:root {
  --primary-color: #0077cc;
  --secondary-color: #005fa3;
  --text-color: #333;
  --light-gray: #f4f7f9;
  --white: #ffffff;
  --error-color: #e74c3c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--light-gray);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
header {
  background: var(--primary-color);
  color: var(--white);
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

.mobile-menu-btn {
  display: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Quiz Container */
#quiz-container {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
  margin: 30px auto;
  max-width: 800px;
}

#quiz-container h1 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

#user-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

#user-info input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

#user-info input:focus {
  outline: none;
  border-color: var(--primary-color);
}

#startBtn, #submitBtn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
  width: 100%;
}

#startBtn:hover, #submitBtn:hover {
  background: var(--secondary-color);
}

#rules {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
}

#rules h2 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

#rules ul {
  padding-left: 20px;
}

#rules li {
  margin-bottom: 8px;
}

/* Quiz Questions */
#quiz {
  display: none;
}

.question-box {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.question-box p {
  font-weight: 600;
  margin-bottom: 10px;
}

.question-box label {
  display: block;
  padding: 8px 0;
  cursor: pointer;
}

.question-box input[type="radio"] {
  margin-right: 10px;
}

/* Timer */
#timer {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin: 15px 0;
  color: var(--primary-color);
}

/* Results */
#result {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 5px;
  display: none;
}

#result h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

#result p {
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 30px 0 15px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-section h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--white);
  text-decoration: none;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: var(--white);
  font-size: 20px;
}

.copyright {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    z-index: 100;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-content {
    flex-direction: column;
  }

  #quiz-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  #quiz-container {
    margin: 15px auto;
    padding: 15px;
  }
}
.options-list {
  list-style-type: none;
  padding-left: 0;
}

.options-list li {
  padding: 5px 10px;
  margin-bottom: 4px;
  border-radius: 4px;
}

.options-list li.correct {
  background-color: #d4edda; /* light green */
  color: #155724;
  font-weight: bold;
}
/* Improved question box with padding, border, and shadow */
.question-box {
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 8px rgba(0, 119, 204, 0.1);
}

/* Question text */
.question-box > p {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

/* Option label styled as a box */
.option-label {
  display: block;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
  background-color: #f9faff;
  transition: background-color 0.3s, border-color 0.3s;
}

/* Hover effect on option */
.option-label:hover {
  background-color: #e6f2ff;
  border-color: var(--primary-color);
}

/* Radio input with accent color and spacing */
.option-label input[type="radio"] {
  margin-right: 12px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

/* Highlight text when option checked */
.option-label input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--secondary-color);
}

/* Span inline for option text */
.option-label span {
  vertical-align: middle;
}

.options-list li.wrong {
  background-color: #f8d7da; /* light red */
  color: #721c24;
  font-weight: bold;
}
