@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e9eff5, #cfd9df);
  padding: 20px;
}

/* Shared hidden class */
.hidden {
  display: none;
}

/* ===== Config & Quiz & Results Containers ===== */
.config-container,
.quiz-container,
.results-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 30px 35px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

/* ===== Titles ===== */
.config-title,
.results-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #2c3e50;
}

.option-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #34495e;
  text-align: left;
}

/* ===== Options Group ===== */
.category-options,
.question-options,
.answer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

/* ===== Buttons ===== */
.category-options button,
.question-options button,
.answer-options button,
.start-quiz-btn,
.next-btn,
.restart-btn {
  flex: 1 1 45%;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3a6073, #3f4c6b);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.category-options button:hover,
.question-options button:hover,
.answer-options button:hover,
.start-quiz-btn:hover,
.next-btn:hover,
.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #4e6e81, #46577a);
}

/* Selected Button Highlight */
.selected {
  background: linear-gradient(135deg, #0f9b8e, #1fc8db) !important;
  box-shadow: 0 0 12px rgba(31,200,219,0.6);
}

/* User selected answer highlight */
.selected-answer {
  background: linear-gradient(135deg, #6dd5ed, #2193b0) !important;
  box-shadow: 0 0 12px rgba(33,147,176,0.6);
}

/* Correct/Wrong Answer Feedback */
.correct {
  background: linear-gradient(135deg, #32cd32, #228b22) !important; /* Lighter green to dark green */
}

.wrong {
  background: linear-gradient(135deg, #ff4500, #b22222) !important; /* Orange-red to darker red */
}

/* Start / Next / Restart Special Buttons */
.start-quiz-btn,
.next-btn,
.restart-btn {
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(135deg, #283e51, #485563);
}

.start-quiz-btn:hover,
.next-btn:hover,
.restart-btn:hover {
  background: linear-gradient(135deg, #324a60, #566677);
}

/* ===== Quiz Question ===== */
.quiz-question {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 25px;
  text-align: left;
}

/* ===== Progress Bar ===== */
.progress-bar {
  height: 10px;
  width: 100%;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 25px;
}
.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, #0f9b8e, #1fc8db);
  border-radius: 8px;
  transition: width 0.4s ease;
}

/* ===== Results ===== */
.results-score {
  font-size: 18px;
  font-weight: 500;
  margin: 20px 0;
  color: #2c3e50;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .category-options button,
  .question-options button,
  .answer-options button {
    flex: 1 1 100%;
  }
}

.review-list {
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.review-item {
  padding: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.review-item h4 {
  margin-bottom: 6px;
  font-size: 16px;
  color: #333;
}

.correct-text {
  color: #2E7D32;
  font-weight: 600;
}

.wrong-text {
  color: #C62828;
  font-weight: 600;
}