/* --- NEW: Difficulty Selection Screen Styles --- */

#difficultyButtons {
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  align-items: center;     /* Center the stack horizontally */
  gap: 0.75rem;          /* Add space between each button */
}

.quiz-level-button {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 450px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--theme-special);
  background: var(--theme-light);
  color: var(--theme-darker);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.quiz-level-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
  background-color: var(--theme-darker);
  color: var(--theme-light);
}

/* NEW: Container for Character + Emoji */
.quiz-char-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px; /* Ensures consistent width */
  margin-right: 1.5rem;
}

.quiz-char-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--theme-darker);
  background-color: var(--theme-lightest);
  padding: 2px;
  transition: border-color 0.2s ease-in-out;
}

.quiz-level-button:hover .quiz-char-img {
   border-color: var(--theme-lightest);
}

/* NEW: Styling for the emoji span */
.quiz-char-emoji {
  font-size: 1rem;
  line-height: 1;
  margin-top: 4px; /* Space between image and emoji */
  min-height: 1em; /* Reserve space even if empty */
}

.quiz-level-label {
  font-size: 1.5rem;
  font-weight: bold;
  flex-grow: 1; /* Allows the label to fill the remaining space */
  text-align: center;
}

/* Container for the image choices */
#imageChoices {
    display: flex;
    flex-direction: column; /* Stack images vertically */
    align-items: center;    /* Center them horizontally */
    gap: 1rem;              /* Add space between images */
}

/* Individual image styling for vertical layout */
.quiz-choice-image {
    max-width: 90%;      /* Allow images to be wide on mobile */
    width: 500px;        /* Set a max-width for large screens */
    height: auto;
    border: 3px solid var(--theme-dark);
    border-radius: 8px;
    padding: 5px;
    background-color: var(--theme-lightest);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-choice-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* State styling after an answer is given */
.quiz-choice-image.disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-choice-image.disabled:hover {
    transform: none;
    box-shadow: none;
}

.quiz-choice-image.correct {
    border-color: #28a745; /* Green for correct */
    opacity: 1;
    transform: scale(1.05);
}

.quiz-choice-image.incorrect {
    border-color: #dc3545; /* Red for incorrect */
    opacity: 0.5;
}

/* Ensure the audio player is centered and sized appropriately */
#quizAudioPlayer {
    max-width: 500px;
    width: 100%;
}