body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 20px;
  background: #f5f6fa;
  color: #2f3640;
  scroll-behavior: smooth;
}

header h1 {
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
  color: #273c75;
}

#menu-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f5f6fa;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

#menu-bar button {
  background-color: #40739e;
  border: none;
  padding: 12px 18px;
  color: white;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-height: 44px;
}

#menu-bar button:hover {
  background-color: #273c75;
}

/* Toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 180px;
  user-select: none;
  font-weight: 600;
  color: #273c75;
  padding-left: 10px;
  line-height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 160px;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
  height: 22px;
  width: 40px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #40739e;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

main {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.1);
}

#test-info {
  margin-bottom: 20px;
  text-align: center;
}

#score-container,
#pass-fail-status {
  font-size: 1.2em;
  font-weight: 700;
}

#pass-fail-status.pass {
  color: #44bd32;
}

#pass-fail-status.fail {
  color: #e84118;
}

#domain-performance-container ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 8px;
}

#domain-performance-container li {
  margin-bottom: 5px;
  font-weight: 600;
  color: #273c75;
}

#questions-container {
  margin-bottom: 20px;
}

.question-block {
  margin-bottom: 30px;
  border-bottom: 1px solid #dcdde1;
  padding-bottom: 20px;
}

.question-header h2 {
  margin-bottom: 6px;
  color: #273c75;
}

.question-header p {
  font-style: italic;
  color: #718093;
  margin-bottom: 14px;
}

.question-text {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: #2f3640;
}

.choices-list {
  list-style: none;
  padding-left: 0;
}

.choices-list li {
  margin-bottom: 12px;
  min-height: 44px;
}

.choices-list input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.feedback-area p {
  margin: 5px 0;
}

.correct {
  color: #44bd32;
  font-weight: 700;
}

.incorrect {
  color: #e84118;
  font-weight: 700;
}

.correct-answer {
  color: #273c75;
  font-style: italic;
}

footer {
  text-align: center;
  margin-top: 40px;
  color: #718093;
  font-size: 0.9em;
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
    margin: 10px;
    padding: 0;
  }

  main {
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
  }

  header h1 {
    font-size: 1.25rem;
  }

  #menu-bar {
    flex-direction: column;
    gap: 10px;
  }

  button {
    width: 100%;
    font-size: 1rem;
  }
}
