:root {
  --bg: #0b1622;
  --panel: #132231;
  --accent: #2ecc71;
  --accent-bad: #e74c3c;
  --text: #e8eef5;
  --muted: #93a6bb;
  --border: #24384c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

header h1 {
  font-size: 1.3rem;
  margin: 8px 0 16px;
}

.hidden { display: none !important; }

.intro {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #0b1622;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 12px;
}

.primary-btn:active { opacity: 0.85; }

.secondary-btn {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
}

.secondary-btn:active { opacity: 0.85; }

.ref-table {
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  overflow-x: auto;
}

.ref-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ref-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}

.ref-table td:first-child,
.ref-table td:nth-child(3) {
  color: var(--muted);
  font-weight: 700;
  width: 24px;
}

.progress {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.tag {
  display: inline-block;
  background: var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 8px 0 12px;
}

.graphic-container {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.q-graphic {
  width: 100%;
  max-width: 240px;
  height: auto;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.95rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.option-btn:disabled { cursor: default; opacity: 0.9; }

.option-btn.correct {
  background: rgba(46, 204, 113, 0.18);
  border-color: var(--accent);
}

.option-btn.incorrect {
  background: rgba(231, 76, 60, 0.18);
  border-color: var(--accent-bad);
}

.explanation {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

#result-screen { text-align: center; }

#score-text {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
}
