* {
  box-sizing: border-box;
}

/* ─── Theme Variables ─── */
:root {
  --bg-primary: radial-gradient(circle at 15% 10%, #dff3ff 0%, #cfeaff 25%, #d8d8ff 60%, #f6f7ff 100%);
  --bg-secondary: #ffffff;
  --text-primary: #1f2a44;
  --text-secondary: #496483;
  --hero-gradient: linear-gradient(135deg, rgba(57, 172, 255, 0.92), rgba(134, 121, 255, 0.9));
  --panel-bg: rgba(255, 255, 255, 0.75);
  --panel-border: rgba(255, 255, 255, 0.7);
  --panel-shadow: 0 14px 28px rgba(56, 88, 179, 0.14);
  --accent-blue: #57b4ff;
  --accent-gold: #ffc107;
}

html[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --bg-secondary: #1e1e2e;
  --text-primary: #e0e0ff;
  --text-secondary: #a0a0b0;
  --hero-gradient: linear-gradient(135deg, rgba(25, 70, 120, 0.95), rgba(40, 50, 90, 0.95));
  --panel-bg: rgba(30, 30, 46, 0.85);
  --panel-border: rgba(100, 150, 200, 0.2);
  --panel-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
  --accent-blue: #64b8ff;
  --accent-gold: #ffa500;
}

html[data-theme="ocean"] {
  --bg-primary: linear-gradient(135deg, #001a4d 0%, #003d99 50%, #0055cc 100%);
  --bg-secondary: #e6f2ff;
  --text-primary: #002d80;
  --text-secondary: #1a5f99;
  --hero-gradient: linear-gradient(135deg, rgba(0, 100, 200, 0.95), rgba(0, 150, 255, 0.95));
  --panel-bg: rgba(200, 230, 255, 0.9);
  --panel-border: rgba(0, 100, 200, 0.4);
  --panel-shadow: 0 14px 28px rgba(0, 100, 200, 0.2);
  --accent-blue: #0099ff;
  --accent-gold: #ff9900;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Tahoma", "Arial", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

.main-wrapper {
  display: flex;
  flex: 1;
  position: relative;
  z-index: 1;
}

.site-flights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  perspective: 1400px;
  perspective-origin: 50% 40%;
}

.fly {
  position: absolute;
  opacity: 0.8;
  user-select: none;
  transform-style: preserve-3d;
  will-change: transform, filter;
  backface-visibility: visible;
}

.butterfly {
  font-size: 2rem;
  animation: wingBeat 0.9s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 14px rgba(160, 80, 220, 0.45)) drop-shadow(0 0 22px rgba(200, 130, 255, 0.28));
}

.bee {
  font-size: 1.5rem;
  animation: wingBeat 0.25s ease-in-out infinite alternate;
  filter: drop-shadow(0 3px 10px rgba(200, 150, 0, 0.4)) drop-shadow(0 0 16px rgba(255, 200, 0, 0.25));
}

.bird {
  font-size: 1.8rem;
  filter: drop-shadow(0 5px 14px rgba(80, 120, 200, 0.35)) drop-shadow(0 0 10px rgba(120, 160, 240, 0.2));
}

.balloon {
  font-size: 1.8rem;
  filter: drop-shadow(0 8px 20px rgba(255, 80, 80, 0.45)) drop-shadow(0 0 16px rgba(255, 120, 100, 0.3));
}

.leaf,
.spark {
  font-size: 1.4rem;
}

.leaf {
  filter: drop-shadow(0 4px 12px rgba(60, 140, 60, 0.4)) drop-shadow(0 0 16px rgba(80, 180, 80, 0.25));
}

.spark {
  filter: drop-shadow(0 0 12px rgba(255, 220, 80, 0.8)) drop-shadow(0 0 28px rgba(255, 255, 150, 0.5));
}

.b1 {
  top: 14%;
  left: -10%;
  animation: wingBeat 0.9s ease-in-out infinite alternate, flyWaveA 18s linear infinite;
}

.b2 {
  top: 32%;
  left: -14%;
  animation: wingBeat 0.85s ease-in-out infinite alternate, flyWaveB 22s linear infinite;
  animation-delay: 0.4s, 1.4s;
}

.b3 {
  top: 54%;
  left: -18%;
  animation: wingBeat 1s ease-in-out infinite alternate, flyWaveC 20s linear infinite;
  animation-delay: 0.2s, 2.2s;
}

.be1 {
  top: 72%;
  left: -20%;
  animation: wingBeat 0.24s ease-in-out infinite alternate, flyWaveB 16s linear infinite;
  animation-delay: 0.1s, 1.8s;
}

.be2 {
  top: 20%;
  left: -24%;
  animation: wingBeat 0.28s ease-in-out infinite alternate, flyWaveC 19s linear infinite;
  animation-delay: 0.3s, 2.9s;
}

.br1 {
  top: 42%;
  left: -18%;
  animation: flyWaveA 26s linear infinite;
}

.br2 {
  top: 62%;
  left: -22%;
  animation: flyWaveC 30s linear infinite;
  animation-delay: 4s;
}

.bl1 {
  top: 88%;
  left: 18%;
  animation: riseBalloon 21s ease-in-out infinite;
}

.lf1 {
  top: 8%;
  left: 95%;
  animation: driftLeaf 14s ease-in-out infinite;
}

.sp1 {
  top: 50%;
  left: 70%;
  animation: sparkleFloat 4s ease-in-out infinite;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--hero-gradient);
  color: #ffffff;
  padding: 2.3rem 1rem;
  border-bottom: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 14px 30px rgba(60, 95, 200, 0.25);
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  text-shadow: 0 2px 8px rgba(28, 44, 115, 0.32);
}

.hero p {
  margin: 0;
  opacity: 0.95;
}

.theme-switcher {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.theme-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 1.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.theme-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.container {
  width: min(1000px, 92%);
  margin: 1.2rem auto 2rem;
  display: grid;
  gap: 1rem;
  flex: 1;
  position: relative;
  z-index: 1;
  padding-right: 0;
}

/* ────── Sidebar Navigation ────── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0.8rem;
  background: linear-gradient(180deg, rgba(100, 150, 255, 0.15), rgba(100, 180, 255, 0.1));
  border-right: 2px solid var(--accent-blue);
  min-width: 110px;
  align-items: stretch;
  backdrop-filter: blur(6px);
  transition: background 0.4s ease;
}

html[data-theme="dark"] .sidebar-nav {
  background: linear-gradient(180deg, rgba(50, 100, 150, 0.3), rgba(40, 80, 120, 0.2));
  border-right-color: rgba(100, 150, 255, 0.3);
}

.nav-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.6rem;
  background: var(--panel-bg);
  border: 2px solid var(--accent-blue);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 600;
}

.nav-section:hover {
  background: rgba(100, 150, 255, 0.2);
  border-color: var(--accent-blue);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(100, 150, 255, 0.3);
}

.nav-section.active {
  background: linear-gradient(135deg, var(--accent-blue), #29a3ff);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(100, 150, 255, 0.4);
}

html[data-theme="dark"] .nav-section.active {
  background: linear-gradient(135deg, #4db8ff, #64c8ff);
  box-shadow: 0 6px 18px rgba(100, 150, 255, 0.5);
}

.nav-icon {
  font-size: 1.8rem;
  display: block;
}

.nav-label {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 1.5rem 1rem;
  }

  .hero-content {
    min-width: 100%;
  }

  .theme-switcher {
    width: 100%;
    justify-content: center;
  }

  .sidebar-nav {
    flex-direction: row;
    min-width: 100%;
    padding: 0.8rem;
    border-right: none;
    border-bottom: 2px solid rgba(100, 180, 255, 0.3);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(230, 245, 255, 0.6));
  }

  .nav-section {
    flex: 1;
    flex-direction: row;
    gap: 0.8rem;
    padding: 0.7rem;
  }

  .nav-icon {
    font-size: 1.3rem;
  }

  .nav-label {
    font-size: 0.85rem;
  }

  .main-wrapper {
    flex-direction: column;
  }
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.1rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--panel-shadow);
  color: var(--text-primary);
  transition: background 0.4s ease, color 0.4s ease;
}

.panel h2,
.panel h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.choice-btn {
  border: 1px solid #b5dcff;
  background: linear-gradient(180deg, #f8fcff, #eaf6ff);
  color: #0a4f82;
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.choice-btn:hover,
.choice-btn.active {
  background: linear-gradient(135deg, #d7eeff, #c8e4ff);
  border-color: #57b4ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(50, 138, 224, 0.25);
}

.lesson-text {
  line-height: 1.9;
  background: #fafcff;
  border: 1px dashed #addbff;
  border-radius: 10px;
  padding: 0.9rem;
  min-height: 8rem;
  font-size: 1.12rem;
  letter-spacing: 0.15px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.lesson-text.cinema-text {
  background: linear-gradient(180deg, #14273d, #223a56 45%, #1a2f47);
  border: 2px solid #6fc3ff;
  box-shadow:
    inset 0 0 28px rgba(128, 199, 255, 0.22),
    0 10px 24px rgba(16, 35, 58, 0.35);
  color: #eaf5ff;
  line-height: 2.2;
  font-size: 1.2rem;
}

.anime-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px) scale(0.93);
  filter: blur(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    color 0.25s ease,
    text-shadow 0.25s ease,
    filter 0.3s ease,
    background-size 0.3s ease;
  color: #b4d0e8;
  margin-left: 0.12rem;
}

.anime-word.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  color: #eaf5ff;
  animation: wordReveal 0.42s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.anime-word.active {
  color: transparent;
  background-image: linear-gradient(90deg, #ffffff 0%, #b9e9ff 35%, #ffe082 55%, #ffd1f5 75%, #ffffff 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 12px rgba(130, 220, 255, 0.8),
    0 0 24px rgba(252, 221, 113, 0.45);
  filter: saturate(1.3) brightness(1.1);
  animation: karaokeSweep 0.85s ease-in-out infinite alternate;
}

.lesson-text.typing::after {
  content: " ▌";
  color: #8ee0ff;
  margin-right: 0.15rem;
  animation: cursorBlink 0.8s steps(1) infinite;
}

@keyframes wordReveal {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.92) rotate(-1deg);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.03) rotate(0.4deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes karaokeSweep {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

.lesson-text.typing {
  border-color: #74c4ff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0.8rem 0 1rem;
}

.btn {
  border: 0;
  background: linear-gradient(135deg, #29b6f6, #2f81f7);
  color: #fff;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(47, 129, 247, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn.secondary {
  background: linear-gradient(135deg, #7187a8, #586b87);
}

.btn.ghost {
  background: linear-gradient(135deg, #ffb84d, #ff9f43);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.animation-box {
  background: #eef6ff;
  border: 2px solid #bee4ff;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.animation-box.film-reveal {
  animation: filmRevealIn 0.6s cubic-bezier(0.2, 1.2, 0.35, 1) both;
}

.scene {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: visible;
  background: linear-gradient(180deg, #aee1ff 0%, #e7f7ff 65%, #d7f2c7 65%, #d7f2c7 100%);
  border-radius: 0;
  border: none;
  border-top: 1px solid #bee4ff;
  border-bottom: 1px solid #bee4ff;
}

.scene[data-theme="hygiene"] {
  background: linear-gradient(180deg, #aee1ff 0%, #e7f7ff 62%, #cbf2df 62%, #cbf2df 100%);
}

.scene[data-theme="school"] {
  background: linear-gradient(180deg, #b7e4ff 0%, #ecf7ff 62%, #ffe9b8 62%, #ffe9b8 100%);
}

.scene[data-theme="kindness"] {
  background: linear-gradient(180deg, #cce6ff 0%, #f1f8ff 62%, #ffd9ef 62%, #ffd9ef 100%);
}

.sun,
.cloud,
.kid,
.book,
.story-action,
.story-caption {
  position: absolute;
  user-select: none;
}

.story-caption {
  top: 12px;
  right: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfe4ff;
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  font-size: 0.95rem;
  color: #084b7c;
  text-align: center;
}

.cinema-subtitle {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  background: rgba(10, 18, 33, 0.72);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.cinema-subtitle.flash {
  animation: subtitlePop 0.4s ease;
}

.story-action {
  bottom: 80px;
  right: 48%;
  font-size: 2.1rem;
  animation: pulseBook 1.1s ease-in-out infinite;
}

.sun {
  top: 10px;
  right: 12px;
  font-size: 2.2rem;
  animation: floatSun 3s ease-in-out infinite;
}

.cloud {
  font-size: 2rem;
  opacity: 0.9;
}

.cloud-1 {
  top: 22px;
  left: -40px;
  animation: moveCloud 10s linear infinite;
}

.cloud-2 {
  top: 60px;
  left: -120px;
  animation: moveCloud 14s linear infinite;
}

.kid {
  bottom: 18px;
  right: 28%;
  font-size: 3rem;
  animation: bounceKid 1.2s ease-in-out infinite;
}

.book {
  bottom: 25px;
  right: calc(28% - 56px);
  font-size: 1.9rem;
  animation: pulseBook 1.5s ease-in-out infinite;
}

.question {
  background: #f8fcff;
  border: 1px solid #d7edff;
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 0.7rem;
}

.question legend {
  font-weight: bold;
  margin-bottom: 0.4rem;
}

/* ── Quiz panel ─────────────────────────── */
.quiz-panel {
  background: linear-gradient(135deg, rgba(255, 252, 220, 0.95) 0%, rgba(255, 238, 180, 0.9) 100%);
  border: 3px solid #ffc107;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.quiz-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: #8a4800;
  text-shadow: 0 2px 6px rgba(180, 83, 9, 0.18);
}

.quiz-trophy {
  font-size: 2.1rem;
}

.quiz-badge {
  background: linear-gradient(135deg, #fff3cd, #ffe08a);
  border: 2px solid #ffc107;
  color: #7c4f00;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 30px;
  padding: 0.3rem 1.1rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.quiz-card {
  background: linear-gradient(160deg, #fffef2, #fff8e0);
  border: 3px solid #ffd700;
  border-radius: 24px;
  padding: 1.6rem 1.4rem 1.3rem;
  box-shadow:
    0 8px 24px rgba(255, 193, 7, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.07);
  text-align: center;
}

.quiz-question-text {
  font-size: 1.35rem;
  font-weight: bold;
  color: #3b2000;
  line-height: 1.9;
  margin: 0 0 1.3rem;
}

.options {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.option-btn {
  border: none;
  border-radius: 18px;
  padding: 1rem 2.2rem;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  min-width: 130px;
  font-family: inherit;
}

.option-btn:hover {
  transform: translateY(-4px);
  filter: brightness(1.08);
}

.option-btn.true-btn {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
}

.option-btn.false-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

.quiz-status {
  color: #8a4800;
  font-weight: bold;
  margin-top: 0;
  text-align: center;
  font-size: 1.05rem;
}

.result {
  font-size: 1.4rem;
  font-weight: bold;
  min-height: 1.8rem;
  text-align: center;
  margin-top: 0.7rem;
}

@keyframes moveCloud {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(100vw + 200px));
  }
}

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

@keyframes floatSun {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes pulseBook {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.footer {
  text-align: center;
  color: var(--text-secondary);
  margin: auto 0 1.2rem;
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}

/* ──────────────────────────────────────────── */
/* ── INTRO PANEL & ABOUT SECTION ────────────── */
/* ──────────────────────────────────────────── */

.intro-mascot {
  position: relative;
  height: 100px;
  margin: 1rem auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-character {
  width: 96px;
  height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, #1d9bf0, #00c2a8);
  border: 4px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(20, 90, 170, 0.3);
  animation: mascotWave 1s ease-in-out infinite;
}

@keyframes mascotWave {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(-10deg) scale(1.1);
  }
}

.mascot-speech {
  position: absolute;
  background: rgba(255, 200, 50, 0.9);
  color: #333;
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
  top: -20px;
  right: -80px;
  white-space: nowrap;
  animation: speechBubble 1.5s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(255, 200, 50, 0.4);
}

@keyframes speechBubble {
  0%, 100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(10px) scale(1.05);
    opacity: 0.8;
  }
}

.intro-panel {
  animation: fadeIn 0.6s ease;
}

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

.intro-content {
  text-align: center;
}

.intro-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.card-delay-1 {
  animation: slideInCard 0.6s ease 0.1s both;
}

.card-delay-2 {
  animation: slideInCard 0.6s ease 0.2s both;
}

.card-delay-3 {
  animation: slideInCard 0.6s ease 0.3s both;
}

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

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.intro-card {
  background: rgba(100, 150, 255, 0.1);
  border: 2px solid var(--accent-blue);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.intro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(100, 150, 255, 0.3);
  background: rgba(100, 150, 255, 0.15);
}

.intro-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.intro-card h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: 0.8rem 0;
}

.intro-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.intro-features {
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.05), rgba(150, 200, 255, 0.05));
  border: 2px solid var(--accent-blue);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.intro-features h3 {
  color: var(--text-primary);
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.feature {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(236, 247, 255, 0.86));
  border: 1px solid rgba(87, 180, 255, 0.45);
  border-radius: 16px;
  padding: 1rem 1rem 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
  text-align: start;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 10px 24px rgba(60, 120, 190, 0.16);
}

.feature:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(60, 120, 190, 0.22);
}

.feature-head {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 20px rgba(40, 120, 210, 0.24);
}

.feature-title {
  margin: 0;
  font-size: 1.02rem;
  color: #15426e;
  line-height: 1.45;
}

.feature-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #355c7f;
  flex: 1;
}

.feature-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0e4d78;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(87, 180, 255, 0.5);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.feature:nth-child(1) .feature-head {
  background: linear-gradient(135deg, #d5f0ff, #a8dcff);
}

.feature:nth-child(2) .feature-head {
  background: linear-gradient(135deg, #ffe0f0, #ffc8e7);
}

.feature:nth-child(3) .feature-head {
  background: linear-gradient(135deg, #e0fce8, #b8f5cb);
}

.feature:nth-child(4) .feature-head {
  background: linear-gradient(135deg, #fff4d8, #ffe4a8);
}

.feature:nth-child(5) .feature-head {
  background: linear-gradient(135deg, #f1e4ff, #dfc9ff);
}

.feature:nth-child(6) .feature-head {
  background: linear-gradient(135deg, #dff7ff, #c5edff);
}

.intro-kids {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.1), rgba(100, 200, 255, 0.1));
  border-radius: 16px;
  border: 2px dashed var(--accent-blue);
}

.intro-subtitle {
  font-size: 2rem;
  margin: 0.5rem 0;
  letter-spacing: 0.5rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 1rem 0;
  font-weight: 500;
}

.intro-btn {
  background: linear-gradient(135deg, var(--accent-blue), #29a3ff);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  box-shadow: 0 6px 20px rgba(100, 150, 255, 0.3);
}

.intro-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(100, 150, 255, 0.5);
}

.intro-btn:active {
  transform: translateY(-1px);
}

.intro-card {
  background: rgba(100, 150, 255, 0.1);
  border: 2px solid var(--accent-blue);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.intro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(100, 150, 255, 0.3);
  background: rgba(100, 150, 255, 0.15);
}

.intro-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.intro-card h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: 0.8rem 0;
}

.intro-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.intro-features {
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.05), rgba(150, 200, 255, 0.05));
  border: 2px solid var(--accent-blue);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.intro-features h3 {
  color: var(--text-primary);
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.1), rgba(150, 200, 255, 0.15));
  border: 2px solid var(--accent-blue);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(100, 150, 255, 0.3);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-blue);
  animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 500;
}

.intro-features h3 {
  color: var(--text-primary);
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--panel-bg);
  border: 1px solid var(--accent-blue);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}

.feature:hover {
  background: rgba(100, 150, 255, 0.15);
  transform: scale(1.05);
}
.feature-animate {
  animation: featureSlide 0.6s ease forwards;
  opacity: 1;
}

.feature-animate:nth-child(1) { animation-delay: 0.1s; }
.feature-animate:nth-child(2) { animation-delay: 0.2s; }
.feature-animate:nth-child(3) { animation-delay: 0.3s; }
.feature-animate:nth-child(4) { animation-delay: 0.4s; }
.feature-animate:nth-child(5) { animation-delay: 0.5s; }
.feature-animate:nth-child(6) { animation-delay: 0.6s; }

@keyframes featureSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.kids-showcase {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(90deg, rgba(100, 200, 255, 0.1), rgba(255, 150, 100, 0.1));
  border-radius: 16px;
  flex-wrap: wrap;
}

.kids-item {
  font-size: 2.5rem;
  animation: kidsFloat 3s ease-in-out infinite;
}

.kids-photo-card {
  width: min(230px, 100%);
  margin: 0;
  padding: 0.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(87, 180, 255, 0.45);
  box-shadow: 0 10px 24px rgba(40, 100, 180, 0.22);
  overflow: hidden;
  text-align: center;
}

.kids-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.kids-caption {
  margin: 0.55rem 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kids-item:nth-child(1) { animation-delay: 0s; }
.kids-item:nth-child(2) { animation-delay: 0.2s; }
.kids-item:nth-child(3) { animation-delay: 0.4s; }
.kids-item:nth-child(4) { animation-delay: 0.6s; }
.kids-item:nth-child(5) { animation-delay: 0.8s; }

@media (max-width: 768px) {
  .kids-photo-card {
    width: min(300px, 100%);
  }

  .kids-photo {
    height: 175px;
  }
}

@keyframes kidsFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.1);
  }
}

.feature:hover {
  background: rgba(100, 150, 255, 0.15);
  transform: scale(1.05);
}

.intro-kids {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.1), rgba(100, 200, 255, 0.1));
  border-radius: 16px;
  border: 2px dashed var(--accent-blue);
}

.intro-kids {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.1), rgba(100, 200, 255, 0.1));
  border-radius: 16px;
  border: 2px dashed var(--accent-blue);
}

.intro-subtitle {
  font-size: 2rem;
  margin: 0.5rem 0;
  letter-spacing: 0.5rem;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 1rem 0;
  font-weight: 500;
}

.intro-btn {
  background: linear-gradient(135deg, var(--accent-blue), #29a3ff);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  box-shadow: 0 6px 20px rgba(100, 150, 255, 0.3);
}

.intro-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(100, 150, 255, 0.5);
}

.intro-btn:active {
  transform: translateY(-1px);
}

@keyframes wingBeat {
  from {
    transform: scale(1) rotate(-8deg) rotateY(-18deg);
  }
  to {
    transform: scale(1.08) rotate(8deg) rotateY(18deg);
  }
}

@keyframes flyWaveA {
  0% {
    transform: translate(-10vw, 0) translateZ(-80px) rotateZ(5deg) scale(0.82);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
    opacity: 0.65;
  }
  20% {
    transform: translate(14vw, -32px) translateZ(60px) rotateZ(-4deg) rotateY(-12deg) scale(1.1);
    opacity: 0.9;
  }
  40% {
    transform: translate(38vw, -18px) translateZ(140px) rotateZ(7deg) rotateY(14deg) scale(1.22);
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.28));
    opacity: 1;
  }
  60% {
    transform: translate(62vw, 22px) translateZ(80px) rotateZ(-5deg) rotateY(-10deg) scale(1.1);
    opacity: 0.95;
  }
  80% {
    transform: translate(90vw, -16px) translateZ(-40px) rotateZ(6deg) scale(0.9);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
    opacity: 0.78;
  }
  100% {
    transform: translate(120vw, 0) translateZ(-80px) rotateZ(0deg) scale(0.82);
    opacity: 0.65;
  }
}

@keyframes flyWaveB {
  0% {
    transform: translate(-15vw, 0) translateZ(-60px) rotateZ(-5deg) scale(0.78);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
    opacity: 0.6;
  }
  18% {
    transform: translate(8vw, 28px) translateZ(50px) rotateZ(4deg) rotateY(10deg) scale(1.08);
    opacity: 0.88;
  }
  42% {
    transform: translate(38vw, -14px) translateZ(130px) rotateZ(-6deg) rotateY(-14deg) scale(1.2);
    filter: drop-shadow(0 10px 26px rgba(0,0,0,0.26));
    opacity: 1;
  }
  65% {
    transform: translate(66vw, 24px) translateZ(60px) rotateZ(5deg) rotateY(8deg) scale(1.07);
    opacity: 0.92;
  }
  85% {
    transform: translate(96vw, -10px) translateZ(-50px) rotateZ(-4deg) scale(0.86);
    opacity: 0.72;
  }
  100% {
    transform: translate(118vw, -6px) translateZ(-60px) rotateZ(-5deg) scale(0.78);
    opacity: 0.6;
  }
}

@keyframes flyWaveC {
  0% {
    transform: translate(-20vw, 0) translateZ(-100px) rotateZ(6deg) scale(0.75);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    opacity: 0.55;
  }
  22% {
    transform: translate(10vw, -20px) translateZ(20px) rotateZ(-3deg) rotateY(-8deg) scale(1.0);
    opacity: 0.82;
  }
  45% {
    transform: translate(38vw, 18px) translateZ(160px) rotateZ(8deg) rotateY(16deg) scale(1.28);
    filter: drop-shadow(0 14px 32px rgba(0,0,0,0.32));
    opacity: 1;
  }
  68% {
    transform: translate(68vw, -12px) translateZ(70px) rotateZ(-5deg) rotateY(-12deg) scale(1.1);
    opacity: 0.9;
  }
  88% {
    transform: translate(105vw, 8px) translateZ(-80px) rotateZ(4deg) scale(0.8);
    opacity: 0.62;
  }
  100% {
    transform: translate(125vw, 0) translateZ(-100px) rotateZ(6deg) scale(0.75);
    opacity: 0.55;
  }
}

@keyframes riseBalloon {
  0% {
    transform: translateY(10vh) translateZ(-80px) rotate(-4deg) scale(0.75);
    filter: drop-shadow(0 8px 20px rgba(255, 80, 80, 0.3));
    opacity: 0.7;
  }
  30% {
    transform: translateY(-18vh) translateZ(40px) rotate(3deg) scale(1.08);
    filter: drop-shadow(0 14px 32px rgba(255, 100, 80, 0.55));
    opacity: 1;
  }
  60% {
    transform: translateY(-52vh) translateZ(100px) rotate(-5deg) scale(1.18);
    filter: drop-shadow(0 16px 36px rgba(255, 80, 80, 0.48));
    opacity: 0.95;
  }
  100% {
    transform: translateY(-86vh) translateZ(-60px) rotate(-3deg) scale(0.72);
    filter: drop-shadow(0 2px 8px rgba(255, 80, 80, 0.2));
    opacity: 0.5;
  }
}

@keyframes driftLeaf {
  0% {
    transform: translate(0, 0) translateZ(-40px) rotate(0deg) scale(0.85);
    filter: drop-shadow(0 4px 10px rgba(60, 140, 60, 0.3));
    opacity: 0.7;
  }
  25% {
    transform: translate(-16vw, 10vh) translateZ(80px) rotate(90deg) scale(1.15);
    filter: drop-shadow(0 10px 22px rgba(60, 140, 60, 0.5));
    opacity: 1;
  }
  50% {
    transform: translate(-35vw, 28vh) translateZ(120px) rotate(180deg) scale(1.25);
    filter: drop-shadow(0 14px 28px rgba(60, 140, 60, 0.58));
    opacity: 1;
  }
  75% {
    transform: translate(-57vw, 52vh) translateZ(40px) rotate(270deg) scale(0.95);
    filter: drop-shadow(0 6px 14px rgba(60, 140, 60, 0.38));
    opacity: 0.82;
  }
  100% {
    transform: translate(-78vw, 72vh) translateZ(-40px) rotate(360deg) scale(0.8);
    filter: drop-shadow(0 2px 6px rgba(60, 140, 60, 0.2));
    opacity: 0.6;
  }
}

@keyframes sparkleFloat {
  0% {
    transform: translateY(0) translateZ(0px) scale(1) rotateZ(0deg);
    filter: drop-shadow(0 0 6px rgba(255, 220, 80, 0.45));
    opacity: 0.35;
  }
  33% {
    transform: translateY(-8px) translateZ(60px) scale(1.18) rotateZ(45deg);
    filter: drop-shadow(0 0 16px rgba(255, 220, 100, 0.9)) drop-shadow(0 0 32px rgba(255, 255, 160, 0.5));
    opacity: 0.85;
  }
  66% {
    transform: translateY(-16px) translateZ(120px) scale(1.38) rotateZ(120deg);
    filter: drop-shadow(0 0 22px rgba(255, 240, 120, 1)) drop-shadow(0 0 44px rgba(255, 255, 200, 0.65));
    opacity: 1;
  }
  100% {
    transform: translateY(0) translateZ(0px) scale(1) rotateZ(360deg);
    filter: drop-shadow(0 0 6px rgba(255, 220, 80, 0.45));
    opacity: 0.35;
  }
}

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

@keyframes filmRevealIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes cursorBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }
}

/* ── Extra flyers ───────────────────────── */
.star {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(255, 220, 50, 0.75)) drop-shadow(0 0 24px rgba(255, 200, 0, 0.45));
}

.flower {
  font-size: 1.6rem;
  filter: drop-shadow(0 4px 12px rgba(255, 100, 160, 0.4)) drop-shadow(0 0 18px rgba(255, 150, 200, 0.28));
}

.ribbon {
  font-size: 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(255, 60, 140, 0.38)) drop-shadow(0 0 16px rgba(255, 100, 180, 0.24));
}

.ladybug {
  font-size: 1.3rem;
  animation: wingBeat 0.55s ease-in-out infinite alternate;
  filter: drop-shadow(0 3px 10px rgba(220, 30, 30, 0.4)) drop-shadow(0 0 14px rgba(255, 60, 60, 0.25));
}

.dragonfly {
  font-size: 1.4rem;
  animation: wingBeat 0.32s ease-in-out infinite alternate;
  filter: drop-shadow(0 3px 10px rgba(40, 140, 220, 0.4)) drop-shadow(0 0 16px rgba(80, 180, 255, 0.28));
}

.rainbow {
  font-size: 2rem;
  filter: drop-shadow(0 0 14px rgba(140, 100, 255, 0.5)) drop-shadow(0 0 28px rgba(200, 150, 255, 0.3));
}

.heart {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 60, 130, 0.65)) drop-shadow(0 0 22px rgba(255, 100, 170, 0.38));
}

.st1 {
  top: 26%;
  left: -10%;
  animation: flyWaveB 24s linear infinite;
  animation-delay: 3s;
}

.st2 {
  top: 78%;
  left: -12%;
  animation: flyWaveA 20s linear infinite;
  animation-delay: 6s;
}

.fw1 {
  top: 40%;
  left: -14%;
  animation: flyWaveC 22s linear infinite;
  animation-delay: 1s;
}

.fw2 {
  top: 62%;
  left: -16%;
  animation: flyWaveA 17s linear infinite;
  animation-delay: 5s;
}

.rb1 {
  top: 10%;
  left: -18%;
  animation: flyWaveB 28s linear infinite;
  animation-delay: 8s;
}

.lb1 {
  top: 84%;
  left: -20%;
  animation: wingBeat 0.55s ease-in-out infinite alternate, flyWaveC 15s linear infinite;
  animation-delay: 0s, 2s;
}

.df1 {
  top: 47%;
  left: -22%;
  animation: wingBeat 0.32s ease-in-out infinite alternate, flyWaveA 23s linear infinite;
  animation-delay: 0s, 7s;
}

.rw1 {
  top: 4%;
  left: -25%;
  animation: flyWaveB 38s linear infinite;
  animation-delay: 12s;
}

.ht1 {
  top: 68%;
  left: -10%;
  animation: sparkleFloat 5s ease-in-out infinite, flyWaveC 26s linear infinite;
  animation-delay: 0s, 4s;
}

.ht2 {
  top: 20%;
  left: -15%;
  animation: sparkleFloat 4s ease-in-out infinite, flyWaveA 31s linear infinite;
  animation-delay: 1s, 9s;
}

/* ── Quiz reveal animation ──────────────── */
@keyframes quizBounceIn {
  from {
    transform: translateY(50px) scale(0.85);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.quiz-reveal {
  animation: quizBounceIn 0.7s cubic-bezier(0.28, 1.45, 0.56, 1) both;
}

/* ── Scene titlebar & frame elements ───────────── */
.scene-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #e0f2ff, #cce8ff);
  padding: 0.5rem 0.8rem;
  font-size: 1.05rem;
  font-weight: bold;
  color: #1a5fa0;
  border-bottom: 1px solid #bee4ff;
}

.story-bg {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  opacity: 0.11;
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

.story-extra {
  position: absolute;
  top: 46%;
  left: 10%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  z-index: 1;
  user-select: none;
  animation: bounceKid 2.2s ease-in-out infinite;
}

.frame-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  background: rgba(224, 240, 255, 0.55);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bad8f8;
  transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
  background: #2f81f7;
  transform: scale(1.45);
}

@keyframes frameIn {
  from {
    opacity: 0.4;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scene.frame-in {
  animation: frameIn 0.45s ease forwards;
}

/* ── Audio progress bar ─────────────────────────── */
.audio-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.2rem;
  padding: 0 0.1rem;
}

.audio-bar-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.audio-bar-track {
  flex: 1;
  height: 7px;
  background: rgba(160, 200, 255, 0.4);
  border-radius: 10px;
  overflow: hidden;
}

.audio-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #29b6f6, #a78bfa, #f472b6);
  border-radius: 10px;
  transition: width 0.25s linear;
}

.audio-bar-label {
  font-size: 0.78rem;
  color: #4a7ac4;
  min-width: 76px;
  text-align: start;
  direction: ltr;
  font-variant-numeric: tabular-nums;
  font-family: "Courier New", monospace;
}

/* ── Score chart ─────────────────────────────────── */
.score-chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.2rem auto 0.4rem;
  max-width: 280px;
}

.score-chart-wrap canvas {
  max-width: 100%;
  height: auto !important;
  filter: drop-shadow(0 6px 18px rgba(34, 197, 94, 0.22));
}

/* ──────────────────────────────────────────── */
/* ── ANIME STYLES FOR KIDS - أنمي للأطفال ──── */
/* ──────────────────────────────────────────── */

.anime-titlebar {
  background: linear-gradient(135deg, #ff006e, #fb5607, #ffbe08);
  border-bottom: 3px solid #ff006e;
  color: white !important;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 0.8rem 1rem !important;
}

.anime-scene {
  background: linear-gradient(180deg, #aee1ff 0%, #e7f7ff 50%, #d7f2f7 100%) !important;
  position: relative;
  perspective: 1000px;
}

.manga-panel {
  width: 100%;
  height: 100%;
  position: relative;
  border: 4px solid #1a1a2e;
  border-radius: 2px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(174, 225, 255, 0.3));
}

.manga-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 3px),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 3px);
  pointer-events: none;
  z-index: 1;
  border-radius: 2px;
}

.anime-background {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.anime-effects {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.anime-character-container {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  animation: characterSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.anime-character {
  font-size: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: characterBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.character-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character-head {
  font-size: 1.5em;
  animation: headBob 2s ease-in-out infinite;
}

.character-torso {
  font-size: 1.2em;
}

.character-legs {
  font-size: 1em;
  animation: legWalking 1s ease-in-out infinite;
}

@keyframes characterSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

@keyframes headBob {
  0%, 100% {
    transform: translateY(0) rotateZ(0deg);
  }
  25% {
    transform: translateY(-2px) rotateZ(-1deg);
  }
  50% {
    transform: translateY(0) rotateZ(0deg);
  }
  75% {
    transform: translateY(-2px) rotateZ(1deg);
  }
}

@keyframes legWalking {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.95);
  }
}

.anime-sun {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2.5rem;
  z-index: 3;
  animation: sunGlow 2s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.6));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(255, 200, 0, 0.9));
    transform: scale(1.1);
  }
}

.anime-cloud {
  animation: cloudFloat 6s ease-in-out infinite !important;
}

.anime-action {
  animation: actionPulse 0.6s ease-in-out;
  z-index: 4;
}

@keyframes actionPulse {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.anime-effect {
  animation: effectBurst 0.8s ease-out forwards;
  z-index: 4;
}

@keyframes effectBurst {
  0% {
    opacity: 1;
    transform: scale(0.3) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.5) translateY(-40px);
  }
}

.anime-book {
  animation: bookFlip 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes bookFlip {
  0% {
    transform: rotateY(90deg) translateX(20px);
    opacity: 0;
  }
  100% {
    transform: rotateY(0) translateX(0);
    opacity: 1;
  }
}

.speech-bubble {
  background: white;
  border: 3px solid #1a1a2e;
  border-radius: 15px;
  padding: 0.6rem 0.9rem;
  position: relative;
  font-weight: bold;
  color: #1a1a2e;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  animation: bubbleAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 20%;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 0px solid transparent;
  border-top: 8px solid white;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 19px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 0px solid transparent;
  border-top: 9px solid #1a1a2e;
}

@keyframes bubbleAppear {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.manga-subtitle {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 6;
}

.anime-subtitle {
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  animation: subtitleSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes subtitleSlide {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anime-indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.8rem;
  background: linear-gradient(135deg, rgba(255, 0, 110, 0.1), rgba(251, 86, 7, 0.1));
}

.anime-indicators span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fb5607;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.anime-indicators span.active {
  background: #ff006e;
  opacity: 1;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.6);
}

/* Scene theme backgrounds for anime */
.scene[data-theme="hygiene"] .anime-background {
  background: linear-gradient(135deg, #aee1ff 0%, #d4f1ff 50%, #cbf2df 100%);
}

.scene[data-theme="school"] .anime-background {
  background: linear-gradient(135deg, #b7e4ff 0%, #ecf7ff 50%, #ffe9b8 100%);
}

.scene[data-theme="kindness"] .anime-background {
  background: linear-gradient(135deg, #cce6ff 0%, #f1f8ff 50%, #ffd9ef 100%);
}

/* Character action animation */
.character-action {
  animation: characterAction 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes characterAction {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.1) rotate(-2deg);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

/* Background change animation */
.anime-bg-change {
  animation: bgChange 0.5s ease-in-out;
}

@keyframes bgChange {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Video Container Styles */
.video-container {
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(60, 88, 179, 0.2);
  background: #000;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* Homework Panel Styles */
.homework-panel {
  background: linear-gradient(135deg, rgba(255, 220, 100, 0.15), rgba(255, 200, 150, 0.12)) !important;
  border: 2px solid rgba(255, 180, 80, 0.3) !important;
}

.homework-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.homework-icon {
  font-size: 1.8rem;
}

.homework-header h2 {
  color: #d97706;
  margin: 0;
  font-size: 1.6rem;
}

.homework-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.homework-btn {
  border: 2px solid #fbbf24;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 0.9rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.homework-btn:hover {
  background: linear-gradient(135deg, #fcd34d, #fbbf24);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.homework-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.feature-list {
  margin: 0;
  padding: 0 1rem 0 0;
  color: #2f587b;
  font-size: 0.84rem;
  line-height: 1.6;
}

.feature-list li {
  margin-bottom: 0.25rem;
}

.feature-foot {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0e5a84;
}

@media (max-width: 768px) {
  .feature {
    min-height: auto;
  }

  .feature-desc,
  .feature-list,
  .feature-foot {
    font-size: 0.9rem;
  }
}

/* ── Kids 3D Motion Upgrade ───────────────────────────── */
.site-flights {
  animation: skyDrift 22s ease-in-out infinite;
}

.fly {
  transform-origin: center center;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.3),
    0 8px 14px rgba(20, 50, 100, 0.28);
}

.fly::before {
  content: "";
  position: absolute;
  inset: 18% 14% 22% 14%;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  filter: blur(3px);
  z-index: -1;
  animation: flyGlowPulse 2.8s ease-in-out infinite;
}

.b1, .b2, .b3,
.be1, .be2,
.br1, .br2,
.bl1, .lf1, .sp1,
.st1, .st2, .fw1, .fw2,
.rb1, .lb1, .df1, .rw1, .ht1, .ht2 {
  transform-style: preserve-3d;
  animation-timing-function: linear;
}

.hero {
  animation: heroFloat 7.5s ease-in-out infinite;
}

.hero h1 {
  animation: titleBounce 3.6s ease-in-out infinite;
}

.panel {
  transform-style: preserve-3d;
  animation: panelBreath 5.8s ease-in-out infinite;
}

.panel:hover {
  transform: translateY(-5px) rotateX(2deg) rotateY(-2deg);
}

.choice-btn,
.theme-btn,
.nav-section,
.intro-btn,
.option-btn,
.homework-btn {
  position: relative;
  overflow: hidden;
}

.choice-btn::after,
.theme-btn::after,
.nav-section::after,
.intro-btn::after,
.option-btn::after,
.homework-btn::after {
  content: "";
  position: absolute;
  top: -140%;
  left: -35%;
  width: 46%;
  height: 320%;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  transform: rotate(14deg);
  animation: buttonShine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.choice-btn:hover,
.theme-btn:hover,
.nav-section:hover,
.intro-btn:hover,
.option-btn:hover,
.homework-btn:hover {
  animation: kidButtonHop 0.5s ease;
}

.intro-card,
.stat-card,
.feature,
.kids-photo-card,
.quiz-card {
  transform-style: preserve-3d;
  animation: floatCard 6.2s ease-in-out infinite;
}

.intro-card:nth-child(2),
.stat-card:nth-child(2),
.kids-photo-card:nth-child(2) {
  animation-delay: 0.35s;
}

.intro-card:nth-child(3),
.stat-card:nth-child(3),
.kids-photo-card:nth-child(3) {
  animation-delay: 0.7s;
}

.quiz-trophy {
  animation: trophySpin 2.6s ease-in-out infinite;
  transform-origin: center;
}

.mascot-character {
  animation: mascotWave 1s ease-in-out infinite, mascotPop 2.2s ease-in-out infinite;
}

@keyframes skyDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(0deg);
  }
  50% {
    transform: translate3d(0, -10px, 0) rotateX(2deg);
  }
}

@keyframes flyGlowPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82) translateZ(0);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.15) translateZ(40px);
  }
}

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

@keyframes titleBounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  30% {
    transform: translateY(-2px) rotate(-0.7deg);
  }
  65% {
    transform: translateY(1px) rotate(0.6deg);
  }
}

@keyframes panelBreath {
  0%,
  100% {
    box-shadow: var(--panel-shadow);
  }
  50% {
    box-shadow: 0 20px 32px rgba(56, 88, 179, 0.2);
  }
}

@keyframes buttonShine {
  0%,
  68% {
    transform: translateX(-20%) rotate(14deg);
    opacity: 0;
  }
  78% {
    transform: translateX(90px) rotate(14deg);
    opacity: 0.95;
  }
  100% {
    transform: translateX(160px) rotate(14deg);
    opacity: 0;
  }
}

@keyframes kidButtonHop {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateY(-6px) rotateX(1.5deg);
  }
}

@keyframes trophySpin {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.06);
  }
}

@keyframes mascotPop {
  0%,
  100% {
    filter: drop-shadow(0 4px 10px rgba(40, 80, 180, 0.25));
  }
  50% {
    filter: drop-shadow(0 10px 22px rgba(40, 80, 180, 0.4));
  }
}

@media (max-width: 768px) {
  .panel {
    animation-duration: 7.4s;
  }

  .intro-card,
  .stat-card,
  .feature,
  .kids-photo-card,
  .quiz-card {
    animation-duration: 7.2s;
  }

  .site-flights {
    animation-duration: 26s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-flights,
  .fly,
  .fly::before,
  .hero,
  .hero h1,
  .panel,
  .intro-card,
  .stat-card,
  .feature,
  .kids-photo-card,
  .quiz-card,
  .quiz-trophy,
  .choice-btn,
  .theme-btn,
  .nav-section,
  .intro-btn,
  .option-btn,
  .homework-btn,
  .mascot-character {
    animation: none !important;
    transition: none !important;
  }

  .choice-btn::after,
  .theme-btn::after,
  .nav-section::after,
  .intro-btn::after,
  .option-btn::after,
  .homework-btn::after {
    display: none;
  }

  .feature-animate {
    opacity: 1 !important;
  }
}
