/* ── Spellingcategorieën pagina ─────────────────────────────────────── */

/* Confetti */
#sp-confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; overflow: hidden; }
.sp-confetti-piece { position: absolute; top: -20px; animation: sp-fall linear forwards; }
@keyframes sp-fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* Sparkles */
.sp-sparkle { position: fixed; pointer-events: none; z-index: 9998; font-size: 24px; animation: sp-sparkle-out 0.9s ease-out forwards; }
@keyframes sp-sparkle-out { to { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }

/* Mix-knop */
.sp-mix-btn {
  display: block; width: 100%; padding: 18px; margin-bottom: 24px;
  background: linear-gradient(135deg, #FF6B9D, #9B72CF, #06D6A0);
  border: none; border-radius: 20px; font-family: 'Nunito', sans-serif;
  font-size: 20px; font-weight: 900; color: white; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.12s, box-shadow 0.12s;
}
.sp-mix-btn:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* Blok-labels */
.sp-blok-label {
  font-size: 13px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--muted); margin: 16px 0 8px;
}

/* Categorie-grid */
.sp-cat-grid { display: flex; flex-direction: column; gap: 10px; }

.sp-cat-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 18px; border: none;
  cursor: pointer; text-align: left; color: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.sp-cat-tile:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.sp-cat-tile-emoji { font-size: 32px; flex-shrink: 0; }
.sp-cat-tile-naam  { font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 900; display: block; }
.sp-cat-tile-regel { font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 600; opacity: 0.88; display: block; margin-top: 2px; }

/* Voortgang */
.sp-progress-row { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.sp-progress-text { font-size: 13px; font-weight: 700; color: var(--muted); }
.sp-progress-bar { background: rgba(155,114,207,0.15); border-radius: 8px; height: 8px; margin-bottom: 20px; overflow: hidden; }
.sp-progress-bar-fill { height: 100%; background: linear-gradient(90deg,#9B72CF,#FF6B9D); border-radius: 8px; transition: width 0.4s ease; }

/* Categorie-label (mix-modus) */
.sp-cat-label {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; text-align: center;
}

/* Regel-box */
.sp-regel {
  border: 2px solid; border-radius: 14px; padding: 12px 16px;
  font-size: 15px; font-weight: 700; margin-bottom: 20px; text-align: center;
  line-height: 1.4;
}

/* Vraag-label */
.sp-vraag-label {
  font-size: 16px; font-weight: 800; color: var(--muted);
  text-align: center; margin-bottom: 10px;
}

/* Zin met blanco (fill-in type) */
.sp-zin {
  font-size: 19px; font-weight: 700; line-height: 1.6; text-align: center;
  padding: 14px 16px; margin-bottom: 14px;
  background: rgba(155,114,207,0.07); border-radius: 14px;
  border: 2px solid rgba(155,114,207,0.18);
}
.sp-blank {
  display: inline-block; min-width: 70px; border-bottom: 3px solid #9B72CF;
  color: #9B72CF; font-weight: 900; padding: 0 4px;
}

/* Opties */
.sp-opties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px;
}
.sp-optie-btn {
  padding: 18px 10px; border-radius: 16px; border: 3px solid rgba(155,114,207,0.25);
  background: rgba(155,114,207,0.08); font-family: 'Nunito', sans-serif;
  font-size: 17px; font-weight: 800; color: var(--text);
  cursor: pointer; transition: transform 0.1s, background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent; min-height: 64px;
  word-break: break-word;
}
.sp-optie-btn:hover:not(:disabled) { background: rgba(155,114,207,0.16); border-color: rgba(155,114,207,0.5); }
.sp-optie-btn:active:not(:disabled) { transform: scale(0.96); }
.sp-optie-btn.sp-correct { background: rgba(6,214,160,0.18); border-color: #06D6A0; color: #059669; }
.sp-optie-btn.sp-wrong   { background: rgba(255,107,91,0.15); border-color: #FF6B5B; color: #dc2626; }
.sp-optie-btn:disabled   { cursor: default; }

/* Feedback */
.sp-feedback {
  min-height: 48px; border-radius: 12px; padding: 12px 14px;
  font-size: 14px; font-weight: 700; text-align: center; line-height: 1.5;
  transition: background 0.2s;
}
.sp-fb-ok   { background: rgba(6,214,160,0.12);  color: #059669; }
.sp-fb-fout { background: rgba(255,107,91,0.12); color: #dc2626; }

/* Volgende-knop */
.sp-next-btn {
  display: block; width: 100%; padding: 16px; border: none; border-radius: 16px;
  background: linear-gradient(135deg,#9B72CF,#FF6B9D); color: white;
  font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 900;
  cursor: pointer; margin-top: 8px; transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 4px 14px rgba(155,114,207,0.4);
}
.sp-next-btn:active { transform: scale(0.97); }

/* Resultaat */
.sp-result-card {
  background: rgba(155,114,207,0.08); border: 2px solid rgba(155,114,207,0.2);
  border-radius: 24px; padding: 36px 24px; text-align: center; margin-top: 8px;
}
.sp-result-emoji { font-size: 64px; margin-bottom: 12px; }
.sp-result-score { font-size: 48px; font-weight: 900; color: #9B72CF; margin-bottom: 4px; }
.sp-result-pct   { font-size: 22px; font-weight: 800; color: var(--muted); margin-bottom: 16px; }
.sp-result-msg   { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 28px; line-height: 1.5; }
.sp-result-btns  { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.sp-btn-primary {
  padding: 14px 28px; border: none; border-radius: 14px;
  background: linear-gradient(135deg,#9B72CF,#FF6B9D); color: white;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 900;
  cursor: pointer; box-shadow: 0 4px 12px rgba(155,114,207,0.35);
}
.sp-btn-secondary {
  padding: 14px 28px; border: 2px solid rgba(155,114,207,0.35); border-radius: 14px;
  background: transparent; color: var(--text);
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 800; cursor: pointer;
}

/* Stoppen-knop tijdens oefening */
.sp-back-exercise-btn {
  position: fixed; top: 14px; left: 14px; z-index: 100;
  background: rgba(255,255,255,0.85); border: none; border-radius: 50px;
  padding: 8px 14px; font-family: 'Nunito', sans-serif;
  font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer;
}
[data-theme="dark"] .sp-back-exercise-btn { background: rgba(40,40,60,0.85); }
