/* zitereenbusjeklem.nl — handgemaakt in Kladblok, 1998-stijl, met moderne media queries */

:root {
  --stad-groen: #1f8a1f;
  --stad-groen-donker: #0d4d0d;
  --wit: #ffffff;
  --rood: #e00000;
  --geel: #ffde00;
  --blauw: #0033cc;
  --paars: #8800cc;
  --inkt: #111;
  --ok: #2fd12f;
  --down: #ff1a1a;
  --bijna: #ffb300;
  --nul: #c9c9c9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  color: var(--inkt);
  background-color: var(--stad-groen);
  /* groen-wit Stadsruitje met sterretjes, getegeld zoals het hoort */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Crect width='40' height='40' fill='%231f8a1f'/%3E%3Crect x='40' y='40' width='40' height='40' fill='%231f8a1f'/%3E%3Crect x='40' width='40' height='40' fill='%23ffffff'/%3E%3Crect y='40' width='40' height='40' fill='%23ffffff'/%3E%3Ctext x='12' y='28' font-size='16'%3E%E2%AD%90%3C/text%3E%3Ctext x='52' y='68' font-size='16'%3E%F0%9F%9A%90%3C/text%3E%3C/svg%3E");
  overflow-x: hidden;
}

a { color: var(--blauw); font-weight: bold; }
a:visited { color: var(--paars); }
a:hover { color: var(--rood); background: var(--geel); }

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

section {
  background: var(--wit);
  border: 6px ridge #c0c0c0;
  margin: 24px 0;
  padding: 20px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.6);
}

/* ---------- Ticker ---------- */
.ticker {
  display: flex;
  align-items: center;
  background: #000;
  color: var(--geel);
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  border-bottom: 4px solid var(--rood);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.ticker-label {
  background: var(--rood);
  color: #fff;
  padding: 10px 12px;
  white-space: nowrap;
  animation: knipper 0.8s steps(1) infinite;
}
.ticker marquee { padding: 10px 0; flex: 1; min-width: 0; }
.ticker a { color: var(--geel); text-decoration: none; }
.ticker a:hover { background: var(--rood); color: #fff; }

/* ---------- Header ---------- */
.kop { text-align: center; padding: 10px 16px 0; }

.construction {
  display: inline-block;
  margin: 12px 0;
  padding: 6px 18px;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 2px;
  background: repeating-linear-gradient(45deg, var(--geel) 0 20px, #000 20px 40px);
  color: #fff;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
  border: 3px solid #000;
}

.wordart {
  margin: 8px 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(32px, 8.5vw, 96px);
  line-height: 1;
  word-break: break-all;
}
.wordart span {
  display: inline-block;
  background: linear-gradient(180deg, #ffef00 0%, #ff8a00 40%, #ff0000 60%, #c0005a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px #000;
  filter: drop-shadow(4px 4px 0 #0d4d0d) drop-shadow(2px 2px 0 #fff);
  animation: golf 1.6s ease-in-out infinite;
}
.wordart span:nth-child(odd) { animation-delay: -0.4s; }
.wordart span:nth-child(3n) { animation-delay: -0.8s; }
.wordart .tld {
  background: linear-gradient(180deg, #fff, #9fff9f);
  -webkit-background-clip: text;
  background-clip: text;
}

.slogan {
  display: inline-block;
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  font-weight: bold;
  padding: 6px 14px;
  border: 3px dashed var(--geel);
}

/* ---------- Scene: busje vs viaduct ---------- */
.scene { max-width: 800px; margin: 16px auto 0; }
.scene-svg { width: 100%; height: auto; display: block; background: linear-gradient(#7ec8ff, #d9f1ff 75%); border: 4px outset #c0c0c0; }
.busje { animation: rijden 7s ease-in infinite; }
.bonk, .sterretjes { opacity: 0; animation: bonk 7s infinite; }
.trein { animation: trein 7s linear infinite; }
.streep { animation: streep 0.6s linear infinite; }

@keyframes rijden {
  0% { transform: translateX(-280px); }
  40% { transform: translateX(240px); }
  42% { transform: translateX(232px) rotate(-1.5deg); }
  44% { transform: translateX(236px) rotate(1deg); }
  46%, 100% { transform: translateX(234px); }
}
@keyframes bonk {
  0%, 40% { opacity: 0; transform: scale(.4); transform-origin: 470px 70px; }
  42% { opacity: 1; transform: scale(1.2); transform-origin: 470px 70px; }
  50%, 90% { opacity: 1; transform: scale(1); transform-origin: 470px 70px; }
  100% { opacity: 0; }
}
@keyframes trein {
  0%, 55% { transform: translateX(400px); }
  100% { transform: translateX(1200px); }
}
@keyframes streep { to { transform: translateX(-60px); } }

/* ---------- Antwoord ---------- */
.antwoord-box { text-align: center; border-color: var(--geel); background: #fffbe0; }
.vraag {
  font-family: "Rubik Glitch", Impact, sans-serif;
  font-size: clamp(26px, 5vw, 52px);
  margin: 0;
  color: var(--stad-groen-donker);
}
.antwoord {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(90px, 22vw, 240px);
  line-height: 1;
  margin: 8px 0;
  -webkit-text-stroke: 4px #000;
}
.antwoord.nee { color: var(--ok); text-shadow: 8px 8px 0 var(--stad-groen-donker); }
.antwoord.joa {
  color: var(--rood);
  text-shadow: 8px 8px 0 #000;
  animation: knipper 0.5s steps(1) infinite, schud 0.3s infinite;
}
.antwoord-sub { font-size: clamp(18px, 2.6vw, 26px); font-weight: bold; margin: 0 0 8px; }
.bijgewerkt { font-family: "Courier New", monospace; font-size: 14px; }
body.alarm { animation: alarmflits 1s steps(1) infinite; }

/* ---------- Fabrieksbord ---------- */
.fabrieksbord { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 20px; align-items: center; }
.bord {
  background: var(--stad-groen);
  color: #fff;
  border: 10px solid #fff;
  outline: 6px solid var(--stad-groen);
  text-align: center;
  padding: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
}
.bord-kop { background: #fff; color: var(--stad-groen); padding: 4px; font-size: 20px; margin-bottom: 8px; }
.bord-getal {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(54px, 9vw, 90px);
  background: #000;
  color: #ff3b3b;
  margin: 10px auto;
  padding: 14px 8px;
  border: 4px inset #444;
  text-shadow: 0 0 12px #f00;
  max-width: 280px;
}
.bord-record { margin-top: 10px; font-size: 14px; color: var(--geel); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat { background: #000; border: 4px outset #888; text-align: center; padding: 14px 8px; color: #0f0; }
.stat-getal { font-family: "Press Start 2P", monospace; font-size: clamp(22px, 4vw, 38px); color: var(--geel); text-shadow: 0 0 8px #ff0; }
.stat-label { margin-top: 8px; font-family: "Courier New", monospace; font-weight: bold; }
.stat-label small { color: #8f8; }
.fabrieksbord .voetnoot { grid-column: 1 / -1; }

.voetnoot { font-size: 13px; color: #555; font-style: italic; }

/* ---------- Regenboog-hr ---------- */
hr.regenboog {
  border: 0;
  height: 12px;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, violet, red);
  background-size: 200% 100%;
  animation: regenboog 3s linear infinite;
  box-shadow: 0 0 10px #fff;
}

.sectiekop {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(24px, 4vw, 38px);
  margin: 0 0 8px;
  color: var(--blauw);
  text-shadow: 3px 3px 0 var(--geel);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.intro { font-size: 17px; }
.nieuw {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  background: var(--rood);
  color: var(--geel);
  padding: 6px 8px;
  transform: rotate(-8deg);
  animation: knipper 0.7s steps(1) infinite;
  text-shadow: none;
}
.spin { animation: draai 3s linear infinite; }

/* ---------- Kaart ---------- */
#kaart { height: 460px; border: 5px inset #c0c0c0; }
.leaflet-popup-content { font-family: "Comic Sans MS", cursive; }
.busje-marker {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #000;
  background: radial-gradient(circle, #ff0 0, #f00 70%);
  font-size: 18px;
  box-shadow: 0 0 0 4px rgba(255,0,0,.35);
  animation: pols 1.4s ease-in-out infinite;
}
.busje-marker.live { background: radial-gradient(circle, #fff 0, #f00 50%); animation: pols .4s infinite; }

/* ---------- Hall of Shame ---------- */
.hotspot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.hotspot {
  border: 4px outset #ddd;
  background: linear-gradient(160deg, #fff 0%, #e6ffe6 100%);
  padding: 14px;
  position: relative;
}
.hotspot.goud { background: linear-gradient(160deg, #fff6b0, #ffd700); border-color: #c9a400; }
.hotspot.zilver { background: linear-gradient(160deg, #fff, #d8d8d8); }
.hotspot.brons { background: linear-gradient(160deg, #ffe3c4, #d9904a); }
.hotspot-rang {
  position: absolute; top: -14px; right: -10px;
  font-family: "Press Start 2P", monospace; font-size: 14px;
  background: var(--rood); color: #fff; padding: 8px; border: 3px solid #000;
  transform: rotate(8deg);
}
.hotspot h3 { margin: 0 0 2px; font-family: Impact, sans-serif; font-size: 22px; letter-spacing: .5px; }
.hotspot .bijnaam { margin: 0 0 8px; color: var(--rood); font-weight: bold; font-style: italic; }
.hotspot .teller-groot { font-family: "Press Start 2P", monospace; font-size: 30px; color: var(--stad-groen-donker); }
.hotspot .meta { font-size: 14px; margin: 6px 0; }
.hotspot .weetje { font-size: 14px; background: #ffffcc; border: 1px dashed #999; padding: 6px; }
.dreiging { margin-top: 8px; font-size: 13px; font-weight: bold; }
.dreiging-balk { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 4px; }
.dreiging-balk i { height: 12px; background: #ddd; border: 1px solid #999; }
.dreiging-balk i.aan:nth-child(1) { background: #2fd12f; }
.dreiging-balk i.aan:nth-child(2) { background: #c6e000; }
.dreiging-balk i.aan:nth-child(3) { background: #ffb300; }
.dreiging-balk i.aan:nth-child(4) { background: #ff6a00; }
.dreiging-balk i.aan:nth-child(5) { background: #ff0000; animation: knipper .6s steps(1) infinite; }

/* ---------- Uptime ---------- */
.statuspagina { background: #f7fff7; }
.systeemstatus {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  font-size: 20px;
  padding: 14px 18px;
  color: #fff;
  background: var(--stad-groen);
  border: 3px solid #000;
  margin: 10px 0 16px;
}
.systeemstatus.storing { background: var(--rood); animation: knipper 1s steps(1) infinite; }
.uptime-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; align-items: center; }
.uptime-periode { margin-left: auto; font-style: italic; }
.blok { display: inline-block; width: 12px; height: 12px; vertical-align: middle; border: 1px solid #0003; }
.blok.ok { background: var(--ok); }
.blok.down { background: var(--down); }
.blok.bijna { background: var(--bijna); }

.uptime-rij { border: 2px solid #000; background: #fff; padding: 12px; margin-bottom: 10px; font-family: Arial, Helvetica, sans-serif; }
.uptime-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.uptime-naam { font-weight: bold; font-size: 17px; }
.uptime-pil { font-size: 12px; font-weight: bold; padding: 2px 8px; border-radius: 10px; color: #fff; background: var(--stad-groen); }
.uptime-pil.down { background: var(--rood); animation: knipper .6s steps(1) infinite; }
.uptime-nummers { margin-left: auto; display: flex; gap: 14px; font-size: 13px; flex-wrap: wrap; }
.uptime-nummers b { font-family: "Courier New", monospace; font-size: 15px; }
.uptime-balk { display: flex; gap: 1px; margin-top: 8px; height: 30px; }
.uptime-balk i { flex: 1; background: var(--ok); border-radius: 1px; min-width: 1px; }
.uptime-balk i.down { background: var(--down); }
.uptime-balk i.bijna { background: var(--bijna); }
.uptime-balk i:hover { outline: 2px solid #000; }
.uptime-sub { display: flex; justify-content: space-between; font-size: 12px; color: #666; margin-top: 4px; gap: 8px; flex-wrap: wrap; }

/* ---------- Incidenten ---------- */
.filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select { font-family: inherit; font-size: 15px; padding: 4px; border: 3px inset #ccc; }
.tabel-wrap { overflow-x: auto; border: 3px inset #ccc; max-height: 640px; overflow-y: auto; }
.incidenten-tabel { width: 100%; border-collapse: collapse; font-size: 15px; }
.incidenten-tabel th { position: sticky; top: 0; background: var(--blauw); color: #fff; text-align: left; padding: 8px; font-family: Arial, sans-serif; }
.incidenten-tabel td { padding: 8px; border-bottom: 1px dotted #888; vertical-align: top; }
.incidenten-tabel tr:nth-child(even) td { background: #eaffea; }
.incidenten-tabel tr.live td { background: #ffd6d6; font-weight: bold; }
.incidenten-tabel .postmortem { font-style: italic; color: #444; font-size: 14px; }
.incidenten-tabel .wanneer { white-space: nowrap; font-family: "Courier New", monospace; font-weight: bold; }
.tag { display: inline-block; font-size: 11px; font-weight: bold; padding: 1px 6px; border: 1px solid #000; margin-right: 4px; font-family: Arial, sans-serif; }
.tag.incident { background: var(--down); color: #fff; }
.tag.bijna { background: var(--bijna); }
.tag.nieuws { background: #9cf; }

/* ---------- Pers ---------- */
.pers-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.persbericht { font-family: "Times New Roman", Times, serif; font-size: 17px; background: #fdfdf6; border: 1px solid #999; padding: 18px; box-shadow: inset 0 0 30px #eee; }
.persbericht-kop { font-family: Arial, sans-serif; font-weight: bold; font-size: 12px; letter-spacing: 2px; color: var(--rood); }
.persbericht h3 { font-size: 26px; margin: 8px 0; }
.pers-zijkant { background: #000; color: #0f0; padding: 16px; font-family: "Courier New", monospace; border: 4px outset #666; }
.pers-zijkant h3 { color: var(--geel); margin-top: 0; }
.pers-zijkant a { color: #0ff; }
.badge-preview { width: 100%; max-width: 300px; height: 110px; border: 0; display: block; margin: 8px 0; }
.embed-code { width: 100%; height: 70px; font-size: 12px; background: #111; color: #0f0; border: 2px inset #555; }

.knop {
  font-family: "Comic Sans MS", cursive;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 16px;
  background: linear-gradient(#fff, #c0c0c0);
  border: 3px outset #ddd;
  cursor: pointer;
}
.knop:active { border-style: inset; }

/* ---------- Bronnen ---------- */
.bronnen-lijst { columns: 2 280px; font-family: "Courier New", monospace; font-size: 13px; }
.bronnen-lijst li { break-inside: avoid; margin-bottom: 4px; }
.bron-ok { color: var(--stad-groen); font-weight: bold; }
.bron-fout { color: var(--rood); font-weight: bold; }

/* ---------- Voet ---------- */
.voet { text-align: center; padding: 20px 16px 120px; color: #fff; }
.voet a { color: var(--geel); }
.webring {
  display: inline-flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: #000; border: 4px ridge var(--geel); padding: 10px 16px; font-size: 15px;
}
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.badge88 {
  width: 88px; height: 31px; font-size: 9px; line-height: 1.15; display: grid; place-content: center;
  background: #333; color: #fff; border: 2px outset #888; font-family: Verdana, sans-serif;
}
.badge88.groen { background: var(--stad-groen); }
.badge88.rood { background: #a00; }
.badge88.geel { background: var(--geel); color: #000; }
.badge88.blauw { background: var(--blauw); }
.teller { display: inline-block; background: #000; padding: 8px 14px; border: 3px inset #666; font-family: Verdana, sans-serif; font-size: 14px; }
.teller-cijfers { font-family: "Press Start 2P", monospace; color: #ff3b3b; letter-spacing: 3px; background: #200; padding: 4px; }
.gastenboek { font-size: 18px; }
.disclaimer { max-width: 760px; margin: 12px auto; font-size: 13px; background: rgba(0,0,0,.65); padding: 10px; }
.copyright { font-size: 12px; background: rgba(0,0,0,.65); display: inline-block; padding: 4px 10px; }

/* ---------- Zwevende knoppen & cursor ---------- */
.zwevers { position: fixed; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 1001; }
.zweef-knop { font-family: "Press Start 2P", monospace; font-size: 11px; padding: 10px; background: var(--geel); border: 3px outset #fff8a0; cursor: pointer; box-shadow: 3px 3px 0 #000; }
.zweef-knop:active { border-style: inset; }
.spoor { position: fixed; pointer-events: none; z-index: 2000; font-size: 18px; animation: vervaag .8s forwards; }
.regen { position: fixed; top: -60px; pointer-events: none; z-index: 1999; font-size: 40px; animation: val linear forwards; }

/* ---------- Animaties ---------- */
@keyframes knipper { 50% { visibility: hidden; } }
.blink-slow { animation: knipperzacht 2s ease-in-out infinite; }
@keyframes knipperzacht { 50% { opacity: .45; } }
@keyframes golf { 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes schud { 25% { transform: translate(-4px, 2px) rotate(-1deg); } 75% { transform: translate(4px, -2px) rotate(1deg); } }
@keyframes regenboog { to { background-position: 200% 0; } }
@keyframes draai { to { transform: rotate(360deg); } }
@keyframes pols { 50% { box-shadow: 0 0 0 12px rgba(255,0,0,0); } }
@keyframes vervaag { to { opacity: 0; transform: translateY(20px) scale(.5); } }
@keyframes val { to { transform: translateY(115vh) rotate(720deg); } }
@keyframes alarmflits { 50% { background-color: var(--rood); background-blend-mode: multiply; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; }
  .ticker marquee { display: none; }
}

@media (max-width: 760px) {
  section { padding: 14px; box-shadow: 4px 4px 0 rgba(0,0,0,.6); }
  .fabrieksbord, .pers-grid { grid-template-columns: 1fr; }
  #kaart { height: 360px; }
  .uptime-nummers { margin-left: 0; }
  .uptime-balk { height: 24px; }
  .uptime-periode { margin-left: 0; }
  .ticker { font-size: 10px; }
  .ticker-label { padding: 10px 6px; }
  .zwevers { flex-direction: row; right: 8px; bottom: 8px; }
  .zweef-knop { font-size: 9px; padding: 7px; }
  .incidenten-tabel { font-size: 14px; }
  .incidenten-tabel .postmortem-kolom { display: none; }
}
