/* Woudlucht Arcade — gedeelde retro-arcadestijl */

/* Het pixellettertype heeft geen pijltjes en symbolen: die nemen we uit een systeemlettertype. */
@font-face {
  font-family: 'Pijlen';
  src: local('Segoe UI Symbol'), local('Arial Unicode MS'), local('DejaVu Sans'), local('Arial');
  unicode-range: U+2190-21FF, U+23CE, U+25B2, U+25B6, U+25BC, U+25C0, U+2665;
  size-adjust: 150%;
}

:root {
  --bg: #050510;
  --paneel: #10102b;
  --rand: #2a2a66;
  --neon-roze: #ff2bd6;
  --neon-cyaan: #21f6ff;
  --neon-geel: #ffe600;
  --neon-groen: #39ff14;
  --neon-oranje: #ff8a00;
  --tekst: #e8e8ff;
  --gedimd: #8a8ab8;
  --font: 'Pijlen', 'Press Start 2P', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -10%, #2a0d55 0%, #0b0820 45%, var(--bg) 100%) fixed;
  color: var(--tekst);
  font-family: var(--font);
}

/* CRT-scanlijnen over de hele pagina */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
}

a { color: var(--neon-cyaan); }

.knipper { animation: knipper 1.1s steps(2, start) infinite; }
@keyframes knipper { to { visibility: hidden; } }

/* ===================== Startpagina ===================== */

.logo { text-align: center; padding: 32px 16px 4px; }
.logo-klein {
  font-size: 12px;
  letter-spacing: 6px;
  color: var(--neon-cyaan);
  text-shadow: 0 0 8px var(--neon-cyaan);
}
.logo-groot {
  margin: 16px 0;
  font-size: clamp(26px, 5vw, 54px);
  line-height: 1.3;
  color: var(--neon-geel);
  text-shadow: 0 0 4px #fff, 0 0 12px var(--neon-oranje), 0 0 28px var(--neon-roze);
}
.logo-groot span {
  color: var(--neon-roze);
  text-shadow: 0 0 4px #fff, 0 0 14px var(--neon-roze), 0 0 30px var(--neon-roze);
}
.logo .knipper { font-size: 14px; margin: 4px 0 0; }

.kasten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1240px;
  margin: 28px auto;
  padding: 0 16px;
}

.kast {
  --accent: var(--neon-cyaan);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, #17173a, #0d0d24);
  border: 4px solid var(--accent);
  border-radius: 14px 14px 4px 4px;
  box-shadow: 0 0 0 4px #000, 0 0 14px var(--accent);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.kast.gekozen {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 0 4px #000, 0 0 28px var(--accent), 0 0 60px var(--accent);
}
.kast-scherm {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border-radius: 8px;
  image-rendering: pixelated;
}
.kast h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
.kast-tekst { margin: 0; font-size: 10px; line-height: 1.8; }
.kast-bediening { margin: 0; font-size: 8px; line-height: 1.8; color: var(--gedimd); }
.kast-top {
  margin-top: auto;
  padding: 10px;
  background: #000;
  border: 2px solid #22224a;
  border-radius: 6px;
}
.kast-top-titel { margin-bottom: 8px; font-size: 10px; color: var(--neon-geel); }

.speel-knop {
  display: block;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  color: #000;
  background: var(--accent);
  border-radius: 6px;
  box-shadow: 0 4px 0 #000;
}
.speel-knop:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }

.voet {
  padding: 20px 16px 40px;
  text-align: center;
  font-size: 11px;
  line-height: 2.4;
  color: var(--gedimd);
}
.voet a { margin: 0 10px; text-decoration: none; }
.voet .beheer { font-size: 8px; color: #55557a; }

/* ===================== Toplijsten ===================== */

.toplijst { list-style: none; margin: 0; padding: 0; font-size: 10px; }
.toplijst li { display: flex; align-items: baseline; gap: 8px; padding: 4px 2px; }
.toplijst .plaats { flex: none; width: 2.4em; color: var(--gedimd); }
.toplijst .naam { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toplijst .school { display: block; overflow: hidden; text-overflow: ellipsis; font-size: .7em; line-height: 1.6; color: var(--gedimd); }
.toplijst .punten { color: var(--neon-geel); }
.toplijst li:nth-child(1) .naam { color: var(--neon-geel); }
.toplijst li:nth-child(2) .naam { color: #d8d8ff; }
.toplijst li:nth-child(3) .naam { color: var(--neon-oranje); }
.toplijst li.leeg { justify-content: center; color: var(--gedimd); line-height: 1.8; text-align: center; }
.toplijst li.jij { background: rgba(255, 43, 214, .25); outline: 1px solid var(--neon-roze); }

/* ===================== Spelpagina's ===================== */

.spel-kop {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 20px;
}
.terug { font-size: 11px; text-decoration: none; }
.spel-titel {
  margin: 0;
  font-size: clamp(14px, 2.4vw, 22px);
  color: var(--neon-geel);
  text-shadow: 0 0 10px var(--neon-oranje);
}

.spel-zone {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  padding: 0 16px 16px;
}
.speelveld-houder {
  position: relative;
  line-height: 0;
  border: 4px solid var(--neon-cyaan);
  border-radius: 6px;
  box-shadow: 0 0 0 4px #000, 0 0 24px rgba(33, 246, 255, .45);
  overflow: hidden;
}
.speelveld {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 96px);
  background: #000;
  image-rendering: pixelated;
}

.hud { display: flex; flex-direction: column; gap: 12px; width: 210px; }
.hud-blok {
  padding: 12px;
  background: var(--paneel);
  border: 3px solid var(--rand);
  border-radius: 6px;
}
.hud-label { font-size: 9px; color: var(--gedimd); }
.hud-waarde {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--neon-geel);
  overflow-wrap: anywhere;
}
.hud-waarde.klein { font-size: 10px; }
.uitleg { font-size: 8px; line-height: 2.2; color: var(--gedimd); }
.volgende { display: block; margin: 8px auto 0; image-rendering: pixelated; }

/* ===================== Overlays (start / einde) ===================== */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
  background: rgba(4, 4, 18, .9);
}
.overlay p { margin: 0; }
.overlay.compact { gap: 10px; padding: 14px; font-size: 9px; line-height: 1.8; }
.overlay.compact .overlay-titel { font-size: 15px; }
.overlay-titel {
  font-size: 20px;
  line-height: 1.4;
  color: var(--neon-geel);
  text-shadow: 0 0 10px var(--neon-oranje);
}
.overlay-titel.rood { color: var(--neon-roze); text-shadow: 0 0 12px var(--neon-roze); }
.overlay .klein { font-size: 8px; color: var(--gedimd); }
.overlay .melding { font-size: 12px; color: var(--neon-groen); }
.overlay .toplijst { width: min(340px, 100%); text-align: left; }
.grote-score {
  font-size: 30px;
  color: var(--neon-geel);
  text-shadow: 0 0 12px var(--neon-oranje);
}

.naam-form { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.naam-form label { font-size: 10px; color: var(--neon-cyaan); }
.naam-form .velden { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.naam-form .velden input { width: min(100%, 200px); }
.naam-form input::placeholder { color: #55557a; }
.naam-form .school-regel { font-size: 9px; color: var(--gedimd); }
.naam-form .school-regel span { color: var(--neon-roze); }
.naam-form input {
  width: 100%;
  max-width: 280px;
  padding: 10px;
  font-family: var(--font);
  font-size: 15px;
  text-align: center;
  color: var(--neon-geel);
  background: #000;
  border: 3px solid var(--neon-cyaan);
  outline: none;
}

.keuzes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(520px, 100%); }
.keuze-knop {
  padding: 12px 10px;
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  color: var(--tekst);
  background: #10102b;
  border: 3px solid #2a2a66;
  border-radius: 6px;
  cursor: pointer;
}
.keuze-knop.gekozen { color: #000; background: var(--neon-roze); border-color: var(--neon-roze); box-shadow: 0 0 14px var(--neon-roze); }
.mobiel .keuzes { gap: 6px; }
.mobiel .keuze-knop { padding: 8px 4px; font-size: 8px; }

.knoppen { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.knop, .naam-form button {
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  color: #000;
  background: var(--neon-roze);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 4px 0 #000;
  cursor: pointer;
}
.knop.tweede { background: var(--neon-cyaan); }
.knop:active, .naam-form button:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }

/* ===================== Scorebord (beamer) ===================== */

.scorebord {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 3vh 4vw 2vh;
  overflow: hidden;
}
.bord-kop {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 30px);
  color: var(--neon-cyaan);
  text-shadow: 0 0 10px var(--neon-cyaan);
}
.bord {
  --accent: var(--neon-geel);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1100px, 92vw);
  margin-top: 3vh;
  animation: binnen .5s ease-out;
}
@keyframes binnen { from { opacity: 0; transform: translateY(20px); } }
.bord-spel {
  margin: 0 0 3vh;
  font-size: clamp(20px, 4.2vw, 58px);
  text-align: center;
  color: var(--accent);
  text-shadow: 0 0 6px #fff, 0 0 22px var(--accent);
}
/* Tien rijen moeten altijd op het scherm passen: lettergrootte volgt breedte én hoogte. */
.bord .toplijst { width: 100%; font-size: clamp(12px, min(2.3vw, 2.6vh), 30px); }
.bord .toplijst li { padding: .4em .4em; border-bottom: 2px dashed #1e1e44; }
.bord .toplijst .plaats { width: 3em; }
.bord .toplijst .school { display: inline; margin-left: .8em; font-size: .6em; }
.bord-stippen { display: flex; gap: 14px; margin-top: auto; padding-top: 3vh; }
.bord-stippen span { width: 14px; height: 14px; background: #333; }
.bord-stippen span.aan { background: var(--neon-roze); box-shadow: 0 0 10px var(--neon-roze); }
.bord-balk { width: min(600px, 80vw); height: 6px; margin-top: 14px; background: #1a1a3a; }
.bord-balk div { height: 100%; width: 0; background: var(--neon-cyaan); }
.bord-hint { margin-top: 12px; font-size: 9px; color: #55557a; }

/* ===================== Alle scores (lange lijst, scrollen mag) ===================== */

.alle-scores {
  --accent: var(--neon-geel);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3vh 16px 40px;
}
.alle-scores .tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 20px 0 10px; }
.alle-scores .bord-spel { margin-bottom: 8px; font-size: clamp(18px, 3.5vw, 40px); }
.alle-scores .klein { margin: 0 0 16px; font-size: 9px; color: var(--gedimd); }
.alle-scores .toplijst { width: 100%; font-size: clamp(11px, 1.7vw, 18px); }
.alle-scores .toplijst li { padding: .5em .4em; border-bottom: 2px dashed #1e1e44; }
.alle-scores .toplijst .plaats { width: 3em; }
.alle-scores .toplijst .tijd { flex: none; font-size: .6em; color: var(--gedimd); }
.alle-scores .bord-hint { margin-top: 28px; }

/* ===================== Bezoekersstatistieken (aparte poort) ===================== */

.stats { max-width: 1200px; margin: 0 auto; padding: 24px 16px 40px; font-size: 10px; line-height: 1.8; }
.stats .bord-kop { text-align: center; }
.stats #status { text-align: center; font-size: 8px; color: var(--gedimd); }
.stats h2 { margin: 28px 0 10px; font-size: 12px; color: var(--neon-geel); }
.stats h2 .klein { font-size: 8px; color: var(--gedimd); }
.stats section { margin-top: 8px; }
.stats-kolommen { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.tegels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.tegel { padding: 14px 8px; text-align: center; background: var(--paneel); border: 3px solid var(--rand); }
.tegel .waarde { font-size: 22px; color: var(--neon-geel); text-shadow: 0 0 10px var(--neon-oranje); }
.tegel .label { margin-top: 8px; font-size: 7px; color: var(--gedimd); }
.balken { display: flex; flex-direction: column; gap: 6px; }
.balk-rij { display: flex; align-items: center; gap: 10px; }
.balk-label { flex: none; width: 13em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 8px; color: var(--gedimd); }
.balk { height: 12px; background: var(--neon-roze); box-shadow: 0 0 8px var(--neon-roze); }
.balk-getal { font-size: 9px; color: var(--neon-geel); }
.tabel-houder { overflow-x: auto; }
.stats table { width: 100%; border-collapse: collapse; font-size: 8px; line-height: 1.6; }
.stats th, .stats td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #1e1e44; white-space: nowrap; }
.stats td.klein { white-space: normal; min-width: 180px; font-size: 7px; color: var(--gedimd); }
.stats th { color: var(--neon-cyaan); }
.stats td.geel { color: var(--neon-geel); }
.stats td.roze { color: var(--neon-roze); }
.stats td.cyaan { color: var(--neon-cyaan); }
.stats .bord-hint { margin-top: 32px; text-align: center; }

/* ===================== Beheer ===================== */

.beheer-pagina { max-width: 760px; margin: 0 auto; padding: 32px 16px; font-size: 11px; line-height: 2; }
.beheer-pagina h1 { font-size: 18px; color: var(--neon-geel); }
.beheer-rij {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  background: var(--paneel);
  border: 3px solid var(--rand);
}

/* ===================== Smartphone / tablet ===================== */

.bediening {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 22px;
  width: 100%;
  padding: 4px 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.bediening[hidden] { display: none; }
.aanraak-groep { display: flex; align-items: center; gap: 10px; }

.aanraak-knop {
  width: 66px;
  height: 66px;
  padding: 0;
  font-family: var(--font);
  font-size: 24px;
  color: #000;
  background: var(--neon-cyaan);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 5px 0 #000, 0 0 12px rgba(33, 246, 255, .5);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.aanraak-knop.in { transform: translateY(4px); box-shadow: 0 1px 0 #000; filter: brightness(1.35); }
.aanraak-knop.actie {
  width: 88px;
  height: 88px;
  font-size: 12px;
  background: var(--neon-roze);
  box-shadow: 0 5px 0 #000, 0 0 14px rgba(255, 43, 214, .6);
}
.aanraak-knop.symbool { font-size: 36px; }
.aanraak-knop.klein { width: 48px; height: 48px; font-size: 12px; color: #fff; background: #3a3a6a; box-shadow: 0 4px 0 #000; }

.joystick {
  position: relative;
  width: 168px;
  height: 168px;
  border: 4px solid var(--neon-roze);
  border-radius: 50%;
  background: radial-gradient(circle, #2a1240 0%, #10102b 70%);
  box-shadow: 0 0 18px rgba(255, 43, 214, .45), inset 0 0 20px rgba(0, 0, 0, .7);
  touch-action: none;
}
.joystick-knop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8be9, var(--neon-roze) 60%, #9a0f80);
  box-shadow: 0 0 16px var(--neon-roze);
  transition: transform .12s ease-out;
}
.joystick.in .joystick-knop { transition: none; }

/* Op een smartphone: speelveld bovenaan, knoppen eronder, scores daaronder. */
.mobiel body { overscroll-behavior: none; }
.mobiel .spel-kop { padding: 8px 12px; }
.mobiel .spel-zone { flex-direction: column; align-items: center; gap: 10px; padding: 0 8px 16px; }
.mobiel .speelveld-houder { order: 0; }
.mobiel .bediening { order: 1; }
.mobiel .hud { order: 2; flex-direction: row; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 480px; }
.mobiel .hud-blok { flex: 1 1 28%; padding: 8px; }
.mobiel .hud-blok:has(.toplijst) { flex-basis: 100%; }
.mobiel .hud-waarde { font-size: 13px; }
.mobiel .uitleg { display: none; }
.mobiel .speelveld { max-width: calc(100vw - 24px); max-height: calc(100svh - 290px); }
.mobiel .spel-kop { grid-template-columns: auto 1fr; gap: 12px; }
.mobiel .spel-kop > span:last-child { display: none; }
.mobiel .spel-titel { font-size: 11px; line-height: 1.5; text-align: right; }
.mobiel .overlay { gap: 7px; padding: 10px; font-size: 9px; line-height: 1.6; }
.mobiel .overlay-titel { font-size: 14px; }
.mobiel .grote-score { font-size: 22px; }
.mobiel .hud-waarde.klein { font-size: 9px; }
