/* California LifeV – Neon Glass UI */
:root {
  --bg0: #070a16;
  --bg1: #0b1020;
  --bg2: #0d1326;
  --text: #eaf0ff;
  --muted: #a8b2d6;
  --accent1: #4c8bff; /* electric blue */
  --accent2: #8a2be2; /* electric violet */
  --accent3: #00d1ff; /* neon cyan */
  --panel: rgba(16,22,40,0.6);
  --border: rgba(120,160,255,0.25);
  --shadow: rgba(0,0,0,.45);
  --glow: rgba(76,139,255,.55);
}
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  background: radial-gradient(120% 100% at 80% 0%, #0f1631 0%, var(--bg1) 45%, var(--bg0) 100%) fixed;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Fira Sans", "Helvetica Neue", Arial, sans-serif;
}
body::before {
  content: ""; position: fixed; inset: -30vh -30vw;
  background: conic-gradient(from 220deg, rgba(255,60,172,.12), rgba(43,134,197,.06), rgba(120,75,160,.10), rgba(0,209,255,.07));
  filter: blur(60px); opacity: .65; pointer-events: none;
  animation: drift 18s linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  50%  { transform: translate3d(6vw,-4vh,0) rotate(180deg); }
  100% { transform: translate3d(0,0,0) rotate(360deg); }
}

/* Header / Hero */
.site-header { display: flex; align-items: center; gap: 20px; padding: 32px 28px; }
.logo { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 8px 25px var(--glow)); }
.titles h1 {
  margin: 0; font-size: 2.1rem; line-height: 1.2;
  background: linear-gradient(120deg, var(--accent1), var(--accent3) 35%, var(--accent2) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 12px rgba(0,209,255,.25);
}
.subtitle { margin: .25rem 0 0; color: var(--muted); }

/* Top Navigation */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; gap: 18px; padding: 12px 24px;
  background: linear-gradient(180deg, rgba(15,22,40,.65) 0%, rgba(11,17,33,.55) 100%);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.top-nav a {
  color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: .2px;
  padding: 8px 12px; border-radius: 12px; transition: all .25s ease;
}
.top-nav a:hover {
  color: #fff; background: linear-gradient(120deg, rgba(76,139,255,.20), rgba(0,209,255,.20));
  box-shadow: 0 8px 18px rgba(76,139,255,.25), inset 0 0 12px rgba(0,209,255,.35);
}

/* Layout */
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 20px 24px 40px; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* Sidebar */
.sidebar {
  position: sticky; top: 88px; align-self: start;
  background: linear-gradient(180deg, var(--panel), rgba(14,22,38,.45));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 18px; box-shadow: 0 20px 45px var(--shadow);
}
.sidebar h2 { margin: 0 0 10px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list a {
  color: var(--muted); text-decoration: none;
  border-left: 2px solid transparent; padding: 8px 10px; display: block; border-radius: 10px;
  transition: all .25s ease;
}
.toc-list a:hover { color: #fff; border-left-color: var(--accent3); background: rgba(76,139,255,.12); }
.toc-list a.active { color: #fff; border-left-color: var(--accent1); background: rgba(138,43,226,.18); }

/* Content Cards */
.content h2 { margin: 0 0 16px; font-size: 1.8rem; }
.rule-card {
  position: relative; margin: 16px 0; padding: 20px 18px;
  border-radius: 18px; background: linear-gradient(180deg, rgba(18,28,48,.75), rgba(12,20,36,.55));
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px) saturate(140%);
  transform: translateY(10px); opacity: 0;
}
.rule-card.in-view { transform: translateY(0); opacity: 1; transition: transform .5s ease, opacity .5s ease; }
.rule-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(76,139,255,.25), rgba(0,209,255,.15), rgba(138,43,226,.25));
  filter: blur(12px); opacity: .35; pointer-events: none;
}
button { position: relative; overflow: hidden; border: 1.5px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06)); color: var(--text); padding: 12px 16px; border-radius: 12px; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
button::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 120px at var(--mx,50%) var(--my,0%), rgba(0,209,255,.25), transparent 40%); pointer-events: none; }
button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px var(--shadow); border-color: rgba(255,255,255,.22); }
button.secondary { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.08); }

/* Quiz styles */
.quiz-meta { display: grid; gap: 10px; margin-top: 8px; }
.quiz-meta input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: var(--text); }
.quiz-actions { display: flex; gap: 10px; margin-top: 12px; }
.quiz-progress { margin: 8px 0 18px; opacity: .9; }
.quiz-field { border: 1px dashed rgba(255,255,255,.06); padding: 12px 12px 6px; border-radius: 12px; margin: 10px 0 14px; }
.quiz-field legend { padding: 0 6px; font-weight: 700; }
.choice { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; padding: 8px 10px; border-radius: 10px; transition: background .2s ease; }
.choice:hover { background: rgba(255,255,255,.04); }
.choice input[type="radio"] { margin-top: 4px; }

/* Page-spezifisch: Regelwerkabfrage */
.page-quiz .layout { grid-template-columns: 520px 1fr; }
@media (max-width: 1200px) { .page-quiz .layout { grid-template-columns: 480px 1fr; } }
@media (max-width: 980px) { .page-quiz .layout { grid-template-columns: 1fr; } }
.page-quiz .sidebar .rule-card.section-head { min-height: 340px; padding: 36px 28px; }
.page-quiz .section-title { font-size: 2.8rem; line-height: 1.15; letter-spacing: .3px; text-transform: none; hyphens: auto; overflow-wrap: anywhere; word-break: break-word; }
.page-quiz .quiz-progress { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(76,139,255,.12); border: 1px solid var(--border); }
.page-quiz .quiz-field legend { font-size: 1rem; }
.page-quiz .choice input[type="radio"]:checked + span { color: #fff; text-shadow: 0 0 12px rgba(0,209,255,.35); }
.page-quiz .result-banner { margin: 8px 0 12px; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.page-quiz .result-banner.passed { background: rgba(0,209,255,.18); border: 1px solid rgba(0,209,255,.35); box-shadow: 0 0 20px rgba(0,209,255,.25); }
.page-quiz .result-banner.failed { background: rgba(255,99,132,.18); border: 1px solid rgba(255,99,132,.35); box-shadow: 0 0 20px rgba(255,99,132,.25); }

.rule-card h3 { margin: 0 0 10px; font-size: 1.2rem; text-shadow: 0 6px 18px rgba(0,209,255,.25); }

/* Prominent section heads */
.rule-card.section-head { padding: 28px 22px; border-width: 1.5px; box-shadow: 0 30px 70px var(--shadow), inset 0 1px 0 rgba(255,255,255,.06); }
.rule-card.section-head::before { opacity: .6; filter: blur(16px); }
.section-title {
  margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  background: linear-gradient(120deg, var(--accent1), var(--accent3) 35%, var(--accent2) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 24px rgba(76,139,255,.35), 0 0 10px rgba(0,209,255,.35);
}
.section-title::after {
  content: ""; display: block; height: 2px; margin-top: 8px;
  background: linear-gradient(90deg, rgba(76,139,255,.9), rgba(0,209,255,.5), rgba(138,43,226,.8));
  border-radius: 999px; box-shadow: 0 0 14px rgba(76,139,255,.55);
}

.rule-card p { color: var(--text); opacity: .92; }

/* Footer */
.site-footer {
  margin-top: 24px; padding: 24px; color: var(--muted); text-align: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10,16,30,.65), rgba(8,12,22,.55));
}