/* =============================================
   QUIZ.CSS — Premium Dark Theme
   ============================================= */

.quiz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

/* ---- Header ---- */
.quiz-header {
  background: var(--bg-page);
  border-bottom: 1px solid var(--bg-border);
  padding: 1rem var(--spacing-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.quiz-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.quiz-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.quiz-logo span { color: var(--gold); }

/* ---- Fortschrittsbalken ---- */
.progress-wrap { flex: 1; max-width: 340px; }

.progress-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-align: right;
}

.progress-bar {
  height: 3px;
  background: var(--bg-border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 100px;
  transition: width 0.45s ease;
}

/* ---- Quiz-Bühne ---- */
.quiz-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-sm);
}

/* ---- Frage-Card ---- */
.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 660px;
  animation: slideIn 0.35s ease forwards;
}

.question-card.slide-out {
  animation: slideOut 0.22s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-20px); }
}

@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.question-card.slide-in-back {
  animation: slideInBack 0.35s ease forwards;
}

.question-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.question-text {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1.75rem;
}

/* ---- Antwort-Optionen ---- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.option-btn:hover {
  border-color: var(--gold-dark);
  background: var(--gold-subtle);
  color: var(--text-primary);
}

.option-btn.is-selected {
  border-color: var(--gold);
  background: var(--gold-subtle);
  color: var(--gold-light);
}

/* ---- Navigation ---- */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn--back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
  font-family: var(--font-body);
  transition: color 0.18s;
  letter-spacing: 0.02em;
}
.btn--back:hover { color: var(--text-secondary); }
.btn--back:disabled { opacity: 0; pointer-events: none; }

/* ---- Lade-Bildschirm ---- */
.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  min-height: 55vh;
  text-align: center;
}

.quiz-loading h2 { font-size: 1.35rem; color: var(--text-primary); }
.quiz-loading p  { color: var(--text-secondary); max-width: 300px; font-size: 0.9rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .question-card { padding: 1.25rem; }

  .quiz-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .progress-wrap { max-width: 100%; width: 100%; }

  .question-text { font-size: 1.05rem; margin-bottom: 1.25rem; }

  .option-btn {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    /* Mindest-Touch-Target 44px */
    min-height: 44px;
  }

  .btn--back {
    /* Mindest-Touch-Target 44px */
    min-height: 44px;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .question-nav {
    gap: 0.75rem;
  }

  .quiz-stage {
    padding: var(--spacing-md) var(--spacing-sm);
    align-items: flex-start;
  }
}
