/* Globale stijlen */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  color: #1c1b22;
  background-color: #3b2e8c;
  background-image: linear-gradient(
    to bottom,
    #231c54,
    #292062,
    #2f256f,
    #35297e,
    #3b2e8c
  );
  background-repeat: no-repeat;
}

/* App-container */
.app {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: rgba(0, 0, 0, 0.16) 0 3px 6px, rgba(0, 0, 0, 0.23) 0 3px 6px;
}

/* Koppen en tekst */
h1 {
  text-align: center;
}
.score-board {
  background-color: #e8e8e9;
  border-radius: 0.25rem;
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  margin: 1rem 0;
  border: 1px solid #bbbbbd;
  color: #52525e;
}

.score,
.highscore {
  margin: 0;
  font-size: 0.875rem;
}
.highscore-container,
.score-container {
  margin: 0;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.motivational-message {
  margin: 1rem 0;
  text-align: center;
  font-size: 1.5rem;
}

/* Emoji's */
.emoji {
  font-family: 'Noto Color Emoji', sans-serif;
}
.emoji-small {
  font-size: 0.75rem;
}

button .emoji {
  margin-left: 0.5rem;
  font-size: 1rem;
}

/* Selectie-elementen */
.select-language,
.select-list,
.select-direction,
.select-set-size {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
}
.select-language select,
.select-list select,
.select-direction select,
.select-set-size select {
  width: 45%;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #bbbbbd;
  padding: 0.25rem 1rem 0.25rem 0.5rem;
  background-color: #e8e8e9;
}

.select-language {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #bbbbbd;
}

.select-list select:disabled,
.select-direction select:disabled,
.select-set-size select:disabled {
  opacity: 0.5;
}
/* Knoppen */
.btn {
  border: none;
  border-radius: 0.25rem;
  font-family: 'Nunito', sans-serif;
  transition: 300ms ease-in-out;
  cursor: pointer;
}

button.start-btn,
button.back-btn {
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

button.start-btn {
  background-color: #2aa4bf;
  color: #fff;
}

button.start-btn:hover {
  background-color: #55b6cc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
button.start-btn:disabled {
  background-color: #bfe4ec;
  box-shadow: none;

  cursor: not-allowed;
}

button.back-btn {
  color: #444;
  background-color: #dddddd;
  order: 2;
  margin-left: auto;
  font-size: 0.875rem;
}

button.back-btn:hover {
  background-color: #c7c7c7;
  box-shadow: rgba(0, 0, 0, 0.12) 0 1px 3px, rgba(0, 0, 0, 0.24) 0 1px 2px;
}
.select-method-buttons {
  margin: 2rem 0;
  display: flex;
  gap: 0.5rem;
  justify-content: stretch;
}

.training-method-btn {
  flex: 1;
  padding: 3rem 1rem;
  border-radius: 0.5rem;
  background-color: #d8d4f3;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.training-method-btn:hover {
  background: #c5bfed;
}
.btn.training-method-btn:disabled {
  opacity: 0.5;
  filter: grayscale(0.65);
  cursor: not-allowed;
}
.training-method-btn .emoji {
  font-size: 2rem;
  margin: 0;
  height: 2rem;
  display: flex;
  width: 2rem;
  align-items: center;
  justify-content: center;
}
.training-method-btn .btn-txt {
  font-weight: 800;
  font-size: 1.25rem;
}
/* saved sessions */
.saved-sessions-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.375rem;
  border: 1px solid;
  border-radius: 0.25rem;
  border: 1px solid #bbbbbd;
  background: #e8e8e9;
}

.saved-sessions-list li {
  display: flex;
  gap: 1rem;
  /* justify-content: space-between; */
  border-radius: 0.25rem;
  border: 1px solid #bbbbbd;
  background-color: #fff;
}

.saved-sessions-list li:hover {
  background-color: #f4f4f4;
}

.session-game-type {
  height: 36px;
  width: 35px;
  min-width: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d8d4f3;
  border-right: 1px solid #bbbbbd;
}

.saved-sessions-list li:hover .session-game-type {
  background-color: #c5bfed;
}

.session-control-btn-container {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem 0.25rem;
  margin-left: auto;
}
.session-control-btn-container .continue-btn {
  background-color: #2aa4bf;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border: 1px solid #139895;
}
.session-control-btn-container .continue-btn:hover {
  background-color: #55b6cc;
}

.session-control-btn-container .delete-btn {
  background-color: #da3d5a;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border: 1px solid #a93046;
}

.session-control-btn-container .delete-btn:hover {
  background-color: #f35774;
}

.session-description {
  font-weight: 500;
  color: #52525e;
  font-size: 0.9rem;
  display: inline-block;
  line-height: 36px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Controle-elementen */
.controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

/* Quiz-container */
.quiz-container {
  margin-top: 1.5rem;
}

.question-container {
  display: none;
}

.question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin: 1.5rem 0;
}

.what-is {
  font-size: 1.25rem;
  font-weight: 700;
  color: #77767a;
  text-align: center;
}
.word {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f24464;
  text-align: center;
}

/* Opties */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  border-radius: 0.25rem;
  justify-content: space-between;
  padding: 0.75rem;
  margin: 1rem 0;
  border: 1px solid #bbbbbd;
  background-color: #e8e8e9;
}

.options button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  height: 6rem;
  background-color: #fff;
  color: #2694ac;
  font-size: 1.125rem;
  font-weight: 800;
  border: 1px solid #2694ac;
  border-radius: 0.25rem;
  cursor: pointer;
  text-indent: -1rem;
  transition: 200ms ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.options button i {
  margin-right: 10px;
  width: 12px;
  position: relative;
  left: -1rem;
}

.options button:hover:not(:disabled) {
  background-color: #2694ac;
  color: #fff;
  border: 1px solid #2694ac;
}

/* Na een klik zijn alle antwoorden uitgeschakeld */
.options button:disabled {
  cursor: default;
  pointer-events: none;
  color: #2694ac;
  background-color: #fff;
  opacity: 0.6;
}

/* Kleurindicaties voor antwoorden */
.options button.correct,
.options button.correct:disabled {
  background-color: #16aba7;
  border-color: #16aba7;
  color: #fff;
  opacity: 1;
}

.options button.correct i,
.options button.wrong i {
  color: #fff;
}

.options button.wrong,
.options button.wrong:disabled {
  background-color: #da3d5a;
  border-color: #da3d5a;
  color: #fff;
  opacity: 1;
}

.options button.correct-answer,
.options button.correct-answer:disabled {
  background-color: #fff;
  border: 2px solid #16aba7;
  color: #16aba7;
  opacity: 1;
}

.options button.correct-answer i {
  color: #16aba7;
  visibility: visible;
}

/* Hulpklassen voor tekst die eerst inline gestyled werd */
.word-highlight {
  color: #f24464;
}

.info-highlight {
  color: #2f2570;
}

.score-good {
  color: #16aba7;
}

.score-bad {
  color: #da3d5a;
}

.progress-bar,
.level-progress-bar,
.set-progress-bar {
  transition: width 300ms ease-in-out;
}

/* Voortgangsbalken */
.progress,
.set-progress,
.level-progress {
  width: 100%;
  height: 0.5rem;
  background-color: #eeeeef;
  margin: 0.125rem 0 0.5rem;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-bar,
.set-progress-bar,
.level-progress-bar {
  width: 0;
  height: 100%;
  background-color: #18beba;
}

/* Adjust level progress bar within the score board */
.flashcard-score-board {
  text-align: center;
}
.flashcard-score-board .level-progress {
  margin: 0.5rem 0; /* Adjust margins as needed */
}

.flashcard-score-board .level-progress-info {
  margin-bottom: 0.5rem;
}
/* Resultaten en feedback */
.result {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.125rem;
}

.feedback {
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
}
.flashcard-game-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.flashcard {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  height: 20rem;
  background-color: #d4eaee;
  color: #2694ac;
  font-size: 1.125rem;
  font-weight: 800;
  border-radius: 0.25rem;
  transition: 200ms ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  flex-direction: column;
  gap: 1rem;
}
.flashcard-question {
  margin-top: 1.5rem;
}
.flashcard-feedback {
  height: 24px;
  min-height: 24px;
  font-weight: 600;
  color: #fff;
}

.flashcard-feedback strong {
  font-weight: 800;
}
.flashcard-answer-input {
  width: 100%;
  border: 1px solid #2694ac;
  border-radius: 0.25rem;
  padding: 0.5rem;
  font-family: 'Nunito', sans-serif;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
}
.flashcard-answer-input::placeholder {
  text-align: center;
  color: #8aa9b0;
}
.flashcard-btn {
  background-color: #2aa4bf;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  visibility: visible;
}

.special-char-toolbar {
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  margin: 0;
}
.special-char-btn {
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #77767a;
  border: 2px solid #77767a;
  border-radius: 0.5rem;
}

.flashcard .input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flashcard.incorrect-answer {
  background-color: #e98b9c;
}

.flashcard.correct-answer .flashcard-feedback,
.flashcard.incorrect-answer .flashcard-feedback {
  display: block;
}

.flashcard.correct-answer .flashcard-question .what-is,
.flashcard.incorrect-answer .flashcard-question .what-is,
.flashcard.correct-answer .flashcard-feedback,
.flashcard.incorrect-answer .flashcard-feedback {
  color: #fff;
}

.flashcard.correct-answer .word-highlight,
.flashcard.incorrect-answer .word-highlight {
  color: #fff;
}
.incorrect-answer .flashcard-answer-input {
  border-color: #da3d5a;
  color: #da3d5a;
  background-color: #f8d8de;
}

.flashcard.correct-answer .flashcard-btn,
.flashcard.incorrect-answer .flashcard-btn {
  visibility: hidden;
}

.flashcard.correct-answer {
  background-color: #73cdca;
}
.flashcard.correct-answer .flashcard-answer-input {
  background-color: #b9e6e5;
  color: #45bcb9;
  border-color: #45bcb9;
}

.flashcard-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* =========================================================
   Responsive: tablets en kleiner
   ========================================================= */
img,
svg {
  max-width: 100%;
}

@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  body {
    /* top | left & right | bottom */
    padding: 2rem 2rem 0.5rem;
    justify-content: flex-start;
  }

  .app {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    border-radius: 0.375rem;
  }

  h1 {
    font-size: 1.5rem;
    margin: 0.25rem 0 1rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .motivational-message {
    font-size: 1.25rem;
    margin: 0.75rem 0;
  }

  /* Selecties onder elkaar */
  .select-language,
  .select-list,
  .select-direction,
  .select-set-size {
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    font-size: 1rem;
  }

  .select-language select,
  .select-list select,
  .select-direction select,
  .select-set-size select {
    width: 100%;
    min-height: 2.75rem;
    font-size: 1rem;
  }

  /* Startknoppen onder elkaar */
  .select-method-buttons {
    flex-direction: column;
    margin: 1.25rem 0;
  }

  .training-method-btn {
    padding: 1.25rem 1rem;
    justify-content: center;
  }

  .training-method-btn .btn-txt {
    font-size: 1.125rem;
  }

  /* Opgeslagen sessies */
  .saved-sessions-list li {
    flex-wrap: wrap;
    gap: 0;
  }

  .session-description {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0.5rem;
    font-size: 0.85rem;
  }

  .session-control-btn-container {
    flex: 1 0 100%;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e2;
    padding: 0.375rem;
  }

  .session-control-btn-container .continue-btn,
  .session-control-btn-container .delete-btn {
    min-width: 3rem;
    min-height: 2.25rem;
  }

  /* Controls onder elkaar, volle breedte */
  .controls {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .controls button,
  button.back-btn {
    width: 100%;
    margin-left: 0;
    min-height: 2.75rem;
  }

  button.back-btn {
    order: 3;
  }

  /* Quiz */
  .quiz-container,
  .flashcard-game-container {
    margin-top: 1rem;
  }

  .what-is {
    font-size: 1rem;
  }

  .word {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .question {
    margin: 1rem 0;
  }

  .options {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .options button {
    height: auto;
    min-height: 3.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  /* Flashcards */
  .flashcard {
    height: auto;
    min-height: 16rem;
    padding: 1rem;
  }

  .flashcard-question {
    margin-top: 0.5rem;
    text-align: center;
  }

  .flashcard .input-wrapper,
  .flashcard-answer-input {
    width: 100%;
  }

  .flashcard-answer-input {
    min-height: 2.75rem;
    /* 16px voorkomt automatisch inzoomen op iOS */
    font-size: 16px;
  }

  .flashcard-feedback {
    height: auto;
    min-height: 24px;
    text-align: center;
  }

  .flashcard-btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .special-char-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
    gap: 0.375rem;
  }

  .special-char-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  /* Score en voortgang */
  .score-board {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.75rem;
  }

  .score-container,
  .progress-info,
  .level-progress-info,
  .result {
    font-size: 0.9375rem;
  }

  .progress,
  .set-progress,
  .level-progress {
    height: 0.625rem;
  }
}

/* Zeer smalle schermen */
@media (max-width: 360px) {
  html {
    font-size: 14px;
  }

  .app {
    padding: 0.75rem;
  }
}

/* Minder beweging indien gewenst */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
