/* ============================================
   Componenten: knoppen, quiz UI, modale,
   sterren, voortgangsbalken
   ============================================ */

/* Knoppen */
.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--knop-min);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-m);
  font-family: inherit;
  font-size: var(--font-grootte-knop);
  font-weight: 700;
  background: var(--kleur-primair);
  color: white;
  cursor: pointer;
  box-shadow: var(--schaduw-zacht);
  transition: transform 0.08s ease, box-shadow 0.1s ease, background 0.15s ease;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.knop:hover { transform: translateY(-2px); box-shadow: var(--schaduw-mid); }
.knop:active { transform: translateY(0); }

.knop.secundair { background: var(--kleur-secundair); }
.knop.groen { background: var(--kleur-groen); }
.knop.paars { background: var(--kleur-paars); }
.knop.terug { background: white; color: var(--kleur-primair); font-size: 16px; padding: 10px 16px; min-height: 48px; }
.knop.klein { font-size: 16px; padding: 8px 16px; min-height: 44px; }
.knop.groot { padding: 18px 36px; font-size: 28px; }

.knop:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.knop-icoon {
  width: 48px; height: 48px;
  background: white;
  color: var(--kleur-primair);
  border-radius: var(--radius-rond);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: none;
  cursor: pointer;
  box-shadow: var(--schaduw-zacht);
}
.knop-icoon.actief { background: var(--kleur-groen); color: white; }

/* Quiz UI */
.quiz-vraag {
  background: var(--kleur-card);
  border-radius: var(--radius-l);
  padding: var(--pad-xl) var(--pad-l);
  box-shadow: var(--schaduw-mid);
  text-align: center;
  margin-top: var(--pad-l);
}

.quiz-teller {
  text-align: center;
  color: white;
  font-size: 18px;
  margin-bottom: var(--pad-s);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.quiz-vraag h2 {
  font-size: 36px;
  color: var(--kleur-tekst);
  margin-bottom: var(--pad-l);
}

.quiz-opties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--pad-m);
  max-width: 600px;
  margin: 0 auto;
}

.quiz-optie {
  background: var(--kleur-secundair);
  color: white;
  border: none;
  border-radius: var(--radius-m);
  padding: var(--pad-l);
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  min-height: 80px;
  cursor: pointer;
  box-shadow: var(--schaduw-zacht);
  transition: transform 0.1s ease, background 0.15s ease;
}

.quiz-optie:hover { transform: scale(1.03); }
.quiz-optie.juist { background: var(--kleur-juist); animation: pulse 0.5s ease; }
.quiz-optie.fout { background: var(--kleur-fout); animation: shake 0.4s ease; }
.quiz-optie:disabled { cursor: not-allowed; }

/* Tekstinvoer voor antwoord typen */
.quiz-invoer {
  width: 100%;
  max-width: 300px;
  font-family: inherit;
  font-size: 36px;
  text-align: center;
  padding: 12px;
  border: 3px solid var(--kleur-card-rand);
  border-radius: var(--radius-m);
  margin: 0 auto;
  display: block;
}
.quiz-invoer:focus { outline: none; border-color: var(--kleur-primair); }

/* Voortgangsbalk */
.voortgang-balk {
  background: rgba(255,255,255,0.4);
  border-radius: 20px;
  height: 14px;
  overflow: hidden;
  margin: 0 auto var(--pad-m);
  max-width: 400px;
}

.voortgang-vul {
  background: var(--kleur-groen);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* Eindscherm sterren */
.eindscherm {
  text-align: center;
  background: var(--kleur-card);
  border-radius: var(--radius-l);
  padding: var(--pad-xl);
  box-shadow: var(--schaduw-diep);
  max-width: 500px;
  margin: var(--pad-xl) auto;
}

.sterren {
  font-size: 80px;
  margin: var(--pad-m) 0;
  letter-spacing: 8px;
}

.sterren .ster { display: inline-block; animation: ster-pop 0.6s ease both; }
.sterren .ster:nth-child(2) { animation-delay: 0.15s; }
.sterren .ster:nth-child(3) { animation-delay: 0.3s; }
.sterren .ster.uit { filter: grayscale(1) opacity(0.3); }

.score-tekst {
  font-size: 24px;
  margin: var(--pad-m) 0;
}

.eindscherm-knoppen {
  display: flex;
  gap: var(--pad-m);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--pad-l);
}

/* Feedback animatie */
.feedback {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--kleur-card);
  padding: var(--pad-l) var(--pad-xl);
  border-radius: var(--radius-l);
  box-shadow: var(--schaduw-diep);
  font-size: 32px;
  font-weight: 700;
  z-index: 200;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.feedback.tonen { transform: translate(-50%, -50%) scale(1); }
.feedback.juist { color: var(--kleur-juist); border: 3px solid var(--kleur-juist); }
.feedback.fout { color: var(--kleur-fout); border: 3px solid var(--kleur-fout); }

/* Naam dialoog */
.modale-achtergrond {
  position: fixed;
  inset: 0;
  background: var(--kleur-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: var(--pad-m);
}

.modale {
  background: var(--kleur-card);
  border-radius: var(--radius-l);
  padding: var(--pad-xl);
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--schaduw-diep);
}

.modale h2 {
  color: var(--kleur-primair);
  margin-bottom: var(--pad-m);
}

.modale input {
  width: 100%;
  font-family: inherit;
  font-size: 28px;
  padding: 14px;
  border: 3px solid var(--kleur-card-rand);
  border-radius: var(--radius-m);
  margin: var(--pad-m) 0;
  text-align: center;
}
.modale input:focus { outline: none; border-color: var(--kleur-primair); }

/* Mascotte */
.mascotte-wrap {
  position: fixed;
  bottom: var(--pad-m);
  left: var(--pad-m);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  gap: var(--pad-s);
  max-width: 320px;
  pointer-events: none;
}

.mascotte {
  width: 90px;
  height: 90px;
  background: white;
  border-radius: var(--radius-rond);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  box-shadow: var(--schaduw-mid);
  animation: zacht-zweven 3s ease-in-out infinite;
  flex-shrink: 0;
  pointer-events: auto;
}

.tekstballon {
  background: white;
  border-radius: var(--radius-m);
  padding: 10px 14px;
  font-size: 16px;
  box-shadow: var(--schaduw-mid);
  position: relative;
  max-width: 220px;
  font-weight: 600;
  pointer-events: auto;
}

.tekstballon::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: -10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-right-color: white;
}

@media (max-width: 600px) {
  .mascotte { width: 70px; height: 70px; font-size: 42px; }
  .tekstballon { font-size: 14px; max-width: 170px; }
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Lees-content (verhalen / WO teksten) */
.lees-blok {
  background: var(--kleur-card);
  border-radius: var(--radius-l);
  padding: var(--pad-l);
  box-shadow: var(--schaduw-mid);
  margin-top: var(--pad-l);
  font-size: 20px;
  line-height: 1.6;
}

.lees-blok h2 { color: var(--kleur-primair); margin-bottom: var(--pad-m); }
.lees-blok p { margin-bottom: var(--pad-m); }
.lees-blok .plaatje { font-size: 80px; text-align: center; margin: var(--pad-m) 0; }

/* Slepen */
.sleep-item {
  display: inline-block;
  background: var(--kleur-paars);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-m);
  margin: 6px;
  cursor: grab;
  font-size: 22px;
  font-weight: 700;
  user-select: none;
}
.sleep-item.gepakt { opacity: 0.4; }
.sleep-doel {
  display: inline-block;
  min-width: 80px;
  min-height: 60px;
  border: 3px dashed var(--kleur-card-rand);
  border-radius: var(--radius-m);
  margin: 6px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
  vertical-align: middle;
}
.sleep-doel.over { background: var(--kleur-zon); }
.sleep-doel.gevuld { border-style: solid; background: var(--kleur-groen); color: white; }

/* Klok */
.klok-svg { width: 260px; height: 260px; margin: 0 auto; display: block; }

/* Hint regel (instructie boven vraag) */
.hint {
  background: var(--kleur-zon);
  color: var(--kleur-tekst);
  padding: 8px 14px;
  border-radius: var(--radius-m);
  display: inline-block;
  font-weight: 700;
  margin-bottom: var(--pad-m);
}
