/* Pubquiz — mobile-first, donker thema voor quizavond */
:root {
  --achtergrond: #14161f;
  --paneel: #1e2130;
  --paneel-licht: #282c40;
  --rand: #3a3f58;
  --tekst: #f2f3f8;
  --tekst-zacht: #a6abc4;
  --accent: #ffb62e;
  --accent-donker: #9a6a0e;
  --goed: #3fca6b;
  --fout: #e2504c;
  --half: #e8a33d;
  --info: #56a8ff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  min-height: 100vh;
}
h1, h2, h3 { line-height: 1.2; }
a { color: var(--info); }
button, .knop {
  font: inherit;
  border: none;
  border-radius: var(--radius);
  padding: 12px 18px;
  background: var(--paneel-licht);
  color: var(--tekst);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled { opacity: .45; cursor: default; }
.knop-primair { background: var(--accent); color: #221a00; font-weight: 700; }
.knop-gevaar { background: var(--fout); color: #fff; }
.knop-klein { padding: 6px 12px; font-size: .85rem; border-radius: 9px; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--rand);
  background: var(--achtergrond);
  color: var(--tekst);
}
input[type="checkbox"], input[type="radio"] { width: auto; }
label { display: block; margin: 14px 0 6px; color: var(--tekst-zacht); font-size: .9rem; }
form { margin: 0; }

.container { max-width: 560px; margin: 0 auto; padding: 18px; }
.container-breed { max-width: 1080px; margin: 0 auto; padding: 18px; }
.paneel {
  background: var(--paneel);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.melding-fout {
  background: rgba(226, 80, 76, .15);
  border: 1px solid var(--fout);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
}
.melding-ok {
  background: rgba(63, 202, 107, .12);
  border: 1px solid var(--goed);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
}
.zacht { color: var(--tekst-zacht); }
.klein { font-size: .85rem; }
.rij { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.groei { flex: 1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
th { color: var(--tekst-zacht); font-weight: 600; font-size: .85rem; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: var(--paneel-licht);
}
.badge-goed { background: rgba(63,202,107,.2); color: var(--goed); }
.badge-half { background: rgba(232,163,61,.2); color: var(--half); }
.badge-fout { background: rgba(226,80,76,.2); color: var(--fout); }
.badge-info { background: rgba(86,168,255,.2); color: var(--info); }

.beoordeel-muziekveld { margin-left: 16px; }

/* vragenpool: beschikbaar ↔ gekozen */
.selectie-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px; align-items: start; margin-top: 10px;
}
.selectie-pijlen {
  align-self: center; text-align: center; color: var(--tekst-zacht);
  font-size: 1.2rem; line-height: 1.6;
}
.selectie-tegel {
  background: var(--achtergrond); border: 1px solid var(--rand);
  border-radius: 10px; padding: 12px; min-height: 90px;
}
.selectie-tegel h3 { margin: 0 0 10px; font-size: .95rem; color: var(--tekst-zacht); }
.selectie-gekozen { border-color: var(--accent-donker); }
.selectie-kaart {
  display: flex; gap: 8px; align-items: center;
  background: var(--paneel-licht); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px;
}
@media (max-width: 700px) {
  .selectie-grid { grid-template-columns: 1fr; }
  .selectie-pijlen { display: none; }
}

/* teamlogo & avatars */
.team-logo {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  vertical-align: middle; background: var(--paneel-licht);
}
.logo-paneel summary { cursor: pointer; }
.logo-paneel summary .team-logo { margin-left: 8px; }
.avatar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px; margin-top: 12px;
}
.avatar-keuze {
  display: block; margin: 0; cursor: pointer; border-radius: 50%;
  border: 3px solid transparent; padding: 2px;
}
.avatar-keuze img { width: 100%; display: block; border-radius: 50%; }
.avatar-keuze input { display: none; }
.avatar-keuze.gekozen, .avatar-keuze:has(input:checked) { border-color: var(--accent); }
.stand-logo {
  width: 1.3em; height: 1.3em; border-radius: 50%; object-fit: cover;
  vertical-align: -0.28em; margin-right: 8px; background: var(--paneel-licht);
}
.beamer-logo {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  margin-bottom: 14px; background: var(--paneel-licht);
}

/* labelchips in het vraagformulier */
.chip-rij { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; margin: 0; padding: 7px 14px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--rand);
  background: var(--paneel-licht); color: var(--tekst); font-size: .9rem;
}
.chip input { display: none; }
.chip:has(input:checked) {
  background: var(--accent); border-color: var(--accent);
  color: #221a00; font-weight: 600;
}

.beamer-maker { color: var(--tekst-zacht); font-size: 1.3vw; }

/* statistieken op de beamer */
.beamer-stats { width: min(94vw, 1500px); text-align: center; }
.beamer-stats h1 { font-size: 3vw; margin-bottom: 3vh; }
.stats-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2vw; text-align: left;
}
.stats-blok {
  background: var(--paneel); border: 1px solid var(--rand);
  border-radius: var(--radius); padding: 1.4vw 1.8vw;
}
.stats-blok h2 { margin: 0 0 .8vh; font-size: 1.6vw; }
.stats-blok td { font-size: 1.4vw; padding: .5vh .6vw; }
.stats-blok .punten { text-align: right; font-weight: 700; color: var(--accent); }
.stats-blok .klein { color: var(--tekst-zacht); font-size: 1vw; }

/* quizbediening: hoofdpaneel + mini-beamer ernaast */
.bediening-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.bediening-layout aside { position: sticky; top: 12px; }
@media (max-width: 1000px) {
  .bediening-layout { grid-template-columns: 1fr; }
  .bediening-layout aside { position: static; order: -1; }
}
.mini-scherm {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 10px; border: 1px solid var(--rand);
  background: #000;
}
.mini-scherm iframe {
  position: absolute; top: 0; left: 0; width: 400%; height: 400%;
  border: 0; transform-origin: top left; transform: scale(0.25);
  pointer-events: none;
}

/* eenmalige geluidsactivering op de beamer */
.audio-hint {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  background: var(--paneel-licht); border: 1px solid var(--rand); border-radius: 999px;
  padding: 10px 20px; font-size: 1rem; color: var(--tekst);
}

.modal-achtergrond {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 12, 20, .8);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal { max-width: 420px; width: 100%; margin-bottom: 0; }
.teamcode-groot {
  font-size: 3rem; font-weight: 800; letter-spacing: .25em; text-align: center;
  color: var(--accent); background: var(--achtergrond);
  border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 14px 0 14px .25em; margin: 14px 0;
}

/* ---------- telefoon ---------- */
.telefoon-kop {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; background: var(--paneel); border-bottom: 1px solid var(--rand);
  position: sticky; top: 0; z-index: 5;
}
.timerbalk {
  font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 1.5rem; color: var(--accent);
}
.timerbalk.bijna { color: var(--fout); animation: knipper 1s infinite; }
@keyframes knipper { 50% { opacity: .35; } }
.vraagtekst { font-size: 1.35rem; font-weight: 700; margin: 10px 0 16px; }
.vraag-afbeelding { width: 100%; border-radius: var(--radius); margin-bottom: 14px; }
.mc-opties { display: grid; gap: 10px; }
.mc-optie {
  text-align: left; font-size: 1.05rem; padding: 14px;
  border: 2px solid var(--rand); background: var(--paneel);
}
.mc-optie .letter {
  display: inline-block; width: 30px; height: 30px; border-radius: 8px;
  background: var(--paneel-licht); text-align: center; line-height: 30px;
  font-weight: 800; margin-right: 10px;
}
.mc-optie.gekozen { border-color: var(--accent); background: rgba(255,182,46,.12); }
.mc-optie.gekozen .letter { background: var(--accent); color: #221a00; }
.status-groot { text-align: center; padding: 48px 18px; color: var(--tekst-zacht); font-size: 1.1rem; }
.status-groot .emoji { font-size: 3rem; display: block; margin-bottom: 12px; }

/* beoordelen */
.beoordeel-vraag { margin-bottom: 14px; }
.beoordeel-vraag summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.beoordeel-antwoord {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px; border: 1px solid var(--rand); border-radius: 10px; margin: 8px 0;
}
.oordeel-knoppen { display: flex; gap: 6px; margin-left: auto; }
.oordeel-knoppen button { padding: 6px 12px; border-radius: 9px; font-weight: 700; }
.oordeel-goed.actief { background: var(--goed); color: #06210f; }
.oordeel-half.actief { background: var(--half); color: #2b1a00; }
.oordeel-fout.actief { background: var(--fout); color: #fff; }

/* stand op telefoon */
.stand-lijst { list-style: none; margin: 0; padding: 0; }
.stand-lijst li {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--rand);
}
.stand-lijst .plek { width: 28px; font-weight: 800; color: var(--tekst-zacht); }
.stand-lijst .punten { margin-left: auto; font-weight: 800; color: var(--accent); }

/* ---------- beamer ---------- */
body.beamer { overflow: hidden; background: #0b0d14; }
.beamer-scherm {
  position: relative; height: 100vh; display: flex; flex-direction: column;
  padding: 3vh 4vw; z-index: 1;
}
.beamer-achtergrond {
  position: fixed; inset: 0; background-size: cover; background-position: center; z-index: 0;
}
.beamer-achtergrond::after {
  content: ""; position: absolute; inset: 0; background: rgba(8, 9, 15, .78);
}
.beamer-kop { display: flex; justify-content: space-between; align-items: baseline; }
.beamer-ronde { font-size: 2.2vw; color: var(--accent); font-weight: 800; }
.beamer-nummer { font-size: 1.8vw; color: var(--tekst-zacht); }
.beamer-midden { flex: 1; display: flex; gap: 3vw; align-items: center; justify-content: center; }
.beamer-vraag { font-size: 3.6vw; font-weight: 800; text-align: center; max-width: 72vw; }
.beamer-vraag.met-afbeelding { text-align: left; max-width: 46vw; }
.beamer-afbeelding { max-height: 55vh; max-width: 38vw; border-radius: 18px; }
.beamer-opties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2vw; margin-top: 2.5vh;
}
.beamer-opties .mc-optie { font-size: 1.9vw; pointer-events: none; }
.beamer-voet { display: flex; justify-content: space-between; align-items: center; }
.beamer-timer {
  font-size: 6vw; font-weight: 900; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.beamer-timer.bijna { color: var(--fout); animation: knipper 1s infinite; }
.beamer-teller { font-size: 1.6vw; color: var(--tekst-zacht); }
.beamer-welkom { text-align: center; }
.beamer-welkom h1 { font-size: 7vw; margin: 0; }
.beamer-welkom p { font-size: 2vw; color: var(--tekst-zacht); }
.beamer-muziek { text-align: center; }
.beamer-muziek .noot { font-size: 9vw; }
.beamer-stand { width: 70vw; margin: 0 auto; }
.beamer-stand h1 { font-size: 3.2vw; text-align: center; }
.beamer-stand table { font-size: 1.9vw; }
.beamer-stand td, .beamer-stand th { padding: 1vh 1vw; }
.beamer-stand tr.verborgen td { visibility: hidden; }
.beamer-stand tr.onthuld td { visibility: visible; animation: onthul .5s ease; }
.beamer-stand .plek { font-weight: 900; color: var(--tekst-zacht); }
.beamer-stand .punten { text-align: right; font-weight: 900; color: var(--accent); }
@keyframes onthul { from { transform: translateY(14px); opacity: 0; } }
.beamer-hint { position: fixed; bottom: 2vh; right: 2vw; color: var(--tekst-zacht); font-size: 1.1vw; }
.speel-knop { font-size: 2vw; padding: 1.5vh 3vw; }

/* ---------- vraagformulier preview ---------- */
.voorbeeld {
  border-radius: var(--radius); border: 1px solid var(--rand); overflow: hidden;
  background: #0b0d14; aspect-ratio: 16 / 9; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 4%;
  padding: 4%; margin-top: 8px;
}
.voorbeeld .v-tekst { font-weight: 800; font-size: clamp(12px, 2.6vw, 20px); text-align: center; z-index: 1; }
.voorbeeld img.v-bij { max-height: 70%; max-width: 40%; border-radius: 8px; z-index: 1; }
.voorbeeld .v-achtergrond {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.voorbeeld .v-achtergrond::after { content: ""; position: absolute; inset: 0; background: rgba(8,9,15,.78); }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.admin-nav .actief { background: var(--accent); color: #221a00; font-weight: 700; }
.fase-knoppen form { display: inline; }
.fase-actief { outline: 3px solid var(--accent); }
.admin-kolommen { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .admin-kolommen { grid-template-columns: 1fr 1fr; } }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { width: auto; padding: 6px 8px; }
.punten-invoer { width: 64px !important; }
audio { width: 100%; max-width: 320px; vertical-align: middle; }
