/* RPG Game Window & Retro Pixel UI Styling */

/* Classic RPG Window Frame */
.rpg-window {
  background: linear-gradient(180deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  border: 4px solid #ffffff;
  outline: 4px solid #000000;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px #000000, 0 10px 20px rgba(0,0,0,0.6);
  padding: 20px 16px;
  position: relative;
  margin-bottom: 20px;
  color: #ffffff;
}

.rpg-window-light {
  background: #ffffff;
  border: 4px solid #000000;
  border-radius: 8px;
  box-shadow: 0 8px 0 #000000;
  padding: 20px 16px;
  color: #2f3542;
}

/* Header & Banner */
.main-header-card {
  text-align: center;
}

.header-badge {
  display: inline-block;
  background: #e1b12c;
  color: #000000;
  font-family: var(--font-pixel);
  font-weight: 900;
  font-size: 1rem;
  padding: 6px 16px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  margin-bottom: 12px;
}

.main-title {
  font-family: var(--font-pixel);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbc531;
  text-shadow: 3px 3px 0 #000000, -2px -2px 0 #000000, 2px -2px 0 #000000, -2px 2px 0 #000000;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.sub-title {
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  color: #4cd137;
  text-shadow: 1px 1px 0 #000000;
  margin-bottom: 16px;
}

/* Character Creation Box */
.char-make-box {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #ffffff;
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: left;
}

.char-make-title {
  font-family: var(--font-pixel);
  color: #fbc531;
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: center;
}

.char-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.char-name-input {
  flex-grow: 1;
  background: #000000;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
}

.char-job-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.job-btn {
  background: #000000;
  border: 2px solid #555555;
  color: #ffffff;
  padding: 6px 4px;
  border-radius: 4px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.job-btn:hover, .job-btn.selected {
  border-color: #fbc531;
  background: #1e272e;
  color: #fbc531;
}

.job-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 2px;
}

/* Monster Battle Arena Display */
.monster-arena {
  background: #000000;
  border: 3px solid #ffffff;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.monster-sprite-container {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.monster-sprite-container.hit-shake {
  animation: monsterHit 0.3s ease;
}

@keyframes monsterHit {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-15deg); filter: brightness(3); }
  50% { transform: scale(0.9) rotate(15deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.monster-name-tag {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: #e1b12c;
  margin-top: 6px;
  background: rgba(0,0,0,0.7);
  padding: 2px 10px;
  border: 1px solid #e1b12c;
}

.damage-num-pop {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Press Start 2P', var(--font-pixel);
  font-size: 1.5rem;
  color: #ff3838;
  text-shadow: 2px 2px 0 #000000;
  pointer-events: none;
  animation: floatDamage 0.6s ease forwards;
}

@keyframes floatDamage {
  0% { opacity: 1; transform: translate(-50%, -20%) scale(1.4); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

/* RPG Command Option Buttons */
.rpg-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.rpg-option-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: #000000;
  border: 3px solid #ffffff;
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  transition: all 0.15s ease;
  position: relative;
  text-align: left;
}

.rpg-option-btn:hover {
  border-color: #fbc531;
  background: #1e272e;
  transform: translateX(4px);
}

.rpg-option-btn:hover::before {
  content: '▶';
  position: absolute;
  left: 6px;
  color: #fbc531;
  font-size: 0.9rem;
}

.rpg-option-btn.selected {
  border-color: #4cd137;
  background: #002b11;
  color: #4cd137;
}

.option-cmd-tag {
  font-family: var(--font-pixel);
  background: #333333;
  color: #fbc531;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 10px;
  border: 1px solid #555555;
  flex-shrink: 0;
}

.option-text-rpg {
  flex-grow: 1;
}

/* Status Bar Header */
.rpg-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000000;
  border: 2px solid #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
}

.hero-art-box {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 3px solid #fbc531;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  background: #0d0f18;
}

.hero-art-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hp-bar-outer {
  width: 100px;
  height: 10px;
  background: #444444;
  border: 1px solid #ffffff;
  display: inline-block;
  vertical-align: middle;
  margin-ml: 4px;
}

.hp-bar-inner {
  height: 100%;
  background: #4cd137;
  transition: width 0.3s ease;
}

/* Primary Button RPG Style */
.btn-rpg-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(180deg, #4cd137 0%, #44bd32 100%);
  color: #000000;
  font-family: var(--font-pixel);
  font-weight: 900;
  font-size: 1.2rem;
  padding: 14px 20px;
  border: 3px solid #ffffff;
  outline: 3px solid #000000;
  border-radius: 6px;
  box-shadow: 0 6px 0 #000000;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 10px;
}

.btn-rpg-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #44bd32 0%, #4cd137 100%);
  box-shadow: 0 8px 0 #000000;
}

.btn-rpg-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #000000;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 1rem;
  padding: 10px 16px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-rpg-secondary:hover {
  border-color: #fbc531;
  color: #fbc531;
}

/* Result RPG Status Sheet */
.rpg-status-sheet {
  background: #000000;
  border: 4px solid #fbc531;
  outline: 3px solid #000000;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
  color: #ffffff;
  font-family: var(--font-pixel);
}

.status-sheet-title {
  font-size: 1.4rem;
  color: #fbc531;
  text-align: center;
  border-bottom: 2px dashed #fbc531;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #111111;
  padding: 10px;
  border: 1px solid #444444;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.status-item {
  display: flex;
  justify-content: space-between;
}

.status-label {
  color: #aaa;
}

.status-val {
  color: #4cd137;
  font-weight: 900;
}
