/* ===== ROOT VARIABLES ===== */
:root {
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f97316;
}

.theme-dark {
  --bg: #0f0e17;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --surface: #1e1b4b;
  --surface2: #312e81;
  --border: #3730a3;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --pixel-shadow: 2px 2px 0 #000;
}

.theme-light {
  --bg: #f0f4ff;
  --bg2: #e8ecff;
  --bg3: #dde3ff;
  --surface: #c7d2fe;
  --surface2: #a5b4fc;
  --border: #818cf8;
  --text: #1e1b4b;
  --text2: #3730a3;
  --text3: #6366f1;
  --pixel-shadow: 2px 2px 0 #c7d2fe;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; font-weight: 600; }
input { font-family: inherit; font-weight: 500; }

/* ===== APP CONTAINER ===== */
#app { min-height: 100vh; display: flex; flex-direction: column; }
#view-root { flex: 1; display: flex; flex-direction: column; }

/* ===== TITLE FONTS ===== */
.pixel-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--accent), 7px 7px 0 #000;
  color: var(--accent2);
  line-height: 1.15;
}
.pixel-subtitle { font-size: 1rem; color: var(--text2); letter-spacing: 3px; font-weight: 600; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.1s;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.7);
}
.btn:active { transform: translate(2px,2px); box-shadow: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #6d28d9; }
.btn-secondary { background: var(--bg3); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-gold { background: var(--gold); color: #000; border-color: var(--gold); }
.btn-cyan { background: var(--accent2); color: #000; border-color: var(--accent2); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.15rem; letter-spacing: 2px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 #000; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.55);
}
.card-title { font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2); margin-bottom: 0.65rem; }

/* ===== INPUTS ===== */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--accent2); }

/* ===== PIN PAD ===== */
.pin-display {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1rem 0;
}
.pin-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg2);
  transition: background 0.2s;
}
.pin-dot.filled { background: var(--accent2); border-color: var(--accent2); }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 280px;
  margin: 0 auto;
}
.pin-key {
  padding: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  box-shadow: 3px 3px 0 #000;
  transition: all 0.1s;
}
.pin-key:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #000; }
.pin-key.del { background: var(--surface2); color: var(--red); }

/* ===== NAV BAR ===== */
.nav-bar {
  display: flex;
  gap: 0;
  background: var(--bg2);
  border-top: 2px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 100;
  overflow: visible;
  align-items: flex-end;
}
.nav-item {
  flex: 1;
  padding: 0.6rem 0.25rem;
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s, padding 0.2s;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
}
.nav-item.active {
  color: #fff;
  background: var(--accent);
  transform: translateY(-12px);
  box-shadow: 0 -4px 18px rgba(0,0,0,0.35);
  padding: 0.75rem 0.25rem 0.6rem;
}
.nav-item .nav-icon { font-size: 1.4rem; }
.nav-item.active .nav-icon { font-size: 1.65rem; }

/* ===== HEADER ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg2);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar-title { font-family: 'Rajdhani', sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: 2.5px; color: var(--accent2); }
.top-bar-coins { color: var(--gold); font-weight: 700; font-size: 1rem; }
.top-bar-xp { color: var(--green); font-weight: 700; font-size: 1rem; }

/* ===== HP / XP BARS ===== */
.bar-wrap { width: 100%; }
.bar-label { font-size: 0.7rem; color: var(--text2); margin-bottom: 2px; letter-spacing: 1px; }
.bar-track {
  height: 12px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.bar-fill.hp { background: linear-gradient(90deg, #ef4444, #f97316); }
.bar-fill.xp { background: linear-gradient(90deg, #6366f1, #06b6d4); }
.bar-fill.coin { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-fill.boss-hp { background: linear-gradient(90deg, #dc2626, #7f1d1d); }

/* ===== CHARACTER AVATAR ===== */
.avatar-container {
  width: 80px; height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-pixel {
  image-rendering: pixelated;
  width: 64px;
  height: 64px;
}

/* ===== STAT CHIPS ===== */
.stat-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stat-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid;
  letter-spacing: 1px;
}
.stat-chip.atk { background: #7f1d1d; border-color: #ef4444; color: #fca5a5; }
.stat-chip.def { background: #1e3a5f; border-color: #3b82f6; color: #93c5fd; }
.stat-chip.hp { background: #14532d; border-color: #22c55e; color: #86efac; }

/* ===== BADGE ===== */
.badge-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  padding: 0.2rem 0.5rem;
  background: var(--gold);
  color: #000;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid #000;
}

/* ===== CHORE ITEM ===== */
.chore-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  transition: all 0.2s;
}
.chore-item.done { opacity: 0.5; border-color: var(--green); }
.chore-item.pending { border-color: var(--gold); }
.chore-icon { font-size: 1.7rem; flex-shrink: 0; }
.chore-info { flex: 1; }
.chore-name { font-weight: 700; font-size: 1rem; }
.chore-reward { font-size: 0.8rem; color: var(--text2); margin-top: 0.1rem; }
.chore-status { font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; }
.chore-status.pending { color: var(--gold); }
.chore-status.approved { color: var(--green); }
.chore-status.rejected { color: var(--red); }

/* ===== SECTION HEADER ===== */
.section-header {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}

/* ===== SCROLL AREA ===== */
.scroll-area { overflow-y: auto; flex: 1; padding: 1rem; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--bg2);
  border: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 6px 6px 0 #000;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 1.2rem; font-weight: 900; letter-spacing: 2px; color: var(--accent2); margin-bottom: 1rem; }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse at center, var(--bg2) 0%, var(--bg) 100%);
}
.kid-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  margin: 1.5rem 0;
}
.kid-card {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 #000;
}
.kid-card:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 #000; border-color: var(--accent2); }
.kid-card:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 #000; }
.kid-card-name { font-weight: 700; font-size: 1.05rem; margin-top: 0.5rem; }
.kid-card-class { font-size: 0.8rem; color: var(--text2); letter-spacing: 1.5px; margin-top: 0.25rem; }

/* ===== ANIMATIONS ===== */
@keyframes toothBob { 0%,100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-6px) rotate(-2deg); } 70% { transform: translateY(-3px) rotate(2deg); } }
@keyframes toothShake { 0%,100% { transform: translateX(0) rotate(0deg); } 20% { transform: translateX(-5px) rotate(-4deg); } 50% { transform: translateX(5px) rotate(4deg); } 80% { transform: translateX(-3px) rotate(-2deg); } }
@keyframes toothGlowWarn { 0%,100% { filter: drop-shadow(0 0 5px #a855f7) drop-shadow(0 0 2px #a855f7); } 50% { filter: drop-shadow(0 0 18px #a855f7) drop-shadow(0 0 10px #d8b4fe); } }
@keyframes toothGlowRed { 0%,100% { filter: drop-shadow(0 0 5px #ef4444) drop-shadow(0 0 2px #ef4444); } 50% { filter: drop-shadow(0 0 18px #ef4444) drop-shadow(0 0 10px #fca5a5); } }
.tooth-warn { animation: toothBob 2.4s ease-in-out infinite, toothGlowWarn 2.4s ease-in-out infinite; transform-origin: center bottom; display:inline-block; }
.tooth-active { animation: toothShake 0.65s ease-in-out infinite, toothGlowRed 0.65s ease-in-out infinite; transform-origin: center center; display:inline-block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
@keyframes floatUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-40px); } }
@keyframes explode { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.8; } 100% { transform: scale(0); opacity: 0; } }
@keyframes bossIntro { from { opacity: 0; transform: scale(0.5) rotate(-10deg); } to { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes impact-burst { 0% { transform: scale(0.2); opacity: 1; } 60% { transform: scale(1.4); opacity: 0.6; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes impact-slash { 0% { transform: scaleX(0) rotate(-30deg); opacity: 1; } 50% { transform: scaleX(1.2) rotate(-30deg); opacity: 0.9; } 100% { transform: scaleX(1.5) rotate(-30deg); opacity: 0; } }
@keyframes enemy-lunge { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(36px) scale(1.1); } 65% { transform: translateY(36px) scale(1.1); } 100% { transform: translateY(0) scale(1); } }
@keyframes mage-charge { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 14px #a78bfa) brightness(1.3); } }
@keyframes ranger-draw { 0%,100% { transform: none; } 40% { transform: translateX(-7px) rotate(-10deg); } }
@keyframes orb-trail { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(0); opacity: 0; } }
@keyframes glitch {
  0% { text-shadow: 3px 3px 0 var(--accent), 6px 6px 0 #000; }
  20% { text-shadow: -3px 3px 0 #06b6d4, 6px -3px 0 #7c3aed; }
  40% { text-shadow: 3px -3px 0 #f59e0b, -3px 3px 0 #000; }
  60% { text-shadow: -3px -3px 0 #ef4444, 3px 3px 0 var(--accent); }
  80% { text-shadow: 3px 3px 0 var(--accent2), -6px -6px 0 #000; }
  100% { text-shadow: 3px 3px 0 var(--accent), 6px 6px 0 #000; }
}
.animate-fadein { animation: fadeIn 0.3s ease; }
.animate-pulse { animation: pulse 1s infinite; }
.animate-shake { animation: shake 0.4s ease; }
.animate-glitch { animation: glitch 2s infinite; }

/* ===== BATTLE SCREEN ===== */
.battle-screen { background: radial-gradient(ellipse at center, #1a0a2e 0%, #000 100%); }
.battle-hp-section { padding: 0.75rem 1rem; }
.battle-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 1rem;
  gap: 1rem;
}
.battle-controls { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

/* ===== BATTLE SCENE BACKGROUNDS ===== */
/* Sky/ground split per scene */
.poke-field[data-scene="sky"]     { background: linear-gradient(to bottom, #020510 0%, #0b0d2a 36%, #141853 44%, #0c1025 50%, #060810 68%, #030508 100%); }
.poke-field[data-scene="lava"]    { background: linear-gradient(to bottom, #0a0000 0%, #220400 36%, #3f0700 44%, #150200 50%, #090100 68%, #040000 100%); }
.poke-field[data-scene="forest"]  { background: linear-gradient(to bottom, #020a04 0%, #041408 36%, #072c12 44%, #041508 50%, #020c04 68%, #010602 100%); }
.poke-field[data-scene="storm"]   { background: linear-gradient(to bottom, #050508 0%, #0b0b14 36%, #14141e 44%, #0a0a12 50%, #060610 68%, #030308 100%); }
.poke-field[data-scene="crystal"] { background: linear-gradient(to bottom, #03010f 0%, #0c042a 36%, #1a0850 44%, #0e0432 50%, #070220 68%, #030115 100%); }
.poke-field[data-scene="void"]    { background: linear-gradient(to bottom, #000000 0%, #04000e 36%, #0c001e 44%, #08001a 50%, #04000e 68%, #000000 100%); }
/* Horizon glow per scene */
.poke-field[data-scene="sky"]::before     { background: linear-gradient(to right, transparent, rgba(6,182,212,0.3), transparent); }
.poke-field[data-scene="lava"]::before    { background: linear-gradient(to right, transparent, rgba(239,68,68,0.4), transparent); box-shadow: 0 0 40px rgba(239,68,68,0.1); }
.poke-field[data-scene="forest"]::before  { background: linear-gradient(to right, transparent, rgba(16,185,129,0.2), transparent); }
.poke-field[data-scene="storm"]::before   { background: linear-gradient(to right, transparent, rgba(100,116,139,0.15), transparent); }
.poke-field[data-scene="crystal"]::before { background: linear-gradient(to right, transparent, rgba(139,92,246,0.3), transparent); box-shadow: 0 0 40px rgba(139,92,246,0.08); }
.poke-field[data-scene="void"]::before    { background: linear-gradient(to right, transparent, rgba(109,40,217,0.35), transparent); box-shadow: 0 0 60px rgba(109,40,217,0.12); }
/* Suppress default starfield for non-sky scenes */
.poke-field[data-scene="lava"]::after,
.poke-field[data-scene="forest"]::after,
.poke-field[data-scene="storm"]::after,
.poke-field[data-scene="crystal"]::after,
.poke-field[data-scene="void"]::after { background: none; }
/* Hide default platform shadows — replaced by scene terrain patches */
.poke-field[data-scene] .poke-platform { display: none; }
.scene-bg { position:absolute; inset:0; pointer-events:none; z-index:1; overflow:hidden; }
@keyframes lava-plume { 0% { height:0;opacity:.9; } 60% { height:32px;opacity:.7; } 100% { height:0;opacity:0; } }
@keyframes ember-rise { 0% { transform:translateY(0) translateX(0);opacity:.9; } 100% { transform:translateY(-60px) translateX(12px);opacity:0; } }
@keyframes firefly { 0%,100% { opacity:.15;transform:translate(0,0); } 30% { opacity:1;transform:translate(7px,-10px); } 70% { opacity:.6;transform:translate(-5px,-7px); } }
@keyframes crystal-shimmer { 0%,100% { opacity:.2; } 50% { opacity:1; } }
@keyframes void-pulse { 0%,100% { opacity:.3;transform:scale(1); } 50% { opacity:.8;transform:scale(1.08); } }
@keyframes shooting-star { 0% { transform:translateX(0) translateY(0);opacity:.9;width:38px; } 100% { transform:translateX(110px) translateY(48px);opacity:0;width:0; } }
@keyframes lightning-flash { 0%,88%,94%,100% { opacity:0; } 90%,92% { opacity:1; } }
@keyframes rain-drop { 0% { transform:translateY(-30px);opacity:.6; } 100% { transform:translateY(130px);opacity:0; } }

/* ===== POKÉMON-STYLE BATTLE LAYOUT ===== */
.poke-screen { background: none; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

.poke-field {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 280px;
  background:
    linear-gradient(to bottom,
      #0b0d2a 0%,
      #141853 42%,
      #0d2f1a 55%,
      #081a0f 75%,
      #040e08 100%
    );
}
/* Horizon line */
.poke-field::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 55%;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(6,182,212,0.35) 20%, rgba(6,182,212,0.35) 80%, transparent);
}
/* Star particles in sky */
.poke-field::after {
  content: '';
  position: absolute;
  inset: 0 0 45% 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 15%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 8%,  rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 8%  35%, rgba(255,255,255,0.4) 0%, transparent 100%);
}

/* Ground shadow ovals — replaces raised platforms */
.poke-platform {
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.poke-platform.enemy-platform {
  width: 90px; height: 14px;
  background: radial-gradient(ellipse, rgba(6,182,212,0.25) 0%, transparent 70%);
}
.poke-platform.player-platform {
  width: 160px; height: 22px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.3) 0%, transparent 70%);
}

/* Sprite positioning areas */
.poke-enemy-area {
  position: absolute;
  right: 8%;
  bottom: 38%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(1.4);
  transform-origin: bottom center;
}
.poke-player-area {
  position: absolute;
  left: 2%;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Enemy glow — radial halo behind sprite, themed per scene */
.poke-enemy-area::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: enemy-glow-pulse 2.5s ease-in-out infinite;
}
@keyframes enemy-glow-pulse { 0%,100% { opacity:.6; } 50% { opacity:1; } }
.poke-field[data-scene="sky"]     .poke-enemy-area::before { background: radial-gradient(circle, rgba(99,150,255,0.22) 0%, transparent 68%); }
.poke-field[data-scene="lava"]    .poke-enemy-area::before { background: radial-gradient(circle, rgba(249,115,22,0.3)  0%, transparent 68%); }
.poke-field[data-scene="forest"]  .poke-enemy-area::before { background: radial-gradient(circle, rgba(52,211,153,0.22) 0%, transparent 68%); }
.poke-field[data-scene="storm"]   .poke-enemy-area::before { background: radial-gradient(circle, rgba(250,204,21,0.2)  0%, transparent 68%); }
.poke-field[data-scene="crystal"] .poke-enemy-area::before { background: radial-gradient(circle, rgba(167,139,250,0.28) 0%, transparent 68%); }
.poke-field[data-scene="void"]    .poke-enemy-area::before { background: radial-gradient(circle, rgba(139,92,246,0.28)  0%, transparent 68%); }
#boss-sprite { margin-bottom: 0; }
/* Zoom player in close — override the inline size set by kidSpriteBack */
.poke-player-area .sprite {
  width: 160px !important;
  height: 160px !important;
  margin-bottom: -6px;
}

/* Nameplates (HP boxes) */
.poke-nameplate {
  position: absolute;
  background: rgba(10, 15, 35, 0.92);
  border: 2px solid rgba(6,182,212,0.55);
  border-radius: 10px;
  padding: 7px 12px 6px;
  min-width: 170px;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 18px rgba(6,182,212,0.18), 3px 3px 0 rgba(0,0,0,0.6);
  z-index: 10;
}
.poke-nameplate.enemy-nameplate { left: 4%; top: 5%; }
.poke-nameplate.player-nameplate { right: 4%; bottom: 5%; }

.poke-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 800;
  font-size: 0.82rem;
  color: #e2e8f0;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.poke-level { font-size: 0.7rem; color: #94a3b8; font-weight: 600; }

.poke-hpbar-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.poke-hp-tag {
  font-size: 0.6rem;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.poke-hpbar-track {
  flex: 1;
  height: 7px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.poke-hpbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.45s ease, background-color 0.45s ease;
}
.poke-hp-numbers {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Bottom panel */
.poke-bottom {
  display: flex;
  min-height: 120px;
  background: #060d1f;
  border-top: 3px solid rgba(6,182,212,0.4);
  flex-shrink: 0;
}
.poke-dialog {
  flex: 1;
  padding: 0.85rem 1rem;
  border-right: 2px solid rgba(6,182,212,0.25);
  display: flex;
  align-items: center;
  background: rgba(6,182,212,0.03);
}
.poke-dialog-text {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.45;
}
.poke-dialog-text em { color: var(--cyan); font-style: normal; }

.poke-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 8px;
  min-width: 195px;
  align-content: center;
}
.poke-btn {
  border: none;
  border-radius: 7px;
  padding: 0.5rem 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Rajdhani', monospace;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.5);
  transition: transform 0.08s, box-shadow 0.08s;
  text-transform: uppercase;
}
.poke-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.poke-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.poke-btn-fight   { background: linear-gradient(to bottom, #f87171, #dc2626); color: #fff; }
.poke-btn-special { background: linear-gradient(to bottom, #fcd34d, #f59e0b); color: #1a1a2e; }
.poke-btn-special.special-ready { animation: special-pulse 0.9s ease-in-out infinite; }
@keyframes special-pulse {
  0%, 100% { box-shadow: 0 0 8px 2px #fbbf24; }
  50%       { box-shadow: 0 0 20px 8px #f59e0b, 0 0 32px 12px #fbbf2466; }
}
.poke-btn-flee    { background: linear-gradient(to bottom, #6b7280, #4b5563); color: #fff; }
.poke-btn-turn    { background: linear-gradient(to bottom, #34d399, #059669); color: #fff; font-size:0.7rem; }
.poke-btn-bag     { background: linear-gradient(to bottom, #818cf8, #6366f1); color: #fff; }

/* Hit splat overlay */
.hit-splat {
  position: absolute;
  pointer-events: none;
  z-index: 30;
  font-weight: 900;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  animation: hitSplat 0.7s ease-out forwards;
}
@keyframes hitSplat {
  0%   { transform: scale(0.4) rotate(-15deg); opacity: 1; }
  30%  { transform: scale(1.3) rotate(8deg);   opacity: 1; }
  60%  { transform: scale(1.1) rotate(-4deg);  opacity: 0.9; }
  100% { transform: scale(0.8) rotate(0deg) translateY(-28px); opacity: 0; }
}

.damage-float {
  position: absolute;
  font-size: 1.5rem;
  font-weight: 900;
  pointer-events: none;
  animation: floatUp 1s ease forwards;
  text-shadow: 2px 2px 0 #000;
}
.damage-float.player { color: var(--red); }
.damage-float.boss { color: var(--green); }

/* ===== PARTICLES ===== */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: explode 0.6s ease forwards;
}

/* ===== SHOP ===== */
.shop-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
}
.shop-item.owned { border-color: var(--green); }
.shop-item.equipped { border-color: var(--gold); background: rgba(245,158,11,0.1); }
.shop-item-icon { font-size: 1.7rem; flex-shrink: 0; }
.shop-item-info { flex: 1; }
.shop-item-name { font-weight: 700; font-size: 1rem; }
.shop-item-desc { font-size: 0.82rem; color: var(--text2); margin: 0.2rem 0; }
.shop-item-stats { font-size: 0.82rem; color: var(--accent2); font-weight: 600; }
.shop-item-cost { font-size: 1rem; color: var(--gold); font-weight: 700; }

/* ===== LEADERBOARD ===== */
.lb-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.lb-rank { font-size: 1.4rem; font-weight: 900; width: 36px; text-align: center; }
.lb-name { flex: 1; font-weight: 700; font-size: 1rem; }
.lb-value { font-weight: 700; color: var(--gold); font-size: 1rem; }

/* ===== ACTIVITY LOG ===== */
.log-entry {
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.log-icon { flex-shrink: 0; }
.log-text { flex: 1; color: var(--text2); }
.log-time { color: var(--text3); font-size: 0.78rem; flex-shrink: 0; }

/* ===== STREAK ===== */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 20px;
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

/* ===== LEVEL TITLE ===== */
.level-title {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid #000;
}

/* ===== NOTIFICATION DOT ===== */
.notif-dot {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  position: absolute;
  top: 2px; right: 2px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .scroll-area { max-width: 600px; margin: 0 auto; }
  .nav-bar { max-width: 600px; margin: 0 auto; }
}

/* ===== INTRO BOSS SCREEN ===== */
.boss-intro {
  min-height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.boss-intro-art { animation: bossIntro 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.boss-intro-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ef4444;
  text-shadow: 3px 3px 0 #7f1d1d, 6px 6px 0 #000;
  margin: 1rem 0 0.5rem;
  line-height: 1.2;
}
.boss-intro-lore { color: #94a3b8; font-size: 0.95rem; line-height: 1.7; max-width: 320px; }

/* ===== VICTORY SCREEN ===== */
.victory-screen {
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1c1917 0%, #000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.victory-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 4px 4px 0 #92400e, 8px 8px 0 #000;
  animation: pulse 0.5s infinite;
}

/* ===== PARENT DASHBOARD ===== */
.parent-section { margin-bottom: 1.5rem; }
.approval-item {
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.approval-meta { font-size: 0.75rem; color: var(--text2); }
.approval-actions { display: flex; gap: 0.5rem; }

/* ===== MISC ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-cyan { color: var(--accent2); }
.text-muted { color: var(--text2); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
