/* Universele basisstijl */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hamburger menu */
.menu-button {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

nav.menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: #444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

nav.menu.hidden {
  display: none;
}

nav.menu ul {
  list-style: none;
}

nav.menu ul li {
  margin: 0.5rem 0;
}

nav.menu a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

/* Application container */
#app {
  width: 100%;
  max-width: 600px;
  margin: 4rem auto;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Stijl voor selecties (categorie, taal, onderwerp, lijst) */
.selection-container {
  /* Minder ruimte boven de lijsten en categorieën om het compacter te maken */
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.selection-container button {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.1s, transform 0.1s;
  /* Ensure high contrast text on a light background */
  color: #000;
}

.selection-container button:hover {
  background-color: #f0f0f0;
}

.selection-container button.active {
  background-color: #0070f3;
  color: #fff;
  border-color: #0070f3;
}

/* Knoppen voor instellingenpagina */
.settings-section {
  margin-top: 1rem;
}

.settings-section p {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.settings-button {
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
  /* Use dark text on light settings buttons for readability */
  color: #000;
}

.settings-button:hover {
  background-color: #f0f0f0;
}

.settings-button.active {
  background-color: #0070f3;
  color: #fff;
  border-color: #0070f3;
}

/* Form and buttons defaults */
button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  margin-top: 1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #666;
}

/* Quiz styles */
.question-container {
  margin-top: 2rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.option-button {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1rem;
  text-align: left;
  background-color: #fafafa;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #333;
  transition: background-color 0.3s, transform 0.2s;
  width: 100%;
}

.option-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.option-button:focus {
  outline: none;
  border-color: #0070f3;
  box-shadow: 0 0 5px rgba(0, 112, 243, 0.5);
}

/* Feedback colours */
.correct {
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.incorrect {
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* Hidden utility class */
.hidden {
  display: none;
}

/* Quiz header styling */
.quiz-header {
  margin-bottom: 1rem;
}
.quiz-header .app-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.quiz-header .list-title {
  font-size: 1.1rem;
  font-weight: normal;
  margin-bottom: 0.25rem;
}
.quiz-header .progress-score {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* Larger input for free entry questions */
.free-input {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Buttons used for revealing answers and self evaluation */
.reveal-button,
.self-eval-button {
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
  color: #000;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}
.reveal-button:hover,
.self-eval-button:hover {
  background-color: #f0f0f0;
}
.reveal-button:disabled,
.self-eval-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Next button styling (leverages default button styles but adds margin) */
.next-button {
  margin-top: 1rem;
}

/* Category button style (for backward compatibility) */
.category-button {
  margin: 5px;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.category-button:hover {
  background-color: #45a049;
}

/*
 * Custom styles to improve the selection page layout.  The start page now
 * groups each level of selection (category, language, topic, list) into
 * a labelled section, makes the topic and list containers scrollable,
 * and reduces the padding of buttons inside those scrollable lists.  In
 * addition, multiple choice answers display the audio button to the right
 * of each answer instead of below it.
 */

/* Wrapper for a selection group, containing a label and its button list */
.selection-group {
  /* Reduce spacing between groups even verder */
  margin-top: 0.25rem;
}

/* Remove the default top margin from selection containers within groups so
   labels sit closer to their button lists */
.selection-group > .selection-container {
  margin-top: 0;
}

/* Styling for labels above each selection container */
.selection-group p {
  font-weight: bold;
  /* Keep labels close to their button lists */
  margin-bottom: 0.15rem;
}

/* Make the topic and list containers scrollable with a max height so about
   ten options are visible without overwhelming the page.  Using a column
   layout ensures each button appears on its own line. */
.topic-container,
.list-container {
  display: flex;
  flex-direction: column;
  /* Ensure items are in a single column without wrapping */
  flex-wrap: nowrap;
  /* Tighter spacing between items */
  gap: 0.01rem;
  max-height: 18rem;
  overflow-y: auto;
}

/* Reduce padding on topic and list buttons to make them more compact while
   retaining the original font size for readability */
.topic-container button,
.list-container button {
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
  /* Align text to the left instead of centered */
  text-align: left;
}

/* Layout for answer and audio button on quiz page: align them horizontally */
.option-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Allow the answer button to grow and take up remaining space in the row */
.option-wrapper .option-button {
  flex-grow: 1;
}

/* Style the audio button so it does not look like a large primary button */
.audio-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  /* Zorg dat de audio-knop geen extra marges heeft die een nieuwe regel forceren */
  margin-top: 0;
  margin-left: 0.5rem;
}

.audio-button:hover {
  opacity: 0.7;
}

/* Wrapper voor het weergegeven woord en de audio-knop naast elkaar */
.question-audio-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Wrapper voor het getoonde antwoord en de audio-knop naast elkaar */
.answer-audio-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}