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

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.screen {
  width: 100%;
  max-width: 560px;
  animation: fadeIn 0.3s ease;
}

.screen.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 36px 32px;
  color: #f1f1f1;
}

/* Start Screen */
#startScreen .card {
  text-align: center;
}

#startScreen h1 {
  font-size: 1.9rem;
  margin-bottom: 10px;
  color: #fff;
}

#startScreen p {
  color: rgba(255,255,255,0.5);
  margin-bottom: 28px;
}

.btn-primary {
  padding: 13px 36px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: #9c59ff; }
.btn-primary:active { transform: scale(0.97); }

/* Quiz Header */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  padding: 0 2px;
}

#timer { font-weight: 700; color: #a78bfa; }
#timer.urgent { color: #f87171; animation: pulse 0.6s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Progress Bar */
.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  background: #7c3aed;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Question */
#questionText {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 22px;
  color: #fff;
}

#optionsList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  padding: 13px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.95rem;
  color: #e2e8f0;
  user-select: none;
}

.option:hover:not(.disabled) {
  background: rgba(124,58,237,0.3);
  border-color: #7c3aed;
}

.option.correct {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
  color: #bbf7d0;
}

.option.wrong {
  background: rgba(239,68,68,0.2);
  border-color: #ef4444;
  color: #fecaca;
}

.option.disabled { cursor: default; }

/* Result Screen */
.result-card { text-align: center; }

.result-emoji { font-size: 4rem; margin-bottom: 12px; }

.result-card h2 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 8px;
}

.result-card > p {
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 28px;
}

.result-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-stats span {
  font-size: 2rem;
  font-weight: 700;
  color: #a78bfa;
}

.result-stats small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
