/* Oefenen - sticker-sheet stijl, meisjesachtig: roze, regenbogen, sterretjes */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@600;800&display=swap');

:root {
  --paper: #fff3f7;
  --ink: #4a3340;
  --accent: #e75aa0;
  --accent-soft: #fbd0e4;
  --accent-2: #9b6fd4;
  --good: #3f9d5a;
  --bad: #d84a3a;
  --card: #ffffff;
}

/* Krijtthema's: roze is de standaard, de rest blijft kiesbaar via het dashboard */
body[data-theme="roze"]   { --accent: #e75aa0; --accent-soft: #fbd0e4; --accent-2: #9b6fd4; }
body[data-theme="paars"]  { --accent: #9b6fd4; --accent-soft: #e5d6f7; --accent-2: #e75aa0; }
body[data-theme="rood"]   { --accent: #e0526a; --accent-soft: #f9cdd6; --accent-2: #e75aa0; }
body[data-theme="blauw"]  { --accent: #5a8fe7; --accent-soft: #d3e2fb; --accent-2: #9b6fd4; }
body[data-theme="groen"]  { --accent: #4bb377; --accent-soft: #d0f0dd; --accent-2: #5a8fe7; }
body[data-theme="oranje"] { --accent: #f0854c; --accent-soft: #fddfcd; --accent-2: #e75aa0; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  /* zachte confetti-stippen in de achtergrond */
  background-image:
    radial-gradient(var(--accent-soft) 2.5px, transparent 3px),
    radial-gradient(var(--accent-soft) 2px, transparent 2.5px);
  background-size: 90px 90px, 140px 140px;
  background-position: 0 0, 45px 60px;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1, h2, .tile-label, button {
  font-family: 'Baloo 2', cursive;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

h1 { font-size: 1.7rem; margin: 0; font-weight: 800; }

.link-home {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
}

/* Regenboog onder de titel */
.regenboog {
  display: block;
  width: 180px;
  height: 26px;
  margin: 0 0 16px;
}

/* Wiebelige handgetekende rand */
.sticker {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px 26px 20px 28px / 26px 20px 28px 22px;
  box-shadow: 4px 5px 0 var(--accent-soft);
  padding: 20px;
  position: relative;
}

/* Sterretje op de hoek van de kaart */
.sticker::after {
  content: "";
  position: absolute;
  top: -14px; right: -10px;
  width: 28px; height: 28px;
  background: var(--accent-2);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Keuzemenu */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.tile {
  cursor: pointer;
  text-align: center;
  padding: 18px 10px;
  transition: transform .12s ease;
  border: 3px solid var(--ink);
  border-radius: 20px 26px 18px 28px / 26px 18px 28px 20px;
  background: var(--card);
  box-shadow: 4px 5px 0 var(--accent-soft);
}
.tile:nth-child(even) { box-shadow: 4px 5px 0 #e5d6f7; }
.tile:hover { transform: rotate(-1.5deg) scale(1.03); }
.tile svg { width: 52px; height: 52px; color: var(--accent); }
.tile:nth-child(even) svg { color: var(--accent-2); }
.tile-label { display: block; font-weight: 700; font-size: 1.05rem; margin-top: 6px; }

/* Oefenscherm */
.screen { display: none; }
.screen.active { display: block; }

.progress {
  display: flex;
  gap: 6px;
  margin: 14px 0 18px;
  justify-content: center;
}
.progress span {
  width: 16px; height: 16px;
  background: transparent;
  clip-path: polygon(50% 6%, 61% 40%, 96% 40%, 68% 62%, 78% 96%, 50% 74%, 22% 96%, 32% 62%, 4% 40%, 39% 40%);
  border: none;
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  background: var(--accent-soft);
}
.progress span.done-good { background: var(--good); }
.progress span.done-bad  { background: var(--bad); }

.vraag {
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 2.6rem;
  text-align: center;
  margin: 18px 0;
  min-height: 3.4rem;
}
.vraag.zin { font-size: 1.6rem; line-height: 1.5; }

.plaatje { display: flex; justify-content: center; margin: 8px 0 4px; }
.plaatje svg { width: 130px; height: 130px; color: var(--accent); }

/* Splitshuisje */
.huisje { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 10px 0; }
.huisje .dak {
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 2rem;
  border: 3px solid var(--ink);
  border-bottom: none;
  padding: 8px 34px;
  border-radius: 40px 40px 0 0 / 46px 46px 0 0;
  background: var(--accent-soft);
}
.huisje .kamers { display: flex; }
.huisje .kamer {
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 2rem;
  border: 3px solid var(--ink);
  padding: 10px 24px;
  min-width: 70px;
  text-align: center;
  background: var(--card);
}
.huisje .kamer + .kamer { border-left: none; }

/* Antwoorden */
.antwoorden {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.antwoorden.twee { grid-template-columns: repeat(2, 1fr); }

button {
  font-weight: 700;
  font-size: 1.3rem;
  padding: 14px 10px;
  cursor: pointer;
  border: 3px solid var(--ink);
  border-radius: 18px 24px 16px 26px / 24px 16px 26px 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 3px 4px 0 var(--accent-soft);
  transition: transform .1s ease;
}
button:hover { transform: scale(1.04); }
button:disabled { opacity: .6; cursor: default; transform: none; }
button.goed { background: var(--good); color: #fff; }
button.fout { background: var(--bad); color: #fff; }
button.primair { background: var(--accent); color: #fff; }

.knoppenrij { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

input[type="text"] {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 1.8rem;
  text-align: center;
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 0 auto;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px 22px 14px 24px / 22px 14px 24px 16px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
input[type="text"]:focus { box-shadow: 0 0 0 4px var(--accent-soft); }

.feedback {
  text-align: center;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 1.4rem;
  min-height: 2rem;
  margin-top: 12px;
}
.feedback.goed { color: var(--good); }
.feedback.fout { color: var(--bad); }

/* Resultaat */
.resultaat { text-align: center; }
.sterren { display: flex; justify-content: center; gap: 10px; margin: 14px 0; min-height: 40px; }
.sterren .ster {
  width: 38px; height: 38px;
  background: var(--accent);
  clip-path: polygon(50% 6%, 61% 40%, 96% 40%, 68% 62%, 78% 96%, 50% 74%, 22% 96%, 32% 62%, 4% 40%, 39% 40%);
}
.sterren .ster:nth-child(2) { background: var(--accent-2); }
.res-nul { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 1.2rem; }

.terug { margin-top: 18px; display: inline-block; }

.verborgen { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .tile, button { transition: none; }
}
