/* ================================================================
   ABITUR CHECKLISTEN 2026 – Stylesheet
   Apple-like Design · Anthrazit #1c1c1e · Navy Blue · Weiß
   (Anthrazit entspricht hier Apples systemnahem Dunkelton #1c1c1e)
   ================================================================ */

/* ── CSS-Variablen ─────────────────────────────────────────────── */
:root {
  /* Abstände & Radien */
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-pill: 9999px;

  /* Basis-Farben */
  --color-bg:         #f5f5f7;   /* Apple off-white */
  --color-card:       #ffffff;
  --color-text:       #1d1d1f;   /* Apple anthracite text */
  --color-muted:      #6e6e73;   /* Apple secondary label */
  --color-border:     rgba(0, 0, 0, 0.07);

  /* Schatten */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.09);

  /* Aktives Fach – wird per JS überschrieben */
  --subject-color:  #1d3461;   /* Navy Blue als Fallback */
  --subject-accent: #2563eb;
  --subject-bg:     #eef2fb;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ── Layout ─────────────────────────────────────────────────────── */
.wrap {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.header-inner {
  padding-top: 24px;
  padding-bottom: 20px;
}

.content-area {
  padding-top: 32px;
  padding-bottom: 96px;
}

.footer-note {
  text-align: center;
  font-size: 12px;
  color: #86868b;
  margin-top: 40px;
}

/* ── Basis ──────────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 3px solid var(--subject-color);
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1), border-color 0.3s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 8px;
}

.site-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.subtitle {
  font-size: 13px;
  color: #86868b;
  margin-top: 6px;
}

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tab {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
}

.tab:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.tab:active {
  transform: scale(0.95);
}

.tab.active {
  background: var(--tab-color, var(--subject-color));
  border-color: var(--tab-color, var(--subject-color));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ── Hero-Karte ─────────────────────────────────────────────────── */
.hero {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border-top: 4px solid var(--subject-color);
  margin-bottom: 28px;
  transition: border-color 0.3s ease, box-shadow 0.25s ease, transform 0.22s ease;
}

.hero:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.hero h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--subject-color);
  transition: color 0.3s ease;
}

.muted {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 5px;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.btn {
  border: 1.5px solid var(--subject-color);
  color: var(--subject-color);
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
}

.btn:hover {
  background: var(--subject-color);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

/* ── Progress-Ring ──────────────────────────────────────────────── */
.progressRing {
  width: 80px;
  height: 80px;
  position: relative;
  flex-shrink: 0;
}

.progressRing svg {
  width: 80px;
  height: 80px;
  display: block;
}

.progressText {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--subject-color);
  transition: color 0.3s ease;
}

/* ── Quartal-Bereich ────────────────────────────────────────────── */
.quarter {
  margin-top: 28px;
}

.quarterHead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quarterBadge {
  background: var(--subject-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 12px;
  min-width: 50px;
  text-align: center;
  letter-spacing: 0.04em;
  transition: background 0.3s ease;
}

.quarterBar {
  flex: 1;
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.quarterBarFill {
  height: 100%;
  width: 0%;
  background: var(--subject-color);
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(.4, 0, .2, 1), background 0.3s ease;
}

.quarterMeta {
  width: 56px;
  text-align: right;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ── Abschnitt-Karten ───────────────────────────────────────────── */
.section {
  background: var(--subject-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.22s ease, transform 0.18s ease;
}

.section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.sectionHeader {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
}

.sectionHeader:hover {
  background: rgba(0, 0, 0, 0.025);
}

.sectionHeader.done {
  background: var(--subject-bg);
}

.arrow {
  width: 16px;
  flex-shrink: 0;
  color: #aeaeb2;
  font-size: 11px;
  line-height: 1;
}

.sectionTitle {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text);
}

.pill {
  font-size: 11px;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  background: rgba(0, 0, 0, 0.07);
  color: var(--color-muted);
  font-weight: 600;
}

.sectionHeader.done .pill {
  background: var(--subject-color);
  color: #fff;
}

/* ── Themen-Liste ───────────────────────────────────────────────── */
.topics {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 6px 0 12px;
}

.topic {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 18px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.topic:hover {
  background: rgba(0, 0, 0, 0.018);
}

.topic.checked {
  background: var(--subject-bg);
  border-left-color: var(--subject-color);
}

.topic input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--subject-color);
  cursor: pointer;
}

.topicText {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  transition: color 0.12s ease;
}

.topic.checked .topicText {
  color: #aeaeb2;
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.18);
}

/* ── LK-Badge ───────────────────────────────────────────────────── */
.lkTag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 5px;
  color: #fff;
  background: var(--subject-color);
  vertical-align: middle;
  transition: background 0.3s ease;
}

/* ── GK-Badge ───────────────────────────────────────────────────── */
.gkTag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 5px;
  color: var(--subject-color);
  background: transparent;
  border: 1.5px solid var(--subject-color);
  vertical-align: middle;
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* ── Mini-Buttons ───────────────────────────────────────────────── */
.sectionTools {
  padding: 4px 18px 2px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.miniBtn {
  border: 1.5px solid var(--subject-color);
  background: transparent;
  color: var(--subject-color);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
}

.miniBtn:hover {
  background: var(--subject-color);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.miniBtn:active {
  transform: scale(0.96);
  box-shadow: none;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .site-header h1 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 11px;
  }

  /* Horizontally scrollable tab row */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 2px;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .tab {
    font-size: 12px;
    padding: 7px 12px;
    flex-shrink: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }

  .hero h2 {
    font-size: 20px;
  }

  .progressRing {
    margin: 0 auto;
  }

  .actions {
    gap: 6px;
  }

  .btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .quarterHead {
    flex-wrap: wrap;
  }

  .quarterMeta {
    width: auto;
  }

  /* Bigger touch targets */
  .topic {
    padding: 11px 16px;
    min-height: 44px;
  }

  .sectionHeader {
    padding: 14px 16px;
    min-height: 44px;
  }

  .level-selector {
    flex-wrap: wrap;
  }
}

/* ── Fade-in animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

#app.initial-load .hero {
  animation: fadeInUp 0.45s cubic-bezier(.4, 0, .2, 1) both;
}

#app.initial-load .quarter {
  animation: fadeInUp 0.45s cubic-bezier(.4, 0, .2, 1) 0.07s both;
}

/* ── Level-Selector ─────────────────────────────────────────────── */
.level-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.level-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.level-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.level-btn {
  border: none;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
}

.level-btn:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

.level-btn:active {
  transform: scale(0.94);
}

.level-btn.active {
  background: var(--subject-color);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: rgba(28, 28, 30, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-inner {
  padding-top: 32px;
  padding-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.disclaimer {
  font-size: 13px;
  color: #86868b;
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto;
}

.disclaimer strong {
  color: #a1a1aa;
}

.credits {
  font-size: 13px;
  color: #636366;
}

.credits strong {
  color: #8e8e93;
}

.footer-sub {
  font-size: 11px;
  color: #3a3a3c;
}

.footer-sub a {
  color: #636366;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-sub a:hover {
  color: #8e8e93;
}
