:root {
  --bg-app: #17181B;
  --surface-1: #212326;
  --surface-2: #2B2E33;
  --text-primary: #F2F3F5;
  --text-secondary: #B7BBC2;
  --text-muted: #7A7F88;
  --accent: #5EE7DF;
  --accent-dim: #2F8C88;
  --border: #2E3136;
  --success: #8AE38C;
  --danger: #FF6E6E;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 600px; height: 600px;
  background: var(--bg-app);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
body {
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
}

.stage { width: 600px; height: 600px; position: relative; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 36px 24px;
  gap: 14px;
}
.screen.hidden { display: none; }

/* ---- HUD bar / tags ---- */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.accent { color: var(--accent); border-color: #2F5E5B; }

/* ---- Learn card ---- */
.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
}

.word {
  font-family: var(--ui);
  font-size: 68px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.1;
  max-width: 520px;
  word-wrap: break-word;
  color: var(--text-primary);
}
.word.answer {
  color: var(--accent);
  font-size: 56px;
}

.side-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Test ---- */
.question {
  font-family: var(--ui);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin: 8px 0 4px;
  line-height: 1.2;
}

.choices {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 6px;
}

.choice {
  font-family: var(--ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  text-align: left;
  position: relative;
  transition: background 100ms cubic-bezier(0.2,0,0,1), border-color 100ms cubic-bezier(0.2,0,0,1);
}

.choice.selected {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.choice.correct {
  border-color: #2F5A32;
  background: #17241A;
  color: var(--success);
  box-shadow: inset 3px 0 0 0 var(--success);
}
.choice.wrong {
  border-color: #5A2929;
  background: #241717;
  color: var(--danger);
  box-shadow: inset 3px 0 0 0 var(--danger);
}

/* ---- Result ---- */
#result { align-items: center; }
.result-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 60px;
}
.score {
  font-family: var(--mono);
  font-size: 96px;
  font-weight: 600;
  text-align: center;
  margin: 8px 0;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.result-sub {
  font-family: var(--ui);
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
}

/* ---- Hints ---- */
.hints {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 24px;
}
.hint {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .choice { transition: none; }
}
