body {
  font-family: "Segoe UI", sans-serif;
  background: #f0f4f8;
  margin: 0;
  padding: 20px;
}

.progress-bar {
  background: #ddd;
  border-radius: 5px;
  height: 20px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 20px;
  overflow: hidden;
}

#progress {
  height: 100%;
  background-color: #3498db;
  width: 0%;
  transition: width 0.3s ease-in-out;
}

h2 {
  text-align: center;
  color: #333;
}

.question-container {
  display: none;
  background: white;
  padding: 2rem;
  margin: auto;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 1.25rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.question-container.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.question-number {
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.5rem;
  text-align: center;
}

label {
  display: block;
  margin: 0.4rem 0; /* Tighter spacing */
  cursor: pointer;
  font-size: 1rem;
}

input[type="text"],
input[type="radio"] {
  margin-right: 0.5rem;
}

button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  margin: 1rem 0.5rem 0;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: #2980b9;
}

.question-menu {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.question-menu li {
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.question-menu li.answered {
  background-color: var(--menu-bg-answered);
}

.question-menu li.unanswered {
  background-color: var(--menu-bg-unanswered);
}

.question-menu li:hover {
  background-color: #e0e0e0;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.start-over {
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.start-over:hover {
  background-color: #c0392b;
}

:root {
  --bg-color: #f0f4f8;
  --text-color: #333;
  --card-bg: white;
  --menu-bg-answered: #d1f7c4;
  --menu-bg-unanswered: #ffd6d6;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Toggle switch */
.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
  background: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.theme-toggle:hover {
  background: #2980b9;
}

/* Dark theme overrides */
body.dark {
  --bg-color: #1e1e1e;
  --text-color: #f5f5f5;
  --card-bg: #2a2a2a;
  --menu-bg-answered: #305030;
  --menu-bg-unanswered: #502e2e;
}

@media (max-width: 600px) {
  .question-container {
    padding: 1rem;
    font-size: 1.2rem;
    line-height: 1.5;
  }

  .question-menu {
    gap: 6px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .question-menu li {
    padding: 5px 10px;
    margin: 2px;
  }

  button {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}

