/* Niet naar school! — paarse cozy stijl */
:root {
  --ink: #2b1840;
  --bg: #2a1745;
  --paneel: #3d2463;
  --paneel-rand: #533283;
  --lavendel: #cdb6f5;
  --licht: #f3ecff;
  --tekst: #f7f2ff;
  --tekst-zacht: #e4d8fb;
  --paars: #7b4fc9;
  --paars-donker: #6b4a8e;
  --geel: #ffd166;
  --rood: #e84a6f;
  --display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Trebuchet MS', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--tekst); font-family: var(--body); overflow: hidden; }

#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#app { position: relative; flex-shrink: 0; width: 1280px; height: 800px; transform-origin: center center; overflow: hidden; }

h1, h2, p { margin: 0; }
.vul { flex-grow: 1; }

/* ---------- knoppen ---------- */
.knop {
  cursor: pointer; border: 4px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 5px 0 var(--ink); font-family: var(--display); font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease;
}
.knop:hover { transform: translateY(-2px); }
.knop:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.knop:focus-visible { outline: 4px solid var(--geel); outline-offset: 3px; }
.knop:disabled { cursor: not-allowed; }
.knop:disabled:hover { transform: none; }
.knop-groot { height: 56px; padding: 0 28px; font-size: 22px; }
.knop-klein { height: 48px; padding: 0 18px; font-size: 18px; font-weight: 600; border-width: 3px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); background: var(--licht); }
.knop-rand { padding: 10px 16px; border: 3px solid var(--lavendel); background: transparent; color: var(--tekst-zacht); box-shadow: none; font-family: var(--body); font-size: 15px; border-radius: 14px; }
.paars { background: var(--paars); color: #fff; }
.lila { background: var(--lavendel); }
.geel { background: var(--geel); height: 72px; font-size: 26px; padding: 0 36px; }

/* ---------- menu ---------- */
.menu { position: absolute; inset: 0; padding: 36px 64px 32px; display: flex; flex-direction: column; gap: 28px; }
.menu-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 250px; }
.menu-tekst { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.kicker { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 2px; color: var(--lavendel); text-transform: uppercase; }
.menu h1 { font-family: var(--display); font-weight: 700; font-size: 76px; line-height: .95; }
.menu-tekst p { font-size: 21px; line-height: 1.45; color: var(--tekst-zacht); text-wrap: pretty; }
.hero { position: relative; width: 380px; height: 250px; flex-shrink: 0; }
.hero-cirkel { position: absolute; left: 30px; top: 10px; width: 250px; height: 250px; border-radius: 50%; background: var(--paneel); }
.hero-meisje { position: absolute; left: 50px; top: 0; }
.hero-poedel { position: absolute; left: 205px; top: 100px; }
.sectie-titel { font-family: var(--display); font-weight: 600; font-size: 26px; }
.sectie-rij { display: flex; align-items: center; gap: 12px; margin: -10px 0 -14px; }
.sectie-rij .knop-klein { height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.sectie-rij .knop-klein svg { width: 16px; height: 19px; }
.geel-klein { background: var(--geel); }
.menu > *:not(.sneeuw) { position: relative; }

.kaarten { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.kaart {
  height: 212px; padding: 18px; border-radius: 22px; background: var(--licht); box-shadow: 0 6px 0 var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; font-family: var(--body);
}
.kaart:disabled { opacity: .55; }
.kaart-nr { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--paars-donker); }
.kaart-naam { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.kaart-doel { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.icoon { width: 30px; height: 30px; display: inline-block; }
.kaart-status { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.kaart-status.gehaald { color: #3f7a36; gap: 4px; }
.kaart-status.slot { color: var(--paars-donker); }
.pil { padding: 8px 16px; border-radius: 999px; background: var(--paars); color: #fff; font-family: var(--display); font-weight: 600; font-size: 18px; border: 3px solid var(--ink); }

.plank { display: flex; align-items: center; gap: 24px; padding: 16px 24px; border-radius: 24px; background: var(--paneel); border: 3px solid var(--paneel-rand); }
.plank-kop { display: flex; flex-direction: column; gap: 4px; width: 210px; }
.plank-titel { font-family: var(--display); font-weight: 600; font-size: 22px; }
.plank-sub { font-size: 16px; color: var(--lavendel); }
.plank-rij { display: flex; gap: 22px; flex-grow: 1; }
.plank-speler { font-size: 15px; color: var(--tekst-zacht); }
.link { padding: 0; border: 0; background: none; color: var(--geel); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.link:focus-visible { outline: 3px solid var(--geel); outline-offset: 2px; }
.plank-poedel { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 110px; font-family: var(--display); font-weight: 600; font-size: 16px; }

/* ---------- naam kiezen ---------- */
.naam-scherm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.naam-veld {
  width: 100%; height: 60px; padding: 0 18px; border: 4px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 26px; text-align: center;
}
.naam-veld:focus { outline: 4px solid var(--geel); outline-offset: 3px; }
.naam-veld::placeholder { color: #b7a6d6; }
.naam-fout { min-height: 26px; color: var(--rood); font-weight: 800; font-size: 18px; }

/* ---------- spel ---------- */
.hud { position: absolute; left: 40px; top: 16px; width: 1200px; height: 64px; display: flex; align-items: center; gap: 16px; }
.hud-titel { font-family: var(--display); font-weight: 700; font-size: 30px; }
.hud-doel { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--geel); color: var(--ink); border: 3px solid var(--ink); font-weight: 800; font-size: 17px; }
.hud-stand { display: flex; gap: 14px; font-family: var(--display); font-weight: 600; font-size: 20px; padding: 6px 14px; border-radius: 999px; background: var(--paneel); border: 3px solid var(--paneel-rand); font-variant-numeric: tabular-nums; }
.hud-stand.zacht { color: var(--lavendel); font-size: 17px; }
.hud-poedels { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 20px; }

.veld {
  position: absolute; left: 40px; top: 96px; width: 1200px; height: 680px; overflow: hidden; border-radius: 20px;
  box-shadow: 0 0 0 5px var(--ink), 0 10px 0 5px #1c0f30;
}
.vloer { position: absolute; padding: 8px 12px; font-family: var(--display); font-weight: 600; font-size: 15px; color: rgba(43, 24, 64, .45); }
.obstakel {
  position: absolute; border: 3px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(43, 24, 64, .18);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); overflow: hidden;
}
.doel {
  position: absolute; border-radius: 22px; border: 4px dashed var(--ink); background: #ffe29a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.doel-icoon { width: 56px; height: 56px; }
.doel-label { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.kegels { position: absolute; left: 0; top: 0; pointer-events: none; }
.kegels path { stroke: rgba(43, 24, 64, .25); stroke-width: 2; stroke-linejoin: round; }
.speler { position: absolute; left: 0; top: 0; width: 48px; height: 60px; will-change: transform; }
.bewaker { position: absolute; left: 0; top: 0; width: 48px; height: 66px; will-change: transform; }
.bewaker.kind { width: 38px; height: 52px; }
.bewaker.kind .alarm { left: 3px; top: -58px; }
.kegels .oor { fill: rgba(123, 79, 201, .10); stroke: rgba(43, 24, 64, .45); stroke-width: 2; stroke-dasharray: 8 6; }
.kegels .oor.jaagt { fill: rgba(232, 74, 111, .18); stroke: rgba(232, 74, 111, .8); }
.sprite { width: 100%; height: 100%; }
.naamkaartje {
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px;
  background: var(--ink); color: var(--tekst); font-family: var(--display); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.alarm {
  position: absolute; left: 7px; top: -66px; width: 34px; height: 34px; border-radius: 50%; background: var(--rood);
  border: 3px solid var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 24px;
  display: none; align-items: center; justify-content: center;
}
.struik { position: absolute; opacity: .9; pointer-events: none; }

/* ---------- overlays ---------- */
.overlay { position: absolute; inset: 0; background: rgba(42, 23, 69, .72); display: flex; align-items: center; justify-content: center; }
.kaart-groot {
  width: 620px; padding: 36px 40px; border-radius: 28px; background: var(--licht); border: 5px solid var(--ink);
  box-shadow: 0 10px 0 var(--ink); color: var(--ink); display: flex; flex-direction: column; gap: 18px;
}
.kaart-groot.midden { width: 580px; align-items: center; text-align: center; gap: 12px; }
.kaart-groot h2 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.05; }
.kaart-groot p { font-size: 20px; line-height: 1.45; text-wrap: pretty; }
.kaart-groot .knop-groot { align-self: flex-start; }
.kaart-groot.midden .knop-groot { align-self: auto; }
.klein-kop { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--paars-donker); }
.uitleg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 15px; font-weight: 700; }
.uitleg > div { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--tekst-zacht); }
.toetsen { display: flex; gap: 4px; }
kbd { padding: 2px 8px; border-radius: 6px; background: #fff; border: 2px solid var(--ink); font-family: var(--body); }
.mini-struik { width: 56px; height: 30px; }
.alarm-groot {
  width: 72px; height: 72px; border-radius: 50%; background: var(--rood); border: 4px solid var(--ink); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 48px; display: flex; align-items: center; justify-content: center;
}
.knoppen { display: flex; gap: 14px; margin-top: 6px; }
.alles { font-weight: 800; color: var(--paars); }
.stand-regel { font-weight: 800; color: var(--paars-donker); }

/* ---------- stand ---------- */
.stand-scherm h1 { font-size: 56px; }
.stand-scherm .sectie-rij { margin: 0; }
.stand-uitleg { font-size: 20px; color: var(--tekst-zacht); margin-top: -10px; }
.stand-lijsten { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stand-lijst { padding: 20px 26px; border-radius: 24px; background: var(--paneel); border: 3px solid var(--paneel-rand); min-height: 420px; }
.stand-lijst h2 { font-family: var(--display); font-weight: 600; font-size: 28px; margin-bottom: 10px; }
.stand-lijst p { color: var(--lavendel); font-size: 18px; }
.stand-lijst table { width: 100%; border-collapse: collapse; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stand-lijst td { padding: 8px 6px; border-top: 2px solid var(--paneel-rand); }
.stand-lijst tr:first-child td { border-top: 0; }
.stand-lijst td:nth-child(n+3) { text-align: right; color: var(--tekst-zacht); }
.stand-lijst .plek { width: 44px; font-family: var(--display); color: var(--geel); }
.stand-lijst tr.ik td { color: var(--geel); }

/* ---------- wereld 2: winter ---------- */
body.winter {
  --bg: #16335a; --paneel: #1f4a7a; --paneel-rand: #2d5f96; --lavendel: #b6d8f5; --tekst-zacht: #d8ebfb;
  --paars: #3f7fd1; --paars-donker: #2d5f96; --licht: #eef6ff;
}
.sneeuw {
  position: absolute; inset: -40px 0 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(#fff 1.6px, transparent 2px), radial-gradient(#fff 1px, transparent 1.4px);
  background-size: 90px 90px, 55px 55px; background-position: 0 0, 25px 35px;
  animation: sneeuw 9s linear infinite;
}
.sneeuw-2 { opacity: .4; background-size: 130px 130px, 70px 70px; animation-duration: 14s; }
@keyframes sneeuw { from { transform: translateY(-90px); } to { transform: translateY(0); } }

/* ---------- animaties ---------- */
@keyframes puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.puls { animation: puls 1.6s ease-in-out infinite; }
@keyframes hup { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hup { animation: hup .5s ease-in-out infinite; }
@keyframes zweef { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.zweef { animation: zweef 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .puls, .hup, .zweef, .sneeuw { animation: none; } }
