:root{
  --bg:#0b0f14;
  --card:#111826;
  --text:#e8eef7;
  --muted:#a9b4c4;
  --line:#223047;
  --btn:#ffffff;
  --btnText:#0b0f14;
  --ghost:#1a2436;
}

*{ box-sizing:border-box; }
html{
  min-height:100vh;
  background: radial-gradient(1000px 700px at 20% -10%, #1b2a44 0%, transparent 60%),
              radial-gradient(900px 600px at 80% 0%, #2a1b44 0%, transparent 55%),
              var(--bg);
}

body{
  min-height:100vh;
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: transparent;
  color:var(--text);
}

.wrap{ max-width:980px; margin:0 auto; padding:18px; }

.header{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:16px;
}
.brand{ font-weight:900; letter-spacing:0.2px; font-size:18px; }

.hero{ padding:32px 0 20px; }
.hero h1{ font-size:40px; line-height:1.05; margin:0 0 10px; }
.sub{ color:var(--muted); margin:0 0 18px; font-size:16px; max-width:52ch; }

.ctaRow{ display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 18px; }

.btn{
  appearance:none; border:0; cursor:pointer;
  background:var(--btn); color:var(--btnText);
  padding:12px 14px; border-radius:14px;
  font-weight:800; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.btn:disabled{ opacity:0.5; cursor:not-allowed; }
.btn.ghost{
  background:rgba(255,255,255,0.06);
  color:var(--text);
  border:1px solid var(--line);
}
.btn:active{ transform: scale(0.97); }

.chips{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  border:1px solid var(--line);
  background: rgba(17,24,38,0.55);
  padding:8px 10px; border-radius:999px;
  color:var(--muted); font-weight:750; font-size:13px;
}

.card{
  border:1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  backdrop-filter: blur(6px);
  border-radius:22px;
  padding:18px;
  margin:18px 0;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.grid3{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.grid3 h3{ margin:0 0 6px; }
.grid3 p{ margin:0; color:var(--muted); }

.demoHeader h2{ margin:0 0 6px; }
.muted{ color:var(--muted); }

/* Section picker */
.sectionPick{ margin-top:14px; }
.sectionGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:10px;
}

.sectionBtn{
  display:block;
  width:100%;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  color:var(--text);
  text-align:left;
  cursor:pointer;
  white-space: normal;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.sectionBadge{
  display:inline-block;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12);
  color: rgba(255,255,255,0.82);
  font-size:12px;
  font-weight:900;
}
.sectionBtn.active .sectionBadge{
  background: rgba(255,255,255,0.12);
}
.sectionBtn:active{ transform: scale(0.98); }

.sectionBtn.active{
  outline:2px solid rgba(255,255,255,0.35);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.03)
  );
}

.sectionRow{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.sectionIcon{
  width:40px;
  height:40px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  font-size:20px;
  flex:0 0 40px;
}

.sectionText{ min-width:0; }

.sectionTitle{
  font-size:16px;
  font-weight:900;
  line-height:1.15;
}

.sectionDesc{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
  line-height:1.35;
}

.sectionMeta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.game{ margin-top:12px; }

.gameTop{
  display:flex; justify-content:space-between; gap:10px;
  margin-bottom:12px;
}

.pill{
  border:1px solid var(--line);
  background: rgba(0,0,0,0.12);
  padding:8px 10px;
  border-radius:999px;
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}

.prompt{
  border:1px solid var(--line);
  background: rgba(0,0,0,0.10);
  border-radius:16px;
  padding:14px;
}

.label{
  color:var(--muted);
  font-weight:900;
  font-size:12px;
  letter-spacing:0.3px;
}

.phrase{
  font-size:28px;
  font-weight:900;
  letter-spacing:0.3px;
  margin-top:6px;
}

.meaning{
  margin-top:8px;
  font-size:15px;
  font-weight:750;
  color: rgba(255,255,255,0.78);
  min-height:18px;
}

.hint{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

.choices{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin:12px 0;
}

.choice{
  width:100%;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  font-weight:850;
  font-size:15px;
  text-align:left;
  cursor:pointer;
  transition:
    transform 0.08s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.choice:active{ transform: scale(0.985); }
.choice:disabled{ opacity:0.85; cursor:not-allowed; }

.choice.correct{
  background: rgba(120,255,170,0.15);
  border-color: rgba(120,255,170,0.5);
}

.choice.wrong{
  background: rgba(255,120,120,0.12);
  border-color: rgba(255,120,120,0.5);
}

.gameBottom{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

.feedback{
  margin-top:12px;
  min-height:24px;
  font-weight:900;
  font-size:14px;
  letter-spacing:0.2px;
}

.footer{ padding:10px 0 30px; }

@media (min-width: 820px){
  .hero h1{ font-size:52px; }
  .grid3{ grid-template-columns:repeat(3,1fr); }
  .choices{ grid-template-columns:repeat(2,1fr); }
  .sectionGrid{ grid-template-columns:repeat(3, 1fr); }
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.choice.wrong{
  animation: shake 0.25s ease;
}