/* Speurtocht — globale stijlen */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --kleur-roze:    #f472b6;
  --kleur-paars:   #a78bfa;
  --kleur-geel:    #fbbf24;
  --kleur-bg:      #fdf4ff;
  --kleur-tekst:   #3b1a5a;
  --kleur-licht:   #f3e8ff;
  --radius:        16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }
body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--kleur-bg);
  color: var(--kleur-tekst);
  font-size: 18px;
  overflow: hidden;
}

/* ── Views ───────────────────────────────────────────────────────────────── */
.view {
  display: none;
  flex-direction: column;
  align-items: center;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 40px;
  background: var(--kleur-bg);
}
.view.actief { display: flex; }

/* ── Typografie ───────────────────────────────────────────────────────────── */
h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  line-height: 1.2;
  text-align: center;
  color: var(--kleur-tekst);
}
h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  text-align: center;
}
p { line-height: 1.5; text-align: center; }

/* ── Knoppen ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 16px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primair {
  background: var(--kleur-roze);
  color: white;
  box-shadow: 0 4px 0 #be185d;
}
.btn-primair:active { box-shadow: 0 1px 0 #be185d; transform: translateY(3px) scale(0.98); }

.btn-secundair {
  background: var(--kleur-paars);
  color: white;
  box-shadow: 0 4px 0 #6d28d9;
}

.btn-geel {
  background: var(--kleur-geel);
  color: var(--kleur-tekst);
  box-shadow: 0 4px 0 #d97706;
}

/* ── Kaartje / blok ──────────────────────────────────────────────────────── */
.kaartje {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 12px rgba(167, 139, 250, 0.15);
}

/* ── Invoerveld ──────────────────────────────────────────────────────────── */
input[type="text"],
input[type="number"] {
  width: 100%;
  max-width: 200px;
  padding: 14px 16px;
  font-size: 1.8rem;
  font-family: 'Fredoka One', cursive;
  font-weight: 700;
  text-align: center;
  border: 3px solid var(--kleur-paars);
  border-radius: var(--radius);
  background: white;
  color: var(--kleur-tekst);
  outline: none;
}
input:focus { border-color: var(--kleur-roze); }

/* ── Melding ─────────────────────────────────────────────────────────────── */
.melding {
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
}
.melding.fout  { background: #fee2e2; color: #b91c1c; }
.melding.goed  { background: #dcfce7; color: #15803d; }
.melding.verborgen { display: none; }

/* ── Opdracht blok ───────────────────────────────────────────────────────── */
.opdracht-blok {
  background: #fef9c3;
  border: 2px solid var(--kleur-geel);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
  max-width: 420px;
}
.opdracht-blok h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #92400e;
}

/* ── Kaart ───────────────────────────────────────────────────────────────── */
#kaart, #kaart-volgend {
  width: 100%;
  max-width: 420px;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ── Scanner scherm ──────────────────────────────────────────────────────── */
#view-scanner { background: #111; color: white; }
#view-scanner h2 { color: white; }
#scanner-container {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  overflow: hidden;
}
#scanner-melding {
  font-size: 1rem;
  color: #ddd;
  text-align: center;
}

/* ── Voortgangsbalk ──────────────────────────────────────────────────────── */
.voortgang-wrapper {
  width: 100%;
  max-width: 360px;
  background: var(--kleur-licht);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}
.voortgang-balk {
  height: 100%;
  background: var(--kleur-roze);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.voortgang-tekst {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--kleur-paars);
}

/* ── Confetti canvas ─────────────────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ── Spacing helpers ─────────────────────────────────────────────────────── */
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.gap-4 { gap: 16px; }
.flex-col { display: flex; flex-direction: column; align-items: center; }
.w-full { width: 100%; max-width: 420px; }
