/* ============================================================
   GEDEELDE STIJLEN — Spelletjes website
   ============================================================ */

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

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  background-attachment: fixed;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e2e8f0;
}

/* ── Navigatie ───────────────────────────────────────────── */
.nav {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 16px;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  padding: 0 16px 0 0;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.nav-logo span { color: #63b3ed; }

.nav-tab {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 44px;
  text-decoration: none;
  color: rgba(144, 205, 244, 0.8);
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}

.nav-tab.actief {
  color: #fff;
  border-bottom-color: #4299e1;
  font-weight: 600;
}

/* ── Paginacontainer ─────────────────────────────────────── */
.pagina {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Koppen ──────────────────────────────────────────────── */
.spel-titel {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
  text-shadow: 0 0 24px rgba(99, 179, 237, 0.55);
  letter-spacing: -0.5px;
}

.spel-subtitel {
  color: #90cdf4;
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.8px;
}

/* ── Statistieken ────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 6px 16px;
  text-align: center;
  backdrop-filter: blur(6px);
  min-width: 76px;
}

.stat-label {
  color: #90cdf4;
  font-size: 0.62rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.stat-value {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Knoppen ─────────────────────────────────────────────── */
.knop {
  padding: 8px 22px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(66, 153, 225, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.knop:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(66,153,225,0.5); }
.knop:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(66,153,225,0.3); }
.knop:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.knop.gevaar {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  box-shadow: 0 4px 14px rgba(229, 62, 62, 0.35);
}

.knop.succes {
  background: linear-gradient(135deg, #38a169, #2f855a);
  box-shadow: 0 4px 14px rgba(56,161,105, 0.35);
}

/* ── Popup overlay ───────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.overlay.toon { display: flex; }

.popup {
  background: linear-gradient(145deg, #1a365d 0%, #2a4a7f 100%);
  border: 1.5px solid rgba(99, 179, 237, 0.35);
  border-radius: 24px;
  padding: 38px 44px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 360px;
  width: 92%;
}

@keyframes pop-in {
  from { transform: scale(0.45) translateY(20px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.popup-emoji { font-size: 3.6rem; display: block; margin-bottom: 10px; }
.popup-titel { color: #fff; font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.popup-tekst { color: #90cdf4; font-size: 0.98rem; line-height: 1.5; margin-bottom: 24px; }

/* ── Niveauknoppen ───────────────────────────────────────── */
.niveau-knoppen {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.niveau-knop {
  padding: 5px 14px;
  border: 1.5px solid rgba(99,179,237,0.3);
  border-radius: 50px;
  background: rgba(255,255,255,0.06);
  color: #90cdf4;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.niveau-knop:hover { border-color: #63b3ed; color: #fff; background: rgba(99,179,237,0.12); }
.niveau-knop.actief { background: #4299e1; border-color: #4299e1; color: #fff; font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 520px) {
  .nav-logo { font-size: 0.9rem; padding-right: 8px; margin-right: 4px; }
  .nav-tab  { font-size: 0.72rem; padding: 0 8px; height: 40px; }
  .pagina   { padding: 10px 10px 14px; }
  .popup    { padding: 22px 20px; }
}
