:root{
  --ink:#131a2f;
  --muted:#68718b;
  --blue:#3b82f6;
  --cyan:#06b6d4;
  --green:#22c55e;
  --yellow:#facc15;
  --orange:#fb923c;
  --pink:#f472b6;
  --purple:#8b5cf6;
  --red:#ef4444;
  --white:#fff;
  --glass:rgba(255,255,255,.78);
  --line:rgba(255,255,255,.76);
  --soft-line:#e5e7eb;
  --shadow:0 24px 70px rgba(37,99,235,.18);
  --soft-shadow:0 14px 34px rgba(15,23,42,.12);
}
*{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 12% 6%,#fff7a7 0 7%,transparent 17%),
    radial-gradient(circle at 88% 10%,#ffd1ea 0 10%,transparent 22%),
    radial-gradient(circle at 20% 92%,#bbf7d0 0 10%,transparent 22%),
    linear-gradient(135deg,#bfeeff 0%,#eefcff 48%,#fff3c4 100%);
  overflow-x:hidden;
}
button,input,select{font:inherit}
button{border:0;cursor:pointer}
.aurora:before,.aurora:after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:radial-gradient(#fff 1.4px,transparent 2px);
  background-size:86px 86px;
  opacity:.3;
  animation:drift 22s linear infinite;
}
.aurora:after{background-size:140px 140px;opacity:.2;animation-duration:34s}
@keyframes drift{to{transform:translateY(90px)}}
.app{max-width:1280px;margin:0 auto;padding:18px;position:relative;z-index:1}
.topbar,.control-center,.main-tabs,.hero,.daily-card,.teacher-card,.history-card,.play-head,.coach-line,.activity-board,.play-sidebar,.report-card,.quick-card{
  background:var(--glass);
  border:1px solid var(--line);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  border-radius:34px;
  padding:16px;
}
.brand{display:flex;gap:14px;align-items:center}
.brand-icon{
  width:76px;height:76px;border-radius:30px;
  display:grid;place-items:center;
  font-size:43px;
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  box-shadow:var(--soft-shadow);
}
.brand h1{margin:0;font-size:29px}
.brand p{margin:4px 0 0;color:var(--muted)}
.profile{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.profile input{
  width:175px;
  padding:14px 15px;
  border-radius:20px;
  border:1px solid rgba(37,99,235,.16);
  background:#fff;
  outline:none;
  font-weight:850;
}
.stat{
  min-width:86px;
  padding:10px 12px;
  border-radius:22px;
  text-align:center;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
}
.stat b{display:block;font-size:24px;color:var(--blue)}
.stat span{font-size:12px;color:var(--muted)}
.control-center{
  margin-top:14px;
  padding:16px;
  border-radius:34px;
  display:grid;
  grid-template-columns:1fr 1.3fr;
  gap:14px;
}
.grade-picker,.mode-picker{
  background:rgba(255,255,255,.65);
  border-radius:26px;
  padding:16px;
}
.mini-label{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:#e0f2fe;
  color:#0369a1;
  font-weight:1000;
  font-size:12px;
}
.grade-picker h2,.mode-picker h2{margin:8px 0 14px;font-size:24px}
.grade-buttons,.mode-buttons{display:flex;gap:8px;flex-wrap:wrap}
.grade-btn,.mode-btn{
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  color:#43506a;
  font-weight:1000;
  box-shadow:0 8px 18px rgba(15,23,42,.07);
}
.grade-btn.active,.mode-btn.active{
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  color:#fff;
}
.main-tabs{
  margin-top:14px;
  border-radius:26px;
  padding:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.tab{
  flex:1;
  min-width:135px;
  padding:13px 14px;
  border-radius:20px;
  background:transparent;
  color:#43506a;
  font-weight:950;
}
.tab.active,.tab:hover{
  background:#fff;
  color:var(--blue);
  box-shadow:0 8px 22px rgba(15,23,42,.07);
}
.screen{display:none}
.screen.active{display:block}
.hero{
  margin-top:18px;
  border-radius:42px;
  padding:32px;
  display:grid;
  grid-template-columns:1.35fr .82fr;
  gap:18px;
  background:linear-gradient(135deg,rgba(59,130,246,.96),rgba(6,182,212,.92),rgba(34,197,94,.88));
  color:#fff;
}
.badge{
  display:inline-flex;
  width:max-content;
  padding:8px 13px;
  border-radius:999px;
  background:rgba(255,255,255,.19);
  border:1px solid rgba(255,255,255,.32);
  color:#fff;
  font-weight:1000;
  font-size:12px;
}
.badge.dark{background:#e0f2fe;color:#0369a1;border-color:#bae6fd}
.hero h2{font-size:44px;line-height:1.1;margin:18px 0 12px}
.hero p{font-size:18px;line-height:1.75;margin:0;opacity:.96}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.big{font-size:18px;padding:17px 24px!important}
.primary,.ghost,.soft,.success,.danger,.back-btn{
  border-radius:22px;
  padding:14px 19px;
  font-weight:1000;
}
.primary{background:linear-gradient(135deg,var(--blue),var(--cyan));color:#fff;box-shadow:var(--soft-shadow)}
.ghost{background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.34);color:#fff}
.soft{background:#fff;color:var(--blue);box-shadow:var(--soft-shadow)}
.success{background:linear-gradient(135deg,#16a34a,#22c55e);color:#fff}
.danger{background:#fee2e2;color:#b91c1c;margin-top:12px}
.back-btn{width:58px;height:58px;background:#fff;color:var(--blue);font-size:24px}
.coach-card{
  border-radius:34px;
  padding:22px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.32);
  text-align:center;
}
.coach-face{font-size:82px}
.coach-card h3{font-size:26px;margin:8px 0}
.coach-card p{font-size:15px}
.coach-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:16px;
}
.coach-stats div{
  background:rgba(255,255,255,.18);
  border-radius:20px;
  padding:12px;
}
.coach-stats b{display:block;font-size:26px}
.coach-stats span{font-size:12px}
.daily-card{
  margin-top:16px;
  border-radius:30px;
  padding:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.daily-card h3{margin:0 0 4px}
.daily-card p{margin:0;color:var(--muted)}
.daily-progress{min-width:260px}
.daily-progress b{color:var(--blue)}
.bar,.progress{
  height:14px;
  border-radius:999px;
  background:rgba(255,255,255,.7);
  overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);
}
.bar i,.progress i{
  display:block;
  height:100%;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,var(--green),var(--yellow),var(--orange));
  transition:.25s;
}
.section-title{margin:28px 0 14px}
.section-title h3{font-size:30px;margin:0 0 6px}
.section-title p{margin:0;color:var(--muted)}
.topic-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.topic-card{
  position:relative;
  overflow:hidden;
  border-radius:34px;
  padding:20px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(255,255,255,.86);
  box-shadow:var(--shadow);
  transition:.16s transform;
}
.topic-card:hover{transform:translateY(-7px)}
.topic-card:before{
  content:"";
  position:absolute;
  right:-40px;
  top:-40px;
  width:130px;
  height:130px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  opacity:.18;
}
.topic-icon{
  width:78px;
  height:78px;
  border-radius:30px;
  display:grid;
  place-items:center;
  font-size:42px;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  box-shadow:var(--soft-shadow);
}
.topic-card h4{font-size:22px;margin:16px 0 8px}
.topic-card p{color:var(--muted);line-height:1.6;margin:0}
.topic-card small{
  display:block;
  margin-top:10px;
  color:#475569;
  font-weight:850;
}
.topic-card 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);
}
.play-shell{
  margin-top:18px;
  display:grid;
  grid-template-columns:310px 1fr;
  gap:16px;
}
.play-sidebar{
  border-radius:32px;
  padding:18px;
  height:max-content;
  position:sticky;
  top:16px;
}
.play-sidebar h3{margin-top:0}
.play-topic-list{display:grid;gap:8px}
.play-topic-list button{
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  padding:12px;
  border-radius:18px;
  background:#fff;
  color:#43506a;
  font-weight:900;
}
.play-topic-list button.active,.play-topic-list button:hover{
  color:var(--blue);
  background:#e0f2fe;
}
.play-head{
  border-radius:34px;
  padding:16px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
}
.play-head h2{font-size:31px;margin:8px 0 0}
.play-score{
  min-width:145px;
  background:#fff;
  border-radius:24px;
  padding:12px;
  text-align:center;
  box-shadow:var(--soft-shadow);
}
.play-score span{display:block;color:var(--muted)}
.play-score b{font-size:28px;color:var(--blue)}
.progress{margin:14px 4px 0}
.coach-line{
  margin-top:14px;
  border-radius:30px;
  padding:16px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  background:#fff7ed;
  border-color:#fed7aa;
}
.bot{
  width:62px;height:62px;
  border-radius:24px;
  background:#ffedd5;
  display:grid;
  place-items:center;
  font-size:36px;
}
.coach-line p{margin:5px 0 0;color:#7c2d12;line-height:1.55}
.coach-line button{
  width:54px;height:54px;
  border-radius:20px;
  background:#fff;
  border:1px solid #fed7aa;
  font-size:22px;
}
.activity-board{
  margin-top:14px;
  min-height:500px;
  border-radius:40px;
  padding:22px;
}
.empty-state{
  min-height:420px;
  display:grid;
  place-items:center;
  align-content:center;
  text-align:center;
  color:var(--muted);
}
.empty-state div{font-size:92px}
.empty-state h3{font-size:28px;color:var(--ink);margin:8px 0}
.actions{
  position:sticky;
  bottom:12px;
  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);
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}
.actions button{font-size:16px}
.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}
.hidden{display:none!important}
.object-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.obj{
  width:48px;
  height:48px;
  border-radius:18px;
  background:linear-gradient(135deg,#fff7ad,#bbf7d0);
  display:grid;
  place-items:center;
  font-size:26px;
  box-shadow:var(--soft-shadow);
}
.choice-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.choice{
  padding:14px;
  border-radius:18px;
  background:#f8fbff;
  border:2px solid #e5e7eb;
  font-size:20px;
  font-weight:1000;
}
.choice.active{border-color:#60a5fa;background:#dbeafe;color:#1d4ed8}
.line-scene{
  height:260px;
  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)}
.pizza{
  width:min(330px,82vw);
  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);
}
.slice.selected{background:#22c55e;color:#fff;transform:scale(1.12)}
.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%}
.grid-area{
  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);
}
.report-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.report-card{
  border-radius:28px;
  padding:18px;
  background:#fff;
}
.report-card b{display:block;font-size:32px;color:var(--blue)}
.report-card span{color:var(--muted)}
.history-card{
  margin-top:18px;
  border-radius:30px;
  padding:20px;
}
.history-list{display:grid;gap:10px}
.history-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border-radius:18px;
  padding:13px 14px;
}
.history-row span{color:var(--muted)}
.teacher-card{
  border-radius:34px;
  padding:26px;
  margin-top:20px;
}
.teacher-card p{color:var(--muted);line-height:1.7}
.teacher-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.teacher-grid div{
  background:#fff;
  border-radius:24px;
  padding:18px;
}
.teacher-grid li{line-height:1.8;color:#475569}
.toast{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:50;
  padding:14px 18px;
  border-radius:18px;
  background:#111827;
  color:#fff;
  box-shadow:var(--shadow);
}
@media(max-width:980px){
  .topbar,.control-center,.hero,.daily-card,.play-shell,.play-head,.play-two,.teacher-grid{
    grid-template-columns:1fr;
    display:grid;
  }
  .profile{justify-content:flex-start}
  .topic-grid,.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .play-sidebar{position:relative;top:auto}
}
@media(max-width:640px){
  .app{padding:10px}
  .brand h1{font-size:22px}
  .hero{padding:22px}
  .hero h2{font-size:32px}
  .topic-grid,.report-grid{grid-template-columns:1fr}
  .activity-board{padding:14px;min-height:auto}
  .question{display:grid}
  .target{white-space:normal}
  .coach-line{grid-template-columns:auto 1fr}
  .coach-line button{grid-column:1/-1;width:100%}
  .actions{position:relative;bottom:auto}
  .actions button{width:100%}
  .choice-grid{grid-template-columns:1fr}
}
