:root {
  color-scheme: light dark;
  --bg: #1b1b1f;
  --fg: #f0f0f2;
  --muted: #9a9aa2;
  --accent: #4f8cff;
  --light-sq: #eee2c9;
  --dark-sq: #4a3728;
  --ok: #3fbf6d;
  --bad: #e6534e;
  --panel: #26262c;
  --border: #38383f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#quiz-card {
  max-width: 640px;
}

h1 {
  font-size: 1.25rem;
  margin: 0;
  text-align: center;
}

.hidden {
  display: none !important;
}

input[type='text'] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #17171b;
  color: var(--fg);
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: #333339;
  color: var(--fg);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.top-bar a,
.top-bar button {
  background: none;
  padding: 0.3rem 0.5rem;
  color: var(--muted);
  font-weight: 500;
  text-decoration: underline;
}

.square-display {
  text-align: center;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2rem 0;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.answer-row button {
  min-height: clamp(160px, 32vh, 280px);
  font-size: clamp(1.75rem, 7vw, 3.25rem);
  border-radius: 20px;
}

.btn-hell {
  background: var(--light-sq);
  color: #2a2013;
}

.btn-dunkel {
  background: var(--dark-sq);
  color: #f0e8dc;
}

.feedback {
  text-align: center;
  min-height: 1.5rem;
  font-weight: 600;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.bad {
  color: var(--bad);
}

.session-counts {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid var(--border);
}

.stat-summary {
  text-align: center;
}

.stat-summary .big {
  font-size: 2.5rem;
  font-weight: 700;
}

.error-text {
  color: var(--bad);
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.1rem;
}
