/* ═══════════════════════════════════════════════════════
   SparkNest – Art & Craft Stylesheet (styles.css)
═══════════════════════════════════════════════════════ */

/* ─── 1. VARIABLES & RESET ─── */
:root {
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #5B21B6;
  --pink: #EC4899;
  --yellow: #FBBF24;
  --green: #10B981;
  --blue: #3B82F6;
  --orange: #F97316;
  --red: #EF4444;
  --bg: #FFF9F2;
  --white: #FFFFFF;
  --text: #1E1B4B;
  --text-light: #6B7280;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(236, 72, 153, .1);
  --shadow-md: 0 8px 30px rgba(236, 72, 153, .15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  zoom: 80%;

  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

@supports not (zoom: 1) {
  body {
    width: 125%;
    min-height: 125vh;
    transform: scale(0.8);
    transform-origin: top left;
  }
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--purple-light);
  border-radius: 3px;
}

/* ─── 2. NAV & BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  font-size: .82rem;
  color: var(--text-light);
  background: var(--white);
  border-bottom: 1px solid #FFF1E6;
}

.breadcrumb a {
  color: var(--pink);
  text-decoration: none;
  font-weight: 700;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.bc-sep {
  color: #D1D5DB;
}

.bc-current {
  color: var(--text);
  font-weight: 700;
}

/* ─── 3. FLOATING DECORATIONS ─── */
.floating-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-item {
  position: absolute;
  font-size: 1.8rem;
  opacity: .2;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-20px)
  }
}

/* ─── 4. PAGE CONTAINER ─── */
.page-container {
  /* max-width: 960px; */
  /* margin: 0 auto; */
  margin-top: 24px;
  /* padding: 24px 24px 100px; */
  position: relative;
  z-index: 1;
}

/* ─── 5. HOME HERO ─── */
.home-hero {
  background: linear-gradient(135deg, #FBCFE8 0%, #FDE68A 50%, #A7F3D0 100%);
  border-radius: 24px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.hero-content {
  padding: 36px 40px;
  z-index: 2;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: .95rem;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 12px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.03)
  }
}

.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: 3.5rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta-btn {
  padding: 12px 24px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  background: var(--pink);
  color: #fff;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(236, 72, 153, .3);
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(236, 72, 153, .4);
}

.hero-cta-btn.secondary {
  background: var(--card);
  color: var(--pink);
}

.hero-mascot {
  position: absolute;
  right: 32px;
  bottom: 0;
  font-size: 10rem;
  opacity: .9;
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-12px)
  }
}

.hero-float-items {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-float-items span {
  position: absolute;
  font-size: 2.5rem;
  opacity: .5;
  animation: float 4s ease-in-out infinite;
}

/* ─── 6. STATS BAR ─── */
.stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform .2s;
  padding: 8px 16px;
}

.stat-item:hover {
  transform: scale(1.08);
}

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

.stat-number {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--pink);
}

.stat-label {
  font-size: .8rem;
  color: var(--text-light);
  font-weight: 700;
}

/* ─── 7. SECTION HEADER ─── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 14px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.view-all-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 2px solid var(--pink);
  background: transparent;
  color: var(--pink);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}

.view-all-btn:hover {
  background: var(--pink);
  color: #fff;
}

/* ─── 8. LEARN GRID ─── */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.learn-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s;
  text-align: center;
}

.learn-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.learn-card-icon {
  font-size: 2.8rem;
}

.learn-card-title {
  font-weight: 800;
  font-size: .92rem;
}

.learn-card-desc {
  font-size: .78rem;
  color: var(--text-light);
}

/* ─── 9. UNIT CARDS ─── */
.units-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.unit-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s;
  border: 2px solid transparent;
}

.unit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.unit-number {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-family: 'Fredoka One', cursive;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.unit-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.unit-emoji {
  font-size: 2.4rem;
}

.unit-title {
  font-weight: 800;
  font-size: 1rem;
}

.unit-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.chapter-pill {
  background: #FFF0F5;
  color: var(--pink);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.chapter-pill:hover {
  background: var(--pink);
  color: #fff;
}

.chapter-pill.done {
  background: #D1FAE5;
  color: var(--green);
}

.unit-progress {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}

.unit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple-light));
  border-radius: 3px;
  transition: width .5s;
}

.unit-progress-label {
  font-size: .75rem;
  color: var(--text-light);
  margin-top: 5px;
}

/* ─── 10. TOPICS GRID ─── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.topic-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s;
  border-left: 4px solid var(--pink);
  position: relative;
}

.topic-card:nth-child(1) {
  border-color: var(--pink)
}

.topic-card:nth-child(2) {
  border-color: var(--yellow)
}

.topic-card:nth-child(3) {
  border-color: var(--blue)
}

.topic-card:nth-child(4) {
  border-color: var(--green)
}

.topic-card:nth-child(5) {
  border-color: var(--orange)
}

.topic-card:nth-child(6) {
  border-color: var(--red)
}

.topic-card:nth-child(7) {
  border-color: var(--purple)
}

.topic-card:nth-child(n+8) {
  border-color: var(--pink)
}

.topic-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.topic-card-icon {
  font-size: 1.8rem;
}

.topic-card-info {
  flex: 1;
}

.topic-card-title {
  font-weight: 800;
  font-size: .9rem;
}

.topic-card-desc {
  font-size: .78rem;
  color: var(--text-light);
}

.done-badge {
  font-size: 1.2rem;
}

/* ─── 11. CONCEPTS (GRAMMAR) GRID ─── */
.grammar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.grammar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s;
  position: relative;
}

.grammar-card:nth-child(1) {
  background: #FFF0F5
}

.grammar-card:nth-child(2) {
  background: #DCFCE7
}

.grammar-card:nth-child(3) {
  background: #DBEAFE
}

.grammar-card:nth-child(4) {
  background: #FEF3C7
}

.grammar-card:nth-child(5) {
  background: #FCE7F3
}

.grammar-card:nth-child(6) {
  background: #D1FAE5
}

.grammar-card:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

.grammar-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.grammar-card-title {
  font-weight: 800;
  font-size: .9rem;
}

/* ─── 12. PRACTICE & ACTIVITIES ROW ─── */
.practice-activities-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.pa-card {
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all .25s;
  box-shadow: var(--shadow);
}

.pa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pa-practice {
  background: linear-gradient(135deg, #FFF0F5, #FBCFE8);
}

.pa-games {
  background: linear-gradient(135deg, #D1FAE5, #86EFAC);
}

.pa-icon {
  font-size: 2.8rem;
}

.pa-info h3 {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.pa-info p {
  font-size: .85rem;
  color: rgba(30, 27, 75, .7);
}

/* ─── 13. QUIZ BANNER ─── */
.quiz-banner {
  background: linear-gradient(135deg, var(--pink), #BE185D);
  color: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.quiz-banner h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.quiz-banner p {
  font-size: .88rem;
  opacity: .9;
}

.quiz-banner button {
  background: var(--card);
  color: var(--pink);
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.quiz-banner button:hover {
  transform: scale(1.05);
}

/* ─── 14. CTA BANNER ─── */
.cta-banner {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.cta-banner h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.cta-banner p {
  font-size: .95rem;
  margin-bottom: 16px;
  opacity: .9;
}

.cta-banner button {
  background: var(--card);
  color: var(--green);
  border: none;
  padding: 12px 28px;
  border-radius: 20px;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
}

.cta-banner button:hover {
  transform: scale(1.05);
}

/* ─── 15. UNIT HERO ─── */
.unit-hero {
  border-radius: 24px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.unit-hero-icon {
  font-size: 4rem;
  margin-bottom: 10px;
}

.unit-hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.unit-hero-sub {
  font-size: .95rem;
  color: var(--pink);
  font-weight: 700;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .7);
  color: var(--pink);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all .2s;
  backdrop-filter: blur(4px);
}

.back-btn:hover {
  background: var(--card);
}

/* ─── 16. CHAPTER CARDS ─── */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.chapter-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s;
  border-left: 4px solid transparent;
}

.chapter-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--pink);
}

.chapter-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.chapter-card-info {
  flex: 1;
}

.chapter-card-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 3px;
}

.chapter-card-sub {
  font-size: .8rem;
  color: var(--text-light);
}

.chapter-card-badge {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  background: #D1FAE5;
  color: var(--green);
}

.chapter-card-badge.pending {
  background: #FFF0F5;
  color: var(--pink);
}

.start-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.start-btn:hover {
  background: var(--purple-dark);
  transform: scale(1.1);
}

/* ─── 17. LESSON HERO ─── */
.lesson-hero {
  border-radius: 24px;
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.lesson-type-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .6);
  color: var(--pink);
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: 12px;
}

.lesson-hero-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
}

.lesson-hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.lesson-hero-sub {
  font-size: .95rem;
  color: var(--pink);
  font-weight: 700;
}

/* ─── 18. CONTENT CARDS ─── */
.content-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.content-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.content-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.content-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FFF1E6;
}

.cch-icon {
  font-size: 1.6rem;
}

.content-card-header h3 {
  font-weight: 800;
  font-size: 1rem;
}

.content-card-body {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
}

.content-card-body b {
  color: var(--pink);
}

.content-section-image {
  text-align: center;
  font-size: 4rem;
  margin: 12px 0;
}

.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  color: var(--text);
  margin: 24px 0 12px;
}

/* ─── 19. VIDEO SECTION ─── */
.video-section {
  margin-bottom: 16px;
}

.video-placeholder {
  background: #FFFBF7;
  border: 2px dashed #E5D5C5;
  border-radius: var(--radius);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all .25s;
  padding: 24px;
}

.video-placeholder:hover {
  border-color: var(--pink);
  background: #FFF0F5;
}

.video-placeholder-icon {
  font-size: 3rem;
}

.video-placeholder-text {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.video-placeholder-sub {
  font-size: .85rem;
  color: var(--text-light);
}

.video-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 320px;
  display: block;
}

/* ─── 20. KEYWORDS ─── */
.key-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.keyword {
  background: #FFF0F5;
  color: var(--pink);
  padding: 6px 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: .88rem;
  transition: all .2s;
  cursor: default;
}

.keyword:hover {
  background: var(--pink);
  color: #fff;
  transform: scale(1.05);
}

/* ─── 21. ACTIVITIES ─── */
.activity-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border-top: 4px solid var(--purple-light);
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.activity-type-badge {
  background: #FFF0F5;
  color: var(--pink);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 800;
}

.activity-header h4 {
  font-weight: 800;
  font-size: 1rem;
}

.activity-instruction {
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

/* Fill Blank */
.fill-blank-item {
  margin-bottom: 16px;
  padding: 14px;
  background: #FAF6F0;
  border-radius: 12px;
}

.fill-blank-sentence {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.6;
}

.blank-slot {
  display: inline-block;
  min-width: 70px;
  padding: 4px 12px;
  background: #FFF0F5;
  border-radius: 8px;
  color: var(--pink);
  font-weight: 800;
  text-align: center;
}

.blank-slot.correct {
  background: #D1FAE5;
  color: var(--green);
}

.word-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-option {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-size: .88rem;
}

.word-option:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink);
}

.word-option.correct {
  background: #D1FAE5;
  border-color: var(--green);
  color: var(--green);
}

.word-option.wrong {
  background: #FEE2E2;
  border-color: var(--red);
  color: var(--red);
}

.fb-feedback {
  font-size: .85rem;
  font-weight: 700;
  margin-top: 6px;
}

.fb-feedback.correct {
  color: var(--green);
}

.fb-feedback.wrong {
  color: var(--red);
}

/* Match */
.match-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-item {
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  text-align: center;
  transition: all .2s;
}

.match-item:hover {
  border-color: var(--purple-light);
  background: #FFF0F5;
}

.match-item.selected {
  border-color: var(--pink);
  background: #FFF0F5;
  transform: scale(1.02);
}

.match-item.matched {
  background: #D1FAE5;
  border-color: var(--green);
  color: var(--green);
  cursor: default;
}

.match-item.wrong {
  border-color: var(--red);
  background: #FEE2E2;
  animation: shake .3s;
}

.match-result {
  font-weight: 800;
  font-size: .95rem;
  margin-top: 8px;
}

.match-result.success {
  color: var(--green);
}

/* Sort */
.sort-items-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 44px;
  padding: 10px;
  background: #FAF6F0;
  border-radius: 12px;
}

.sort-item {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-size: .88rem;
}

.sort-item:hover {
  border-color: var(--purple-light);
}

.sort-item.selected {
  border-color: var(--pink);
  background: #FFF0F5;
  transform: scale(1.05);
}

.sort-item.matched {
  background: #D1FAE5;
  border-color: var(--green);
}

.sort-item.wrong-sort {
  border-color: var(--red);
  background: #FEE2E2;
  animation: shake .3s;
}

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

.sort-bucket {
  border: 2px dashed #E5D5C5;
  border-radius: 14px;
  padding: 14px;
  min-height: 80px;
  cursor: pointer;
  transition: border-color .2s;
}

.sort-bucket:hover {
  border-color: var(--pink);
  background: #FFF0F5;
}

.sort-bucket-label {
  font-weight: 800;
  font-size: .88rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.sort-bucket-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sort-placed {
  padding: 5px 12px;
  background: #D1FAE5;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
}

.sort-result {
  font-weight: 800;
  margin-top: 8px;
}

/* Order */
.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.order-item {
  padding: 10px 16px;
  border-radius: 14px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  transition: all .2s;
}

.order-item:hover {
  border-color: var(--purple-light);
}

.order-item.order-used {
  opacity: .3;
  cursor: not-allowed;
}

.order-placed {
  background: #FAF6F0;
  border-radius: 12px;
  padding: 14px;
  min-height: 50px;
}

.order-hint {
  font-size: .85rem;
  color: var(--text-light);
  font-weight: 600;
}

.order-placed-item {
  font-weight: 700;
  font-size: .9rem;
  color: var(--green);
  margin-bottom: 4px;
}

.order-result {
  font-weight: 800;
  margin-top: 8px;
}

.order-result.success {
  color: var(--green);
}

/* True/False */
.tf-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tf-item {
  background: #FAF6F0;
  border-radius: 12px;
  padding: 14px 16px;
}

.tf-statement {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 10px;
}

.tf-btns {
  display: flex;
  gap: 10px;
}

.tf-btn {
  padding: 10px 24px;
  border-radius: 20px;
  border: 2px solid;
  font-weight: 800;
  cursor: pointer;
  font-size: .9rem;
  transition: all .2s;
}

.true-btn {
  border-color: var(--green);
  color: var(--green);
  background: var(--card);
}

.false-btn {
  border-color: var(--red);
  color: var(--red);
  background: var(--card);
}

.true-btn:hover:not(:disabled) {
  background: var(--green);
  color: #fff;
}

.false-btn:hover:not(:disabled) {
  background: var(--red);
  color: #fff;
}

.tf-feedback {
  font-size: .85rem;
  font-weight: 700;
  margin-top: 8px;
}

.tf-feedback.correct {
  color: var(--green);
}

.tf-feedback.wrong {
  color: var(--red);
}

/* MCQ */
.mcq-item {
  background: #FAF6F0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.mcq-q {
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 10px;
}

.mcq-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mcq-option {
  padding: 8px 18px;
  border-radius: 20px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-size: .88rem;
}

.mcq-option:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink);
}

.mcq-option.correct {
  background: #D1FAE5;
  border-color: var(--green);
  color: var(--green);
}

.mcq-option.wrong {
  background: #FEE2E2;
  border-color: var(--red);
  color: var(--red);
}

.mcq-feedback {
  font-size: .85rem;
  font-weight: 700;
  margin-top: 6px;
}

.mcq-feedback.correct {
  color: var(--green);
}

.mcq-feedback.wrong {
  color: var(--red);
}

/* ─── 22. QUIZ ENGINE ─── */
.quiz-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple-light));
  border-radius: 4px;
  transition: width .4s;
}

.quiz-progress-text {
  font-weight: 800;
  font-size: .85rem;
  color: var(--text-light);
  white-space: nowrap;
}

.quiz-q {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border: 2px solid #E5E7EB;
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  min-width: 110px;
  transition: all .25s;
  position: relative;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--pink);
  background: #FFF0F5;
  transform: translateY(-2px);
}

.quiz-option.correct {
  border-color: var(--green);
  background: #ECFDF5;
}

.quiz-option.wrong {
  border-color: var(--red);
  background: #FEF2F2;
  animation: shake .3s;
}

.qo-emoji {
  font-size: 1.8rem;
}

.qo-label {
  font-weight: 800;
  font-size: .88rem;
}

.checkmark {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn .3s;
}

@keyframes popIn {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

.quiz-nav-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
  display: inline-block;
  margin-top: 4px;
}

.quiz-nav-btn:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
}

.quiz-nav-btn.secondary {
  background: var(--text-light);
}

.quiz-nav-btn.hidden {
  display: none;
}

/* Quiz Score */
.quiz-score {
  text-align: center;
  padding: 32px 20px;
}

.score-emoji {
  font-size: 5rem;
  animation: bounce 1s ease-in-out infinite;
  margin-bottom: 10px;
}

.score-text {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: var(--pink);
}

.score-pct {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.score-msg {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.score-stars {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 20px;
}

/* ─── 23. GAMES HUB ─── */
.games-hero {
  background: linear-gradient(135deg, #FBCFE8, #FDE68A, #A7F3D0);
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.games-hero h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 8px;
}

.games-hero p {
  font-size: 1rem;
  color: var(--pink);
  font-weight: 700;
  margin-bottom: 12px;
}

.games-hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.games-hero-stats span {
  background: rgba(255, 255, 255, .6);
  padding: 6px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: .9rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.game-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .3s;
}

.game-card:hover:not(.game-locked) {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.game-locked {
  opacity: .55;
  filter: grayscale(.6);
  cursor: not-allowed;
}

.game-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 14px;
}

.game-card-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.game-card-desc {
  font-size: .82rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.game-card-badge {
  font-size: .8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
}

.game-card-badge.unlocked {
  background: #D1FAE5;
  color: var(--green);
}

.game-card-badge.locked {
  background: #FEE2E2;
  color: var(--red);
}

/* ─── 24. GAME PLAY ─── */
.game-play {
  padding: 8px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #FFF1E6;
}

.game-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--pink);
}

.game-score,
.game-q {
  font-weight: 800;
  font-size: .95rem;
}

.game-lives {
  font-size: 1.1rem;
}

.game-progress-bar {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.game-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple-light));
  transition: width .3s;
}

.game-area {
  text-align: center;
  padding: 16px 0;
}

.game-hint {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 16px;
  background: #FAF6F0;
  padding: 10px 16px;
  border-radius: 12px;
}

.game-feedback {
  font-size: 1rem;
  font-weight: 800;
  margin: 10px 0;
  min-height: 24px;
}

.game-feedback.correct {
  color: var(--green);
}

.game-feedback.wrong {
  color: var(--red);
}

.game-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.game-submit-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
}

.game-submit-btn:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
}

.game-skip-btn {
  background: #F3F4F6;
  color: var(--text-light);
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s;
}

.game-skip-btn:hover {
  background: #E5E7EB;
}

/* Memory Match card grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  max-width: 520px;
  margin: 16px auto;
}

.memory-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 600px;
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .4s;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .08);
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.memory-card-front {
  background: linear-gradient(135deg, var(--pink), var(--purple-light));
  color: #fff;
  font-size: 2.2rem;
  border: 2px solid #fff;
}

.memory-card-back {
  background: #E6FFFA;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
  transform: rotateY(180deg);
  text-align: center;
  padding: 6px;
  border: 2px solid var(--green);
}

.memory-card.matched .memory-card-back {
  background: #ECFDF5;
  border-color: var(--green);
}

.game-result {
  text-align: center;
  padding: 32px 20px;
}

.game-result-emoji {
  font-size: 5rem;
  animation: bounce 1s ease-in-out infinite;
  margin-bottom: 10px;
}

.game-result h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--pink);
  margin-bottom: 10px;
}

.game-result-score {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: var(--pink);
}

.game-result-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 10px;
}

.game-result-stars {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 20px;
}

.game-result-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.game-moves {
  font-weight: 800;
  font-size: .9rem;
}

/* ─── 25. ACHIEVEMENTS ─── */
.profile-card {
  background: linear-gradient(135deg, var(--pink), #BE185D);
  color: #fff;
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.profile-avatar {
  font-size: 5rem;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 4px solid rgba(255, 255, 255, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  animation: bounce 3s ease-in-out infinite;
}

.profile-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.profile-level {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 16px;
}

.xp-bar {
  height: 12px;
  background: rgba(255, 255, 255, .2);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 6px;
  max-width: 300px;
}

.xp-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .8s;
}

.xp-label {
  font-size: .85rem;
  opacity: .8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.sb-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.sb-num {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--pink);
}

.sb-label {
  font-size: .78rem;
  color: var(--text-light);
  font-weight: 700;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.badge-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all .25s;
  cursor: default;
}

.badge-card.unlocked {
  border: 2px solid var(--yellow);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .2);
}

.badge-card.badge-locked {
  opacity: .45;
  filter: grayscale(.5);
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.badge-title {
  font-weight: 800;
  font-size: .82rem;
  margin-bottom: 4px;
}

.badge-hint {
  font-size: .72rem;
  color: var(--text-light);
}

.badge-hint.unlocked-hint {
  color: var(--green);
}

.progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.progress-card {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: .9rem;
}

.progress-card.done {
  background: #ECFDF5;
  border-left: 4px solid var(--green);
}

/* ─── 26. MODALS ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .25s;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal-card {
  background: var(--white);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .3s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

.modal-large {
  width: 95%;
  max-width: 700px;
}

.modal-video {
  width: 95%;
  max-width: 820px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin-bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #F3F4F6;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
  z-index: 10;
}

.modal-close:hover {
  background: #E5E7EB;
  transform: scale(1.1);
}

/* ─── 27. BOTTOM NAV BAR ─── */
.bottom-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--white);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin-top: 28px;
}

.nav-action {
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid #E5E7EB;
  background: var(--card);
  color: var(--text);
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s;
}

.nav-action:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.nav-action.primary {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.nav-action.primary:hover {
  background: #BE185D;
}

/* ─── 28. TOAST ─── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #BE185D;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 800;
  font-size: .95rem;
  z-index: 300;
  opacity: 0;
  transition: all .3s;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(236, 72, 153, .4);
}

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

/* ─── 29. CONFETTI ─── */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  overflow: hidden;
}

.confetto {
  position: absolute;
  top: -20px;
  animation: confettiFall linear forwards;
  border-radius: 2px;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ─── 30. ANIMATIONS ─── */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-5px)
  }

  75% {
    transform: translateX(5px)
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-12px)
  }
}

/* ─── 31. UTILITIES ─── */
.hidden {
  display: none !important;
}

.text-pink {
  color: var(--pink)
}

.text-green {
  color: var(--green)
}

.text-blue {
  color: var(--blue)
}

.text-orange {
  color: var(--orange)
}

.text-red {
  color: var(--red)
}

.text-yellow {
  color: var(--yellow)
}

/* ─── 32. RESPONSIVE ─── */
@media (max-width:768px) {
  body {
    zoom: 100% !important;
  }
  @supports not (zoom: 1) {
    body {
      width: 100% !important;
      min-height: 100vh !important;
      transform: none !important;
    }
  }
  .hero {
    padding: 0 !important;
  }

  .page-container {
    padding: 16px 16px 80px;
  }

  .home-hero {
    min-height: 220px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-mascot {
    font-size: 7rem;
    right: 12px;
  }

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

  .units-grid {
    grid-template-columns: 1fr;
  }

  .topics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grammar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .practice-activities-row {
    grid-template-columns: 1fr;
  }

  .match-container {
    grid-template-columns: 1fr;
  }

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

  .quiz-option {
    min-width: 90px;
  }
}

@media (max-width:480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-mascot {
    font-size: 5rem;
  }

  .learn-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .grammar-grid {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .badges-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}