:root {
  --bg: #08111f;
  --panel: rgba(13, 23, 39, 0.9);
  --panel-2: rgba(21, 32, 51, 0.95);
  --border: rgba(106, 139, 184, 0.24);
  --text: #edf2f7;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #38bdf8;
  --violet: #8b5cf6;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.10), transparent 30%),
    linear-gradient(180deg, #020617, #0b1220);
  color: var(--text);
}
.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
h1, h2, h3, p { margin-top: 0; }
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.muted { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.controls, .helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
button, .btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease, background .18s ease;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
button.primary { background: linear-gradient(90deg, #22c55e, #16a34a); color: #052e16; }
button.info { background: linear-gradient(90deg, #38bdf8, #0ea5e9); color: #082f49; }
button.warn { background: linear-gradient(90deg, #f59e0b, #f97316); color: #451a03; }
button.danger { background: linear-gradient(90deg, #ef4444, #dc2626); color: white; }
button.dark { background: #334155; color: white; }
button.violet { background: linear-gradient(90deg, #8b5cf6, #7c3aed); color: white; }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.option-list { display: grid; gap: 12px; margin-top: 16px; }
.option-item {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  transition: transform .18s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
  color: var(--text);
}
.option-item.correct {
  border-color: rgba(34, 197, 94, 0.78);
  background: rgba(34, 197, 94, 0.14);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
}
.log {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  color: var(--text);
}
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; font-size: 14px; }
.input {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #020617;
  color: white;
}
.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--border);
}
.warning { border-color: rgba(245,158,11,.6); }
.question-chip {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}
.question-chip:hover { transform: translateY(-1px); }
.question-chip.is-current {
  background: linear-gradient(90deg, rgba(56,189,248,.24), rgba(34,197,94,.22));
  border-color: rgba(56,189,248,.85);
  box-shadow: 0 0 0 2px rgba(56,189,248,.16);
}
.question-chip.is-done { opacity: .72; }
