@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400;500;600;700;800&family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --ink: #243552;
  --muted: #71809c;
  --purple: #7659d8;
  --purple-dark: #5c42bd;
  --lavender: #eeeaff;
  --coral: #ff856f;
  --yellow: #ffc947;
  --mint: #b9ead8;
  --sky: #dff2ff;
  --cream: #fff9f0;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(81, 70, 135, 0.12);
  --soft-shadow: 0 9px 20px rgba(81, 70, 135, 0.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 11% 18%, rgba(255, 201, 71, .16) 0 6px, transparent 7px),
    radial-gradient(circle at 89% 75%, rgba(118, 89, 216, .11) 0 5px, transparent 6px),
    linear-gradient(145deg, #fffaf1 0%, #fff4ec 47%, #f2efff 100%);
  font-family: 'Cairo', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; }
button:focus-visible { outline: 4px solid rgba(118, 89, 216, .35); outline-offset: 4px; }
.app-shell { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 24px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:64px; }
.brand { display:flex; align-items:center; gap:11px; padding:0; border:0; background:transparent; color:var(--ink); cursor:pointer; text-align:right; }
.brand-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:15px 15px 15px 5px; color:#fff; background:linear-gradient(145deg, var(--purple), #9e87f2); font-family:'Baloo Bhaijaan 2', sans-serif; font-size:29px; line-height:1; box-shadow:0 8px 16px rgba(118,89,216,.22); transform:rotate(-6deg); }
.brand-name { font-family:'Baloo Bhaijaan 2', sans-serif; font-size:20px; font-weight:800; letter-spacing:-.3px; }
.top-stats { display:flex; align-items:center; gap:10px; }
.stat-pill { display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.75); border:1px solid rgba(118,89,216,.08); border-radius:999px; padding:8px 13px; box-shadow:var(--soft-shadow); font-weight:800; font-size:15px; }
.stat-label { color:var(--muted); font-size:12px; font-weight:700; }
.star-icon { color:#f3b51b; font-size:19px; text-shadow:0 2px 0 #ffe9a0; }
.progress-dot { width:9px; height:9px; border-radius:50%; background:#77cdb0; box-shadow:0 0 0 4px #d9f6ea; }
.screen { animation:screenIn .45s ease both; padding:58px 0 24px; }
.screen[hidden] { display:none; }
@keyframes screenIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
#welcome-screen { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); align-items:center; gap:28px; min-height:560px; direction:ltr; }
.eyebrow { display:inline-flex; align-items:center; gap:7px; color:var(--purple); font-size:14px; font-weight:800; letter-spacing:.1px; }
.hero-copy { grid-column:1; direction:rtl; width:auto; padding:28px 0 15px; }
h1, h2, p { margin-top:0; }
h1, h2 { font-family:'Baloo Bhaijaan 2', sans-serif; }
h1 { font-size:clamp(48px, 6vw, 78px); line-height:1.04; letter-spacing:-2px; margin:16px 0 20px; font-weight:800; }
h1 span { color:var(--coral); position:relative; }
h1 span::after { content:""; position:absolute; height:8px; width:76%; right:4%; bottom:-5px; background:#ffd566; border-radius:100%; transform:rotate(-2deg); z-index:-1; opacity:.8; }
.hero-description { color:var(--muted); max-width:500px; font-size:18px; line-height:1.9; margin-bottom:28px; font-weight:600; }
.primary-button, .secondary-button { border:0; cursor:pointer; transition:transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button { display:inline-flex; align-items:center; justify-content:center; gap:16px; min-height:58px; padding:13px 24px; border-radius:19px; color:white; background:linear-gradient(135deg, var(--purple), #987ff0); box-shadow:0 11px 0 #5b43b5, 0 18px 25px rgba(118,89,216,.22); font-size:19px; font-weight:800; }
.primary-button:hover { transform:translateY(-3px); box-shadow:0 14px 0 #5b43b5, 0 23px 29px rgba(118,89,216,.22); }
.primary-button:active { transform:translateY(5px); box-shadow:0 5px 0 #5b43b5, 0 11px 15px rgba(118,89,216,.16); }
.hero-button { min-width:188px; }
.button-arrow { display:grid; place-items:center; width:31px; height:31px; border-radius:10px; background:rgba(255,255,255,.2); font-size:22px; }
.hero-hint { margin-top:22px; color:#9b8ab9; font-size:13px; font-weight:700; }
.hint-spark { color:#e2b32e; font-size:20px; margin-left:6px; }
.hero-scene { grid-column:2; position:relative; direction:ltr; left:auto; top:auto; width:100%; height:460px; overflow:hidden; border-radius:45% 42% 50% 43%; background:linear-gradient(155deg, #e5f5ff 0%, #d8ecfc 57%, #edf8f4 100%); box-shadow:var(--shadow); }
.hero-scene::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 20% 28%, rgba(255,255,255,.85) 0 24px, transparent 25px), radial-gradient(circle at 82% 16%, rgba(255,255,255,.6) 0 16px, transparent 17px); }
.sun-disc { position:absolute; top:35px; right:50px; font-size:46px; filter:drop-shadow(0 5px 5px rgba(255,201,71,.23)); animation:float 4s ease-in-out infinite; }
.hill { position:absolute; bottom:-130px; border-radius:50% 50% 0 0; transform:rotate(-6deg); }
.hill-back { width:140%; height:300px; left:-20%; background:#bcdfc8; }
.hill-front { width:145%; height:225px; left:-25%; bottom:-125px; background:#9cd1b9; transform:rotate(8deg); }
.hero-letter { position:absolute; display:grid; place-items:center; width:65px; height:65px; border-radius:20px; color:#fff; font-family:'Baloo Bhaijaan 2', sans-serif; font-size:44px; font-weight:800; box-shadow:0 11px 18px rgba(73,80,127,.14); animation:float 4.7s ease-in-out infinite; }
.letter-a { top:129px; left:80px; background:#ff8b76; transform:rotate(-11deg); }
.letter-b { top:213px; left:166px; background:#866ee3; animation-delay:.7s; transform:rotate(8deg); }
.letter-m { top:104px; left:260px; background:#f5bd3c; animation-delay:1.3s; transform:rotate(10deg); }
.hero-animal { position:absolute; z-index:3; font-size:101px; filter:drop-shadow(0 12px 5px rgba(52,72,88,.16)); animation:animalBob 3.3s ease-in-out infinite; }
.animal-lion { left:98px; bottom:69px; transform:rotate(-7deg); }
.animal-elephant { right:71px; bottom:50px; font-size:111px; animation-delay:1.1s; }
.animal-bird { right:197px; top:174px; font-size:53px; animation-delay:.45s; }
.floating-spark { position:absolute; color:#fff; font-size:27px; animation:twinkle 1.9s ease-in-out infinite; }
.spark-a { left:70px; top:67px; color:#ffd45c; }.spark-b { right:120px; top:123px; color:#fff; animation-delay:.8s; }
.scene-caption { position:absolute; z-index:4; bottom:22px; left:0; right:0; text-align:center; color:#467e76; font-size:14px; font-weight:800; direction:rtl; }.scene-caption span { color:var(--purple); }
@keyframes float { 0%,100% { transform:translateY(0) rotate(-2deg); } 50% { transform:translateY(-9px) rotate(2deg); } }
@keyframes animalBob { 0%,100% { transform:translateY(0) rotate(-4deg); } 50% { transform:translateY(-12px) rotate(4deg); } }
@keyframes twinkle { 0%,100% { opacity:.35; transform:scale(.8) rotate(0); } 50% { opacity:1; transform:scale(1.15) rotate(18deg); } }
.section-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:26px; }
h2 { font-size:clamp(32px, 4vw, 47px); line-height:1.15; letter-spacing:-1px; margin:9px 0 8px; }
.section-heading p { color:var(--muted); font-size:16px; font-weight:600; margin-bottom:0; }
.secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 17px; min-height:46px; color:var(--purple-dark); background:#fff; border:1px solid #e9e1ff; border-radius:15px; box-shadow:var(--soft-shadow); font-weight:800; font-size:14px; white-space:nowrap; }.secondary-button:hover { transform:translateY(-2px); background:#f8f5ff; }
.letter-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:14px; }
.letter-card { position:relative; min-height:132px; border:0; border-radius:23px; color:var(--ink); background:#fff; box-shadow:var(--soft-shadow); cursor:pointer; overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; }
.letter-card::before { content:""; position:absolute; width:58px; height:58px; border-radius:50%; background:var(--card-color); opacity:.17; top:-22px; left:-14px; }.letter-card::after { content:""; position:absolute; width:16px; height:16px; border-radius:50%; background:var(--card-color); opacity:.45; bottom:14px; left:16px; }
.letter-card:hover, .letter-card:focus-visible { transform:translateY(-6px) rotate(-1deg); box-shadow:0 16px 25px rgba(81,70,135,.16); }.letter-card:active { transform:translateY(-1px) scale(.98); }
.card-letter { position:relative; z-index:1; display:block; margin-top:11px; font-family:'Baloo Bhaijaan 2', sans-serif; font-size:53px; line-height:1; font-weight:800; color:var(--card-color); }.card-animal { position:relative; z-index:1; display:block; margin-top:6px; font-size:28px; line-height:1; }.card-label { display:block; margin-top:7px; color:var(--muted); font-size:12px; font-weight:800; }
.letter-card.seen::after { content:"✓"; display:grid; place-items:center; width:23px; height:23px; right:12px; left:auto; bottom:12px; color:#fff; background:#77cdb0; opacity:1; font-size:14px; font-weight:900; }
.detail-toolbar, .quiz-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }.detail-breadcrumb, .quiz-progress-label { color:var(--muted); font-size:14px; font-weight:700; }.detail-breadcrumb b, .quiz-progress-label b { color:var(--purple); margin-right:5px; }
.detail-card { display:grid; grid-template-columns:.9fr 1.1fr; overflow:hidden; min-height:485px; border-radius:34px; background:#fff; box-shadow:var(--shadow); }
.letter-showcase { position:relative; display:grid; place-items:center; align-content:center; overflow:hidden; background:linear-gradient(150deg, #e7f7ff, #eff8ff 55%, #e8f7ef); isolation:isolate; }
.letter-showcase::before, .letter-showcase::after { content:""; position:absolute; border-radius:50%; border:1px solid rgba(118,89,216,.12); width:390px; height:390px; }.letter-showcase::before { transform:rotate(25deg); }.letter-showcase::after { width:280px; height:280px; transform:rotate(-25deg); border-color:rgba(255,133,111,.16); }
.showcase-orbit { position:absolute; border-radius:50%; border:2px dashed rgba(118,89,216,.18); width:80px; height:80px; }.orbit-one { top:54px; right:42px; }.orbit-two { bottom:52px; left:45px; width:48px; height:48px; border-color:rgba(255,201,71,.5); }
.big-letter { position:relative; z-index:1; width:196px; height:196px; display:grid; place-items:center; padding-bottom:20px; border-radius:63px 63px 63px 18px; background:linear-gradient(145deg, var(--purple), #a18af2); color:#fff; font-family:'Baloo Bhaijaan 2', sans-serif; font-size:148px; line-height:1; font-weight:800; box-shadow:0 22px 0 rgba(118,89,216,.13), 0 25px 40px rgba(118,89,216,.25); transform:rotate(-5deg); animation:letterPop .65s cubic-bezier(.2,.9,.2,1.2) both; }.big-letter::after { content:""; position:absolute; width:21px; height:21px; border-radius:50%; right:27px; top:24px; background:#ffd665; }
@keyframes letterPop { from { opacity:0; transform:scale(.65) rotate(-14deg); } to { opacity:1; transform:scale(1) rotate(-5deg); } }
.letter-name { position:relative; z-index:1; margin-top:24px; color:var(--purple-dark); font-family:'Baloo Bhaijaan 2', sans-serif; font-size:25px; font-weight:800; }.letter-chip { position:relative; z-index:1; margin-top:11px; color:#7092a3; font-size:12px; font-weight:700; }
.showcase-star { position:absolute; z-index:1; color:#ffc947; font-size:27px; animation:twinkle 2.4s infinite; }.star-top { top:107px; left:95px; }.star-bottom { right:76px; bottom:113px; animation-delay:.6s; }
.animal-showcase { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:38px 28px; }.animal-kicker { display:inline-flex; align-items:center; gap:8px; color:#77a694; font-size:14px; font-weight:800; }.kicker-dot { width:8px; height:8px; border-radius:50%; background:#78cfae; box-shadow:0 0 0 5px #e1f8ed; }.animal-art-wrap { position:relative; width:205px; height:164px; display:grid; place-items:center; margin:15px 0 2px; }.animal-glow { position:absolute; bottom:16px; width:157px; height:52px; border-radius:50%; background:#ffe6b5; opacity:.65; }.animal-art { position:relative; z-index:1; font-size:122px; line-height:1; filter:drop-shadow(0 12px 4px rgba(49,63,81,.17)); animation:animalBob 3s ease-in-out infinite; }.animal-showcase h2 { margin:1px 0 1px; font-size:38px; }.animal-showcase h2 span { color:var(--muted); font-size:26px; font-weight:600; }.animal-showcase h2 strong { color:var(--coral); }.animal-phrase { color:var(--purple); font-family:'Baloo Bhaijaan 2', sans-serif; font-size:23px; font-weight:800; margin:0 0 12px; }.speech-status { color:#8e9ab0; font-size:12px; font-weight:700; }.status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:#77cdb0; margin-left:5px; }.speech-status.no-voice { color:#b1805b; }.speech-status.no-voice .status-dot { background:#ffb56a; }.replay-button { min-height:48px; margin-top:20px; padding:10px 22px; font-size:15px; box-shadow:0 8px 0 #5b43b5, 0 13px 19px rgba(118,89,216,.2); }.replay-button:hover { box-shadow:0 10px 0 #5b43b5, 0 16px 22px rgba(118,89,216,.2); }.detail-footer-note { color:#7c8ca6; text-align:center; margin-top:18px; font-size:13px; font-weight:700; }
.quiz-card { max-width:720px; margin:0 auto; padding:32px 34px 35px; text-align:center; border-radius:34px; background:#fff; box-shadow:var(--shadow); }.quiz-intro { display:flex; align-items:center; justify-content:center; gap:13px; text-align:right; }.quiz-badge { display:grid; place-items:center; width:55px; height:55px; border-radius:19px; background:#fff2ca; font-size:30px; }.quiz-intro h2 { margin:5px 0 0; font-size:34px; }.quiz-animal { display:grid; place-items:center; width:190px; height:160px; margin:25px auto 8px; border-radius:45% 55% 48% 52%; background:linear-gradient(145deg,#f0fbff,#fff1da); font-size:111px; filter:drop-shadow(0 12px 6px rgba(71,82,98,.12)); animation:animalBob 2.8s ease-in-out infinite; }.quiz-question { color:var(--muted); font-size:17px; font-weight:800; margin-bottom:17px; }.quiz-options { display:grid; grid-template-columns:repeat(5, 1fr); gap:10px; max-width:500px; margin:0 auto; }.quiz-option { min-height:59px; border:2px solid #ece8fa; color:var(--purple-dark); background:#faf9ff; border-radius:17px; cursor:pointer; font-family:'Baloo Bhaijaan 2', sans-serif; font-size:30px; font-weight:800; transition:.2s; }.quiz-option:hover { border-color:#baaaf4; background:#f2eeff; transform:translateY(-3px); }.quiz-option.correct { border-color:#73c9a5; background:#e8faf1; color:#2b9b72; }.quiz-option.wrong { border-color:#ffb5a6; background:#fff0ec; color:#e47763; }.quiz-option:disabled { cursor:default; }.quiz-feedback { min-height:31px; margin-top:16px; font-weight:800; font-size:16px; }.quiz-feedback.success { color:#26956e; }.quiz-feedback.try-again { color:#d3835f; }.next-quiz-button { min-height:49px; margin-top:8px; font-size:16px; box-shadow:0 8px 0 #5b43b5, 0 13px 19px rgba(118,89,216,.2); }.quiz-done { padding:15px 0 7px; }.quiz-done .done-emoji { font-size:76px; animation:float 2s ease-in-out infinite; }.quiz-done h2 { color:var(--purple); }.quiz-done p { color:var(--muted); font-weight:700; }
.footer-note { padding-top:22px; color:#9a92aa; text-align:center; font-size:12px; font-weight:700; }.toast { position:fixed; z-index:20; bottom:22px; left:50%; transform:translate(-50%, 90px); opacity:0; pointer-events:none; padding:11px 17px; color:#fff; background:#253653; border-radius:999px; box-shadow:var(--shadow); font-size:13px; font-weight:800; transition:.3s ease; }.toast.show { transform:translate(-50%,0); opacity:1; }

@media (max-width: 860px) { .app-shell { width:min(100% - 28px, 680px); }#welcome-screen { display:block; direction:rtl; min-height:0; }.hero-copy { width:100%; text-align:center; }.hero-description { margin-left:auto; margin-right:auto; }.hero-scene { position:relative; left:auto; top:auto; width:100%; height:330px; margin:22px auto 0; border-radius:40px; }.screen { padding-top:38px; }.letter-grid { grid-template-columns:repeat(5, 1fr); }.detail-card { grid-template-columns:1fr; }.letter-showcase { min-height:335px; }.section-heading { align-items:flex-start; }.section-heading, .quiz-header { flex-wrap:wrap; } }
@media (max-width: 560px) { .app-shell { width:calc(100% - 22px); padding-top:12px; }.topbar { align-items:flex-start; }.brand-name { max-width:130px; font-size:16px; line-height:1.2; }.brand-mark { width:41px; height:41px; font-size:26px; }.top-stats { gap:5px; }.stat-pill { padding:7px 8px; font-size:13px; }.stat-label { display:none; }.hero-copy { padding-top:18px; }.hero-description { font-size:15px; line-height:1.75; }.hero-scene { height:290px; }.hero-animal { font-size:75px; }.animal-elephant { font-size:84px; right:39px; }.animal-lion { left:50px; }.animal-bird { right:125px; top:125px; font-size:40px; }.hero-letter { width:53px; height:53px; font-size:36px; }.letter-a { top:90px; left:43px; }.letter-b { top:152px; left:105px; }.letter-m { top:75px; left:175px; }.sun-disc { top:23px; right:24px; font-size:35px; }.scene-caption { font-size:12px; }.section-heading p { font-size:14px; }.section-heading .secondary-button { width:100%; }.letter-grid { grid-template-columns:repeat(4, 1fr); gap:9px; }.letter-card { min-height:105px; border-radius:17px; }.card-letter { font-size:42px; margin-top:8px; }.card-animal { font-size:23px; margin-top:3px; }.card-label { font-size:10px; margin-top:4px; }.detail-toolbar { align-items:flex-start; gap:8px; }.detail-breadcrumb { font-size:12px; padding-top:12px; }.detail-card { border-radius:24px; }.letter-showcase { min-height:305px; }.big-letter { width:143px; height:143px; font-size:109px; border-radius:46px 46px 46px 13px; }.letter-name { margin-top:17px; font-size:22px; }.animal-showcase { padding:26px 14px 31px; }.animal-showcase h2 { font-size:31px; }.animal-showcase h2 span { font-size:22px; }.animal-phrase { font-size:20px; }.quiz-card { padding:24px 13px 28px; border-radius:25px; }.quiz-intro h2 { font-size:28px; }.quiz-animal { width:160px; height:137px; font-size:92px; }.quiz-options { grid-template-columns:repeat(5, 1fr); gap:6px; }.quiz-option { min-height:52px; font-size:26px; border-radius:13px; }.footer-note { padding-bottom:10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; } }
