:root {
  --primary: #f39c12;
  --secondary: #8e44ad;
  --accent: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --success: #27ae60;
  --wrong: #e74c3c;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(44,62,80,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: var(--dark);
  overflow-x: hidden;
}

/* SCREENS */
.screen { display: none; min-height: 100vh; padding: 20px; }
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* HEADER */
.app-header {
  text-align: center;
  margin-bottom: 32px;
}
.app-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0,0,0,0.4);
  letter-spacing: -1px;
}
.app-title span { color: var(--primary); }
.app-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-top: 8px;
}

/* CARD */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 540px;
}

/* FORM ELEMENTS */
label {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type="text"], select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fafafa;
}
input[type="text"]:focus, select:focus { border-color: var(--primary); background: #fff; }

.form-group { margin-bottom: 20px; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #e67e22);
  color: #fff;
  box-shadow: 0 4px 16px rgba(243,156,18,0.4);
  width: 100%;
  font-size: 1.2rem;
  padding: 16px;
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(243,156,18,0.5); transform: translateY(-1px); }
.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #9b59b6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(142,68,173,0.3);
}

/* THEMEN GRID */
.themen-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}
.thema-card {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.thema-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.thema-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  box-shadow: 0 4px 12px rgba(243,156,18,0.3);
}
.thema-icon { font-size: 1.5rem; margin-bottom: 3px; }
.thema-name { font-weight: 700; color: var(--dark); font-size: 0.65rem; line-height: 1.2; }

/* Validierungsfehler — rote Umrandung */
.validation-fehler { outline: 2px solid #e74c3c !important; border-radius: 10px; }
.validation-fehler input,
input.validation-fehler { border-color: #e74c3c !important; }

/* Themen-Kategorien */
.thema-gruppe {
  margin-bottom: 8px;
}
.thema-gruppe-titel {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 6px;
  padding-left: 2px;
}

/* GRUPPE BUTTONS */
.gruppe-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .gruppe-grid { gap: 3px; }
  .gruppe-btn {
    font-size: 0.52rem;
    aspect-ratio: auto;
    min-height: 64px;
    line-height: 1.2;
  }
  .gruppe-btn .gruppe-icon { font-size: 1.2rem; }
}

/* TEAM-RANGLISTE */
.team-rangliste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.team-card {
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.team-rank {
  font-size: 1.3rem;
  font-weight: 900;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.team-info { flex: 1; min-width: 0; }
.team-name { font-size: 0.8rem; font-weight: 700; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-avg { font-size: 1.4rem; font-weight: 900; }
.team-count { font-size: 0.7rem; opacity: 0.6; }
.team-card-leer { opacity: 0.45; }
.gruppe-btn {
  padding: 6px 2px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  line-height: 1.3;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  hyphens: auto;
  overflow-wrap: break-word;
}
.gruppe-btn .gruppe-icon { font-size: 1.5rem; }
.gruppe-btn:hover { border-color: var(--secondary); transform: translateY(-2px); }
.gruppe-btn.selected {
  border-color: var(--secondary);
  background: linear-gradient(135deg, #f3e5f5, #ede7f6);
  color: var(--secondary);
  box-shadow: 0 4px 12px rgba(142,68,173,0.25);
}

/* QUIZ SCREEN */
#screen-quiz {
  justify-content: flex-start;
  padding-top: 16px;
}
.quiz-header {
  width: 100%;
  max-width: 600px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-meta {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}
.progress-bar-wrap {
  width: 100%;
  max-width: 600px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  height: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #e67e22);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.quiz-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
}
.schwierigkeit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
}
.schwierigkeit.s1 { background: #d4edda; color: #155724; }
.schwierigkeit.s2 { background: #fff3cd; color: #856404; }
.schwierigkeit.s3 { background: #f8d7da; color: #721c24; }

.frage-text {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 24px;
}

.frage-bild {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  max-height: 220px;
  object-fit: cover;
}

/* ANTWORTEN */
.antworten-grid {
  display: grid;
  gap: 12px;
}
.antwort-btn {
  padding: 16px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fafafa;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.antwort-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: #fff8e1;
  transform: translateX(4px);
}
.antwort-btn:focus { outline: none; }
.antwort-btn:focus-visible { outline: none; }
.antwort-btn .antwort-label {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.antwort-btn.richtig {
  border-color: var(--success);
  background: #d4edda;
}
.antwort-btn.richtig .antwort-label { background: var(--success); }
.antwort-btn.falsch {
  border-color: var(--wrong);
  background: #f8d7da;
  opacity: 0.7;
}
.antwort-btn.falsch .antwort-label { background: var(--wrong); }
.antwort-btn:disabled { cursor: not-allowed; }

/* ERKLÄRUNG */
.erklaerung-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-left: 4px solid var(--success);
  display: none;
}
.erklaerung-box.wrong {
  background: linear-gradient(135deg, #fce4ec, #fdecea);
  border-left-color: var(--accent);
}
.erklaerung-box p { font-size: 0.95rem; color: #333; line-height: 1.6; }
.erklaerung-box a {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.9rem;
}
.erklaerung-box a:hover { text-decoration: underline; }

.weiter-btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--dark), #34495e);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: none;
  transition: transform 0.15s;
}
.weiter-btn:hover { transform: translateY(-1px); }

/* LÜCKEN-TYP */
.luecke-wrap {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 2;
}
.luecke {
  display: inline-block;
  min-width: 120px;
  border-bottom: 3px solid var(--primary);
  padding: 0 8px;
  color: var(--primary);
  font-style: italic;
}

/* ERGEBNIS */
.ergebnis-emoji {
  font-size: 5rem;
  text-align: center;
  margin-bottom: 16px;
  animation: bounce 0.6s ease;
}
@keyframes bounce {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.ergebnis-score {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  color: var(--primary);
  margin-bottom: 8px;
}
.ergebnis-text {
  text-align: center;
  color: #555;
  font-size: 1.05rem;
  margin-bottom: 24px;
}
.ergebnis-actions {
  display: grid;
  gap: 12px;
}

/* SCOREBOARD */
#screen-scores {
  justify-content: flex-start;
  padding-top: 20px;
}
.scores-header {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.scores-title {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 900;
}
.back-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.gruppe-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 600px;
  margin-bottom: 16px;
}
.gruppe-tab {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.gruppe-tab.active {
  background: #fff;
  color: var(--dark);
}

.score-list {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.score-item {
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.rank {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  width: 36px;
  text-align: center;
}
.rank.gold { color: #f1c40f; }
.rank.silver { color: #95a5a6; }
.rank.bronze { color: #cd7f32; }
.score-info { flex: 1; }
.score-name { font-weight: 700; font-size: 1rem; color: var(--dark); }
.score-detail { font-size: 0.85rem; color: #888; margin-top: 2px; }
.score-punkte {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--secondary);
}
.score-thema-badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 99px;
  background: #f0e6fa;
  color: var(--secondary);
  font-weight: 700;
}

/* DUELL-ANZEIGE */
.duell-banner {
  width: 100%;
  max-width: 600px;
  background: linear-gradient(135deg, #e67e22, #8e44ad);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #fff;
}
.duell-gruppe {
  flex: 1;
  text-align: center;
}
.duell-gruppe-name { font-size: 0.8rem; opacity: 0.85; font-weight: 600; text-transform: uppercase; }
.duell-avg { font-size: 2rem; font-weight: 900; }
.duell-vs {
  font-size: 1.5rem;
  font-weight: 900;
  opacity: 0.6;
}

/* KONFETTI */
.konfetti {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}
.konfetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: fall linear forwards;
  border-radius: 2px;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ZITAT-KARTE */
.zitat-karte {
  background: linear-gradient(135deg, var(--secondary), #6c3483);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
  max-width: 600px;
}
.zitat-text {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 12px;
}
.zitat-quelle {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 600;
}
.zitat-link {
  color: #f8c291;
  text-decoration: none;
  font-weight: 700;
}
.btn-share {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  width: 100%;
  margin-top: 8px;
}
.btn-share:hover { opacity: 0.9; }
.belohnung-box {
  margin: 20px 0 8px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}
.motiv-text {
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
  opacity: 0.95;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .themen-grid { grid-template-columns: repeat(4, 1fr); }
  .gruppe-grid { grid-template-columns: repeat(5, 1fr); }
  .card { padding: 20px 16px; }
  .quiz-card { padding: 20px 16px; }
}

/* LOADING */
.loading {
  text-align: center;
  color: rgba(255,255,255,0.6);
  padding: 40px;
  font-size: 1.1rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* FOOTER & IMPRESSUM */
.app-footer {
  text-align: center;
  padding: 16px 0 24px;
  margin-top: 8px;
}
.footer-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}
.footer-link:hover { color: rgba(255,255,255,0.7); }

/* ERGEBNIS BADGE & BOOKMARK-HINWEIS */
.ergebnis-badge {
  display: inline-block;
  margin: 4px 0 12px;
  padding: 6px 16px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  box-shadow: 0 3px 10px rgba(243,156,18,0.35);
}
.bookmark-hinweis {
  margin: 8px 0 4px;
  padding: 12px 16px;
  background: rgba(142,68,173,0.08);
  border: 1px dashed #8e44ad;
  border-radius: 12px;
  color: #6c3483;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* STREAK-ANZEIGE */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff7043, #f4511e);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 99px;
  margin-left: auto;
  animation: streakPop 0.3s ease;
}
@keyframes streakPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== ENGAGEMENT & OPTIK-UPGRADE ===== */

/* Sterne auf Themen-Kacheln (Sammeltrieb) */
.thema-sterne {
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: #c8c8c8;
  margin-top: 2px;
}
.thema-sterne .stern-voll { color: #f39c12; }

/* Tages-Streak-Banner auf dem Startscreen */
.streak-banner {
  margin: 14px auto 0;
  padding: 8px 18px;
  max-width: 420px;
  background: linear-gradient(135deg, rgba(255,112,67,0.25), rgba(244,81,30,0.25));
  border: 1px solid rgba(255,112,67,0.5);
  border-radius: 99px;
  color: #ffcbb8;
  font-size: 0.9rem;
}

/* "Fast geschafft"-Box im Ergebnis (Goal-Gradient) */
.ergebnis-next {
  margin: 4px 0 10px;
  font-size: 0.9rem;
  color: #555;
}
.ergebnis-next .fast-geschafft {
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #f39c12;
  border-radius: 10px;
  margin-top: 6px;
}
.ergebnis-next .neue-sterne {
  padding: 10px 14px;
  background: linear-gradient(135deg, #f3e5f5, #ede7f6);
  border-radius: 10px;
  color: #6c3483;
  font-weight: 700;
  animation: streakPop 0.4s ease;
}

/* Eigene Platzierung im Scoreboard */
.dein-platz {
  padding: 12px 16px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(243,156,18,0.25), rgba(230,126,34,0.25));
  border: 1px solid rgba(243,156,18,0.6);
  border-radius: 12px;
  color: #ffe4b8;
  font-size: 0.95rem;
  text-align: center;
}

/* Kartenwechsel-Animation */
.card-enter { animation: cardIn 0.35s ease; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Titel "atmet" dezent */
.app-title { animation: atmen 4s ease-in-out infinite; }
@keyframes atmen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

/* Barrierefreiheit: reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .app-title, .card-enter, .streak-badge, .ergebnis-next .neue-sterne { animation: none !important; }
}

/* Sterne-Legende unter den Themen */
.sterne-legende {
  font-size: 0.7rem;
  color: #999;
  text-align: center;
  margin: 4px 0 2px;
}
.sterne-legende .stern-voll { color: #f39c12; }

/* ===== GAME-DESIGN-PAKET ===== */

/* Konfi-Level-Box */
.level-box {
  margin: 14px auto 0;
  padding: 12px 18px;
  max-width: 420px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  color: #fff;
  text-align: left;
}
.level-zeile {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.level-bar {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}
.level-fill {
  height: 100%;
  background: linear-gradient(90deg, #f39c12, #f1c40f);
  border-radius: 99px;
  transition: width 0.8s ease;
}
.level-hinweis {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 5px;
}

/* Thema des Tages */
.thema-card { position: relative; }
.thema-des-tages {
  border-color: #f1c40f !important;
  animation: tagesPuls 2.5s ease-in-out infinite;
}
@keyframes tagesPuls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241,196,15,0.35); }
  50% { box-shadow: 0 0 10px 3px rgba(241,196,15,0.45); }
}
.tages-ribbon {
  position: absolute;
  top: 2px;
  right: 2px;
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #fff;
  font-size: 0.42rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* Fast fertig: ★★☆ schimmert */
.fast-fertig {
  animation: fastFertigGlow 3s ease-in-out infinite;
}
@keyframes fastFertigGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243,156,18,0); }
  50% { box-shadow: 0 0 8px 2px rgba(243,156,18,0.35); }
}

/* Letzte Frage: goldenes Finale */
.quiz-card.letzte-frage {
  border: 2px solid #f1c40f;
  box-shadow: 0 0 24px rgba(241,196,15,0.35);
}
.letzte-frage-banner {
  display: inline-block;
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
  animation: streakPop 0.4s ease;
}

/* Rekord-Hinweis zu Quizbeginn */
.rekord-hinweis {
  background: #f3e5f5;
  border: 1px solid #8e44ad;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #6c3483;
  margin-bottom: 14px;
}

/* Konfetti-Puff an der Antwort */
.puff-piece {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  animation: puffOut 0.6s ease-out forwards;
}
@keyframes puffOut {
  to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Falsche Antwort: Karte schüttelt kurz den Kopf */
.shake-falsch { animation: shake 0.35s ease; }

/* Serien-Meilenstein-Overlay */
.streak-overlay {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 24px rgba(243,156,18,0.9), 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 1000;
  animation: overlayPop 1.1s ease forwards;
}
@keyframes overlayPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  35% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* Level-Up & Tages-Bonus im Ergebnis */
.ergebnis-next .level-up {
  padding: 10px 14px;
  background: linear-gradient(135deg, #1a6b4a, #27ae60);
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
  animation: streakPop 0.4s ease;
}
.ergebnis-next .tages-bonus {
  padding: 8px 14px;
  background: #fffbea;
  border: 1px dashed #f1c40f;
  border-radius: 10px;
  color: #8a6d00;
  margin-top: 6px;
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .thema-des-tages, .fast-fertig, .streak-overlay, .puff-piece { animation: none !important; }
}

/* ===== PILGERWEG-KARTE ===== */
.ansicht-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.ansicht-btn {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
.ansicht-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  color: #7a5c00;
}

.pilgerweg-panel {
  background: linear-gradient(160deg, #faf3e3, #f2e7cf);
  border: 1px solid #d9c9a8;
  border-radius: 14px;
  max-height: 58vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pilgerweg-panel svg {
  display: block;
  width: 100%;
  height: auto;
}
.pilgerweg-hinweis {
  font-size: 0.7rem;
  color: #999;
  text-align: center;
  margin: 6px 0 2px;
}

.pw-station { cursor: pointer; }
.pw-station .pw-node { transition: fill 0.2s; }
.pw-station:hover .pw-node { fill: #fff8e1; }
.pw-station.selected .pw-node { fill: #fff3cd; }
.pw-station.selected .pw-ring { stroke-width: 5.5; }
.pw-station.pw-fertig .pw-ring {
  filter: drop-shadow(0 0 4px rgba(241,196,15,0.7));
}
.pw-station.pw-fastfertig .pw-ring {
  animation: pwGlow 3s ease-in-out infinite;
}
@keyframes pwGlow {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 5px rgba(243,156,18,0.8)); }
}
.pw-tages { animation: pwTagesPuls 2.5s ease-in-out infinite; }
@keyframes pwTagesPuls {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-tages, .pw-station.pw-fastfertig .pw-ring { animation: none !important; }
}
