.voice-quiz-container {
  max-width: 500px;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  padding: 1.5rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.voice-quiz-container p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 0;
}

.voice-quiz-container input[type="text"],
.voice-quiz-container input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Important */
}

.voice-quiz-container button {
  width: 100%;
  padding: 0.85rem;
  margin: 0.25rem 0;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  background-color: #004080;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.1s ease;
  text-align: left;
  padding-left: 1rem;
}

.voice-quiz-container button:hover {
  background-color: #003060;
}

.voice-quiz-container button:active {
    transform: scale(0.99);
}

#quiz-feedback {
  margin-top: 1rem;
  border-radius: 6px;
  text-align: center; /* Centers the loader */
}

/* --- CHANGED SECTION START --- */
/* These styles apply to the entire colored box (success or error) */
#quiz-feedback .success,
#quiz-feedback .error {
    padding: 1rem;
    text-align: left; /* Align text left within the box */
}

#quiz-feedback .success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

#quiz-feedback .error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Style for paragraphs inside the feedback boxes */
#quiz-feedback .success p,
#quiz-feedback .error p {
    margin-top: 0;
    margin-bottom: 0.75rem;
}
#quiz-feedback .success p:last-child,
#quiz-feedback .error p:last-child {
    margin-bottom: 0;
}

/* Style for the link inside the success box */
#quiz-feedback .success a {
    color: #0f5132;
    font-weight: bold;
}
/* --- CHANGED SECTION END --- */


/* Loader animation */
.loader {
  border: 5px solid #f3f3f3;
  border-radius: 50%;
  border-top: 5px solid #004080;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}