/* ===== CSS VARIABLES ===== */
:root {
  --bg: #0f0f13;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --bg-sidebar: #13131f;
  --text: #e0e0e0;
  --text-muted: #888;
  --text-dim: #555;
  --border: #2a2a3e;

  --scheikunde: #ff6b35;
  --scheikunde-dark: #cc4e1e;
  --economie: #4facfe;
  --natuurkunde: #43e97b;

  --correct: #43e97b;
  --wrong: #f44336;
  --warning: #ffa726;
  --xp: #ffd700;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text); }

/* ===== LANDING PAGE ===== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.landing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.landing-header .tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.subject-card.scheikunde::before { background: var(--scheikunde); }
.subject-card.economie::before  { background: var(--economie); }
.subject-card.natuurkunde::before { background: var(--natuurkunde); }

.subject-card.active {
  cursor: pointer;
  border-color: rgba(255,107,53,0.3);
}

.subject-card.active:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(255,107,53,0.6);
}

.subject-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-progress {
  background: var(--border);
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.card-progress-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.card-progress-bar.scheikunde { background: var(--scheikunde); }

.card-progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.locked-badge {
  display: inline-block;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  margin-top: 0.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--scheikunde);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 99px;
  margin-top: 1rem;
  transition: background var(--transition), transform var(--transition);
}

.cta-btn:hover { background: var(--scheikunde-dark); transform: scale(1.02); }

/* ===== UTILITY ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(255,215,0,0.15);
  color: var(--xp);
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.chip.correct { background: rgba(67,233,123,0.15); color: var(--correct); }
.chip.wrong   { background: rgba(244,67,54,0.15);  color: var(--wrong); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .subject-grid { grid-template-columns: 1fr; }
  .landing { padding: 1.5rem; }
}
