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

:root {
  --primary:       #7c3aed;
  --primary-light: #ede9fe;
  --primary-dark:  #5b21b6;
  --accent:        #06b6d4;
  --accent-light:  #cffafe;
  --success:       #059669;
  --danger:        #dc2626;
  --warning:       #d97706;
  --secondary:     #6b7280;
  --bg:            #f5f3ff;
  --surface:       #ffffff;
  --border:        #ece8fb;
  --text:          #0d0a1a;
  --text-muted:    #6d6a80;
  --sidebar-w:     240px;
  --radius:        16px;
  --shadow:        0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 20px rgba(124,58,237,0.10), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:     0 12px 40px rgba(124,58,237,0.15), 0 2px 8px rgba(0,0,0,0.06);
  --card-border:   1px solid rgba(124,58,237,0.10);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(124,58,237,0.06) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 100%, rgba(6,182,212,0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  cursor: default;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
input, textarea { cursor: text !important; user-select: text !important; }

/* ── Layout ──────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1e0a4a 0%, #2d1175 40%, #4c1db5 80%, #6d28d9 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.3s;
  box-shadow: 1px 0 0 rgba(255,255,255,0.04), 4px 0 32px rgba(0,0,0,0.4);
}

/* subtle noise texture overlay */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.6rem 1.4rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: opacity 0.2s;
  position: relative;
}
.sidebar-logo:hover { opacity: 0.8; }
.logo-icon {
  font-size: 1.7rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Geen typteken op niet-bewerkbare tekst */
.flashcard-front p, .flashcard-back p,
#quiz-question, #result-text, #result-emoji,
.deck-card h3, .deck-card .meta,
.card-q, .card-a, .counter, .hint,
.empty-state p, #fc-counter, #quiz-counter {
  user-select: none;
  cursor: default;
}

/* ── Streak badge ────────────────────────────────────────── */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.75rem 1.25rem 0.25rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(4px);
}
.streak-badge.hidden { display: none !important; }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s, transform 0.15s;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.13);
  color: white;
  transform: translateX(3px);
}
.nav-item.active {
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: white;
  border-radius: 99px;
}
.nav-icon { font-size: 1.1rem; }

.lang-toggle {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  margin-bottom: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.modal-lang-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-lang-overlay.hidden { display: none; }
.modal-lang-box {
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-lang-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.modal-lang-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.lang-options { display: flex; gap: 1rem; justify-content: center; }
.lang-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.lang-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-weight: 600;
}
.lang-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ── Auth modal ─────────────────────────────────────────── */
.modal-auth-box {
  width: 100%;
  max-width: 360px;
}
.modal-auth-box input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  cursor: text;
  user-select: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-auth-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.auth-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: var(--bg);
  border-radius: 12px;
  padding: 0.3rem;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.auth-tab:hover { color: var(--primary); }
.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.auth-error {
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.3);
  color: #dc2626;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  text-align: center;
}
.auth-error.hidden { display: none; }
.auth-field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.4rem;
  margin-bottom: 0.4rem;
  padding: 0 0.2rem;
}
.auth-field-hint.hidden { display: none; }
.auth-submit-btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.25rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.auth-lang-switch {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  padding: 0.25rem;
  transition: color 0.2s;
}
.auth-lang-switch:hover { color: var(--primary); }

/* ── Topbar user ────────────────────────────────────────── */
.topbar-user {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 0.25rem;
  background: var(--bg);
  border-radius: 99px;
  padding: 0.3rem 0.75rem;
  font-weight: 500;
}

.sidebar-footer {
  padding: 1rem 1.25rem 1.25rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.kofi-tekst {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}
.btn-kofi {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #ff5e5b, #ff8a6a);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 3px 12px rgba(255,94,91,0.35);
}
.btn-kofi:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Content area ────────────────────────────────────────── */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(124,58,237,0.12);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 0 rgba(124,58,237,0.08), 0 4px 24px rgba(124,58,237,0.06);
}
.topbar-title {
  font-size: 1.15rem;
  font-weight: 800;
  flex: 1;
  color: var(--text);
  letter-spacing: -0.3px;
}
.topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }
.topbar-menu { position: relative; }
.menu-dots-btn {
  background: var(--bg);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  line-height: 1;
  transition: background 0.15s;
}
.menu-dots-btn:hover { background: var(--primary-light); color: var(--primary); }
.menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-width: 190px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}
.menu-dropdown button:hover { background: var(--bg); }
.menu-dropdown.hidden { display: none; }

main {
  flex: 1;
  padding: 2rem 2.25rem;
  max-width: 980px;
  width: 100%;
  cursor: default;
  user-select: none;
}
main input, main textarea { cursor: text; user-select: text; }

.hidden { display: none !important; }

/* ── Help pagina ─────────────────────────────────────────── */
.help-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.help-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.help-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.help-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.help-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.help-card code {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.85rem;
}
.help-example {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.help-example-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}
.he-q { font-weight: 600; color: var(--text); font-size: 0.88rem; flex: 1; }
.he-sep {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.he-a { color: var(--text-muted); font-size: 0.88rem; flex: 2; }

/* ── Deck grid (home) ────────────────────────────────────── */
.home-welcome { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.home-greeting { font-size: 1.4rem; font-weight: 700; margin: 0; }
.home-sub { font-size: 0.9rem; color: var(--text-muted); margin: 0.15rem 0 0; }
.home-streak-pill { display: flex; align-items: center; gap: 0.3rem; background: rgba(245,158,11,0.12); color: #d97706; font-weight: 700; font-size: 1rem; padding: 0.4rem 0.9rem; border-radius: 20px; }
.home-quick-actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.quick-action-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.85rem 0.5rem; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; font-family: inherit; transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; }
.quick-action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.qa-icon { font-size: 1.4rem; }
.qa-label { font-size: 0.75rem; font-weight: 600; color: var(--text); text-align: center; }

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.35rem;
}

.deck-card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
}
.deck-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}
.deck-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.22);
}
.deck-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.deck-card .meta {
  color: var(--text-muted);
  font-size: 0.83rem;
  margin-bottom: 0;
  font-weight: 500;
}
.deck-card .card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.deck-card .card-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deck-card .card-actions .btn[title="Deel dit deck"] {
  flex: 0 0 auto;
  padding: 0.5rem 0.65rem;
}

/* ── Deck progress bar ───────────────────────────────────── */
.deck-progress {
  height: 5px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  margin: 0.65rem 0 0;
}
.deck-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.deck-progress-fill.green  { background: linear-gradient(90deg, #059669, #34d399); }
.deck-progress-fill.orange { background: linear-gradient(90deg, #d97706, #fbbf24); }
.deck-progress-fill.red    { background: linear-gradient(90deg, #dc2626, #f87171); }

/* ── Mode tabs (deck page) ───────────────────────────────── */
.mode-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  width: fit-content;
  box-shadow: var(--shadow);
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.mode-tab:hover  { background: var(--primary-light); color: var(--primary); }
.mode-tab.active { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(124,58,237,0.3); }

/* ── Cards (deck list) ───────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.learn-card {
  background: var(--surface);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
  position: relative;
}
.learn-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.22);
}
.learn-card .card-q {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}
.learn-card .card-a {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.learn-card .card-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.learn-card .card-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ── Flashcard ───────────────────────────────────────────── */
.flashcard-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  max-width: 620px;
  height: 7px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

.counter { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

.flashcard {
  width: 100%;
  max-width: 600px;
  height: 300px;
  perspective: 1400px;
  cursor: pointer;
}
.flashcard-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}
.flashcard-inner.flipped { transform: rotateY(180deg); }

.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  text-align: center;
}
.flashcard-front {
  background: linear-gradient(145deg, #2d0f6b 0%, #5b21b6 45%, #8b5cf6 80%, #a855f7 100%);
  color: white;
  border: none;
  box-shadow: 0 12px 48px rgba(91,33,182,0.45), 0 4px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.15);
}
.flashcard-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}
.flashcard-front p { font-size: 1.35rem; font-weight: 700; line-height: 1.4; }
.flashcard-front .hint { margin-top: 1.3rem; font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.flashcard-back {
  background: linear-gradient(155deg, #4c1d95 0%, #7c3aed 50%, #a78bfa 100%);
  color: white;
  transform: rotateY(180deg);
  box-shadow: 0 8px 32px rgba(91,33,182,0.35);
}
.flashcard-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.12) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}
.flashcard-back p { font-size: 1.35rem; font-weight: 600; line-height: 1.4; }

/* ── Tung tung sahur ─────────────────────────────────────── */
.tungtung {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  width: 80px;
  cursor: pointer;
  z-index: 999;
  user-select: none;
  animation: tungtung-idle 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  transition: transform 0.1s;
}
.tungtung:hover { animation: tungtung-dance 0.25s steps(2) infinite; }
.tungtung:active { transform: scale(0.85); }

@keyframes tungtung-idle {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-4px) rotate(3deg); }
}
@keyframes tungtung-dance {
  0%   { transform: rotate(-15deg) scale(1.2); }
  100% { transform: rotate(15deg)  scale(1.2); }
}

.fc-buttons { display: flex; gap: 1rem; }

/* ── Quiz ────────────────────────────────────────────────── */
.quiz-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
}
.quiz-card {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}
.quiz-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
  padding: 0.95rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  font-weight: 500;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateX(4px);
}
.quiz-option.correct {
  border-color: var(--success);
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
}
.quiz-option.wrong {
  border-color: var(--danger);
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}
.quiz-option:disabled { cursor: default; }

/* ── Result ──────────────────────────────────────────────── */
.result-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  max-width: 500px;
  margin: 3rem auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.result-emoji { font-size: 4rem; margin-bottom: 0.75rem; }
.result-box h2 { font-size: 2rem; margin-bottom: 0.6rem; font-weight: 800; }
.result-box p  { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.14s, box-shadow 0.18s;
  letter-spacing: 0.01em;
}
.btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: scale(0.97) translateY(0); opacity: 1; }
.btn.primary   { background: #7c3aed; color: white; box-shadow: 0 2px 12px rgba(124,58,237,0.35); }
.btn.primary:hover { background: #6d28d9; opacity: 1; }
.btn.success   { background: #059669; color: white; }
.btn.danger    { background: #dc2626; color: white; }
.btn.warning   { background: #d97706; color: white; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--bg); opacity: 1; }
.btn.accent    { background: var(--accent); color: white; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Modal ───────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,3,15,0.65);
  z-index: 99;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-box {
  background: var(--surface);
  border-radius: 22px;
  padding: 2rem 2rem 1.75rem;
  width: 90%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 24px 64px rgba(91,33,182,0.22), 0 8px 24px rgba(0,0,0,0.1);
  z-index: 101;
  border: 1px solid rgba(124,58,237,0.15);
}
.modal-bulk-box { max-width: 640px; }
.modal-box h3 { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.modal-box input,
.modal-box textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg);
  color: var(--text);
}
.modal-box input:focus,
.modal-box textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  background: var(--surface);
}

/* ── Bulk preview ────────────────────────────────────────── */
.modal-hint { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.modal-hint code { background: var(--primary-light); color: var(--primary-dark); padding: 0.1rem 0.3rem; border-radius: 5px; font-size: 0.82rem; }
.modal-hint em { color: var(--text); font-style: normal; font-family: monospace; }
.bulk-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-height: 220px; overflow-y: auto; }
.bulk-preview table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bulk-preview th { background: var(--bg); padding: 0.5rem 0.75rem; text-align: left; font-weight: 700; border-bottom: 1px solid var(--border); }
.bulk-preview td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.bulk-preview tr:last-child td { border-bottom: none; }
.bulk-preview tr.error td { color: var(--danger); background: #fff5f5; }
.bulk-row { display: flex; gap: 1rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.bulk-row:last-child { border-bottom: none; }
.bulk-q { font-weight: 600; flex: 1; }
.bulk-a { flex: 1; color: var(--text-muted); }
.ai-btn { background: linear-gradient(135deg, #6c63ff, #a78bfa); color: #fff; border: none; }
.ai-btn:hover { opacity: 0.9; }
.ai-btn-small { background: linear-gradient(135deg, #6c63ff, #a78bfa); color: #fff; border: none; font-size: 0.78rem; padding: 0.25rem 0.6rem; border-radius: 6px; cursor: pointer; }
.ai-btn-small:hover { opacity: 0.85; }
.ai-error { color: var(--danger); font-size: 0.875rem; padding: 0.5rem 0; }
.ai-loading { color: var(--text-muted); font-style: italic; padding: 1rem 0; text-align: center; }

/* ── AI modal ─────────────────────────────────────────────── */
.ai-modal-box { padding: 0; overflow: hidden; max-height: 85vh; display: flex; flex-direction: column; }
.ai-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.ai-modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); padding: 0.25rem 0.5rem; border-radius: 6px; }
.ai-modal-close:hover { background: var(--bg); color: var(--text); }
.ai-modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }

/* ── Toetsenbord hints ───────────────────────────────────── */
.kb-hints-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.kb-hint-item { display: flex; align-items: center; gap: 0.3rem; }
.kb-hint-sep { color: var(--border); }
.kb-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 0 var(--border);
  font-family: monospace;
}
.help-kb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Schrijfmodus ────────────────────────────────────────── */
.write-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
  width: 100%;
}
.write-card {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow-md);
}
.write-kb-hint { justify-content: flex-start; margin-top: 0; margin-bottom: 1rem; }
.write-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.4;
}
.write-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}
.write-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.18s;
  outline: none;
}
.write-input:focus { border-color: var(--primary); }
.write-input:disabled { opacity: 0.6; }
.write-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}
.write-correct { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.write-almost  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.write-wrong   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.write-next-row {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 640px;
}
.write-next-row button { min-width: 160px; }

/* ── Hint ─────────────────────────────────────────────────── */
.fc-hint-row { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.hint-btn { background: #f0f0ff; color: #6c63ff; border: 1px solid #c4b5fd; font-size: 0.85rem; padding: 0.35rem 1rem; }
.hint-btn:hover { background: #e5e0ff; }
.hint-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.9rem; max-width: 400px; text-align: center; line-height: 1.5; }

/* ── Uitleg modal ─────────────────────────────────────────── */
.explain-card-preview { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.explain-card-preview strong { font-size: 1rem; }
.explain-card-preview span { color: var(--text-muted); font-size: 0.9rem; }
.explain-content { font-size: 0.95rem; line-height: 1.65; }
.explain-content p { margin: 0; }

/* ── Studieplan modal ─────────────────────────────────────── */
.plan-date-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.plan-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.plan-date-row input[type="date"] { border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.7rem; font-size: 0.9rem; background: var(--bg); color: var(--text); }
.plan-days { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.plan-day { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem; }
.plan-day-date { font-size: 0.78rem; font-weight: 700; color: #6c63ff; min-width: 60px; padding-top: 0.1rem; }
.plan-day-body { display: flex; flex-direction: column; gap: 0.15rem; }
.plan-day-body strong { font-size: 0.9rem; }
.plan-day-body span { font-size: 0.82rem; color: var(--text-muted); }
.plan-day-cards { color: #6c63ff !important; font-weight: 600; }
.plan-exam-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }

/* ── Sidebar planningen ───────────────────────────────────── */
.sidebar-plans { margin: 1rem 0.75rem 0; border-radius: 12px; overflow: hidden; border: 1.5px solid #7c3aed; background: linear-gradient(135deg, #4c1d95 0%, #3b1069 100%); }
.sidebar-plans-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #c4b5fd; padding: 0.6rem 0.85rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 0.4rem; }
.sidebar-plan-row { display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.07); }
.sidebar-plan-row:last-child { border-bottom: none; }
.sidebar-plan-item { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; background: none; border: none; text-align: left; padding: 0.55rem 0.85rem; cursor: pointer; color: #fff; }
.sidebar-plan-item:hover { background: rgba(255,255,255,0.08); }
.sp-name { font-size: 0.86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.sp-date { font-size: 0.74rem; color: #c4b5fd; font-weight: 500; }
.sp-delete { background: none; border: none; color: rgba(255,255,255,0.35); cursor: pointer; font-size: 0.75rem; padding: 0.4rem 0.6rem; flex-shrink: 0; }
.sp-delete:hover { color: #f87171; background: rgba(239,68,68,0.2); }

/* ── AI Tools pagina ──────────────────────────────────────── */
.ai-tools-page { max-width: 560px; }
.ai-tools-page h2 { margin-bottom: 0.25rem; }
.ai-tools-intro { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.ai-tool-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: var(--card-border); border-radius: 14px; padding: 1rem 1.25rem; cursor: pointer; transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s; margin-bottom: 0.65rem; }
.ai-tool-card:hover { border-color: rgba(124,58,237,0.3); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ai-tool-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.ai-tool-icon { font-size: 1.6rem; flex-shrink: 0; }
.ai-tool-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.ai-tool-info strong { font-size: 0.95rem; }
.ai-tool-info span { font-size: 0.82rem; color: var(--text-muted); }
.ai-tool-arrow { font-size: 1.1rem; color: var(--text-muted); }

/* ── Bestand upload ───────────────────────────────────────── */
.file-drop-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; margin-bottom: 1rem; }
.file-drop-zone:hover, .file-drop-active { border-color: #6c63ff; background: rgba(108,99,255,0.05); }
.file-drop-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.file-drop-text { font-weight: 600; font-size: 0.95rem; }
.file-drop-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.file-selected { margin-bottom: 0.75rem; }
.file-chip { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.75rem; font-size: 0.875rem; font-weight: 600; }
.file-size { color: var(--text-muted); font-weight: 400; }
.file-action-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.file-result-cards { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-height: 260px; overflow-y: auto; margin-bottom: 0.75rem; }
.file-summary { font-size: 0.92rem; line-height: 1.65; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; max-height: 60vh; overflow-y: auto; }
.file-summary p, .file-summary li { margin: 0.2rem 0; }
.file-summary strong { color: var(--text); }
.summary-saved-hint { font-size: 0.85rem; color: #22c55e; margin-top: 0.75rem; }
.summary-list-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.5rem; }
.summary-list-info { flex: 1; cursor: pointer; min-width: 0; }
.summary-list-info:hover .summary-list-name { text-decoration: underline; }
.summary-list-name { display: block; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-list-date { display: block; font-size: 0.75rem; color: var(--text-muted); margin: 0.1rem 0 0.25rem; }
.summary-list-preview { display: block; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-summary-delete { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: 0.5; flex-shrink: 0; padding: 0.25rem; }
.btn-summary-delete:hover { opacity: 1; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 1rem;
  grid-column: 1/-1;
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: grayscale(0.3);
}
.empty-state p { font-size: 1rem; font-weight: 500; }

/* ── Confetti ────────────────────────────────────────────── */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 0.9s ease-out forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(130px) rotate(560deg); opacity: 0; }
}

/* ── Statistieken pagina ─────────────────────────────────── */
.stats-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stats-card {
  background: var(--surface);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: var(--radius);
  padding: 1.35rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stats-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stats-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.stats-card .stats-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stats-card .stats-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stats-chart-label {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 130px;
  background: var(--surface);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.6rem;
  box-shadow: var(--shadow);
}
.stats-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.stats-bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  min-height: 4px;
  transition: height 0.5s cubic-bezier(.4,0,.2,1);
}
.stats-bar.green  { background: linear-gradient(180deg, #34d399, #059669); }
.stats-bar.orange { background: linear-gradient(180deg, #fbbf24, #d97706); }
.stats-bar.red    { background: linear-gradient(180deg, #f87171, #dc2626); }
.stats-bar-pct {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.stats-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

/* ── Landingspagina ──────────────────────────────────────── */
.landing {
  min-height: 100vh;
  background: linear-gradient(160deg, #1e0a4e 0%, #3b1278 40%, #6d28d9 75%, #a855f7 100%);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
}
.landing.hidden { display: none !important; }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.landing-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.landing-login-btn {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.landing-login-btn:hover { background: rgba(255,255,255,0.22); }

.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 2.5rem 3rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.landing-hero-content { flex: 1; max-width: 540px; }

.landing-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 99px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.landing-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}
.landing-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.landing-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.landing-cta-btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.landing-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.landing-cta-secondary {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.landing-cta-secondary:hover { color: white; }

/* ── Demo banner ─────────────────────────────────────────── */
.demo-banner { display: flex; align-items: center; gap: 0.75rem; background: #7c3aed; color: white; padding: 0.6rem 1.25rem; font-size: 0.88rem; flex-wrap: wrap; position: sticky; top: 0; z-index: 200; }
.demo-banner span { flex: 1; }
.demo-banner-btn { background: white; color: #7c3aed; border: none; border-radius: 20px; padding: 0.3rem 0.9rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.demo-banner-btn:hover { background: #ede9fe; }
.demo-banner-close { background: none; border: none; color: white; font-size: 1rem; cursor: pointer; opacity: 0.7; flex-shrink: 0; }
.demo-banner-close:hover { opacity: 1; }
.demo-locked { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* floating preview cards */
.landing-hero-visual { flex: 1; max-width: 420px; position: relative; height: 480px; }
.landing-card-preview { position: relative; width: 100%; height: 100%; }
.lp-card {
  position: absolute;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.lp-card-1 { top: 0; left: 5%; width: 72%; animation: lp-float1 4s ease-in-out infinite; }
.lp-card-2 { top: 90px; right: 0; width: 58%; animation: lp-float2 4s ease-in-out infinite 0.8s; }
.lp-card-3 { top: 200px; left: 0; width: 52%; animation: lp-float3 4s ease-in-out infinite 1.6s; }
.lp-card-4 { top: 185px; right: 2%; width: 54%; animation: lp-float1 4.5s ease-in-out infinite 1.2s; }
.lp-card-5 { top: 310px; left: 8%; width: 62%; animation: lp-float2 5s ease-in-out infinite 0.4s; }
.lp-card-6 { top: 315px; right: 0; width: 56%; animation: lp-float3 4.2s ease-in-out infinite 2s; }
@keyframes lp-float1 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lp-float2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lp-float3 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lp-card-q { font-weight: 700; font-size: 0.95rem; }
.lp-card-a { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.lp-card-tag { font-size: 0.75rem; color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1); padding: 0.2rem 0.5rem; border-radius: 99px; width: fit-content; }
.lp-label { font-size: 0.78rem; font-weight: 800; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.06em; }
.lp-streak { font-size: 0.9rem; font-weight: 700; }
.lp-score { font-size: 1.6rem; font-weight: 900; color: #86efac; }
.lp-lb-row { font-size: 0.82rem; font-weight: 600; display: flex; justify-content: space-between; padding: 0.15rem 0; }
.lp-lb-me { color: #c4b5fd; }
.lp-lb-score { color: #fbbf24; }
.lp-progress-bars { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.25rem; }
.lp-bar-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: rgba(255,255,255,0.7); }
.lp-bar-row span { width: 70px; flex-shrink: 0; }
.lp-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.15); border-radius: 99px; overflow: hidden; }
.lp-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s; }
.landing-card-preview { position: relative; width: 100%; height: 480px; }

/* features */
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 0 2.5rem 3rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.landing-feature {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.landing-feature:hover { background: rgba(255,255,255,0.13); transform: translateY(-3px); }
.lf-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.landing-feature h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.landing-feature p { font-size: 0.85rem; color: rgba(255,255,255,0.65); line-height: 1.6; }

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.cookie-banner.hidden { display: none; }
.cookie-banner-text { flex: 1 1 240px; font-size: 0.85rem; line-height: 1.5; }
.cookie-banner-text a { color: var(--primary); font-weight: 600; }
.cookie-banner-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-btn {
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
}
.cookie-btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.cookie-btn-primary { background: linear-gradient(135deg,#a855f7,#7c3aed 55%,#06b6d4); color: #fff; }

.landing-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.landing-footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.landing-footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-weight: 600;
}
.landing-footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Mobile ──────────────────────────────────────────────── */
/* ── Bottom nav ──────────────────────────────────────────────── */
.bottom-nav { display: none; }

@media (max-width: 680px) {
  /* Sidebar verdwijnt op mobiel */
  .sidebar { display: none; }
  .content { margin-left: 0; }
  .mobile-menu-btn { display: none; }

  /* Bottom nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface, #fff);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.5rem 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item.active { color: var(--primary); }
  .bnav-icon { font-size: 1.3rem; line-height: 1; }
  .bnav-label { font-size: 0.65rem; font-weight: 500; }

  /* Content krijgt ruimte voor bottom nav */
  main { padding: 1rem 1rem 5rem; }
  .topbar { padding: 0 1rem; }

  /* Topbar compacter */
  .topbar-title { font-size: 1rem; }
  .topbar-user { display: none; }

  /* Flashcard groter en beter aan te raken */
  .flashcard { height: 260px; font-size: 1.1rem; }
  .fc-buttons button { padding: 0.9rem 1.5rem; font-size: 1rem; }
  .fc-counter { font-size: 0.9rem; }

  /* Deck grid 1 kolom */
  .deck-grid { grid-template-columns: 1fr; }
  .deck-card { padding: 1rem 1.1rem; }

  /* Mode tabs full width */
  .mode-tabs { width: 100%; }
  .mode-tab { flex: 1; justify-content: center; padding: 0.65rem 0.4rem; font-size: 0.82rem; }

  /* Kaartjes */
  .learn-card { padding: 1rem; }
  .card-actions { flex-wrap: wrap; gap: 0.4rem; }
  .card-actions .btn { font-size: 0.8rem; padding: 0.4rem 0.7rem; }

  /* Quiz opties */
  .quiz-option { padding: 0.85rem 1rem; font-size: 0.95rem; }

  /* Modals full screen op mobiel */
  .modal-box, .ai-modal-box, .modal-bulk-box, .modal-auth-box {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal { align-items: flex-end; }

  /* AI tools grid 1 kolom */
  .ai-tools-page { padding: 0; }
  .ai-tool-card { padding: 1rem; }

  /* Settings */
  .settings-card { max-width: 100%; }

  /* Demo banner compact */
  .demo-banner { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  .demo-banner span { font-size: 0.78rem; }

  /* Landing */
  .landing-nav { padding: 1rem 1.25rem; }
  .landing-hero { flex-direction: column; padding: 2.5rem 1.25rem 2rem; gap: 2rem; }
  .landing-hero-visual { display: none; }
  .landing-features { padding: 0 1.25rem 2.5rem; grid-template-columns: 1fr 1fr; }
  .landing-title { font-size: 2rem; }
  .landing-cta-btn { width: 100%; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── App delen modal ─────────────────────────────────────────── */
.share-app-btns { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.share-app-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
  text-align: left;
}
.share-app-btn:hover { transform: translateY(-2px); opacity: 0.92; }
.share-app-icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
.share-app-x    { background: #000; color: #fff; }
.share-app-wa   { background: #25d366; color: #fff; }
.share-app-copy { background: var(--primary-light); color: var(--primary); border: 1.5px solid rgba(124,58,237,0.2); }

/* ── Streak warning banner ───────────────────────────────────── */
.streak-warning-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.08));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d97706;
}
.streak-warning-banner.hidden { display: none !important; }
.streak-warning-banner span { flex: 1; }
.streak-banner-close {
  background: none; border: none; cursor: pointer;
  color: #d97706; font-size: 1rem; padding: 0 0.25rem; opacity: 0.6;
  flex-shrink: 0;
}
.streak-banner-close:hover { opacity: 1; }

/* ── Studieplan kalender ─────────────────────────────────────── */
.plan-calendar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.5rem;
  margin-top: 0.75rem;
  scrollbar-width: thin;
}
.plan-cal-day {
  flex: 0 0 auto;
  width: 80px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.6rem 0.5rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-cal-day:hover { border-color: rgba(124,58,237,0.3); box-shadow: var(--shadow); }
.plan-cal-date {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 2px;
}
.plan-cal-date span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-cal-body strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.35rem;
  line-height: 1.3;
}
.plan-cal-cards {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: block;
}
.plan-cal-today {
  border-color: var(--primary) !important;
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.15);
}
.plan-cal-today .plan-cal-date { color: var(--primary); }
.plan-cal-past { opacity: 0.45; }
.plan-cal-exam {
  border-color: rgba(5,150,105,0.4);
  background: rgba(5,150,105,0.06);
}
.plan-cal-exam .plan-cal-date { font-size: 1.4rem; }

/* ── Herhalen widget ─────────────────────────────────────────── */
.review-widget {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(168,85,247,0.06));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.review-widget.hidden { display: none !important; }
.review-widget-icon { font-size: 1.8rem; flex-shrink: 0; }
.review-widget-text { flex: 1; }
.review-widget-text strong { display: block; font-size: 0.95rem; color: var(--text); margin-bottom: 0.15rem; }
.review-widget-text span { font-size: 0.82rem; color: var(--text-muted); }
.review-widget-btn { flex-shrink: 0; white-space: nowrap; }

/* ── Bulk import tabs ────────────────────────────────────────── */
.bulk-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.3rem;
}
.bulk-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.bulk-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.bulk-tab:hover:not(.active) { color: var(--text); }

/* ── Groepen pagina ──────────────────────────────────────────── */
.groups-actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.groups-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 640px; }
.group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.group-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}
.group-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: rgba(124,58,237,0.22); }
.group-card-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.group-card-meta { font-size: 0.82rem; color: var(--text-muted); }
.group-card-code {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.1em;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  flex-shrink: 0;
  font-family: 'Courier New', monospace;
}

/* ── Groep detail modal ──────────────────────────────────────── */
.group-code-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.group-code-display strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.15em;
  font-family: 'Courier New', monospace;
}
.group-members-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow-y: auto; }
.group-member-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border-radius: 10px;
  font-size: 0.9rem;
}
.group-member-rank { font-size: 1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.group-member-name { flex: 1; font-weight: 600; color: var(--text); }
.group-member-streak { font-size: 0.82rem; color: var(--text-muted); flex-shrink: 0; }
.group-member-score { font-size: 0.82rem; font-weight: 700; color: var(--primary); flex-shrink: 0; }

/* ── Ontdek pagina ───────────────────────────────────────────── */
.discover-search-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  max-width: 520px;
}
.discover-search-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  cursor: text;
  user-select: text;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.discover-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.discover-status {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}
.discover-deck-author {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.discover-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}
.discover-preview-row {
  display: flex;
  gap: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}
.discover-preview-row .bulk-q { font-weight: 600; flex: 1; color: var(--text); }
.discover-preview-row .bulk-a { flex: 1.5; color: var(--text-muted); }

/* ── Share deck modal ────────────────────────────────────────── */
.share-link-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.share-link-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  cursor: text;
  user-select: text;
  font-family: 'Courier New', monospace;
  min-width: 0;
}
.share-link-wrap.hidden { display: none !important; }
.share-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.2em;
  margin-bottom: 0.25rem;
}

/* ── Dark mode ───────────────────────────────────────────────── */
:root.dark {
  --bg:          #07050f;
  --surface:     #100d1c;
  --border:      #1e1933;
  --text:        #ede8ff;
  --text-muted:  #7b6ea8;
  --primary-light: #1a1140;
  --shadow:      0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.75), 0 2px 8px rgba(0,0,0,0.5);
  --card-border: 1px solid rgba(255,255,255,0.06);
}
:root.dark body {
  background-image: radial-gradient(ellipse at 15% 0%, rgba(124,58,237,0.18) 0%, transparent 50%),
                    radial-gradient(ellipse at 85% 100%, rgba(124,58,237,0.08) 0%, transparent 45%);
}
:root.dark .topbar {
  background: rgba(10,8,20,0.95);
  border-bottom-color: rgba(124,58,237,0.15);
}
:root.dark .deck-card,
:root.dark .learn-card,
:root.dark .modal-box,
:root.dark .mode-tabs,
:root.dark .help-card {
  background: var(--surface);
  border-color: rgba(255,255,255,0.05);
}
:root.dark .deck-card:hover { border-color: rgba(124,58,237,0.3); }
:root.dark .modal-box input,
:root.dark .modal-box textarea,
:root.dark .modal-auth-box input {
  background: #0a0816;
  color: var(--text);
  border-color: var(--border);
}
:root.dark .menu-dropdown {
  background: var(--surface);
  border-color: var(--border);
}
:root.dark .menu-dropdown button:hover { background: var(--bg); }
:root.dark .bottom-nav { background: rgba(10,8,20,0.97); border-top-color: rgba(255,255,255,0.06); backdrop-filter: blur(20px); }
:root.dark .auth-tabs { background: var(--bg); }
:root.dark .auth-tab.active { background: var(--surface); }
:root.dark .topbar-user { background: var(--surface); color: var(--text-muted); }
:root.dark .stats-content h2,
:root.dark .topbar-title { color: var(--text); }
:root.dark .flashcard-back {
  background: var(--surface);
  border-color: var(--border);
}
:root.dark .flashcard-back p { color: var(--text); }
:root.dark .write-card { background: var(--surface); }
:root.dark .write-input { background: var(--bg); color: var(--text); border-color: var(--border); }
:root.dark .help-kb-row { background: var(--bg); }
:root.dark .kb-badge { background: var(--bg); border-color: var(--border); color: var(--text-muted); }

/* ── Dark toggle button ──────────────────────────────────────── */
.sidebar-footer-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.sidebar-footer-row .lang-toggle { margin-bottom: 0; flex: 1; }
.dark-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}
.dark-toggle:hover { background: rgba(255,255,255,0.2); }

/* ── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-list { display: flex; flex-direction: column; gap: 0.6rem; max-width: 640px; }

/* ── Settings ────────────────────────────────────────────── */
.settings-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; max-width: 480px; }
.settings-section-title { font-size: 1rem; font-weight: 600; margin: 0 0 1rem; }
.settings-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem; }
.settings-field label { font-size: 0.82rem; color: var(--text-muted); }
.settings-field input { padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 0.95rem; }
.settings-field input:focus { outline: none; border-color: var(--accent); }
.settings-error { color: var(--danger, #e74c3c); font-size: 0.85rem; margin-bottom: 0.75rem; }
.settings-success { color: #22c55e; font-size: 0.85rem; margin-bottom: 0.75rem; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.lb-row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lb-me { border-color: var(--primary); background: var(--primary-light); }
.lb-rank { font-size: 1.3rem; width: 2rem; text-align: center; flex-shrink: 0; }
.lb-name { font-weight: 700; flex: 1; color: var(--text); }
.lb-you { font-size: 0.75rem; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 0.1rem 0.4rem; border-radius: 99px; }
.lb-streak { font-weight: 700; color: #f59e0b; white-space: nowrap; }
.lb-score { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }

.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.4rem; color: var(--text); }
.page-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ── Moeilijkste kaartjes ────────────────────────────────────── */
.hard-cards-wrap { margin-top: 2rem; }
.hard-cards-title { font-size: 1rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--text); }
.hard-card-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
}
.hard-card-q { font-weight: 700; font-size: 0.92rem; color: var(--text); margin-bottom: 0.2rem; }
.hard-card-a { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.hard-card-meta { font-size: 0.75rem; color: var(--primary); font-weight: 600; }

/* ── Deck delen ──────────────────────────────────────────────── */
.share-link-wrap { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.75rem 0; }
.share-link-input {
  flex: 1; min-width: 0;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  cursor: text;
  user-select: text;
}
.share-status { font-size: 0.88rem; color: var(--primary); font-weight: 600; min-height: 1.2rem; }

.btn-share-app {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  cursor: pointer;
  text-align: center;
  margin-bottom: 0.65rem;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}
.btn-share-app:hover { background: rgba(255,255,255,0.22); transform: translateY(-1px); }

.shared-deck-preview {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0.5rem 0;
}
.shared-deck-name { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 0.3rem; }
.shared-deck-meta { font-size: 0.87rem; color: var(--text-muted); }

/* ── Match modus ─────────────────────────────────────────────── */
.match-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.match-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.match-timer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.match-progress-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.match-timer-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.match-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
@media (max-width: 480px) {
  .match-grid { grid-template-columns: repeat(2, 1fr); }
}
.match-tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.14s, background 0.14s, transform 0.13s, opacity 0.3s;
  word-break: break-word;
  user-select: none;
  line-height: 1.35;
}
.match-tile:hover:not(.matched):not(.wrong) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.match-tile.selected {
  border-color: var(--primary);
  background: rgba(124,58,237,0.12);
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}
.match-tile.matched {
  border-color: #059669;
  background: rgba(5,150,105,0.1);
  color: #059669;
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
}
.match-tile.wrong {
  border-color: var(--danger);
  background: rgba(220,38,38,0.08);
  animation: match-shake 0.45s ease;
}
@keyframes match-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.match-win {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}
.match-win-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.match-win h3 { font-size: 1.25rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.match-win p  { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.1rem; }


/* ── Gamificatie stijlen ─────────────────────────────────────── */

/* Profielkaart */
.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #1a1630 0%, #1e1a3a 50%, #1a2540 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 1.25rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
html:not(.dark) .profile-card {
  background: linear-gradient(135deg, #f3f0ff 0%, #ede9fe 50%, #e0f2fe 100%);
  border-color: rgba(139,92,246,0.25);
}
.profile-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 85% 50%, rgba(139,92,246,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.profile-char-wrap {
  flex-shrink: 0;
  width: 68px;
  height: 76px;
  position: relative;
  z-index: 1;
}
.profile-char {
  width: 68px;
  height: 76px;
  filter: drop-shadow(0 0 10px rgba(139,92,246,0.55));
}
.profile-char svg {
  width: 100%;
  height: 100%;
}
.profile-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.home-greeting {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(139,92,246,0.8);
  margin: 0 0 0.35rem;
}
html:not(.dark) .home-greeting {
  color: rgba(109,40,217,0.75);
}
.profile-level-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.profile-level-badge {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.profile-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: #e8e8f8;
}
html:not(.dark) .profile-title-text {
  color: #1e1b4b;
}
.profile-xp-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}
html:not(.dark) .profile-xp-bar-wrap {
  background: rgba(109,40,217,0.15);
}
.profile-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.34,1.56,.64,1);
}
.profile-xp-text {
  font-size: 0.72rem;
  color: rgba(200,195,240,0.65);
  font-weight: 500;
}
html:not(.dark) .profile-xp-text {
  color: rgba(109,40,217,0.6);
}

/* Quests & badges card */
.quests-card,
.badges-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.quests-header,
.badges-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}
.quests-title,
.badges-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.quests-xp-label,
.badges-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Quest items */
.quest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.quest-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.quest-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: rgba(139,92,246,0.12);
}
.quest-item:nth-child(1) .quest-item-icon { background: rgba(16,185,129,0.13); }
.quest-item:nth-child(2) .quest-item-icon { background: rgba(59,130,246,0.13); }
.quest-item:nth-child(3) .quest-item-icon { background: rgba(245,158,11,0.13); }
.quest-item-body {
  flex: 1;
  min-width: 0;
}
.quest-item--done .quest-item-label {
  opacity: 0.5;
}
.quest-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  gap: 0.4rem;
}
.quest-item-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.quest-item-xp {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8b5cf6;
  white-space: nowrap;
  flex-shrink: 0;
}
.quest-done-pill {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.quest-progress-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}
.quest-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
  border-radius: 999px;
  transition: width 0.45s ease;
}
.quest-item:nth-child(1) .quest-progress-bar { background: linear-gradient(90deg,#10b981,#34d399); }
.quest-item:nth-child(2) .quest-progress-bar { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.quest-item:nth-child(3) .quest-progress-bar { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.quest-progress-text {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Badges raster */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
}
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.2rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: default;
  transition: transform 0.15s, border-color 0.15s;
}
.badge-item--unlocked {
  border-color: rgba(139,92,246,0.45);
  background: rgba(139,92,246,0.07);
}
.badge-item--locked {
  opacity: 0.3;
}
.badge-item--unlocked:hover {
  transform: translateY(-2px);
  border-color: rgba(139,92,246,0.7);
}
.badge-item-icon {
  font-size: 1.2rem;
  line-height: 1;
}
.badge-item-label {
  font-size: 0.56rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
  font-weight: 600;
}
.badge-item--unlocked .badge-item-label {
  color: #a78bfa;
}

/* Level-up overlay */
.levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.levelup-overlay.hidden {
  display: none;
}
.levelup-box {
  background: #13111f;
  border-radius: 1.75rem;
  padding: 2.25rem 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(139,92,246,0.45);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.1), 0 24px 80px rgba(139,92,246,0.25);
  animation: lu-pop 0.45s cubic-bezier(.17,.67,.35,1.35) both;
  max-width: 300px;
  width: 90%;
  position: relative;
  overflow: hidden;
}
html:not(.dark) .levelup-box {
  background: #1e1b4b;
}
.levelup-box::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139,92,246,0.35) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes lu-pop {
  from { transform: scale(0.5) translateY(40px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.levelup-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(139,92,246,0.08);
  border: 2px solid rgba(139,92,246,0.3);
  margin: 0.25rem 0 0.5rem;
}
.levelup-ring::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#8b5cf6, #c4b5fd, #8b5cf6);
  mask: radial-gradient(circle, transparent 44px, black 45px);
  -webkit-mask: radial-gradient(circle, transparent 44px, black 45px);
  animation: lu-spin 2.5s linear infinite;
}
@keyframes lu-spin {
  to { transform: rotate(360deg); }
}
.levelup-char {
  width: 76px;
  height: 84px;
  position: relative;
  z-index: 1;
}
.levelup-char svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(139,92,246,0.7));
}
.levelup-badge-label {
  background: rgba(139,92,246,0.18);
  border: 1px solid rgba(139,92,246,0.4);
  color: #c4b5fd;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.15em;
}
.levelup-level {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #c4b5fd 30%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.levelup-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8e8f8;
}
.levelup-stars {
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin: 0.1rem 0;
}
.levelup-hint {
  font-size: 0.72rem;
  color: rgba(200,195,240,0.38);
  margin-top: 0.3rem;
}

/* Toast meldingen */
.xp-gain-toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(109,40,217,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 8888;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.xp-gain-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.badge-unlock-toast,
.quest-complete-toast {
  position: fixed;
  bottom: 170px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a1630;
  border: 1px solid rgba(139,92,246,0.45);
  color: #e8e8f8;
  font-size: 0.88rem;
  padding: 0.75rem 1.1rem;
  border-radius: 1rem;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 8889;
  max-width: 92vw;
}
html:not(.dark) .badge-unlock-toast,
html:not(.dark) .quest-complete-toast {
  background: #1e1b4b;
}
.badge-unlock-toast--show,
.quest-complete-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.badge-unlock-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}
.badge-unlock-toast strong,
.quest-complete-toast strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c4b5fd;
  line-height: 1.3;
}
.badge-unlock-toast span,
.quest-complete-toast span {
  font-size: 0.78rem;
  color: rgba(200,195,240,0.6);
}

/* ── AI quota balk ─────────────────────────────────────────────── */
.ai-quota-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}
.ai-quota-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}
.ai-quota-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.ai-quota-fill {
  height: 100%;
  border-radius: 999px;
  background: #8b5cf6;
  transition: width 0.4s ease, background 0.3s;
}

/* ── Pricing page ────────────────────────────────────────── */
.pricing-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 3rem;
}
.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
}
.pricing-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.pricing-sub {
  color: var(--text-muted);
  font-size: 1rem;
}
.pricing-plus-active {
  margin-top: 1rem;
  background: linear-gradient(135deg, #7c3aed22, #06b6d422);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  display: inline-block;
}
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
  .pricing-cards { grid-template-columns: 1fr; }
}
.pricing-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: var(--card-border);
  box-shadow: var(--shadow-md);
  padding: 1.8rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card-plus {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(124,58,237,0.18);
}
.pricing-badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-card-top {
  margin-bottom: 1.5rem;
}
.pricing-plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-price-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.8rem;
  flex: 1;
}
.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.feat-yes { color: var(--text) !important; }
.feat-limit { color: var(--warning) !important; }
.feat-no { color: var(--text-muted) !important; text-decoration: line-through; }
.plus-feat { color: var(--primary) !important; }
.pricing-cta-wrap {
  margin-top: auto;
  text-align: center;
}
.pricing-btn-free {
  width: 100%;
  background: var(--border);
  color: var(--text-muted);
  border: none;
  border-radius: 10px;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: not-allowed;
}
.pricing-btn-plus {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}
.pricing-btn-plus:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.pricing-btn-plus:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pricing-cta-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}
.pricing-faq {
  background: var(--surface);
  border-radius: var(--radius);
  border: var(--card-border);
  padding: 1.5rem;
}
.pricing-faq h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.faq-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.faq-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Paywall modal ───────────────────────────────────────── */
.paywall-box {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
}
.paywall-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 8px rgba(124,58,237,0.4));
}
.paywall-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.paywall-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.paywall-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem;
}
.paywall-col { text-align: center; }
.paywall-col-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.paywall-col-free .paywall-col-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
}
.paywall-col-plus .paywall-col-val {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.paywall-arrow {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
}
.paywall-upgrade-btn {
  margin-bottom: 0.6rem;
}
.paywall-later-btn {
  width: 100%;
  margin-top: 0.3rem;
}

/* ── Upgrade modal ───────────────────────────────────────── */
.upgrade-box {
  padding: 0;
  overflow: hidden;
}
.upgrade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
}
.upgrade-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.upgrade-header .ai-modal-close {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
}
.upgrade-price-row {
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
}
.upgrade-price {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.upgrade-price-per {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.upgrade-features {
  list-style: none;
  padding: 0.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.upgrade-features li {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}
.upgrade-contact-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 1.5rem 1rem;
  line-height: 1.5;
  text-align: center;
}
.upgrade-contact-hint a {
  color: var(--primary);
  font-weight: 600;
}
.upgrade-box .pricing-btn-plus {
  margin: 0 1.5rem;
  width: calc(100% - 3rem);
}
.upgrade-secure {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.75rem 1.5rem 1.2rem;
}

/* ── Sidebar Plus-knop highlight ─────────────────────────── */
#nav-pricing {
  background: linear-gradient(90deg, rgba(124,58,237,0.18) 0%, rgba(6,182,212,0.10) 100%);
  border: 1px solid rgba(124,58,237,0.3);
  margin: 0.4rem 0.6rem;
  border-radius: 10px;
}
#nav-pricing:hover {
  background: linear-gradient(90deg, rgba(124,58,237,0.28) 0%, rgba(6,182,212,0.18) 100%);
}
#nav-pricing.active {
  background: linear-gradient(90deg, rgba(124,58,237,0.35) 0%, rgba(6,182,212,0.22) 100%);
}

/* ════════════════════════════════════════════════════════════
   ✨ PREMIUM LAYER — verfijnde effecten & micro-interacties
   Bouwt voort op de bestaande stijl (paars → cyaan merk).
   ════════════════════════════════════════════════════════════ */
:root {
  --grad-brand:   linear-gradient(135deg, #8b5cf6 0%, #7c3aed 45%, #06b6d4 120%);
  --grad-brand-2: linear-gradient(120deg, #a855f7 0%, #7c3aed 50%, #4f46e5 100%);
  --glow-brand:   0 0 0 1px rgba(124,58,237,0.18), 0 10px 30px -8px rgba(124,58,237,0.45);
  --glow-soft:    0 8px 30px -10px rgba(124,58,237,0.35);
  --ease-spring:  cubic-bezier(.34,1.56,.64,1);
}

/* ── Premium scrollbar ───────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(124,58,237,0.4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(124,58,237,0.55), rgba(6,182,212,0.45));
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.8); background-clip: padding-box; }

/* Verfijnde tekstselectie */
::selection { background: rgba(124,58,237,0.25); color: var(--text); }

/* ── Premium knoppen: gradient + glans-sweep ─────────────── */
.btn.primary,
.btn.ai-btn,
.pricing-btn-plus,
.landing-cta-btn,
.quick-action-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn.primary {
  background: var(--grad-brand-2);
  background-size: 160% 160%;
  box-shadow: 0 4px 16px -2px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform .18s var(--ease-spring), box-shadow .25s, background-position .5s;
}
.btn.primary:hover {
  background-position: 100% 0;
  box-shadow: 0 10px 28px -6px rgba(124,58,237,0.6), inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
/* glans die over de knop veegt */
.btn.primary::after,
.btn.ai-btn::after,
.pricing-btn-plus::after,
.landing-cta-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
  z-index: 1;
  pointer-events: none;
}
.btn.primary:hover::after,
.btn.ai-btn:hover::after,
.pricing-btn-plus:hover::after,
.landing-cta-btn:hover::after { left: 130%; }

/* ── Deck-kaarten: glow + geanimeerde accentbalk ─────────── */
.deck-card { transition: box-shadow .28s, transform .28s var(--ease-spring), border-color .28s; }
.deck-card::before {
  background: linear-gradient(90deg, #7c3aed, #a855f7, #06b6d4, #7c3aed);
  background-size: 300% 100%;
  transition: opacity .3s;
  opacity: 0.85;
}
.deck-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px -14px rgba(124,58,237,0.45), 0 4px 12px rgba(0,0,0,0.06);
}
.deck-card:hover::before { animation: deck-shine 2.5s linear infinite; opacity: 1; }
@keyframes deck-shine { to { background-position: 300% 0; } }

/* ── AI-tool kaarten & snelle acties: subtiele lift/glow ─── */
.ai-tool-card { transition: transform .2s var(--ease-spring), box-shadow .25s, border-color .25s; }
.ai-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-soft);
  border-color: rgba(124,58,237,0.3);
}
.ai-tool-card:hover .ai-tool-arrow { transform: translateX(4px); }
.ai-tool-arrow { transition: transform .2s var(--ease-spring); }
.quick-action-btn { transition: transform .18s var(--ease-spring), box-shadow .22s; }
.quick-action-btn:hover { transform: translateY(-3px); box-shadow: var(--glow-soft); }
.quick-action-btn:active { transform: translateY(-1px) scale(.98); }

/* ── Sidebar: actieve item met gloed-pill ────────────────── */
.nav-item.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  box-shadow: 0 2px 16px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.15);
}
.nav-item.active::before { box-shadow: 0 0 12px 1px rgba(255,255,255,0.7); border-radius: 2px; }
.logo-icon { animation: logo-pulse 3.5s ease-in-out infinite; }
@keyframes logo-pulse {
  0%,100% { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
  50%     { filter: drop-shadow(0 0 12px rgba(168,85,247,0.9)); }
}

/* ── Profielkaart: premium gradient + glans ──────────────── */
.profile-card { position: relative; overflow: hidden; }
.profile-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.profile-xp-bar { position: relative; overflow: hidden; }
.profile-xp-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: translateX(-100%);
  animation: xp-shine 2.6s ease-in-out infinite;
}
@keyframes xp-shine { 0%,60% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* ── Modals: zachte entree-animatie ──────────────────────── */
.modal:not(.hidden) .modal-box {
  animation: modal-pop .35s var(--ease-spring) both;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-box { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124,58,237,0.06); }

/* ── Flashcard: rijkere schaduw ──────────────────────────── */
.flashcard { transition: transform .2s var(--ease-spring); }
.flashcard:hover { transform: translateY(-2px); }

/* respecteer reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .05ms !important; }
}

/* ════════════════════════════════════════════════════════════
   ✨ PREMIUM LANDINGSPAGINA
   ════════════════════════════════════════════════════════════ */
.landing {
  position: relative;
  overflow: hidden;
  background: #140634;
}
/* bewegende aurora-achtergrond */
.landing::before {
  content: '';
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(124,58,237,0.55) 0%, transparent 60%),
    radial-gradient(35% 45% at 85% 15%, rgba(6,182,212,0.35) 0%, transparent 60%),
    radial-gradient(45% 55% at 75% 85%, rgba(168,85,247,0.45) 0%, transparent 60%),
    radial-gradient(40% 50% at 20% 90%, rgba(79,70,229,0.4) 0%, transparent 60%);
  filter: blur(30px);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}
/* fijne korrel-overlay voor diepte */
.landing::after {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
.landing > * { position: relative; z-index: 1; }

.landing-nav { padding: 1.25rem 2.5rem; backdrop-filter: blur(6px); }
.landing-logo { display: flex; align-items: center; gap: .4rem; }

/* glanzende badge met pulserende stip */
.landing-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 20px -6px rgba(124,58,237,0.6);
}
.landing-badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* gradient-titel */
.landing-title {
  background: linear-gradient(180deg, #ffffff 30%, #e9d5ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 40px rgba(168,85,247,0.3);
}
.landing-cta-btn {
  background: linear-gradient(135deg, #ffffff, #f3e8ff);
  box-shadow: 0 8px 30px -6px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.4) inset;
}

/* preview-kaarten: extra glow + rand-highlight */
.lp-card {
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
}

/* feature-kaarten: gradient-rand bij hover */
.landing-feature {
  position: relative;
  transition: transform .25s var(--ease-spring), background .25s, box-shadow .25s;
}
.landing-feature::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(168,85,247,0.6), transparent 40%, rgba(6,182,212,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
}
.landing-feature:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -16px rgba(0,0,0,0.5); }
.landing-feature:hover::before { opacity: 1; }
.lf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(6,182,212,0.18));
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: .85rem;
}

/* ── Trust-bar (statistieken) ────────────────────────────── */
.landing-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem;
  max-width: 1100px; margin: 0 auto; padding: 0 2.5rem 1rem;
}
.trust-stat { text-align: center; }
.trust-num {
  display: block; font-size: 2.2rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.trust-label { font-size: .82rem; color: rgba(255,255,255,0.6); font-weight: 600; }

/* ── Sectiekoppen ────────────────────────────────────────── */
.landing-section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; padding: 0 1.5rem; }
.landing-section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; letter-spacing: -.5px; margin-bottom: .6rem; }
.landing-section-head p { color: rgba(255,255,255,0.6); font-size: 1rem; line-height: 1.6; }
.landing-section { padding: 3.5rem 0 1rem; }
.landing-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #c4b5fd; margin-bottom: .75rem;
}

/* ── Hoe het werkt (stappen) ─────────────────────────────── */
.landing-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; max-width: 1000px; margin: 0 auto; padding: 0 2.5rem;
}
.landing-step {
  position: relative;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 1.75rem 1.5rem;
  backdrop-filter: blur(8px);
  transition: transform .25s var(--ease-spring);
}
.landing-step:hover { transform: translateY(-4px); }
.landing-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; font-weight: 900; font-size: 1.1rem;
  background: var(--grad-brand-2); color: #fff;
  box-shadow: 0 6px 18px -4px rgba(124,58,237,0.7); margin-bottom: 1rem;
}
.landing-step h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .4rem; }
.landing-step p { font-size: .9rem; color: rgba(255,255,255,0.65); line-height: 1.6; }

/* ── Testimonials ────────────────────────────────────────── */
.landing-testimonials {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; max-width: 1000px; margin: 0 auto; padding: 0 2.5rem;
}
.testimonial {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.testimonial-stars { color: #fbbf24; font-size: .95rem; margin-bottom: .6rem; letter-spacing: 2px; }
.testimonial-quote { font-size: .95rem; line-height: 1.65; color: rgba(255,255,255,0.9); margin-bottom: 1rem; }
.testimonial-author { display: flex; align-items: center; gap: .65rem; }
.testimonial-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem;
  background: var(--grad-brand-2); color: #fff;
}
.testimonial-name { font-size: .88rem; font-weight: 700; }
.testimonial-role { font-size: .78rem; color: rgba(255,255,255,0.55); }

/* ── Slot-CTA ────────────────────────────────────────────── */
.landing-final {
  max-width: 880px; margin: 4rem auto 3rem; padding: 3rem 2rem; text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(6,182,212,0.18));
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  box-shadow: 0 30px 80px -30px rgba(124,58,237,0.7);
  position: relative; overflow: hidden;
}
.landing-final::before {
  content: ''; position: absolute; top: -50%; left: -20%; width: 80%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  animation: aurora 12s ease-in-out infinite alternate;
}
.landing-final h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -.5px; margin-bottom: .75rem; }
.landing-final p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 1.75rem; }
.landing-final .landing-cta-btn { font-size: 1.05rem; padding: 1rem 2.5rem; }
.landing-final-note { margin-top: 1rem; font-size: .82rem; color: rgba(255,255,255,0.5); }

@media (max-width: 680px) {
  .landing-trust { gap: 1.5rem 2rem; }
  .trust-num { font-size: 1.7rem; }
  .landing-section { padding: 2.5rem 0 .5rem; }
  .landing-final { margin: 2.5rem 1rem; padding: 2.25rem 1.25rem; }
}

/* ════════════════════════════════════════════════════════════
   ✨ PREMIUM INLOGSCHERM
   ════════════════════════════════════════════════════════════ */
#modal-auth.modal-lang-overlay {
  background: #140634;
  overflow: hidden;
}
#modal-auth::before {
  content: '';
  position: absolute; inset: -20%; z-index: 0;
  background:
    radial-gradient(40% 50% at 18% 22%, rgba(124,58,237,0.6) 0%, transparent 60%),
    radial-gradient(35% 45% at 82% 18%, rgba(6,182,212,0.4) 0%, transparent 60%),
    radial-gradient(45% 55% at 75% 85%, rgba(168,85,247,0.5) 0%, transparent 60%),
    radial-gradient(40% 50% at 22% 88%, rgba(79,70,229,0.45) 0%, transparent 60%);
  filter: blur(30px);
  animation: aurora 18s ease-in-out infinite alternate;
}
#modal-auth .modal-auth-box {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 24px;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 30px 80px -24px rgba(20,6,52,0.85), 0 0 0 1px rgba(124,58,237,0.08);
  animation: modal-pop .4s var(--ease-spring) both;
}
:root.dark #modal-auth .modal-auth-box {
  background: rgba(20,16,38,0.97);
  border-color: rgba(255,255,255,0.08);
}
#modal-auth .modal-lang-logo {
  font-size: 1.7rem;
  background: var(--grad-brand-2);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: .35rem;
}
.auth-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 1.4rem;
}
#modal-auth .modal-auth-box input {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
#modal-auth .auth-submit-btn {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  margin-top: 0.3rem;
}
.auth-lang-switch {
  margin-top: 1rem;
}

/* ════════════════════════════════════════════════════════════
   ✨ IN-APP POLISH — minder "basic", meer premium
   ════════════════════════════════════════════════════════════ */
/* Tab-balk binnen een deck: actieve tab met gradient + gloed */
.mode-tabs { backdrop-filter: blur(6px); }
.mode-tab { transition: background .18s, color .18s, transform .15s var(--ease-spring); }
.mode-tab:active { transform: scale(.96); }
.mode-tab.active {
  background: var(--grad-brand-2);
  box-shadow: 0 4px 16px -4px rgba(124,58,237,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Zachte pagina-overgang bij navigeren */
#app > section:not(.hidden) {
  animation: page-in .32s ease both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Iconen van snelle acties in een merk-tegel */
.quick-action-btn .qa-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,0.14), rgba(6,182,212,0.12));
  font-size: 1.2rem;
}
:root.dark .quick-action-btn .qa-icon {
  background: linear-gradient(135deg, rgba(124,58,237,0.28), rgba(6,182,212,0.18));
}

/* Topbar-titel met subtiel gradient-accent */
.topbar-title { position: relative; }

/* Page-titels (Groepen, Ontdek, etc.) met merk-accentstreep */
.page-title {
  position: relative;
  padding-left: 0.9rem;
}
.page-title::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.4rem; border-radius: 99px;
  background: var(--grad-brand-2);
}

/* Stats-kaarten / lege staten net iets rijker */
.empty-state {
  border-radius: var(--radius);
}
.empty-icon { filter: drop-shadow(0 4px 12px rgba(124,58,237,0.25)); }

/* ── Merk-mark (Spark Card logo) in lockups ──────────────── */
.brand-mark {
  display: inline-block;
  width: 1.5em; height: 1.5em;
  vertical-align: middle;
  flex-shrink: 0;
}
.sidebar-logo .brand-mark { width: 32px; height: 32px; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.3)); }
.landing-logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.landing-logo .brand-mark { width: 30px; height: 30px; }
.modal-lang-logo {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.modal-lang-logo .brand-mark { width: 30px; height: 30px; }
/* logo-icon was een emoji-span; als SVG geen font-size nodig */
.sidebar-logo .logo-icon.brand-mark { font-size: 0; }

/* ── Sidebar overflow: donatieknop altijd zichtbaar ──────── */
.sidebar { overflow: hidden; }
.sidebar-nav { overflow-y: auto; min-height: 0; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 99px; }
.sidebar-footer { flex-shrink: 0; }

