* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a2e;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Quiz card */
.quiz-container {
  background: #16213e;
  border-radius: 16px;
  padding: 40px;
  max-width: 650px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

/* Results card */
.results-container {
  display: none;
  background: #16213e;
  border-radius: 16px;
  padding: 50px 40px;
  max-width: 650px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

.results-container h2 {
  color: #e94560;
  font-size: 2rem;
  margin-bottom: 20px;
}

.final-score {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.score-message {
  color: #aaa;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Progress bar */
.progress {
  color: #e94560;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* Score display */
.score-display {
  color: #4CAF50;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

/* Question text */
.question {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 28px;
  line-height: 1.5;
  min-height: 60px;
}

/* Options container */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

/* Option buttons */
.option-btn {
  background: #0f3460;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.option-btn:hover:not(:disabled) {
  background: #1a4a7a;
  border-color: #e94560;
  transform: translateX(6px);
}

.option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

/* Correct / Incorrect styles */
.option-btn.correct {
  background: #4CAF50;
  border-color: #4CAF50;
  color: #fff;
}

.option-btn.incorrect {
  background: #f44336;
  border-color: #f44336;
  color: #fff;
}

/* Next button */
.btn-next {
  display: none;
  width: 100%;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.btn-next:hover {
  background: #c73652;
  transform: scale(1.02);
}

/* Restart button */
.btn-restart {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.btn-restart:hover {
  background: #c73652;
  transform: scale(1.05);
}

/* Fade animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slide transition for questions */
.quiz-container.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.quiz-container.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Responsive */
@media (max-width: 500px) {
  .quiz-container,
  .results-container {
    padding: 24px 18px;
  }
  .question {
    font-size: 1.1rem;
  }
}
