/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0a2540;
  --teal: #0f766e;
  --teal-light: #14b8a6;
  --teal-bg: #f0fdfa;
  --yellow: #facc15;
  --yellow-dark: #ca8a04;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --sun: #fbbf24;
  --moon: #3b82f6;
  --green: #16a34a;
  --red: #dc2626;
  --shadow: 0 4px 24px rgba(10,37,64,0.10);
  --shadow-lg: 0 8px 40px rgba(10,37,64,0.15);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --font: 'Cairo', 'Tajawal', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  direction: rtl;
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.7;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 4px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,37,64,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-emoji { font-size: 32px; }

.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 20px; font-weight: 900; color: var(--yellow); line-height: 1.2; }
.logo-sub { font-size: 12px; color: #94a3b8; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.nav-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-btn.active { background: var(--teal); color: white; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== PAGES ===== */
.page { display: none; min-height: calc(100vh - 72px); }
.page.active { display: block; }

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 90vh;
  background: linear-gradient(135deg, #0a2540 0%, #0f4c75 40%, #0f766e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 24px;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.fl {
  position: absolute;
  right: var(--x, 10%);
  top: var(--y, 20%);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  color: rgba(255,255,255,0.06);
  animation: floatLetter 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  font-family: var(--font);
}
@keyframes floatLetter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}

.mascot-box {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}
.mascot { font-size: 80px; animation: bounce 2s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.speech-bubble {
  position: absolute;
  top: -10px;
  left: -80px;
  background: var(--yellow);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 20px 20px 4px 20px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.hero-content h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: white;
  line-height: 1.3;
  margin-bottom: 20px;
}
.highlight { color: var(--yellow); }

.hero-p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: #94d1cb;
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn.primary { background: var(--teal); color: white; }
.btn.primary:hover { background: var(--teal-light); }
.btn.yellow { background: var(--yellow); color: var(--navy); }
.btn.yellow:hover { background: #fde047; }
.btn.outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn.outline:hover { background: rgba(255,255,255,0.1); border-color: white; }
.btn.small { padding: 10px 18px; font-size: 14px; }
.btn.danger { background: var(--red); color: white; }

/* ===== STATS ROW ===== */
.stats-row {
  background: var(--navy);
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 48px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-left: none; }
.sn { font-size: 36px; font-weight: 900; color: var(--yellow); }
.sl { font-size: 14px; color: #94a3b8; margin-top: 4px; }

/* ===== CONTAINER ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 60px 24px; }

/* ===== SECTION HEADER ===== */
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(24px, 4vw, 38px); font-weight: 900; color: var(--navy); margin-bottom: 10px; }
.sec-head p { font-size: 18px; color: var(--gray-600); }

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.feat-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
}
.feat-card:hover { transform: translateY(-6px); border-color: var(--teal-light); box-shadow: var(--shadow-lg); }
.ficon { font-size: 40px; margin-bottom: 16px; }
.feat-card h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.feat-card p { font-size: 15px; color: var(--gray-600); line-height: 1.6; }

/* ===== WHO GRID ===== */
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.who-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}
.who-card:hover { transform: translateY(-4px); }
.who-icon { font-size: 52px; margin-bottom: 16px; }
.who-card h3 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 18px; }
.who-card ul { list-style: none; text-align: right; margin-bottom: 24px; }
.who-card ul li { padding: 6px 0; font-size: 15px; color: var(--gray-600); }

/* ===== LETTERS GRID ===== */
.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.letter-card {
  background: white;
  border-radius: var(--radius);
  padding: 22px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: all 0.22s;
  border: 2px solid transparent;
}
.letter-card:hover { transform: translateY(-4px); border-color: var(--teal-light); box-shadow: var(--shadow-lg); }
.letter-card.selected { border-color: var(--teal); background: var(--teal-bg); }
.lc-char { font-size: 48px; font-weight: 900; color: var(--teal); line-height: 1; margin-bottom: 6px; }
.lc-name { font-size: 14px; color: var(--gray-600); font-weight: 600; }

/* ===== LETTER DETAIL ===== */
.letter-detail {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--teal-light);
}
.letter-detail.hidden { display: none; }
.ld-header { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.ld-big { font-size: 100px; font-weight: 900; color: var(--teal); line-height: 1; }
.ld-info h2 { font-size: 32px; font-weight: 900; color: var(--navy); }
.ld-info p { color: var(--gray-600); font-size: 17px; }
.ld-actions { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

.ld-forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.ld-form-card { background: var(--teal-bg); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.ld-form-char { font-size: 36px; font-weight: 900; color: var(--teal); }
.ld-form-label { font-size: 13px; color: var(--gray-600); margin-top: 4px; }

.ld-words { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.word-chip {
  background: var(--navy);
  color: white;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.word-chip:hover { background: var(--teal); transform: scale(1.05); }

.ld-quiz { background: var(--gray-50); border-radius: var(--radius); padding: 24px; }
.ld-quiz h4 { font-size: 18px; color: var(--navy); margin-bottom: 16px; }
.quiz-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.quiz-chip {
  background: white;
  border: 2px solid var(--gray-200);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-chip:hover { border-color: var(--teal); }
.quiz-chip.correct { background: #dcfce7; border-color: var(--green); color: var(--green); }
.quiz-chip.wrong { background: #fee2e2; border-color: var(--red); color: var(--red); }

/* ===== TABS ===== */
.tabs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 12px 24px;
  border-radius: 50px;
  border: 2px solid var(--gray-200);
  background: white;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { border-color: var(--teal); color: var(--teal); }
.tab-btn.active { background: var(--teal); color: white; border-color: var(--teal); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== HARAKAT CARDS ===== */
.harakat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.haraka-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 5px solid transparent;
}
.haraka-card.fatha { border-top-color: #f97316; }
.haraka-card.kasra { border-top-color: #3b82f6; }
.haraka-card.damma { border-top-color: #8b5cf6; }
.haraka-symbol { font-size: 64px; font-weight: 900; color: var(--teal); margin-bottom: 12px; }
.haraka-name { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.haraka-card p { font-size: 15px; color: var(--gray-600); margin-bottom: 16px; }
.haraka-examples { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.ex-chip {
  background: var(--teal-bg);
  color: var(--teal);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.ex-chip:hover { background: var(--teal); color: white; }

/* ===== COMPARE CARDS ===== */
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.compare-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.compare-card h3 { font-size: 30px; font-weight: 900; color: var(--navy); margin-bottom: 10px; }
.compare-card p { color: var(--gray-600); margin-bottom: 18px; }
.compare-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== SUKUN ===== */
.info-card.big {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 24px;
}
.info-icon { font-size: 52px; margin-bottom: 16px; }
.info-card.big h3 { font-size: 28px; font-weight: 900; color: var(--navy); margin-bottom: 12px; }
.info-card.big p { font-size: 17px; color: var(--gray-600); margin-bottom: 28px; }
.sukun-examples { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.sukun-ex {
  background: var(--navy);
  color: white;
  padding: 18px 24px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.sukun-ex:hover { background: var(--teal); transform: scale(1.05); }
.sukun-ex span { display: block; font-size: 32px; font-weight: 900; }
.sukun-ex small { font-size: 13px; color: rgba(255,255,255,0.7); }

/* ===== TANWIN ===== */
.tanwin-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.tanwin-card {
  background: var(--teal-bg);
  border-radius: var(--radius);
  padding: 20px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.tanwin-card:hover { border-color: var(--teal); transform: scale(1.04); }
.tchar { display: block; font-size: 36px; font-weight: 900; color: var(--navy); }
.tname { display: block; font-size: 14px; color: var(--gray-600); margin-top: 6px; }

/* ===== TANWIN PAGE ===== */
.tanwin-big-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.tanwin-big-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.tanwin-big-card:hover { border-color: var(--teal); transform: translateY(-4px); }
.tb-sym { font-size: 52px; font-weight: 900; color: var(--teal); margin-bottom: 12px; }
.tb-name { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.tanwin-big-card p { font-size: 15px; color: var(--gray-600); margin-bottom: 16px; }

/* ===== SYLLABLES ===== */
.syllable-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 32px; }
.step-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step-num {
  width: 44px; height: 44px;
  background: var(--teal);
  color: white;
  border-radius: 50%;
  font-size: 20px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.step-card h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.step-demo { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.step-piece {
  background: var(--teal-bg);
  color: var(--teal);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s;
}
.step-piece:hover { background: var(--teal); color: white; }
.step-plus { font-size: 20px; font-weight: 700; color: var(--gray-400); }

/* ===== LAM PAGE ===== */
.lam-story { margin-bottom: 32px; }
.story-bubble {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}
.story-icon { font-size: 52px; flex-shrink: 0; }
.story-bubble p { font-size: 18px; color: var(--gray-600); line-height: 1.7; font-style: italic; }

.lam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.lam-card { border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.sun-card { background: linear-gradient(135deg, #fffbeb, #fef9c3); border: 2px solid #fde68a; }
.moon-card { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 2px solid #bfdbfe; }
.lam-title { font-size: 24px; font-weight: 900; margin-bottom: 12px; }
.sun-card .lam-title { color: var(--yellow-dark); }
.moon-card .lam-title { color: var(--moon); }
.lam-rule { font-size: 16px; margin-bottom: 16px; color: var(--gray-600); }
.lam-letters {
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: var(--gray-800);
}
.lam-examples { display: flex; gap: 10px; flex-wrap: wrap; }
.lam-ex {
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.sun-card .lam-ex { background: #fde68a; color: #92400e; }
.sun-card .lam-ex:hover { background: var(--yellow); }
.moon-card .lam-ex { background: #bfdbfe; color: #1e40af; }
.moon-card .lam-ex:hover { background: #93c5fd; }

/* ===== TAA PAGE ===== */
.taa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.taa-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.taa-char { font-size: 72px; font-weight: 900; color: var(--teal); margin-bottom: 12px; }
.taa-card h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.taa-card p { font-size: 15px; color: var(--gray-600); margin-bottom: 18px; }
.taa-examples { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== SIMILAR LETTERS ===== */
.similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 28px; }
.similar-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.similar-card h4 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.similar-letters { display: flex; gap: 10px; flex-wrap: wrap; }
.sim-letter {
  font-size: 36px;
  font-weight: 900;
  color: var(--teal);
  background: var(--teal-bg);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.sim-letter:hover { background: var(--teal); color: white; transform: scale(1.1); }

/* ===== ACTIVITY BOX ===== */
.activity-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 2px solid var(--gray-100);
}
.activity-box h3 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.activity-box p { color: var(--gray-600); margin-bottom: 20px; }

/* ===== GAME RESULT ===== */
.game-result { margin-top: 24px; min-height: 60px; }
.gr-question { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 20px; }
.gr-choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gr-choice {
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-800);
  font-family: var(--font);
}
.gr-choice:hover { border-color: var(--teal); background: var(--teal-bg); color: var(--teal); }
.gr-choice.correct { background: #dcfce7; border-color: var(--green); color: var(--green); }
.gr-choice.wrong { background: #fee2e2; border-color: var(--red); color: var(--red); }
.gr-feedback { font-size: 22px; font-weight: 800; margin-top: 16px; }
.gr-feedback.ok { color: var(--green); }
.gr-feedback.err { color: var(--red); }

/* ===== GAMES PAGE ===== */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 36px; }
.game-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
  border: 2px solid transparent;
}
.game-card:hover { transform: translateY(-6px); border-color: var(--teal-light); box-shadow: var(--shadow-lg); }
.game-icon { font-size: 48px; margin-bottom: 14px; }
.game-card h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.game-card p { font-size: 14px; color: var(--gray-600); margin-bottom: 20px; line-height: 1.6; }

.game-stage {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  min-height: 300px;
  border: 2px solid var(--teal-light);
}
.empty-state { color: var(--gray-400); font-size: 22px; text-align: center; padding: 60px 0; }

/* ===== BUBBLES GAME ===== */
.bubbles-container {
  position: relative;
  width: 100%;
  height: 340px;
  background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  animation: bubbleFloat 3s ease-in-out infinite;
  user-select: none;
}
.bubble:hover { transform: scale(1.1); }
@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== MEMORY GAME ===== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}
.memory-card {
  aspect-ratio: 1;
  background: var(--navy);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: transparent;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font);
  user-select: none;
}
.memory-card.flipped { background: white; color: var(--teal); border: 2px solid var(--teal-light); }
.memory-card.matched { background: #dcfce7; color: var(--green); border: 2px solid var(--green); cursor: default; }

/* ===== BASKET GAME ===== */
.basket-word {
  display: inline-block;
  background: var(--navy);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 24px;
  font-weight: 800;
  margin: 10px;
  cursor: pointer;
}
.basket-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.basket {
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 100px;
  text-align: center;
  transition: border-color 0.2s;
}
.basket h4 { font-size: 16px; color: var(--gray-600); margin-bottom: 10px; }
.basket.highlight { border-color: var(--teal); background: var(--teal-bg); }

/* ===== QUIZ ===== */
.quiz-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.quiz-topic-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: all 0.22s;
  border: 2px solid transparent;
}
.quiz-topic-card:hover { transform: translateY(-4px); border-color: var(--teal); }
.qt-icon { font-size: 40px; margin-bottom: 12px; }
.quiz-topic-card h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.quiz-topic-card p { font-size: 14px; color: var(--gray-600); }

.quiz-area { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.quiz-area.hidden { display: none; }
.quiz-progress-bar { width: 100%; height: 10px; background: var(--gray-100); border-radius: 5px; margin-bottom: 20px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--teal); border-radius: 5px; transition: width 0.4s; }
.quiz-q-num { font-size: 14px; color: var(--gray-400); margin-bottom: 10px; }
.quiz-question { font-size: 28px; font-weight: 800; color: var(--navy); margin-bottom: 28px; text-align: center; }
.quiz-choices { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.quiz-choice {
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  color: var(--gray-800);
}
.quiz-choice:hover { border-color: var(--teal); background: var(--teal-bg); }
.quiz-choice.correct { background: #dcfce7; border-color: var(--green); color: var(--green); }
.quiz-choice.wrong { background: #fee2e2; border-color: var(--red); color: var(--red); }
.quiz-feedback { font-size: 20px; font-weight: 800; text-align: center; margin-top: 20px; padding: 16px; border-radius: var(--radius-sm); }
.quiz-feedback.hidden { display: none; }
.quiz-feedback.ok { background: #dcfce7; color: var(--green); }
.quiz-feedback.err { background: #fee2e2; color: var(--red); }

.quiz-result {
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.quiz-result.hidden { display: none; }
.qr-emoji { font-size: 72px; margin-bottom: 16px; }
.qr-score { font-size: 52px; font-weight: 900; color: var(--teal); margin-bottom: 8px; }
.qr-msg { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 24px; }

/* ===== PROGRESS DASHBOARD ===== */
.progress-dashboard {}
.pd-stars {
  background: linear-gradient(135deg, var(--navy), #0f4c75);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: white;
  margin-bottom: 28px;
}
.pd-stars-count { font-size: 72px; font-weight: 900; color: var(--yellow); }
.pd-stars-label { font-size: 20px; color: #94d1cb; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pd-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.pd-icon { font-size: 32px; margin-bottom: 10px; }
.pd-skill { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.pd-bar { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.pd-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s; }
.pd-pct { font-size: 13px; color: var(--gray-400); margin-top: 6px; }

/* ===== TEACHER PAGE ===== */
.teacher-plan {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.teacher-plan h3 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 28px; }
.plan-steps { display: flex; flex-direction: column; gap: 20px; }
.plan-step { display: flex; gap: 20px; align-items: flex-start; }
.ps-num {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--teal); color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.ps-content h4 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.ps-content p { font-size: 15px; color: var(--gray-600); }

.skills-sequence {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.skills-sequence h3 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 24px; }
.skills-list { display: flex; flex-direction: column; gap: 12px; }
.skill-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
}
.skill-item.done { border-color: var(--teal); background: var(--teal-bg); }
.skill-num {
  width: 32px; height: 32px;
  background: var(--gray-200);
  color: var(--gray-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.skill-item.done .skill-num { background: var(--teal); color: white; }
.skill-item span:last-child { font-size: 16px; font-weight: 600; color: var(--gray-800); }

.teacher-tips { margin-bottom: 32px; }
.teacher-tips h3 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 20px; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tip-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.tip-icon { font-size: 32px; margin-bottom: 10px; }
.tip-card p { font-size: 15px; color: var(--gray-600); }

/* ===== PARENT PAGE ===== */
.parent-tips { margin-bottom: 40px; }
.parent-tips h3 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 24px; }
.parent-tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.parent-tip {
  background: white;
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.pt-icon { font-size: 40px; margin-bottom: 12px; }
.parent-tip h4 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.parent-tip p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

.contact-section { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); }
.contact-section h3 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 28px; text-align: center; }
.contact-form-wrap { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.2s;
  direction: rtl;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  z-index: 9999;
  transition: transform 0.3s;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== STARS OVERLAY ===== */
.stars-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.3s;
}
.stars-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.stars-content { text-align: center; }
.stars-emoji { font-size: 72px; animation: pop 0.4s; }
.stars-msg { font-size: 32px; font-weight: 900; color: white; margin-top: 16px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 32px 24px;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-logo { font-size: 24px; font-weight: 900; color: var(--yellow); margin-bottom: 10px; }
.footer-credit { margin-top: 10px; font-size: 14px; opacity: 0.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .lam-grid { grid-template-columns: 1fr; }
  .ld-forms { grid-template-columns: repeat(3, 1fr); }
  .memory-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .main-nav {
    display: none;
    position: fixed;
    top: 72px;
    right: 0; left: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px;
    gap: 6px;
    z-index: 99;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-btn { text-align: right; justify-content: flex-start; padding: 12px 16px; }
  .stat-item { padding: 20px 20px; }
  .sn { font-size: 28px; }
  .hero-section { min-height: auto; padding: 48px 20px; }
  .mascot { font-size: 56px; }
  .speech-bubble { font-size: 13px; padding: 6px 12px; left: -60px; }
  .container { padding: 40px 16px; }
  .lam-letters { font-size: 16px; letter-spacing: 2px; }
  .basket-area { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .memory-card { font-size: 22px; }
  .letter-detail { padding: 24px 16px; }
  .ld-big { font-size: 72px; }
  .ld-forms { gap: 10px; }
  .game-stage { padding: 20px; }
  .quiz-area { padding: 24px 16px; }
  .teacher-plan, .skills-sequence, .contact-section { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .stats-row { flex-wrap: wrap; }
  .stat-item { flex: 1 1 45%; border-left: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .features-grid, .who-grid { grid-template-columns: 1fr; }
  .ld-header { flex-direction: column; text-align: center; }
  .ld-forms { grid-template-columns: 1fr 1fr 1fr; }
  .games-grid { grid-template-columns: 1fr 1fr; }
  .game-card { padding: 20px 14px; }
  .game-icon { font-size: 36px; }
  .game-card h3 { font-size: 16px; }
}
