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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  overflow: hidden;
    background: url('back.png');


@keyframes drift {
  to { transform: translate(60px, 60px) rotate(360deg); }
}

/* ── Quiz-Container ────────────────────────────── */
#quiz-app {
  width: min(520px, 92vw);
  position: relative;
}

.card {
  background: rgba(20, 20, 20, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ── Startbildschirm ───────────────────────────── */
#start-screen {
  text-align: center;
}

#start-screen h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#start-screen p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  padding: 14px 48px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(247, 151, 30, 0.4);
}

/* ── Fortschrittsbalken ────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 28px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Fragebereich ──────────────────────────────── */
#quiz-screen .question-counter {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#quiz-screen h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 28px;
  line-height: 1.5;
}

.answer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
}

.answer-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.answer-btn.correct {
  background: rgba(46, 213, 115, 0.25);
  border-color: #2ed573;
  color: #2ed573;
}

.answer-btn.wrong {
  background: rgba(255, 71, 87, 0.25);
  border-color: #ff4757;
  color: #ff4757;
}

.answer-btn.disabled {
  cursor: default;
  opacity: 0.55;
}

/* ── Ergebnisbildschirm ────────────────────────── */
#result-screen {
  text-align: center;
}

.result-emoji {
  font-size: 4rem;
  margin-bottom: 12px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.3); }
}

#result-screen h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

#result-screen .score-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.score-circle {
  width: 140px;
  height: 140px;
  margin: 0 auto 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 700;
  border: 6px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.score-circle .fraction {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 2px;
}

/* ── Bildschirm-Umschalten (Fade) ──────────────── */
.fade-out {
  animation: fadeOut 0.35s forwards;
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.96); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}
