/* =========================================================================
   TIẾNG TRUNG TRẺ EM HOA NAM - MISS HOA (MAGICAL 3D STORYBOOK WONDERLAND UI)
   ========================================================================= */

:root {
  --bg: #f0fdfa;
  --surface: #ffffff;
  --emerald: #0f766e;
  --emerald-bright: #10b981;
  --emerald-soft: #d1fae5;
  --sky: #0284c7;
  --sky-bright: #0ea5e9;
  --sky-soft: #e0f2fe;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --coral: #ff6b6b;
  --coral-soft: #fff1f2;
  --purple: #8b5cf6;
  --purple-soft: #f3e8ff;
  --text: #134e4a;
  --text-muted: #4b726d;
  --border: #cdeae1;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-card: 0 12px 30px rgba(15, 118, 110, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #e0f7ff 0%, #f0fdf8 38%, #fffbeb 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* FLOATING SKY DECORATIONS */
.sky-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-deco {
  position: absolute;
  font-size: 2.8rem;
  opacity: 0.25;
  animation: driftFloat 7s ease-in-out infinite;
}

.float-deco.d1 { top: 90px; left: 3%; font-size: 3.6rem; animation-delay: 0s; }
.float-deco.d2 { top: 220px; right: 4%; font-size: 2.6rem; animation-delay: 1.5s; }
.float-deco.d3 { bottom: 160px; left: 2%; font-size: 3.4rem; animation-delay: 2.5s; }
.float-deco.d4 { bottom: 90px; right: 5%; font-size: 2.9rem; animation-delay: 1s; }
.float-deco.d5 { top: 48%; left: 95%; font-size: 2.4rem; animation-delay: 3s; }

@keyframes driftFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* TOP BAR */
.kids-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid #bae6fd;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

.kids-topbar-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.kids-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.kids-logo {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid #fde68a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22);
}

.kids-brand-title {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.02em;
}

.kids-brand-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 800;
}

.kids-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.star-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 3px solid #f59e0b;
  color: #92400e;
  padding: 5px 16px 5px 6px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #d97706;
  transition: transform 0.15s ease;
}

.star-pill-btn:hover {
  transform: translateY(-2px);
}

.pill-panda-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.adult-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
  color: var(--emerald);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
  transition: all 0.15s ease;
}

.adult-site-link:hover {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

/* MAIN CONTAINER */
.kids-main {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 18px 56px;
}

/* =========================================================================
   MAGICAL WONDERLAND STORYBOOK BANNER
   ========================================================================= */
.wonderland-banner {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 295px;
  margin-bottom: 20px;
  border: 4px solid #ffffff;
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.2);
  display: flex;
  align-items: center;
}

.wonderland-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.wonderland-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(6, 78, 59, 0.82) 0%,
    rgba(15, 118, 110, 0.62) 44%,
    rgba(14, 165, 233, 0.12) 78%,
    rgba(255, 255, 255, 0) 100%
  );
}

.wonderland-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 28px 34px;
  color: #ffffff;
}

.wonderland-pill {
  display: inline-block;
  background: rgba(254, 243, 199, 0.96);
  color: #b45309;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.wonderland-content h1 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 2.05rem;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 0 3px 12px rgba(6, 78, 59, 0.45);
}

.wonderland-content p {
  font-size: 1rem;
  font-weight: 800;
  color: #ecfdf5;
  margin-bottom: 18px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wonderland-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-cta-btn {
  padding: 11px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.15s ease;
}

.banner-cta-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.cta-play {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 5px 0 #c2410c;
}

.cta-write {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 5px 0 #0369a1;
}

.cta-video {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  box-shadow: 0 5px 0 #6d28d9;
}

/* =========================================================================
   2-TRACK HERO CARDS WITH 3D PIXAR ARTWORK
   ========================================================================= */
.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.track-card {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: var(--surface);
  border: 4px solid #e2f3ec;
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  font-family: inherit;
}

.track-card:hover {
  transform: translateY(-4px);
}

.track-card.active.track-preschool {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.25);
}

.track-card.active.track-primary {
  background: linear-gradient(135deg, #e0f2fe 0%, #d1fae5 100%);
  border-color: #10b981;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.25);
}

.track-art-wrap {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.track-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--emerald);
  margin-bottom: 5px;
}

.track-card.active.track-preschool .track-badge {
  background: #f59e0b;
  color: #ffffff;
}

.track-card.active.track-primary .track-badge {
  background: #0f766e;
  color: #ffffff;
}

.track-info h2 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.28rem;
  color: var(--text);
  margin-bottom: 3px;
}

.track-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 800;
}

/* LEVEL & LESSON PICKER */
.picker-section {
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.yct-level-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px dashed #bae6fd;
}

.yct-lvl-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s ease;
}

.yct-lvl-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 0 #0369a1;
}

.lesson-pills-label {
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--emerald);
  margin-bottom: 10px;
}

.lesson-pills {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.lesson-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 16px;
  border: 2px solid #cdeae1;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lesson-pill:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  transform: translateY(-2px);
}

.lesson-pill.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 4px 0 #065f46;
  transform: translateY(-1px);
}

.lesson-resource-strip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed #e2f3ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 800;
}

.resource-links-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 900;
  border: 2px solid #7dd3fc;
}

.mini-link-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

/* =========================================================================
   5 GIANT COLORFUL 3D TOY-BLOCK ACTIVITY TABS
   ========================================================================= */
.activity-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.act-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 15px 10px;
  border-radius: 22px;
  border: 3px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.act-tab:hover {
  transform: translateY(-3px);
}

.act-tab.tab-coral {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
  box-shadow: 0 5px 0 #fda4af;
}
.act-tab.tab-coral.active {
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  color: #ffffff;
  border-color: #e11d48;
  box-shadow: 0 5px 0 #be123c;
}

.act-tab.tab-sky {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  box-shadow: 0 5px 0 #7dd3fc;
}
.act-tab.tab-sky.active {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  border-color: #0369a1;
  box-shadow: 0 5px 0 #075985;
}

.act-tab.tab-amber {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
  box-shadow: 0 5px 0 #fcd34d;
}
.act-tab.tab-amber.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 5px 0 #b45309;
}

.act-tab.tab-purple {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #6d28d9;
  box-shadow: 0 5px 0 #d8b4fe;
}
.act-tab.tab-purple.active {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #ffffff;
  border-color: #6d28d9;
  box-shadow: 0 5px 0 #5b21b6;
}

.act-tab.tab-emerald {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
  box-shadow: 0 5px 0 #6ee7b7;
}
.act-tab.tab-emerald.active {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 5px 0 #065f46;
}

.act-ico {
  font-size: 2.1rem;
  line-height: 1;
}

.act-lbl {
  font-size: 0.94rem;
  font-weight: 900;
  text-align: center;
}

/* PANELS */
.tab-panel {
  display: none;
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid #cdeae1;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.tab-panel.active {
  display: block;
  animation: fadeUp 0.25s ease;
}

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

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.5rem;
  color: var(--emerald);
}

.panel-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 800;
}

.big-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 0 #047857;
  transition: transform 0.12s ease;
}

.big-action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #047857;
}

/* =========================================================================
   TAB 1: RAINBOW CANDY PICTURE CARDS (EDGE-TO-EDGE 3D VISUAL FLASHCARDS)
   ========================================================================= */
.picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.pic-card {
  border: 3px solid #fde68a;
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.pic-card:nth-child(6n+1) { border-color: #fda4af; background: linear-gradient(180deg, #fff1f2 0%, #ffffff 48%); }
.pic-card:nth-child(6n+2) { border-color: #7dd3fc; background: linear-gradient(180deg, #e0f2fe 0%, #ffffff 48%); }
.pic-card:nth-child(6n+3) { border-color: #fcd34d; background: linear-gradient(180deg, #fef3c7 0%, #ffffff 48%); }
.pic-card:nth-child(6n+4) { border-color: #6ee7b7; background: linear-gradient(180deg, #d1fae5 0%, #ffffff 48%); }
.pic-card:nth-child(6n+5) { border-color: #d8b4fe; background: linear-gradient(180deg, #f3e8ff 0%, #ffffff 48%); }
.pic-card:nth-child(6n+6) { border-color: #fdba74; background: linear-gradient(180deg, #ffedd5 0%, #ffffff 48%); }

.pic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(14, 165, 233, 0.16);
}

.pic-card.speaking {
  border-color: #f59e0b !important;
  transform: scale(1.03);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.28);
}

.pic-visual-box {
  position: relative;
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: radial-gradient(circle at center, #ffffff 0%, rgba(255, 255, 255, 0.35) 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.pic-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.pic-card:hover .pic-scene-img {
  transform: scale(1.05);
}

.pic-twemoji-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, rgba(255, 255, 255, 0.25) 68%, transparent 100%);
}

.twemoji-md {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease;
}

.pic-card:hover .twemoji-md {
  transform: scale(1.1) rotate(-3deg);
}

.twemoji-lg {
  width: 156px;
  height: 156px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14));
}

.pic-zoom-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.pic-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.pic-hz-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pic-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 2.35rem;
  font-weight: 900;
  color: #064e3b;
  line-height: 1.15;
}

.pic-mini-speaker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #bae6fd;
  transition: transform 0.12s ease;
}

.pic-mini-speaker:hover {
  transform: scale(1.12);
  background: #0ea5e9;
  color: #ffffff;
}

.pic-py {
  font-size: 1.12rem;
  font-weight: 900;
  color: #0284c7;
  margin: 3px 0 8px;
}

.pic-vi-pill {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 2px solid #f59e0b;
  font-size: 1.05rem;
  font-weight: 900;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.pic-sentence {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 8px 11px;
  margin-bottom: 12px;
  width: 100%;
  text-align: left;
}

.ps-zh {
  font-size: 0.92rem;
  font-weight: 800;
  color: #064e3b;
}

.ps-py {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0284c7;
}

.ps-vi {
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
}

.pic-card-btns {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.pic-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.pic-btn-speak {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  box-shadow: 0 3px 0 #0369a1;
}

.pic-btn-write {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #ffffff;
  box-shadow: 0 3px 0 #b45309;
}

/* GIANT SPOTLIGHT FLASHCARD MODAL */
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 120;
}

.spotlight-backdrop.open {
  display: flex;
}

.spotlight-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border: 5px solid #fde68a;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  animation: fadeUp 0.22s ease;
}

.spotlight-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}

.spotlight-media {
  width: 100%;
  height: 290px;
  background: linear-gradient(135deg, #e0f2fe, #fef3c7);
  overflow: hidden;
}

.spotlight-body {
  padding: 20px 24px 22px;
  text-align: center;
}

.spotlight-word-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.spotlight-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 3.4rem;
  font-weight: 900;
  color: #064e3b;
  line-height: 1.1;
}

.spotlight-speak-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #0369a1;
}

.spotlight-py {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0284c7;
  margin: 4px 0 10px;
}

.spotlight-vi-pill {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 2px solid #f59e0b;
  font-size: 1.25rem;
  font-weight: 900;
  padding: 6px 22px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.spotlight-sentence-box {
  background: #f0fdf8;
  border: 2px dashed #6ee7b7;
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.sp-sent-zh { font-family: "Noto Sans SC", sans-serif; font-size: 1.15rem; font-weight: 900; color: #064e3b; }
.sp-sent-py { font-size: 0.92rem; font-weight: 800; color: #0284c7; }
.sp-sent-vi { font-size: 0.95rem; font-weight: 800; color: #334155; }

.spotlight-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.spotlight-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 2px dashed #e2e8f0;
}

.mini-nav-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  color: #0f766e;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.spotlight-counter {
  font-weight: 900;
  color: #64748b;
}

/* TAB 2: HANZI WRITER STROKE PRACTICE */
.write-char-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.write-char-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 18px;
  border: 2px solid #bae6fd;
  background: #f0f9ff;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.write-char-pill .wc-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--emerald);
}

.write-char-pill .wc-vi {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-muted);
}

.write-char-pill.active {
  background: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 4px 0 #d97706;
}

.write-stage {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

.write-canvas-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tianzige-frame {
  width: 300px;
  height: 300px;
  border: 5px solid #0ea5e9;
  border-radius: 26px;
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, transparent 49.5%, rgba(14, 165, 233, 0.35) 49.5%, rgba(14, 165, 233, 0.35) 50.5%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(14, 165, 233, 0.35) 49.5%, rgba(14, 165, 233, 0.35) 50.5%, transparent 50.5%),
    linear-gradient(45deg, transparent 49.6%, rgba(14, 165, 233, 0.16) 49.6%, rgba(14, 165, 233, 0.16) 50.4%, transparent 50.4%),
    linear-gradient(-45deg, transparent 49.6%, rgba(14, 165, 233, 0.16) 49.6%, rgba(14, 165, 233, 0.16) 50.4%, transparent 50.4%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 26px rgba(14, 165, 233, 0.16);
  touch-action: none;
}

.hanzi-target {
  width: 280px;
  height: 280px;
}

.write-status {
  margin-top: 12px;
  text-align: center;
  font-size: 0.94rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 16px;
  padding: 10px 14px;
  width: 100%;
}

.write-controls-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.write-word-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fffbeb, #ecfdf5);
  border: 3px solid #fde68a;
  border-radius: 22px;
  padding: 14px 18px;
}

.write-preview-emoji {
  font-size: 3.4rem;
  line-height: 1;
}

.write-preview-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--emerald);
  line-height: 1.1;
}

.write-preview-py {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--sky);
}

.write-preview-vi {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

.write-btn-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chunky-btn {
  padding: 14px 16px;
  border-radius: 18px;
  border: none;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.chunky-btn:active {
  transform: translateY(3px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 5px 0 #047857;
}

.btn-sky {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  box-shadow: 0 5px 0 #0369a1;
}

.btn-amber {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #ffffff;
  box-shadow: 0 5px 0 #b45309;
}

.btn-soft {
  background: #e2f3ec;
  color: var(--emerald);
  box-shadow: 0 5px 0 #b8dfd0;
}

.write-tip-box {
  background: #fffbeb;
  border: 2px solid #fde68a;
  color: #92400e;
  border-radius: 18px;
  padding: 13px 15px;
  font-size: 0.9rem;
  font-weight: 800;
}

/* TAB 3: 4 FUN GAMES */
.game-subtabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.game-sub-btn {
  padding: 11px 18px;
  border-radius: 18px;
  border: 2px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
}

.game-sub-btn.active {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 4px 0 #c2410c;
}

.game-arena {
  background: linear-gradient(180deg, #f0f9ff 0%, #f0fdf8 100%);
  border: 3px dashed #7dd3fc;
  border-radius: var(--radius-xl);
  padding: 22px;
  min-height: 360px;
}

.game-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.game-score-chip {
  background: #fef3c7;
  color: #92400e;
  border: 2px solid #fcd34d;
  padding: 7px 15px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.95rem;
}

.listen-prompt-box {
  text-align: center;
  margin-bottom: 20px;
}

.big-speaker-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 0 #0369a1;
}

.listen-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}

.listen-opt-card {
  background: #ffffff;
  border: 3px solid #bae6fd;
  border-radius: 24px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 0 #e0f2fe;
  transition: all 0.15s ease;
}

.listen-opt-card:hover {
  transform: translateY(-4px);
  border-color: #0ea5e9;
}

.listen-opt-card.correct {
  background: #d1fae5;
  border-color: #10b981;
}

.listen-opt-card.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.listen-opt-emoji {
  font-size: 3.8rem;
  line-height: 1.1;
  margin-bottom: 8px;
}

.listen-opt-vi {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

/* BALLOON POP GAME */
.balloon-sky {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 18px 10px;
}

.balloon-btn {
  width: 140px;
  height: 156px;
  border-radius: 50% 50% 48% 48%;
  border: 4px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  animation: floatBalloon 2.8s ease-in-out infinite;
  transition: transform 0.15s ease;
}

.balloon-btn:hover {
  transform: scale(1.08);
}

.balloon-btn.popped {
  opacity: 0;
  transform: scale(1.4);
  pointer-events: none;
}

.balloon-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
}

.balloon-py {
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0.95;
}

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

/* MEMORY MATCH GAME */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.mem-card {
  height: 115px;
  border-radius: 20px;
  border: 3px solid #7dd3fc;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.9rem;
  font-weight: 900;
  box-shadow: 0 5px 0 #0369a1;
  transition: all 0.2s ease;
}

.mem-card.revealed,
.mem-card.matched {
  background: #ffffff;
  color: var(--text);
  border-color: #10b981;
  box-shadow: 0 5px 0 #a7f3d0;
}

.mem-card.matched {
  background: #d1fae5;
  opacity: 0.88;
}

.mem-hz {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--emerald);
}

.mem-sub {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* TAB 4: VIDEO & MP3 LIBRARY */
.video-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 22px;
  overflow: hidden;
  background: #0f172a;
  border: 4px solid #d8b4fe;
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.16);
}

.video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-info-box {
  margin-top: 12px;
  background: #faf5ff;
  border: 2px solid #e9d5ff;
  border-radius: 18px;
  padding: 14px 16px;
}

.video-info-box h4 {
  font-size: 1.15rem;
  color: #6d28d9;
  margin-bottom: 4px;
}

.video-info-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 700;
}

.video-fallback-row {
  margin-top: 10px;
}

.video-quiz-card {
  margin-top: 14px;
  background: #fffbeb;
  border: 3px solid #fde68a;
  border-radius: 20px;
  padding: 16px;
}

.video-quiz-title {
  font-size: 1rem;
  font-weight: 900;
  color: #92400e;
  margin-bottom: 10px;
}

.video-quiz-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.vq-btn {
  padding: 11px 12px;
  border-radius: 14px;
  border: 2px solid #fcd34d;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.vq-btn.correct {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.vq-btn.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.video-list-title {
  font-size: 1rem;
  font-weight: 900;
  color: #6d28d9;
  margin-bottom: 10px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 18px;
  border: 2px solid #e9d5ff;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.video-item-btn.active {
  background: #f3e8ff;
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.18);
}

.video-item-ico {
  font-size: 2rem;
  flex-shrink: 0;
}

.video-item-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text);
}

.video-item-topic {
  font-size: 0.78rem;
  font-weight: 900;
  color: #7c3aed;
}

.library-section {
  padding-top: 22px;
  border-top: 2px dashed #d8b4fe;
}

.mp3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.mp3-card {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border: 2px solid #bae6fd;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp3-level-tag {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
}

.mp3-card-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--text);
}

.mp3-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* =========================================================================
   TAB 5: 3D BABY PANDA MASCOT & BADGES
   ========================================================================= */
.panda-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.panda-home-card,
.badges-card {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border: 3px solid #a7f3d0;
  border-radius: 26px;
  padding: 24px;
}

.panda-home-card {
  text-align: center;
}

.panda-stage-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
  margin-bottom: 14px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.panda-mascot-frame {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0 auto 14px;
  border-radius: 36px;
  padding: 6px;
  background: linear-gradient(135deg, #fde68a, #6ee7b7, #7dd3fc);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22);
  animation: floatBalloon 3.2s ease-in-out infinite;
}

.panda-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  display: block;
}

.panda-level-badge-ico {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: #ffffff;
  border: 3px solid #f59e0b;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.panda-progress-wrap {
  margin: 16px 0;
}

.panda-progress-bar {
  height: 18px;
  background: #d1fae5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 2px solid #a7f3d0;
}

.panda-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.panda-progress-label {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--emerald);
}

.kid-name-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed #a7f3d0;
  text-align: left;
}

.kid-name-box label {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.kid-name-row {
  display: flex;
  gap: 8px;
}

.kid-name-row input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 14px;
  border: 2px solid #a7f3d0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.badge-tile {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 14px 10px;
  text-align: center;
  opacity: 0.52;
  filter: grayscale(0.8);
  transition: all 0.2s ease;
}

.badge-tile.unlocked {
  opacity: 1;
  filter: none;
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.18);
}

.badge-ico {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

.badge-name {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--text);
}

.badge-req {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stats-summary-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-chip {
  background: #ffffff;
  border: 2px solid #a7f3d0;
  border-radius: 14px;
  padding: 8px 13px;
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--emerald);
}

/* FOOTER */
.kids-footer {
  position: relative;
  z-index: 1;
  border-top: 3px solid #bae6fd;
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
  margin-top: 24px;
}

.kids-footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 800;
}

.footer-links a {
  color: var(--emerald);
  font-weight: 900;
  text-decoration: none;
}

/* CELEBRATION TOAST */
.celebrate-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: linear-gradient(135deg, #059669, #0f766e);
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 12px 30px rgba(6, 95, 70, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  z-index: 100;
}

.celebrate-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .wonderland-banner {
    min-height: 250px;
  }

  .wonderland-content h1 {
    font-size: 1.55rem;
  }

  .track-grid,
  .write-stage,
  .video-layout,
  .panda-layout {
    grid-template-columns: 1fr;
  }

  .activity-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .memory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wonderland-content {
    padding: 20px;
  }

  .activity-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .write-btn-stack {
    grid-template-columns: 1fr;
  }

  .tianzige-frame {
    width: 260px;
    height: 260px;
  }

  .hanzi-target {
    width: 240px;
    height: 240px;
  }
}
