/* ============================================================
   BegrijpendTuben – Kindvriendelijk stylesheet
   Kleurenpalet: paars/roze primair, geel accent, mintgroen succes
   Lettertypes: Baloo 2 (titels) + Nunito (tekst)
   ============================================================ */

/* ── CSS Variabelen ──────────────────────────────────────── */
:root {
  --paars:        #7c3aed;
  --paars-licht:  #a78bfa;
  --paars-donker: #5b21b6;
  --roze:         #ec4899;
  --roze-licht:   #f9a8d4;
  --geel:         #fbbf24;
  --geel-licht:   #fef3c7;
  --groen:        #10b981;
  --groen-licht:  #d1fae5;
  --rood:         #ef4444;
  --rood-licht:   #fee2e2;
  --grijs:        #6b7280;
  --grijs-licht:  #f3f4f6;
  --wit:          #ffffff;
  --tekst:        #1f2937;
  --tekst-licht:  #6b7280;

  --radius-klein:  8px;
  --radius:        16px;
  --radius-groot:  24px;
  --schaduw:       0 4px 20px rgba(124, 58, 237, 0.15);
  --schaduw-hover: 0 8px 30px rgba(124, 58, 237, 0.25);

  --font-titel: 'Baloo 2', cursive;
  --font-tekst: 'Nunito', sans-serif;

  --body-bg: linear-gradient(135deg, #f0e6ff 0%, #fce7f3 50%, #fef3c7 100%);
}

/* ── Thema: Stoer (blauw/groen) ──────────────────────────── */
[data-thema="stoer"] {
  --paars:        #0369a1;
  --paars-licht:  #7dd3fc;
  --paars-donker: #075985;
  --roze:         #16a34a;
  --roze-licht:   #bbf7d0;
  --body-bg:      linear-gradient(135deg, #dbeafe 0%, #d1fae5 50%, #dcfce7 100%);
  --schaduw:      0 4px 20px rgba(3, 105, 161, 0.15);
  --schaduw-hover:0 8px 30px rgba(3, 105, 161, 0.25);
}

/* ── Thema: Magisch (diep paars/violet) ──────────────────── */
[data-thema="magisch"] {
  --paars:        #9333ea;
  --paars-licht:  #d8b4fe;
  --paars-donker: #7e22ce;
  --roze:         #c026d3;
  --roze-licht:   #f0abfc;
  --body-bg:      linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fae8ff 100%);
  --schaduw:      0 4px 20px rgba(147, 51, 234, 0.18);
  --schaduw-hover:0 8px 30px rgba(147, 51, 234, 0.28);
}

/* ── Thema: Vrolijk (geel/oranje) ────────────────────────── */
[data-thema="vrolijk"] {
  --paars:        #d97706;
  --paars-licht:  #fde68a;
  --paars-donker: #b45309;
  --roze:         #f97316;
  --roze-licht:   #fed7aa;
  --body-bg:      linear-gradient(135deg, #fffbeb 0%, #ffedd5 50%, #fce7f3 100%);
  --schaduw:      0 4px 20px rgba(217, 119, 6, 0.15);
  --schaduw-hover:0 8px 30px rgba(217, 119, 6, 0.25);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-tekst);
  font-size: 18px;
  color: var(--tekst);
  background: var(--body-bg);
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ── Header ──────────────────────────────────────────────── */
.app-header {
  background: linear-gradient(135deg, var(--paars) 0%, var(--roze) 100%);
  color: var(--wit);
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logo-emoji {
  font-size: 2rem;
  animation: wiegelen 2s ease-in-out infinite;
}

.logo-emoji:last-child {
  animation-delay: 0.5s;
}

.logo-tekst {
  font-family: var(--font-titel);
  font-size: 2.4rem;
  font-weight: 800;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.15);
  letter-spacing: -0.5px;
}

.tagline {
  margin-top: 6px;
  font-size: 1.05rem;
  opacity: 0.9;
  font-weight: 600;
}

/* ── Stap-indicator ──────────────────────────────────────── */
.stap-balk {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 0;
  flex-wrap: wrap;
  background: var(--wit);
  border-bottom: 2px solid var(--roze-licht);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.stap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.35;
  transition: opacity 0.3s;
  min-width: 80px;
}

.stap.actief {
  opacity: 1;
}

.stap.klaar {
  opacity: 0.7;
}

.stap-getal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grijs-licht);
  color: var(--grijs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s;
  font-family: var(--font-titel);
}

.stap.actief .stap-getal {
  background: linear-gradient(135deg, var(--paars), var(--roze));
  color: var(--wit);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.stap.klaar .stap-getal {
  background: var(--groen);
  color: var(--wit);
}

.stap-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tekst-licht);
  text-align: center;
  white-space: nowrap;
}

.stap.actief .stap-label {
  color: var(--paars);
}

.stap-lijn {
  height: 3px;
  width: 40px;
  background: var(--grijs-licht);
  margin-bottom: 20px;
  border-radius: 99px;
  flex-shrink: 0;
}

/* ── Schermen (secties) ──────────────────────────────────── */
.scherm {
  display: none;
  max-width: 800px;
  margin: 24px auto;
  padding: 0 16px;
  animation: inschuiven 0.4s ease-out;
}

.scherm.actief {
  display: block;
}

@keyframes inschuiven {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Kaarten ─────────────────────────────────────────────── */
.kaart {
  background: var(--wit);
  border-radius: var(--radius-groot);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--schaduw);
  border: 2px solid transparent;
  transition: box-shadow 0.2s, transform 0.2s;
}

.kaart:hover {
  box-shadow: var(--schaduw-hover);
}

/* Intro-kaart met kleurverloop */
.intro-kaart {
  background: linear-gradient(135deg, var(--paars-licht) 0%, var(--roze-licht) 100%);
  border-color: var(--paars-licht);
  text-align: center;
}

.intro-kaart h2 {
  font-family: var(--font-titel);
  font-size: 1.8rem;
  color: var(--paars-donker);
  margin-bottom: 8px;
}

.intro-kaart p {
  color: var(--paars);
  font-weight: 600;
}

/* ── Zoek-sectie ─────────────────────────────────────────── */
.zoek-kaart h3 {
  font-family: var(--font-titel);
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: var(--tekst);
}

.invoer-rij {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tekst-invoer {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border: 2px solid var(--paars-licht);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-tekst);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--tekst);
}

.tekst-invoer:focus {
  border-color: var(--paars);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.tekst-invoer::placeholder {
  color: #c4b5fd;
}

.hulptekst {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Video-grid ──────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.video-kaartje {
  background: var(--grijs-licht);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.video-kaartje:hover {
  border-color: var(--paars-licht);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.2);
}

.video-kaartje:focus {
  outline: none;
  border-color: var(--paars);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--paars-licht);
}

.video-thumbnail-wrapper {
  position: relative;
}

.video-thumbnail-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--paars-licht), var(--roze-licht));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.video-duur-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
}

.video-duur-badge {
  display: inline-block;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.video-info {
  padding: 12px;
}

.video-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.video-categorie-badge {
  display: inline-block;
  background: var(--geel-licht);
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-kanaal-badge {
  display: inline-block;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.3px;
}

.video-naam {
  font-family: var(--font-titel);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tekst);
  line-height: 1.3;
  margin-bottom: 4px;
}

.video-omschrijving {
  font-size: 0.82rem;
  color: var(--tekst-licht);
  line-height: 1.4;
  max-height: 2.8em;   /* ~2 regels */
  overflow: hidden;
  position: relative;
}

.video-omschrijving::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.4em;
  background: linear-gradient(to bottom, transparent, #f3f4f6);
  pointer-events: none;
}

/* ── Video-speler ─────────────────────────────────────────── */
.video-kaart {
  padding: 16px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 verhouding */
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.video-beschrijving {
  font-size: 1rem;
  color: var(--tekst-licht);
  margin-top: 4px;
  max-height: 4.8em;   /* ~3 regels */
  overflow: hidden;
  position: relative;
}

.video-beschrijving::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.6em;
  background: linear-gradient(to bottom, transparent, white);
  pointer-events: none;
}

/* ── Video einde-overlay ──────────────────────────────────── */
.video-einde-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.93) 0%, rgba(236,72,153,0.93) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.einde-inhoud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.einde-emoji {
  font-size: 3.5rem;
  animation: wiegelen 1.5s ease-in-out infinite;
  display: block;
}

.einde-tekst {
  font-family: var(--font-titel);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--wit);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Klaar-knop kaart */
.klaar-kaart {
  text-align: center;
}

.klaar-tekst {
  font-size: 1.05rem;
  color: var(--tekst-licht);
  margin-bottom: 16px;
}

/* ── Voortgangsbalk ──────────────────────────────────────── */
.voortgang-kaart {
  padding: 16px 24px;
}

.voortgang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1rem;
}

#vraagTeller { color: var(--paars); }
#scoreTeller { color: var(--geel); font-size: 1.1rem; }

.voortgang-balk {
  height: 14px;
  background: var(--grijs-licht);
  border-radius: 99px;
  overflow: hidden;
}

.voortgang-vulling {
  height: 100%;
  background: linear-gradient(90deg, var(--paars), var(--roze));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

/* ── Vraagkaart ──────────────────────────────────────────── */
.vraag-kaart {
  text-align: center;
}

.vraag-nummer {
  display: inline-block;
  background: linear-gradient(135deg, var(--paars), var(--roze));
  color: var(--wit);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vraag-tekst {
  font-family: var(--font-titel);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tekst);
  line-height: 1.4;
  margin-bottom: 28px;
}

/* ── Antwoord-knoppen ─────────────────────────────────────── */
.antwoord-grid {
  display: grid;
  gap: 12px;
}

.antwoord-knop {
  width: 100%;
  padding: 16px 20px;
  border: 3px solid var(--paars-licht);
  border-radius: var(--radius);
  background: var(--wit);
  color: var(--tekst);
  font-family: var(--font-tekst);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
}

.antwoord-knop:hover:not(:disabled) {
  background: #f5f3ff;
  border-color: var(--paars);
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.15);
}

.antwoord-knop:disabled {
  cursor: not-allowed;
}

.antwoord-knop.correct {
  background: var(--groen-licht);
  border-color: var(--groen);
  color: #065f46;
  animation: schudden-goed 0.4s ease;
}

.antwoord-knop.fout {
  background: var(--rood-licht);
  border-color: var(--rood);
  color: #7f1d1d;
  animation: schudden-fout 0.5s ease;
}

.antwoord-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grijs-licht);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.antwoord-knop:hover:not(:disabled) .antwoord-letter {
  background: var(--paars);
  color: var(--wit);
}

.antwoord-knop.correct .antwoord-letter {
  background: var(--groen);
  color: var(--wit);
}

.antwoord-knop.fout .antwoord-letter {
  background: var(--rood);
  color: var(--wit);
}

/* ── Feedback ─────────────────────────────────────────────── */
.feedback-blok {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feedback-blok.correct-bg {
  background: var(--groen-licht);
  border: 2px solid var(--groen);
}

.feedback-blok.fout-bg {
  background: var(--rood-licht);
  border: 2px solid var(--rood);
}

.feedback-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.feedback-bericht {
  font-family: var(--font-titel);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.feedback-blok.correct-bg .feedback-bericht { color: #065f46; }
.feedback-blok.fout-bg .feedback-bericht { color: #7f1d1d; }

.feedback-uitleg {
  font-size: 0.95rem;
  color: var(--tekst-licht);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Resultaat-scherm ─────────────────────────────────────── */
.resultaat-kaart {
  text-align: center;
  padding: 40px 24px;
}

.resultaat-trophy {
  font-size: 5rem;
  margin-bottom: 12px;
  animation: wiegelen 1s ease-in-out infinite;
  display: block;
}

.resultaat-titel {
  font-family: var(--font-titel);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--paars), var(--roze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-cirkel {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: linear-gradient(135deg, var(--paars), var(--roze));
  border-radius: 50%;
  width: 140px;
  height: 140px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

.score-groot {
  font-family: var(--font-titel);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--wit);
}

.score-max {
  font-size: 1.4rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.score-bericht {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tekst);
  margin-bottom: 28px;
}

/* Overzicht van antwoorden */
.antwoord-overzicht {
  text-align: left;
  margin-bottom: 28px;
}

.overzicht-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-klein);
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.overzicht-item.goed {
  background: var(--groen-licht);
}

.overzicht-item.slecht {
  background: var(--rood-licht);
}

.overzicht-icoon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.overzicht-vraag {
  font-weight: 700;
  margin-bottom: 3px;
}

.overzicht-antwoord {
  font-size: 0.88rem;
  color: var(--tekst-licht);
}

.overzicht-antwoord strong {
  color: var(--tekst);
}

.resultaat-knoppen {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Knoppen ──────────────────────────────────────────────── */
.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-tekst);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 20px;
  font-size: 1rem;
}

.knop:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.knop:active {
  transform: translateY(0);
}

.knop-primair {
  background: linear-gradient(135deg, var(--paars), var(--paars-donker));
  color: var(--wit);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.knop-groot {
  padding: 16px 28px;
  font-size: 1.1rem;
  border-radius: var(--radius-groot);
}

.knop-klein {
  padding: 9px 16px;
  font-size: 0.9rem;
}

.knop-groen {
  background: linear-gradient(135deg, var(--groen), #059669);
  color: var(--wit);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.knop-paars {
  background: linear-gradient(135deg, var(--paars), var(--roze));
  color: var(--wit);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.knop-grijs {
  background: var(--grijs-licht);
  color: var(--grijs);
  box-shadow: none;
  margin-top: 12px;
}

.knop-grijs:hover {
  background: #e5e7eb;
}

/* ── Laadindicator ────────────────────────────────────────── */
.laad-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--tekst-licht);
}

.spinner-cirkel {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--paars-licht);
  border-top-color: var(--paars);
  border-radius: 50%;
  animation: draaien 0.8s linear infinite;
  margin-bottom: 12px;
}

/* ── Confetti ─────────────────────────────────────────────── */
.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-stukje {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-vallen linear forwards;
}

/* ── Animaties ────────────────────────────────────────────── */
@keyframes wiegelen {
  0%, 100% { transform: rotate(-5deg); }
  50%       { transform: rotate(5deg); }
}

@keyframes draaien {
  to { transform: rotate(360deg); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes schudden-goed {
  0%  { transform: scale(1); }
  30% { transform: scale(1.04) translateX(4px); }
  60% { transform: scale(1.02) translateX(-2px); }
  100%{ transform: scale(1) translateX(0); }
}

@keyframes schudden-fout {
  0%  { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100%{ transform: translateX(0); }
}

@keyframes confetti-vallen {
  0%   { top: -10%; opacity: 1; }
  100% { top: 110%; opacity: 0.3; }
}

/* ── Sterren-balk in header ───────────────────────────────── */
.sterren-balk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 6px 20px;
  font-size: 0.9rem;
}

.sterren-label {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.sterren-waarde {
  color: var(--wit);
  font-weight: 800;
  font-family: var(--font-titel);
  font-size: 1rem;
}

/* ── Categorie-tabs ──────────────────────────────────────── */
.categorie-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.cat-tab {
  padding: 8px 16px;
  border: 2px solid var(--paars-licht);
  border-radius: 99px;
  background: var(--wit);
  color: var(--paars);
  font-family: var(--font-tekst);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-tab:hover {
  background: #f5f3ff;
  border-color: var(--paars);
}

.cat-tab.actief {
  background: linear-gradient(135deg, var(--paars), var(--roze));
  border-color: transparent;
  color: var(--wit);
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}

/* ── Geen resultaten tekst ───────────────────────────────── */
.geen-resultaten {
  text-align: center;
  padding: 32px;
  font-size: 1.1rem;
  color: var(--tekst-licht);
  font-weight: 600;
}

/* ── Terugknop (prominent bovenaan schermen) ─────────────── */
.knop-terug {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wit);
  color: var(--paars);
  border: 2px solid var(--paars-licht);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-family: var(--font-tekst);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin: 0 auto 16px;
  max-width: 800px;
  width: calc(100% - 32px);
  transition: all 0.15s ease;
  box-shadow: var(--schaduw);
}

.knop-terug:hover {
  background: #f5f3ff;
  border-color: var(--paars);
  transform: translateX(-3px);
}

/* Rode variant voor quiz-stop */
.knop-terug-rood {
  color: var(--rood);
  border-color: #fca5a5;
}

.knop-terug-rood:hover {
  background: var(--rood-licht);
  border-color: var(--rood);
  transform: translateX(0);
}

/* ── Sterren op resultaatscherm ──────────────────────────── */
.sterren-sessie {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.sessie-ster {
  font-size: 2rem;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  display: inline-block;
}

.sessie-ster.leeg {
  opacity: 0.3;
  filter: grayscale(1);
}

/* ── Totaalscore kaartje op resultaatscherm ──────────────── */
.totaal-kaart {
  background: linear-gradient(135deg, var(--paars-licht), var(--roze-licht));
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 2px solid var(--paars-licht);
}

.totaal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paars-donker);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.totaal-sterren {
  font-family: var(--font-titel);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--paars-donker);
  margin-bottom: 4px;
}

.totaal-sub {
  font-size: 0.9rem;
  color: var(--paars);
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .logo-tekst { font-size: 1.8rem; }
  .vraag-tekst { font-size: 1.25rem; }
  .resultaat-knoppen { flex-direction: column; align-items: center; }
  .knop-groot { width: 100%; max-width: 320px; white-space: normal; line-height: 1.3; }
  .score-cirkel { width: 120px; height: 120px; }
  .score-groot { font-size: 2.8rem; }
  .categorie-tabs { gap: 6px; }
  .cat-tab { padding: 6px 12px; font-size: 0.82rem; }

  /* Stap-balk: horizontaal scrollbaar i.p.v. wrappen */
  .stap-balk {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 8px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stap-balk::-webkit-scrollbar { display: none; }
  .stap { min-width: 44px; flex-shrink: 0; gap: 2px; }
  .stap-getal { width: 28px; height: 28px; font-size: 0.82rem; }
  .stap-lijn { width: 12px; flex-shrink: 0; margin-bottom: 14px; }

  /* Op mobiel: verberg de lange tekst, toon korte data-kort via ::before */
  .stap-label {
    font-size: 0;   /* verberg lange tekst */
  }
  .stap-label::before {
    content: attr(data-kort);
    font-size: 0.6rem;
    font-weight: 700;
  }

  /* Toon de actieve-stap strook onder de stapbalk */
  .stap-actief-label { display: block; }

  /* Thema-opties: 2 kolommen op kleine schermen */
  .thema-opties { grid-template-columns: repeat(2, 1fr); }
}

/* ── Modal overlay ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-kaart {
  background: var(--wit);
  border-radius: var(--radius-groot);
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-emoji {
  font-size: 4rem;
  margin-bottom: 12px;
  display: block;
  animation: wiegelen 2s ease-in-out infinite;
}

.modal-titel {
  font-family: var(--font-titel);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--paars-donker);
  margin-bottom: 8px;
}

.modal-sub {
  color: var(--tekst-licht);
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.naam-invoer {
  width: 100%;
  padding: 14px 18px;
  border: 2.5px solid var(--paars-licht);
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-family: var(--font-titel);
  font-weight: 700;
  text-align: center;
  color: var(--tekst);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.naam-invoer:focus {
  border-color: var(--paars);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.naam-invoer::placeholder {
  color: #c4b5fd;
  font-weight: 400;
  font-family: var(--font-tekst);
}

/* ── Thema-kiezer ─────────────────────────────────────────── */
.thema-kiezer {
  margin-bottom: 24px;
}

.thema-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tekst-licht);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.thema-opties {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.thema-knop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 2.5px solid var(--grijs-licht);
  border-radius: var(--radius);
  background: var(--wit);
  color: var(--tekst);
  font-family: var(--font-tekst);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.thema-knop:hover {
  border-color: var(--paars-licht);
  transform: translateY(-2px);
}

.thema-knop.actief {
  border-color: var(--paars);
  background: #f5f3ff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
}

.thema-kleur {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── Speler-balk in header ───────────────────────────────── */
.speler-balk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

#spelersContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

/* Speler-knop: niet-actieve spelers */
.speler-knop {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-tekst);
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.speler-knop:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--wit);
}

/* Actieve speler: witte achtergrond, gekleurde tekst */
.speler-knop.actief {
  background: var(--wit);
  border-color: transparent;
  color: var(--paars-donker);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.speler-knop.actief:hover {
  background: rgba(255, 255, 255, 0.92);
}

/* Dropdown (>5 spelers) */
.speler-dropdown {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  color: var(--wit);
  padding: 4px 14px;
  font-size: 0.82rem;
  font-family: var(--font-tekst);
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

/* Nieuw-speler knop */
.speler-nieuw-knop {
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-tekst);
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.speler-nieuw-knop:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--wit);
}

/* ── Kindvriendelijke popup ──────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.popup-kaart {
  background: var(--wit);
  border-radius: var(--radius-groot);
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.popup-tekst {
  font-family: var(--font-titel);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tekst);
  line-height: 1.4;
  margin-bottom: 24px;
}

.popup-knoppen {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Rode knop (voor bevestig-dialogs) */
.knop-rood {
  background: linear-gradient(135deg, var(--rood), #dc2626);
  color: var(--wit);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* ── Footer ───────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 20px 16px;
  color: var(--tekst-licht);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
}

/* ── Mobiele actieve-stap label ──────────────────────────── */
.stap-actief-label {
  display: none; /* zichtbaar via media query */
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--paars);
  background: var(--wit);
  padding: 4px 12px 8px;
  border-bottom: 2px solid var(--roze-licht);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
