:root{
  --ink:#162033;
  --muted:#6b7280;
  --white:#fff;
  --blue:#3478ff;
  --cyan:#2dd4bf;
  --green:#22c55e;
  --orange:#fb923c;
  --pink:#f472b6;
  --purple:#8b5cf6;
  --yellow:#facc15;
  --red:#ef4444;
  --line:rgba(255,255,255,.62);
  --glass:rgba(255,255,255,.72);
  --shadow:0 24px 70px rgba(37,99,235,.18);
  --soft-shadow:0 14px 36px rgba(15,23,42,.12);
  --r:30px;
}
*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 15% 8%,#fff4a3 0 8%,transparent 18%),
    radial-gradient(circle at 88% 12%,#ffd1eb 0 11%,transparent 23%),
    linear-gradient(135deg,#b9efff 0%,#dffcff 44%,#fff3c4 100%);
  overflow-x:hidden;
}
button,input{font:inherit}
button{border:0;cursor:pointer}
.bg-bubbles span{
  position:fixed;
  border-radius:50%;
  background:rgba(255,255,255,.38);
  filter:blur(1px);
  animation:float 7s ease-in-out infinite;
  pointer-events:none;
}
.bg-bubbles span:nth-child(1){width:110px;height:110px;left:7%;top:20%}
.bg-bubbles span:nth-child(2){width:80px;height:80px;right:10%;top:30%;animation-delay:1s}
.bg-bubbles span:nth-child(3){width:140px;height:140px;left:20%;bottom:8%;animation-delay:2s}
.bg-bubbles span:nth-child(4){width:90px;height:90px;right:24%;bottom:16%;animation-delay:3s}
@keyframes float{50%{transform:translateY(-18px)}}
.app{max-width:1180px;margin:0 auto;padding:18px;position:relative;z-index:2}
.screen{display:none}
.screen.active{display:block}
.home-top,.game-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px;
  border-radius:34px;
  background:var(--glass);
  border:1px solid var(--line);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
}
.logo{display:flex;gap:14px;align-items:center}
.logo-icon{
  width:72px;height:72px;border-radius:28px;
  display:grid;place-items:center;
  font-size:40px;
  background:linear-gradient(135deg,#fff7ad,#baffd4);
  box-shadow:var(--soft-shadow);
}
.logo h1{font-size:26px;margin:0}
.logo p{margin:4px 0 0;color:var(--muted)}
.profile{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.profile input{
  width:170px;padding:14px 15px;border-radius:20px;
  border:1px solid rgba(37,99,235,.15);
  background:#fff;outline:none;font-weight:800;
}
.mini-stat{
  min-width:84px;padding:10px 12px;border-radius:22px;
  text-align:center;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.08)
}
.mini-stat b{display:block;font-size:23px;color:var(--blue)}
.mini-stat span{font-size:12px;color:var(--muted)}
.hero{
  margin-top:18px;
  display:grid;
  grid-template-columns:1.35fr .8fr;
  gap:18px;
  padding:32px;
  border-radius:42px;
  background:
    linear-gradient(135deg,rgba(52,120,255,.96),rgba(45,212,191,.92)),
    url("");
  color:#fff;
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
}
.hero:after{
  content:"";
  position:absolute;right:-80px;top:-80px;
  width:240px;height:240px;border-radius:50%;
  background:rgba(255,255,255,.18);
}
.label{
  width:max-content;
  padding:8px 13px;border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.32);
  font-size:12px;font-weight:1000;
}
.hero h2{font-size:44px;line-height:1.1;margin:18px 0 12px}
.hero p{font-size:18px;line-height:1.7;margin:0;opacity:.95}
.big-btn{
  margin-top:24px;
  padding:17px 26px;
  border-radius:24px;
  background:linear-gradient(135deg,#fff,#fff7cc);
  color:#1d4ed8;
  font-size:18px;
  font-weight:1000;
  box-shadow:0 18px 36px rgba(15,23,42,.18);
}
.hero-card{
  position:relative;z-index:1;
  padding:24px;border-radius:34px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.36);
  text-align:center;
  align-self:stretch;
  display:grid;
  align-content:center;
}
.bear{font-size:86px}
.hero-card h3{font-size:26px;margin:6px 0}
.hero-card p{font-size:15px}
.steps{display:grid;gap:9px;margin-top:18px}
.steps span{
  padding:12px;border-radius:18px;
  background:rgba(255,255,255,.18);
  font-weight:1000;
}
.section-head{margin:28px 0 14px}
.section-head h3{font-size:30px;margin:0 0 6px}
.section-head p{color:var(--muted);margin:0}
.mission-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.mission{
  position:relative;
  padding:20px;
  border-radius:34px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:var(--shadow);
  overflow:hidden;
  transition:.18s transform,.18s box-shadow;
}
.mission:hover{transform:translateY(-7px);box-shadow:0 30px 80px rgba(37,99,235,.23)}
.mission:before{
  content:"";
  position:absolute;right:-36px;top:-36px;width:120px;height:120px;border-radius:50%;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  opacity:.18;
}
.icon{
  width:76px;height:76px;
  border-radius:30px;
  display:grid;place-items:center;
  font-size:42px;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  box-shadow:var(--soft-shadow);
}
.mission h4{font-size:22px;margin:16px 0 8px}
.mission p{color:var(--muted);line-height:1.6;margin:0}
.mission button{
  margin-top:16px;width:100%;
  padding:14px;border-radius:20px;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  color:#fff;font-weight:1000;
  box-shadow:var(--soft-shadow);
}
.icon-btn{
  width:56px;height:56px;border-radius:20px;
  background:#fff;color:var(--blue);
  font-size:24px;font-weight:1000;
  box-shadow:var(--soft-shadow);
}
.game-title span{
  display:inline-flex;padding:6px 11px;border-radius:999px;
  background:#e0f2fe;color:#0369a1;font-weight:1000;font-size:12px;
}
.game-title h2{font-size:30px;margin:7px 0 0}
.score-pill{
  min-width:118px;padding:12px 14px;border-radius:22px;
  background:#fff;text-align:center;box-shadow:var(--soft-shadow)
}
.score-pill small{display:block;color:var(--muted)}
.score-pill b{font-size:26px;color:var(--blue)}
.progress-track{
  height:14px;border-radius:999px;background:rgba(255,255,255,.6);
  margin:16px 6px 0;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)
}
.progress-track i{
  display:block;height:100%;width:0%;
  background:linear-gradient(90deg,var(--green),var(--yellow),var(--orange));
  border-radius:999px;transition:.25s;
}
.coach{
  margin-top:14px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;align-items:center;
  padding:16px;border-radius:30px;
  background:#fff7ed;border:1px solid #fed7aa;
  box-shadow:var(--shadow);
}
.coach-avatar{
  width:62px;height:62px;border-radius:24px;
  display:grid;place-items:center;font-size:36px;
  background:#ffedd5;
}
.coach b{font-size:17px}
.coach p{margin:5px 0 0;color:#7c2d12;line-height:1.55}
.speak{
  width:54px;height:54px;border-radius:20px;
  background:#fff;border:1px solid #fed7aa;font-size:22px;
}
.game-board{
  margin-top:14px;
  min-height:500px;
  padding:22px;
  border-radius:40px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:var(--shadow);
}
.question{
  display:flex;justify-content:space-between;gap:12px;align-items:flex-start;
  padding:18px;border-radius:30px;
  background:linear-gradient(135deg,#eff6ff,#ecfeff);
  border:1px solid #dbeafe;
  margin-bottom:18px;
}
.question h3{font-size:28px;line-height:1.32;margin:0}
.question p{color:var(--muted);line-height:1.6;margin:6px 0 0}
.target{
  padding:10px 14px;border-radius:18px;background:#fff;
  border:1px solid #bfdbfe;color:#1d4ed8;font-weight:1000;white-space:nowrap;
}
.play.two{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center}
.panel{
  background:#fff;border:1px solid #e5e7eb;border-radius:32px;
  padding:20px;box-shadow:var(--soft-shadow)
}
.panel h4{font-size:24px;margin:0 0 10px}
.panel p{color:var(--muted);line-height:1.7}
.answer{
  display:flex;gap:10px;align-items:center;margin-top:12px;
}
.answer input{
  flex:1;min-width:0;padding:15px;border-radius:20px;
  border:2px solid #e5e7eb;outline:none;font-size:22px;font-weight:1000;
}
.answer input:focus{border-color:#93c5fd}
.answer span{font-weight:1000;color:#475569}
.feedback{
  margin-top:14px;padding:14px 16px;border-radius:20px;
  line-height:1.65;font-weight:900;
}
.feedback.info{background:#e0f2fe;color:#075985}
.feedback.good{background:#dcfce7;color:#166534}
.feedback.bad{background:#fee2e2;color:#991b1b}
.action-bar{
  position:sticky;bottom:12px;
  display:flex;justify-content:center;gap:12px;flex-wrap:wrap;
  margin-top:16px;padding:10px;border-radius:28px;
  background:rgba(255,255,255,.64);backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.72);
}
.action-bar button{
  padding:15px 22px;border-radius:22px;font-weight:1000;font-size:16px;
}
.soft{background:#fff;color:var(--blue);box-shadow:var(--soft-shadow)}
.primary{background:linear-gradient(135deg,var(--blue),var(--cyan));color:#fff;box-shadow:var(--soft-shadow)}
.success{background:linear-gradient(135deg,#16a34a,#22c55e);color:#fff;box-shadow:var(--soft-shadow)}
.hidden{display:none!important}
.toast{
  position:fixed;right:20px;bottom:20px;z-index:50;
  padding:14px 18px;border-radius:18px;
  background:#111827;color:#fff;box-shadow:var(--shadow);
}

/* Pizza */
.pizza{
  width:min(345px,84vw);aspect-ratio:1;border-radius:50%;
  margin:auto;position:relative;
  border:18px solid #92400e;
  background:conic-gradient(#fbbf24 0 45deg,#f59e0b 45deg 90deg,#fbbf24 90deg 135deg,#f59e0b 135deg 180deg,#fbbf24 180deg 225deg,#f59e0b 225deg 270deg,#fbbf24 270deg 315deg,#f59e0b 315deg 360deg);
  box-shadow:inset 0 0 0 10px #fde68a,0 24px 48px rgba(146,64,14,.22);
}
.slice{
  position:absolute;width:46px;height:46px;border-radius:50%;
  background:#fff;border:3px solid #fef3c7;
  color:#92400e;font-weight:1000;box-shadow:0 8px 18px rgba(15,23,42,.16);
  transition:.12s;
}
.slice.selected{background:#22c55e;color:#fff;transform:scale(1.12);border-color:#dcfce7}
.slice:nth-child(1){left:46%;top:7%}
.slice:nth-child(2){right:17%;top:20%}
.slice:nth-child(3){right:11%;bottom:34%}
.slice:nth-child(4){right:30%;bottom:12%}
.slice:nth-child(5){left:30%;bottom:12%}
.slice:nth-child(6){left:11%;bottom:34%}
.slice:nth-child(7){left:17%;top:20%}
.slice:nth-child(8){left:43%;top:42%}

/* Number line */
.line-scene{
  height:280px;position:relative;border-radius:32px;
  background:linear-gradient(180deg,#dff8ff,#bae6fd);
  overflow:hidden;
}
.line-scene:before{
  content:"";position:absolute;left:8%;right:8%;bottom:82px;height:18px;border-radius:20px;background:#334155;
}
.runner{
  position:absolute;bottom:142px;width:76px;height:76px;border-radius:30px;
  display:grid;place-items:center;background:linear-gradient(135deg,#fff7ad,#fde68a);
  font-size:40px;box-shadow:var(--soft-shadow);transform:translateX(-50%);transition:.2s left;
}
.tick{
  position:absolute;bottom:108px;transform:translateX(-50%);text-align:center;font-weight:1000;
}
.tick i{display:block;width:4px;height:28px;background:#334155;margin:0 auto 5px;border-radius:4px}
.slider{width:100%;accent-color:var(--blue)}

/* Grid */
.grid{
  display:grid;gap:5px;width:max-content;max-width:100%;margin:auto;
  padding:16px;border-radius:30px;background:#f8fbff;border:1px solid #e5e7eb;
}
.cell{
  width:38px;height:38px;border-radius:12px;
  background:linear-gradient(135deg,#93c5fd,#22c55e);
  box-shadow:inset -5px -5px 0 rgba(15,23,42,.09);
}

/* Pattern */
.pattern-row{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding:18px}
.gem{
  width:68px;height:68px;border-radius:24px;display:grid;place-items:center;
  font-size:36px;background:#f8fbff;border:2px solid #e5e7eb;box-shadow:var(--soft-shadow)
}
.options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.option{
  padding:15px;border-radius:20px;background:#f8fbff;border:2px solid #e5e7eb;
  font-size:30px;font-weight:1000;
}
.option.active{border-color:#60a5fa;background:#dbeafe}

.finish-card{
  max-width:720px;margin:38px auto;padding:34px;border-radius:42px;text-align:center;
  background:rgba(255,255,255,.9);border:1px solid rgba(255,255,255,.85);box-shadow:var(--shadow)
}
.celebrate{font-size:96px}
.finish-card h2{font-size:42px;margin:8px 0}
.finish-card p{color:var(--muted);line-height:1.7}
.rewards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}
.rewards div{padding:16px;border-radius:26px;background:#f8fbff;border:1px solid #e5e7eb}
.rewards b{display:block;font-size:34px;color:var(--blue)}
.rewards span{color:var(--muted)}
.learned{text-align:left;background:#fff7ed;border:1px solid #fed7aa;border-radius:28px;padding:18px;margin-bottom:18px}
.learned h3{margin:0 0 8px}
.learned li{line-height:1.8;color:#7c2d12}

@media(max-width:900px){
  .home-top,.hero,.game-top,.play.two{grid-template-columns:1fr;display:grid}
  .profile{justify-content:flex-start}
  .mission-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:620px){
  .app{padding:10px}
  .logo h1{font-size:21px}
  .hero{padding:22px}
  .hero h2{font-size:32px}
  .mission-grid{grid-template-columns:1fr}
  .game-board{padding:14px;min-height:auto}
  .question{display:grid}
  .target{white-space:normal}
  .rewards{grid-template-columns:1fr}
  .coach{grid-template-columns:auto 1fr}
  .speak{grid-column:1/-1;width:100%}
  .action-bar{position:relative;bottom:auto}
  .action-bar button{width:100%}
  .options{grid-template-columns:repeat(2,1fr)}
}
