:root {
  /* Palet Warna Kerajaan Jawa Kuno (Majapahit / Mataram) */
  --bg-dark: #1a0f0a;
  --bg-card: rgba(43, 24, 16, 0.92);
  --bg-panel: rgba(62, 34, 21, 0.94);
  --terracotta: #9a3412;
  --batik-brown: #451a03;
  --electric-blue: #b45309;
  --neon-cyan: #f59e0b;
  --magic-purple: #991b1b;
  --royal-gold: #fbbf24;
  --gold-bright: #fde047;
  --emerald-win: #10b981;
  --crimson-danger: #dc2626;
  --text-light: #fef3c7;
  --text-muted: #fde68a;
  --border-glow: rgba(251, 191, 36, 0.65);
  --font-scale: 1;
}

body.projector-mode {
  --font-scale: 1.22;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Georgia, system-ui, -apple-system, sans-serif;
}

body {
  /* Latar Senja Kerajaan Jawa Kuno & Siluet Candi */
  background: 
    radial-gradient(circle at 50% 18%, rgba(245, 158, 11, 0.28) 0%, rgba(154, 52, 18, 0.35) 35%, rgba(26, 15, 10, 0.98) 80%),
    repeating-linear-gradient(45deg, #1f120b 0px, #1f120b 14px, #29170e 14px, #29170e 28px);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: calc(16px * var(--font-scale));
}

.hidden {
  display: none !important;
}

/* Partikel Kunang-kunang & Percikan Obor Keraton */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(3px 3px at 18% 25%, rgba(253, 224, 71, 0.8), transparent),
    radial-gradient(4px 4px at 78% 18%, rgba(249, 115, 22, 0.75), transparent),
    radial-gradient(2.5px 2.5px at 38% 78%, rgba(251, 191, 36, 0.8), transparent),
    radial-gradient(3.5px 3.5px at 85% 68%, rgba(234, 88, 12, 0.7), transparent),
    radial-gradient(2px 2px at 55% 45%, rgba(254, 240, 138, 0.75), transparent);
  animation: floatBg 14s infinite alternate ease-in-out;
}

@keyframes floatBg {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-22px) scale(1.05); }
}

/* Topbar Ukiran Kayu Jati & Emas */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: linear-gradient(90deg, #27130a, #431f0f, #27130a);
  border-bottom: 3px solid var(--royal-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.game-mini-title {
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px #000;
}

.currency-pill {
  background: rgba(24, 11, 5, 0.85);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  border: 1.5px solid var(--royal-gold);
}

.coin-pill { color: #fde047; }
.gem-pill { color: #38bdf8; }

/* Layar (Screens) */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.screen.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Splash Screen Kerajaan */
#screen-splash {
  min-height: 92vh;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#screen-splash.active {
  display: flex;
}

.logo-badge {
  display: inline-block;
  background: linear-gradient(90deg, #7c2d12, #b45309, #7c2d12);
  border: 2px solid var(--royal-gold);
  color: #fef3c7;
  padding: 7px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 14px;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.main-logo {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fffbeb;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.85), 0 6px 0 #451a03, 0 8px 15px #000;
  letter-spacing: 2px;
}

.main-logo span {
  color: var(--gold-bright);
  text-shadow: 0 0 25px rgba(234, 88, 12, 0.9), 0 5px 0 #7c2d12;
}

.slogan {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 14px 0 24px;
  font-style: italic;
}

.splash-heroes-showcase {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.splash-hero-box {
  width: 140px;
  height: 155px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35), rgba(69, 26, 3, 0.75) 70%);
  border: 3px solid var(--royal-gold);
  border-radius: 24px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65), inset 0 0 15px rgba(251, 191, 36, 0.3);
  animation: heroIdle 2.4s infinite ease-in-out;
}

/* Tombol Ornamen Jawa */
button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  transition: all 0.2s ease;
  font-size: 1rem;
}

button:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #d97706, #991b1b);
  color: #fef3c7;
  padding: 12px 24px;
  border: 2px solid var(--gold-bright);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 3px #000;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.65);
}

.btn-secondary {
  background: linear-gradient(180deg, #451a03, #271004);
  color: #fde68a;
  padding: 10px 18px;
  border: 1.5px solid var(--royal-gold);
}

.btn-secondary:hover {
  background: #7c2d12;
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  color: #fff;
  padding: 10px 18px;
  border: 1.5px solid #fca5a5;
}

.btn-icon {
  background: rgba(45, 21, 11, 0.95);
  color: #fef3c7;
  padding: 8px 14px;
  border: 1.5px solid var(--royal-gold);
}

.btn-large {
  font-size: 1.25rem;
  padding: 16px 36px;
  border-radius: 16px;
}

.btn-full {
  width: 100%;
  margin-top: 12px;
}

/* Dashboard & Kartu Gebyok Ukir Jawa */
.dashboard-grid {
  display: grid;
  grid-template-columns: 365px 1fr;
  gap: 24px;
}

.card {
  background: 
    linear-gradient(180deg, rgba(67, 32, 16, 0.95) 0%, rgba(36, 17, 9, 0.96) 100%);
  border: 3px solid var(--royal-gold);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(154, 52, 18, 0.6);
  position: relative;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-frame {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b 0%, #7c2d12 65%, #271004 100%);
  border: 4px solid var(--gold-bright);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5), inset 0 0 12px #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-svg-container {
  width: 100%;
  height: 100%;
}

.frame-gold { border-color: #fde047; box-shadow: 0 0 22px #facc15; }
.frame-cyan { border-color: #38bdf8; box-shadow: 0 0 22px #06b6d4; }
.frame-fire { border-color: #f97316; box-shadow: 0 0 24px #ef4444; }

.rank-badge {
  display: inline-block;
  background: linear-gradient(90deg, #f59e0b, #fde047, #f59e0b);
  color: #451a03;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 99px;
  margin-bottom: 4px;
  border: 1px solid #fff;
}

.hero-subtitle {
  color: var(--gold-bright);
  font-size: 0.92rem;
  font-weight: 700;
}

.xp-container {
  margin: 18px 0;
}

.xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.progress-bar-bg {
  height: 14px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #fbbf24, #fde047);
  transition: width 0.4s ease;
}

.hero-stats-mini {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-pill {
  flex: 1;
  background: rgba(24, 10, 4, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 8px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.88rem;
}

.learning-summary {
  background: rgba(20, 9, 4, 0.82);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  padding: 14px;
  border-radius: 14px;
}

.learning-summary h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--gold-bright);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.9rem;
}

.cta-battle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #7c2d12 0%, #991b1b 50%, #451a03 100%);
  border: 3px solid var(--gold-bright);
  margin-bottom: 20px;
  gap: 16px;
}

.section-heading {
  margin: 16px 0 12px;
  color: var(--gold-bright);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px #000;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
}

.mode-card {
  background: linear-gradient(180deg, rgba(75, 36, 17, 0.95), rgba(40, 18, 9, 0.95));
  color: var(--text-light);
  padding: 16px;
  border-radius: 16px;
  text-align: left;
  border: 2px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.45);
}

.mode-card:hover {
  border-color: var(--gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.mode-classroom {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(69, 26, 3, 0.95));
}

.mode-icon {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 8px;
}

.mode-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

.nav-menus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.nav-btn {
  background: linear-gradient(180deg, #3b1a0b, #230f06);
  color: #fef3c7;
  padding: 14px;
  border: 1.5px solid var(--border-glow);
}

.nav-btn:hover {
  background: linear-gradient(180deg, #9a3412, #451a03);
  border-color: var(--gold-bright);
}

.badge {
  background: var(--crimson-danger);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.75rem;
}

/* ============================================================================
   BATTLE ARENA — PENDOPO & PELATARAN CANDI BENTAR JAWA KUNO
   ============================================================================ */
.arena-top-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 12px 20px;
  border-radius: 16px;
  border: 2px solid var(--royal-gold);
  margin-bottom: 14px;
}

.hud-info-pill {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge-mode {
  background: linear-gradient(90deg, #991b1b, #b45309);
  border: 1px solid var(--gold-bright);
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 900;
}

.turn-pill {
  background: var(--royal-gold);
  color: #451a03;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 900;
}

.timer-box {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-bright);
  background: rgba(24, 10, 4, 0.85);
  padding: 6px 18px;
  border-radius: 99px;
  border: 2px solid var(--gold-bright);
}

/* Panggung Pertarungan dengan Siluet Candi Bentar & Langit Senja Majapahit */
.battle-stage {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  background: 
    /* Siluet Gapura Candi Bentar Kiri & Kanan menggunakan Gradien */
    linear-gradient(to top, #271209 0%, #3e1d0f 16%, transparent 16%),
    radial-gradient(circle at 50% 35%, rgba(251, 191, 36, 0.45) 0%, rgba(234, 88, 12, 0.45) 38%, rgba(69, 26, 3, 0.95) 78%, #1c0d06 100%);
  border: 4px solid var(--royal-gold);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  min-height: 270px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 25px rgba(0,0,0,0.65);
}

/* Ornamen Pilar Pendopo & Gapura Candi di Latar Arena */
.battle-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 300' preserveAspectRatio='none'%3E%3C!-- Gunung & Siluet Candi Bentar Jawa --%3E%3Cpolygon points='120,260 260,110 400,260' fill='%23451a03'/%3E%3Cpolygon points='420,260 560,95 700,260' fill='%23451a03'/%3E%3C!-- Candi Bentar Kiri --%3E%3Cpolygon points='280,260 280,90 300,90 300,115 320,115 320,145 340,145 340,180 355,180 355,260' fill='%237c2d12'/%3E%3C!-- Candi Bentar Kanan --%3E%3Cpolygon points='520,260 520,90 500,90 500,115 480,115 480,145 460,145 460,180 445,180 445,260' fill='%237c2d12'/%3E%3C!-- Pilar Pendopo Ukir Kiri & Kanan --%3E%3Crect x='15' y='0' width='28' height='300' fill='%2378350f'/%3E%3Crect x='757' y='0' width='28' height='300' fill='%2378350f'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center bottom;
}

.fighter-side {
  position: relative;
  z-index: 2;
}

.fighter-hud {
  background: rgba(28, 13, 6, 0.9);
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--royal-gold);
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.fighter-name-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--gold-bright);
}

.hp-bar-outer {
  height: 22px;
  background: #1c0a04;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--royal-gold);
}

.hp-bar-inner {
  height: 100%;
  transition: width 0.35s ease;
}

.hp-player { background: linear-gradient(90deg, #059669, #10b981, #34d399); }
.hp-enemy { background: linear-gradient(90deg, #991b1b, #ef4444, #f97316); }

.hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}

.energy-Combo-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.88rem;
}

.combo-badge {
  background: linear-gradient(90deg, #f97316, #fde047);
  color: #451a03;
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 900;
}

.fighter-sprite-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 165px;
}

.fighter-svg {
  width: 155px;
  height: 165px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.75));
  animation: heroIdle 2.4s infinite ease-in-out;
}

@keyframes heroIdle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

.anim-attack-right {
  animation: attackRight 0.55s ease !important;
}
@keyframes attackRight {
  0% { transform: translateX(0) scale(1); }
  45% { transform: translateX(95px) scale(1.22); }
  100% { transform: translateX(0) scale(1); }
}

.anim-attack-left {
  animation: attackLeft 0.55s ease !important;
}
@keyframes attackLeft {
  0% { transform: translateX(0) scale(1); }
  45% { transform: translateX(-95px) scale(1.22); }
  100% { transform: translateX(0) scale(1); }
}

.anim-hit {
  animation: hitShake 0.45s ease !important;
}
@keyframes hitShake {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  25% { transform: translateX(-12px); filter: brightness(2) drop-shadow(0 0 14px red); }
  75% { transform: translateX(12px); }
}

.dmg-float {
  position: absolute;
  top: -8px;
  font-size: 1.85rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 3px 8px #000;
  animation: floatUp 0.9s ease forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.8); }
  100% { opacity: 0; transform: translateY(-45px) scale(1.25); }
}

.stage-center-fx {
  text-align: center;
  position: relative;
  z-index: 2;
}

.vs-banner {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 0 15px #ea580c, 0 3px 6px #000;
}

.fx-projectile {
  font-size: 3.2rem;
  animation: pulseMagic 0.5s infinite alternate;
}

@keyframes pulseMagic {
  from { transform: scale(0.9); }
  to { transform: scale(1.35); }
}

/* Bar Skill Jurus Ksatria */
.skills-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.skill-btn {
  flex: 1;
  min-width: 190px;
  background: linear-gradient(180deg, #3b190b, #1f0d05);
  color: var(--text-light);
  padding: 10px 14px;
  border: 2px solid rgba(251, 191, 36, 0.35);
  font-size: 0.9rem;
}

.skill-btn.active {
  border-color: var(--gold-bright);
  background: linear-gradient(135deg, #9a3412, #b45309);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.6);
}

.skill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Panel Soal Lontar / Prasasti Keraton */
.question-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.q-tag {
  background: rgba(180, 83, 9, 0.35);
  border: 1px solid var(--royal-gold);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 800;
}

.diff-mudah { color: #4ade80; }
.diff-sedang { color: #fde047; }
.diff-sulit { color: #fca5a5; }

.question-text {
  font-size: calc(1.25rem * var(--font-scale));
  line-height: 1.55;
  font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(90deg, rgba(28, 12, 5, 0.9), rgba(52, 23, 10, 0.85));
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-left: 6px solid var(--gold-bright);
}

.hint-box {
  background: rgba(180, 83, 9, 0.28);
  border: 1.5px dashed var(--gold-bright);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  color: #fef3c7;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #3a1a0d, #240f07);
  color: #fef3c7;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid rgba(251, 191, 36, 0.35);
  text-align: left;
  font-size: calc(1.05rem * var(--font-scale));
}

.option-btn:hover:not(:disabled) {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #7c2d12, #451a03);
}

.option-btn.correct {
  background: rgba(16, 185, 129, 0.38) !important;
  border-color: #10b981 !important;
}

.option-btn.wrong {
  background: rgba(220, 38, 38, 0.4) !important;
  border-color: #ef4444 !important;
}

.opt-letter {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d97706, #7c2d12);
  border: 1px solid var(--gold-bright);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

/* Panel Feedback Pembahasan */
.feedback-panel {
  margin-top: 14px;
  border: 3px solid var(--gold-bright);
}

.feedback-header {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.feedback-explanation {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 14px;
  color: #fef3c7;
}

/* Grid Hero (Medali Lingkaran Emas Keraton Seperti Gambar Contoh) */
.heroes-grid, .shop-grid, .achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.item-card {
  background: var(--bg-card);
  border: 2.5px solid var(--royal-gold);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.item-card .hero-svg-container {
  width: 135px;
  height: 135px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.45) 0%, rgba(124, 45, 18, 0.9) 75%);
  border: 4px solid var(--gold-bright);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 0 10px #000;
  padding: 4px;
  overflow: hidden;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: linear-gradient(180deg, #3b190b, #1c0b04);
  border: 3px solid var(--gold-bright);
  border-radius: 22px;
  max-width: 560px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 15px 40px #000;
}

.modal-header, .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  margin: 18px 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--gold-bright);
}

.form-control {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--royal-gold);
  background: #170a04;
  color: #fef3c7;
  font-size: 1rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.res-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

.res-box strong {
  display: block;
  font-size: 1.4rem;
  color: var(--gold-bright);
  margin-top: 4px;
}

/* Tabel Leaderboard */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th, .leaderboard-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.notice-box {
  background: rgba(180, 83, 9, 0.25);
  border: 1.5px solid var(--gold-bright);
  padding: 12px;
  border-radius: 12px;
  margin: 10px 0 16px;
  font-size: 0.92rem;
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid var(--border-glow);
  gap: 14px;
  flex-wrap: wrap;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #b45309, #7c2d12);
  border: 2px solid var(--gold-bright);
  color: #fef3c7;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 800;
  z-index: 200;
  box-shadow: 0 8px 25px rgba(0,0,0,0.75);
}

/* Responsif Layar Kecil & Tablet */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .battle-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .cta-battle-card {
    flex-direction: column;
    text-align: center;
  }
}