:root {
  --bg: #0f172a;
  --bg2: #111827;
  --panel: rgba(255,255,255,0.10);
  --panel2: rgba(255,255,255,0.14);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #2563eb;
  --primary2: #7c3aed;
  --good: #10b981;
  --bad: #ef4444;
  --warn: #f59e0b;
  --card: #ffffff;
  --ink: #0f172a;
  --shadow: 0 20px 60px rgba(0,0,0,.22);
  --radius: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #1d4ed8 0%, var(--bg) 35%, var(--bg2) 100%);
  min-height: 100vh;
}
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}
.header {
  display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px;
}
.brand { display:flex; gap:12px; align-items:center; }
.logo { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background: linear-gradient(135deg, var(--primary2), var(--primary)); box-shadow: var(--shadow); font-size:22px; }
.tag { padding:8px 12px; border-radius:999px; background: rgba(255,255,255,.12); color:#dbeafe; font-size:13px; }
.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.hero {
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(37,99,235,.25);
}
h1,h2,h3,p { margin: 0; }
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.hero p { color: #dbeafe; line-height: 1.5; }
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.mini {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 16px;
}
.button-row { display:flex; flex-wrap:wrap; gap:12px; margin-top: 18px; }
button {
  border: 0; cursor: pointer; border-radius: 18px; padding: 14px 18px; font-weight: 700;
  transition: transform .15s ease, opacity .15s ease; font-size: 15px;
}
button:hover { transform: translateY(-1px); }
.primary { background: white; color: var(--primary); }
.secondary { background: rgba(255,255,255,.12); color: white; border:1px solid rgba(255,255,255,.14); }
.accent { background: linear-gradient(135deg, var(--primary2), var(--primary)); color: white; }
.muted { color: var(--muted); }
.hidden { display:none !important; }
.step {
  color:#64748b; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 800; margin-bottom:12px;
}
.screen {
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(15,23,42,.12);
}
.options { display:grid; gap:12px; margin-top: 18px; }
.option {
  border: 2px solid #dbeafe; border-radius: 18px; padding: 16px; background:white; cursor:pointer; font-weight:600;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.option:hover { border-color: #93c5fd; transform: translateY(-1px); }
.option.selected { border-color: #4338ca; background: #eef2ff; }
.option.correct { border-color: var(--good); background: #ecfdf5; }
.option.incorrect { border-color: var(--bad); background: #fef2f2; }
.progress-bar { height:10px; border-radius:999px; background:#e2e8f0; overflow:hidden; margin: 12px 0 18px; }
.progress-bar > span { display:block; height:100%; background: linear-gradient(90deg, var(--primary2), var(--primary)); }
.pill { display:inline-block; padding:7px 10px; border-radius:999px; font-size:12px; font-weight:800; }
.pill.easy { background:#dcfce7; color:#166534; }
.pill.medium { background:#fef3c7; color:#92400e; }
.pill.hard { background:#fee2e2; color:#991b1b; }
.result-card { background: white; border-radius: 20px; padding: 18px; border:1px solid #e2e8f0; }
.score-row { display:grid; grid-template-columns: 1fr auto; gap:12px; align-items:center; margin: 12px 0; }
.bar { height:10px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.bar > span { display:block; height:100%; background: linear-gradient(90deg, var(--primary2), var(--primary)); }
.review-item { border:1px solid #e2e8f0; border-radius:18px; padding:16px; background:white; }
.review-item summary { cursor:pointer; font-weight:700; }

.download-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.download-actions button { margin:0; }

.notice { border-radius:18px; padding:16px; margin-top:18px; }
.notice.good { background:#ecfdf5; color:#065f46; }
.notice.bad { background:#fef2f2; color:#991b1b; }
.notice.info { background:#eff6ff; color:#1d4ed8; }
input[type="text"] {
  width:100%; padding: 14px 16px; border-radius: 16px; border:1px solid #cbd5e1; font-size:16px;
}
.radio-list { display:grid; gap:12px; margin-top: 16px; }
.radio-item { padding:16px; border-radius:18px; border:2px solid #dbeafe; background:white; cursor:pointer; }
.radio-item.selected { border-color:#4338ca; background:#eef2ff; }
.footer { text-align:center; font-size: 13px; color: var(--muted); margin-top: 20px; }
@media (max-width: 720px) {
  .app { padding: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .screen, .panel, .hero { padding: 18px; }
}

#screen-results button { opacity:1; pointer-events:auto; }