/* Zuidasdok-quiz: één stylesheet voor beamer en telefoon. */

:root {
  --bg: #12161f;
  --panel: #1d2330;
  --text: #f4f6fa;
  --muted: #9aa3b5;
  --accent: #ffb400;
  --good: #26a65b;
  --bad: #d64545;
  --a0: #e0393e; /* A rood */
  --a1: #2f6fde; /* B blauw */
  --a2: #d9a300; /* C geel */
  --a3: #2c9a3c; /* D groen */
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

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

main { max-width: 1400px; margin: 0 auto; padding: 24px 16px; }

[hidden] { display: none !important; }

h1 { font-size: clamp(1.6rem, 3vw, 2.6rem); margin: 0 0 24px; }
h2 { margin: 0 0 16px; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

button.big {
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 16px 32px;
  margin-top: 24px;
}

button:disabled { opacity: .4; cursor: default; }

input {
  font: inherit;
  font-size: 1.3rem;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid var(--panel);
  background: var(--panel);
  color: var(--text);
  width: 100%;
}

.center { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70vh; }
.stack { display: flex; flex-direction: column; gap: 12px; width: min(100%, 360px); text-align: left; }
.error { color: var(--bad); min-height: 1.4em; }

.bar { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 1.2rem; margin-bottom: 16px; }

.timer {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  background: var(--panel);
  border-radius: 50%;
  width: 3.2em;
  height: 3.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timer.urgent { color: var(--bad); }

.letter {
  font-weight: 800;
  background: rgb(0 0 0 / .25);
  border-radius: 8px;
  padding: 2px 10px;
  margin-right: 12px;
}

.a0 { background: var(--a0); }
.a1 { background: var(--a1); }
.a2 { background: var(--a2); }
.a3 { background: var(--a3); }

/* --- Host: lobby --- */

.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.join { text-align: center; }
.qr { width: min(100%, 460px); background: #fff; border-radius: 16px; padding: 12px; }
.join-url { font-size: 2rem; font-weight: 700; margin-top: 16px; word-break: break-all; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--panel); padding: 8px 16px; border-radius: 999px; font-size: 1.2rem; animation: pop .3s ease-out; }

@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Host: vraag --- */

.question { font-size: clamp(1.8rem, 3.4vw, 3rem); text-align: center; margin: 24px 0 40px; }

.answers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.answer { padding: 28px 24px; border-radius: 14px; font-size: 1.6rem; font-weight: 600; display: flex; align-items: center; }

/* --- Host: antwoord en grafiek --- */

.chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; height: 320px; align-items: end; }
.column { background: none; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; opacity: .35; }
.column.correct { opacity: 1; }
.column .count { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.bar-fill { min-height: 6px; border-radius: 8px 8px 0 0; background: inherit; transition: height .6s ease-out; }
.column.a0 .bar-fill { background: var(--a0); }
.column.a1 .bar-fill { background: var(--a1); }
.column.a2 .bar-fill { background: var(--a2); }
.column.a3 .bar-fill { background: var(--a3); }
.column-label { margin-top: 10px; font-size: 1.1rem; }
.column.correct .column-label::after { content: " ✔"; color: var(--good); font-weight: 800; }

.explanation { font-size: 1.4rem; max-width: 1000px; margin: 32px auto 8px; text-align: center; }
.source { text-align: center; color: var(--muted); }
.source a { color: var(--accent); }
#screen-reveal .next, #screen-leaderboard .next { display: block; margin: 24px auto 0; }

/* --- Host: stand --- */

.ranking { max-width: 800px; margin: 0 auto; padding-left: 2.5em; font-size: 1.8rem; }
.ranking li { padding: 12px 16px; margin-bottom: 10px; background: var(--panel); border-radius: 12px; }
.ranking li span { display: inline-block; }
.ranking .name { width: 70%; }
.ranking .score { width: 30%; text-align: right; font-weight: 700; color: var(--accent); }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.step { width: 220px; text-align: center; }
.step .name { font-size: 1.6rem; font-weight: 700; }
.step .score { color: var(--accent); margin-bottom: 8px; }
.step .block { background: var(--panel); border-radius: 12px 12px 0 0; font-size: 3rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.place1 .block { height: 220px; background: var(--accent); color: #1a1a1a; }
.place2 .block { height: 160px; }
.place3 .block { height: 110px; }

/* --- Speler --- */

.player main { max-width: 560px; }
.hello { font-size: 1.6rem; }
.small-question { font-size: 1.2rem; text-align: center; margin: 0 0 16px; }

.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.buttons .answer { min-height: 26vh; font-size: 1.1rem; text-align: left; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.buttons .letter { font-size: 1.6rem; margin: 0 0 8px; }

.big-letter { font-size: 5rem; font-weight: 800; width: 1.6em; height: 1.6em; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 0 16px; }

.result.good { background: var(--good); border-radius: 20px; }
.result.bad { background: var(--bad); border-radius: 20px; }
.result-title { font-size: 3rem; font-weight: 800; margin: 0; }
.result-points { font-size: 1.6rem; font-weight: 700; }
.medal { font-size: 5rem; margin: 0; }

.status { position: fixed; left: 16px; right: 16px; bottom: 16px; text-align: center; background: var(--panel); padding: 10px; border-radius: 10px; color: var(--accent); }

/* --- Smal scherm --- */

@media (max-width: 800px) {
  .lobby { grid-template-columns: 1fr; gap: 24px; }
  .answers { grid-template-columns: 1fr; }
  .chart { height: 220px; gap: 8px; }
  .column-label span:last-child { display: none; }
  .ranking { font-size: 1.2rem; }
  .step { width: 30%; }
}
