/* ═══════════════════════════════════════════════════════════════
   Schulquiz – gemeinsame Design-Basis
   Vorbild: Stundenplan-System (plans.php) — Verlaufs-Kopfleiste,
   helle Grünfläche, weiße "schwebende" Listenzeilen.
   Offizielle Systemfarben der Linden-Grundschule Velten.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Nunito';
    src: url('https://www.linden-grundschule-velten.de/wbce_2019/scripte/stundenplan/assets/fonts/nunito/Nunito-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
  --green-dark: #1b5e20;
  --green: #2e7d32;
  --green-mid: #43a047;
  --green-light: #e8f5e9;
  --green-pale: #f1f8e9;
  --text: #1a1a1a;
  --text-grau: #6b7a6c;
  --rot: #c62828;
  --rot-soft: #fdecea;
  --radius: 16px;
  --radius-klein: 10px;
  --schatten: 0 2px 10px rgba(27, 94, 32, 0.10);
  --schatten-hover: 0 4px 16px rgba(27, 94, 32, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--green-pale);
}

/* ── Verlaufs-Kopfleiste (Vorbild: Stundenplan-Header) ────────────── */
.app-header {
  background: linear-gradient(90deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-header-titel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header-titel .icon { font-size: 30px; line-height: 1; }
.app-header-titel h1 { font-size: 19px; font-weight: 800; margin: 0; }
.app-header-titel .sub { font-size: 12px; font-weight: 600; opacity: 0.85; margin-top: 1px; }

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── Seiteninhalt auf hellgrüner Fläche ────────────────────────────── */
.app-inhalt {
  padding: 20px 16px 40px;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Listenzeile (Klassenauswahl etc.) ─────────────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 16px 18px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.list-row:hover {
  box-shadow: var(--schatten-hover);
  transform: translateY(-1px);
}

.list-row .icon { font-size: 20px; }
.list-row .titel { font-weight: 800; color: var(--green-dark); font-size: 16px; }

.list-row .badge {
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
}

.list-row .pfeil {
  margin-left: auto;
  color: var(--green-mid);
  font-size: 15px;
}

/* ── Karte (Frage, Hinweise) ───────────────────────────────────────── */
.quiz-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 20px 20px 16px;
  max-width: 100%;
}

/* Startseiten-Widget: eigener, kompakter Kartenstil mit feinem Rahmen */
.quiz-widget-card {
  border: 1px solid var(--green-dark);
  border-radius: 5px;
  background: #fff;
  box-shadow: var(--schatten);
  max-width: 100%;
  overflow: hidden;
}

.quiz-header-bar {
  background: var(--green-dark);
  color: #fff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-header-bar .quiz-emoji { font-size: 22px; line-height: 1; }
.quiz-header-bar .quiz-titel { font-size: 14px; font-weight: 600; margin: 0; }
.quiz-header-bar .quiz-subtitel { font-size: 12px; font-weight: 700; color: #FFD700; margin: 1px 0 0 0; }

.quiz-body { padding: 14px 16px 14px; }

/* ── Badge (Klasse/Fach) ───────────────────────────────────────────── */
.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ── Frage ─────────────────────────────────────────────────────────── */
.quiz-frage {
  background: var(--green-light);
  border-radius: var(--radius-klein);
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.4;
  color: var(--text);
}

/* ── Antwort-Optionen ─────────────────────────────────────────────── */
.quiz-optionen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {
  .quiz-optionen { grid-template-columns: 1fr; }
}

.quiz-option-btn {
  font-family: inherit;
  font-size: 16px; /* iOS-Zoom-Schutz */
  font-weight: 600;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius-klein);
  background: var(--green-light);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.quiz-option-btn:hover { background: #dcefdd; }
.quiz-option-btn:active { transform: scale(0.98); }

.quiz-option-btn.richtig { background: var(--green-mid); color: #fff; }
.quiz-option-btn.falsch { background: var(--rot-soft); color: var(--rot); }
.quiz-option-btn:disabled { cursor: default; opacity: 0.9; }

/* ── Feedback (Erklärung) — Farbe je nach richtig/falsch ─────────── */
.quiz-feedback {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-klein);
  background: var(--green-light);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: none;
}

.quiz-feedback.sichtbar { display: block; }
.quiz-feedback.richtig { background: var(--green-light); color: var(--green-dark); }
.quiz-feedback.falsch { background: var(--rot-soft); color: var(--rot); }

/* ── Links ─────────────────────────────────────────────────────────── */
.quiz-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
}

.quiz-link:hover { text-decoration: underline; }

/* ── Widget: kompakter Klassen-Wähler ──────────────────────────────── */
.quiz-klassen-pick {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

.quiz-klassen-pick .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-grau);
  margin-right: 3px;
  white-space: nowrap;
}

.quiz-klassen-pick a {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.quiz-klassen-pick a.aktiv { background: var(--green-mid); color: #fff; }

.quiz-widget-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 14px;
}

/* Spacer gegen abgeschnittenen box-shadow im iframe (Fundgrube-Merkzettel Pkt. 4) */
.quiz-iframe-spacer { height: 5px; width: 1px; }