body {
  font-family: 'Playfair Display', serif; /* Default font for the body */
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0 10px;
}

#quiz-container {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  text-align: center;
}

#p5-logo {
  max-width: 100%; /* Responsive logo */
  height: auto;
  margin-bottom: 5px;
}

.title-container {
  text-align: center; /* Central alignment for the title and byline */
  font-family: 'Josefin Sans', sans-serif; /* Ensures font consistency in the container */
}

#quiz h1 {
  font-size: 3rem; /* Larger font size for prominence */
  text-transform: uppercase; /* Ensures uppercase */
  color: blue; /* Sets the color to black for better visibility */
  margin: 20px 0 0 0; /* Adjusts the margin to space out elements */
}

.byline {
  font-size: 1rem; /* Smaller font size for the byline */
  color: gray; /* Matching color to the title for consistency */
  margin-top: -18px; /* Negative margin to bring byline closer to the title */
  display: block; /* Ensures the byline is on a new line */
}

#quiz h2 {
  font-size: 1.2rem;
  font-family: 'Arial', sans-serif; /* Font for questions */
}

#quiz .option {
  background-color: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding-right: 15px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

#quiz .option:hover {
  background-color: #e8e9ea;
}

#quiz input[type="radio"] {
  display: none;
}

#quiz label {
  flex-grow: 1;
  text-align: left;
  padding: 15px 0px 15px 15px;
  margin-left: 10px;
  font-size: 1rem;
  font-weight: normal;
  font-family: 'Arial', sans-serif; /* Font for options */
}

#quiz .icon {
  margin-left: auto;
  font-size: 1.5em;
  display: flex;
  align-items: center;
}

#quiz .option.selected {
  border-color: purple; /* Light purple border for selected options */
  background-color: #f2e5f9; /* Light purple background for selected options */
}

#quiz .option.correct {
  border-color: green; /* Light green border for correct answers */
  background-color: #e6ffe6; /* Light green background for correct answers */
  color: green;
}

#quiz .option.incorrect {
  border-color: red; /* Light red border for incorrect answers */
  background-color: #ffe6e6; /* Light red background for incorrect answers */
  color: red;
}

#submit-btn, #replay-btn {
  background-color: #9b51e0;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-weight: bold;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
  font-family: 'Josefin Sans', sans-serif; /* Font for buttons */
}

#submit-btn:hover, #replay-btn:hover {
  background-color: #8a4cc3;
}

#submit-btn:disabled {
  background-color: #ddd;
  cursor: not-allowed;
}

#progress-bar {
  height: 10px;
  background-color: #4CAF50;
  margin-bottom: 20px;
  border-radius: 5px;
}

#result {
  margin-top: 20px;
  font-size: 1.2em;
  font-family: 'Josefin Sans', sans-serif; /* Font for result */
}

#replay-btn {
  margin-top: 20px;
  font-family: 'Josefin Sans', sans-serif; /* Font for replay button */
}

.rank {
  margin-top: 10px; /* Adjust this value as needed for more or less space */
}

.fail {
  color: red;
}

strong {
  font-weight: bold;

}


/* Media Queries for responsive design */
@media (min-width: 768px) and (max-width: 1024px) {
  #quiz-container {
    width: 70%;
    padding: 30px;
  }

  #quiz h1 {
    font-size: 2.5rem;
  }

  #submit-btn, #replay-btn {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  #quiz-container {
    width: 95%;
    padding: 20px;
  }

  #quiz h1 {
    font-size: 2rem;
  }

  #submit-btn, #replay-btn {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #quiz-container {
    width: 100%;
    padding: 15px;
  }

  #quiz h1 {
    font-size: 1.5rem;
  }

  #submit-btn, #replay-btn {
    font-size: 0.9rem;
  }

  #quiz label {
    font-size: 0.9rem;
  }
}
