/* Reset default styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  padding: 20px;
  color: #333;
}

/* Common container styling */
.container {
  max-width: 600px;
  margin: auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: none;
}

/* Display start screen initially */
#start-screen {
  display: block;
}

h1, h2, h3 {
  text-align: center;
  margin-bottom: 20px;
}

/* Select dropdown and button styles */
select, button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Timer styling */
#timer {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Progress bar container */
#progress-container {
  background-color: #eee;
  border-radius: 10px;
  height: 16px;
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}

/* Progress bar fill */
#progress-bar {
  background-color: #007bff;
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px 0 0 10px;
}

/* Pagination text */
#pagination {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 16px;
  color: #555;
}

/* Option buttons */
#options-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#options-box button {
  background-color: #f0f0f0;
  color: #000;
  border: 1px solid #ccc;
  text-align: left;
  transition: all 0.2s ease;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

#options-box button:hover:not(:disabled) {
  background-color: #d0e6ff;
}

/* Correct / wrong option colors */
.correct {
  background-color: #4caf50 !important;
  color: #fff !important;
  border-color: #388e3c !important;
}

.wrong {
  background-color: #f44336 !important;
  color: #fff !important;
  border-color: #c62828 !important;
}

/* Leaderboard */
#leaderboard {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

#leaderboard li {
  background-color: #e9f5e9;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
}

/* Reattempt and Reset buttons */
#result-screen button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

#reset-score-btn {
  background-color: #dc3545;
  border: none;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#reset-score-btn:hover {
  background-color: #a71d2a;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  .container {
    padding: 20px;
  }

  select, button {
    font-size: 14px;
    padding: 10px;
  }

  #timer {
    font-size: 16px;
  }
}
