:root {
  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: #fff;
  --primary: #2563eb;
  --primary-fg: #fff;
  --primary-soft: #eff6ff;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.theme-dark {
  --bg: #0f172a;
  --fg: #f8fafc;
  --muted: #94a3b8;
  --border: #334155;
  --card: #1e293b;
  --primary: #3b82f6;
  --primary-fg: #fff;
  --primary-soft: #1e3a5f;
  --accent: #2dd4bf;
  --accent-soft: #134e4a;
}
* { box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--fg); margin: 0; min-height: 100vh; }
.main { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 0.25rem; letter-spacing: -0.02em; }
.page-header .page-subtitle { color: var(--muted); font-size: 1rem; margin: 0; }
.section-title { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.75rem; letter-spacing: -0.01em; }
.section-title:first-child { margin-top: 0; }
.nav { border-bottom: 1px solid var(--border); background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nav-logo { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav-level-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  max-width: 220px;
  min-width: 140px;
}
.nav-level-text { font-size: 0.8rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.nav-xp-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.nav-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.nav-xp-text { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 700px) {
  .nav-level-bar { max-width: 160px; }
  .nav-xp-text { display: none; }
}
.nav-right { display: flex; align-items: center; flex-wrap: wrap; }
.nav a, .nav .nav-theme { color: var(--fg); text-decoration: none; margin-left: 0.75rem; font-size: 0.95rem; font-weight: 500; }
.nav a:hover, .nav .nav-theme:hover { color: var(--primary); }
.nav .btn-primary { padding: 0.4rem 0.9rem; border-radius: 0.5rem; background: var(--primary); color: var(--primary-fg); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; margin: 0.5rem 0; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.2s ease; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.theme-dark .card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.card-highlight { border-color: var(--primary); background: var(--primary-soft); }
.theme-dark .card-highlight { background: var(--primary-soft); }
.card-success { border-color: var(--accent); background: var(--accent-soft); }
.theme-dark .card-success { background: var(--accent-soft); }
.card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-list .card a { color: inherit; text-decoration: none; display: block; }
.card-list .card a:hover { text-decoration: none; }
.card-clickable { cursor: pointer; }
.card-clickable a:hover { color: var(--primary); }
.form-card { max-width: 28rem; }
.form-card label { display: block; margin: 0.75rem 0; font-weight: 500; }
.form-card input, .form-card textarea, .form-card select { width: 100%; padding: 0.5rem 0.75rem; margin-top: 0.25rem; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--card); color: var(--fg); }
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none; font-weight: 500; margin-right: 0.5rem; margin-top: 0.5rem; border: 1px solid transparent; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-outline:hover { background: var(--border); }
.text-danger { color: #dc2626; }
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); margin-bottom: 1.5rem; }
.actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.error { color: #dc2626; margin: 0.5rem 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.stat { font-size: 1.5rem; font-weight: 700; margin: 0.25rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.stats-grid .card { padding: 1.25rem; text-align: center; }
.stats-grid .stat { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stats-grid .muted { font-size: 0.875rem; margin-bottom: 0.25rem; }
.form-card .form-card-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; }
.form-card input:focus, .form-card textarea:focus, .form-card select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.footer { border-top: 1px solid var(--border); padding: 1.5rem 1rem; text-align: center; font-size: 0.9rem; color: var(--muted); margin-top: 2rem; }
.footer a { color: var(--primary); font-weight: 500; }
.practice-main { text-align: center; padding: 2rem; }
.flashcard-wrapper { max-width: 32rem; margin: 1rem auto; min-height: 280px; perspective: 1000px; cursor: pointer; }
.flashcard-inner { position: relative; width: 100%; height: 280px; transition: transform 0.5s; transform-style: preserve-3d; }
.flashcard-inner.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border: 2px solid var(--border); border-radius: 0.75rem; padding: 1.5rem; display: flex; align-items: center; justify-content: center; background: var(--card); }
.flashcard-back { background: var(--muted); transform: rotateY(180deg); }
.flashcard-front p, .flashcard-back p { margin: 0; font-size: 1.125rem; text-align: center; white-space: pre-wrap; }
.practice-actions { display: flex; gap: 1rem; justify-content: center; margin: 1.5rem 0; }
.practice-actions button { padding: 0.5rem 1rem; border-radius: 0.5rem; border: 1px solid var(--border); background: var(--card); color: var(--fg); cursor: pointer; }
.practice-actions button:first-of-type { margin-right: 0.5rem; }
.practice-actions button:nth-child(2) { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

/* ===== Landingpagina ===== */
.landing { max-width: 100%; padding: 0; }
.landing-hero {
  position: relative;
  text-align: center;
  padding: 5rem 1.5rem 5.5rem;
  background: linear-gradient(165deg, var(--primary-soft) 0%, var(--bg) 45%, var(--bg) 100%);
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.theme-dark .landing-hero::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
}
.landing-hero .landing-actions { position: relative; z-index: 1; }
.landing-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--card);
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.landing-title {
  position: relative;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
}
.landing-tagline {
  position: relative;
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.65;
  font-weight: 500;
}
.landing-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-large {
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-large:hover { transform: translateY(-1px); }
.btn-primary.btn-large { box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); }
.btn-primary.btn-large:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }

.landing-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.landing-section-alt {
  background: var(--card);
  box-shadow: 0 1px 0 var(--border);
}
.landing-section-title {
  font-size: 1.85rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.landing-section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 26rem;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
  font-size: 1.05rem;
}
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.landing-feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.landing-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.theme-dark .landing-feature:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.25); }
.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: var(--primary-soft);
  color: var(--primary);
}
.landing-feature h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.5rem; }
.landing-feature p { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 800px) {
  .landing-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .landing-steps { grid-template-columns: 1fr; }
}
.landing-step {
  position: relative;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg);
  border-radius: 1rem;
  border: 1px solid var(--border);
}
.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: var(--primary-fg);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.landing-step h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.4rem; }
.landing-step p { margin: 0; font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

.landing-cta {
  text-align: center;
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--primary-soft) 100%);
  border-radius: 0 0 1.5rem 1.5rem;
}
.landing-cta-text {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.landing-cta-small { margin-top: 1.25rem; font-size: 0.95rem; color: var(--muted); }
.landing-cta-small a { color: var(--primary); font-weight: 600; }

/* ===== Errorpagina's ===== */
.error-page { max-width: 100%; padding: 0; min-height: calc(100vh - 8rem); display: flex; align-items: center; justify-content: center; }
.error-hero {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  max-width: 36rem;
  margin: 0 auto;
}
.error-code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 0.5rem;
  letter-spacing: -0.04em;
  color: var(--primary);
  opacity: 0.9;
}
.error-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.error-message {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 2rem;
}
.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.error-actions .btn-large {
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}
