@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0b0f1a;
  --surface: #121826;
  --surface-2: #182034;
  --border: #232c40;
  --text: #e7ebf3;
  --muted: #8b95ab;
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --green: #22c55e;
  --red: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
}

h1, h2, h3, .brand {
  font-family: 'Sora', system-ui, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand span {
  color: var(--blue);
  text-shadow: 0 0 18px var(--blue-glow);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-top .brand { display: block; margin-bottom: 32px; padding: 0 8px; }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active { background: var(--surface-2); color: var(--blue); }
.nav-item .lock { font-size: 0.75rem; color: var(--muted); }
.nav-item.locked { color: var(--muted); }

.footer-note {
  padding: 12px 8px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}
.footer-note .db { color: var(--blue); font-weight: 600; }

.main {
  flex: 1;
  padding: 40px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 440px;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

button, .btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
button:hover, .btn:hover { background: #2f6fe0; text-decoration: none; }

.msg { padding: 10px 12px; border-radius: 8px; font-size: 0.88rem; margin-top: 12px; }
.msg.error { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.msg.success { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-top: 20px;
}
.module-pill {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.module-pill.unlocked { border-color: var(--blue); color: var(--blue); }

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.topbar form { margin: 0; }
.topbar button { margin-top: 0; background: transparent; border: 1px solid var(--border); color: var(--muted); }
.topbar button:hover { color: var(--text); background: var(--surface-2); }

/* ---- Lerninhalte (PDFs + Aufgaben) ---- */
.content-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; max-width: 640px; }
.content-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.content-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.content-icon { font-size: 1.4rem; line-height: 1; }
.content-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.content-desc { margin: 0; color: var(--muted); font-size: 0.88rem; }
.question-text { font-weight: 600; margin: 0 0 14px; }
.option-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-size: 0.92rem; }
.option-row:hover { background: var(--surface-2); }
.option-row input { width: auto; margin: 0; }
.option-row.correct { border-color: var(--green); background: rgba(34,197,94,0.08); }
.option-row.wrong { border-color: var(--red); background: rgba(239,68,68,0.08); }

/* ---- Hilfe / FAQ ---- */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 4px 18px; }
.faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.faq-item p { color: var(--muted); margin: 0 0 16px; max-width: 620px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .layout { flex-direction: column; min-height: auto; }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  .sidebar-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 100%;
  }
  .sidebar-top .brand { margin: 0 12px 0 0; padding: 4px 0; }
  .nav-item { padding: 7px 10px; margin-bottom: 0; font-size: 0.85rem; }

  .footer-note {
    width: 100%;
    border-top: none;
    margin-top: 8px;
    padding-top: 8px;
    text-align: center;
  }

  .main { padding: 24px 20px; }
  .auth-wrap { padding: 16px; min-height: auto; }
  .card { width: 100%; }
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 420px) {
  .brand { font-size: 1.15rem; }
  h1 { font-size: 1.4rem; }
  .nav-item { font-size: 0.8rem; padding: 6px 8px; }
  .card { padding: 20px; }
}
