:root {
  --gray: #eee;
  --ok: #4dad45;
  --not-ok: #ec2232;
  --navigation: color-mix(in srgb, var(--gray), black 20%);
}

body {
  font-family: Poppins, sans-serif;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

main {
  width: 100%;
  max-width: 1200px;
  height: auto;
  padding: 15px;
  box-sizing: border-box;
}

.quiz-container {
  box-sizing: border-box;
  background-color: white;
  border-radius: 20px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  width: 100%;
}

.question-answer-wrapper {
  display: flex;
  flex-direction: row;
  column-gap: 5vw;
  min-height: 65vh;
}

.quiz-container .question-wrapper {
  text-align: left;
  color: #000000;
  width: 50%;
}

.question {
  font-size: 2rem;
}

.quiz-container .question-wrapper .questions-counter .max-possible-score {
  font-size: 1rem;
}

.quiz-container .question-wrapper .question {
  padding: 0;
  margin: 0;
}

.quiz-container .answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 50%;
}

.quiz-container .answers button {
  color: black;
  background-color: var(--gray);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 400;
  padding: 10px;
  min-height: 6rem;
  font-family: Poppins;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.quiz-container .answers button.correct {
  background-color: var(--ok);
}

.quiz-container .answers button.incorrect {
  background-color: var(--not-ok);
}

.quiz-container .navigation {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 15px;
}

.navigation p {
  text-align: left;
  padding: 0;
  margin: 0;
}

.quiz-container .navigation .nav-button {
  background-color: var(--navigation);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 400;
  height: 3rem;
  padding: 10px;
  margin: 10px 0 0 0;
  width: 10ch;
  align-self: flex-end;
  display: none;
  border-radius: 5px;
}

.quiz-container .navigation .nav-button.visible {
  display: block;
}

@media (max-width: 768px) {
  .question-answer-wrapper {
    flex-direction: column;
  }

  .quiz-container .question-wrapper {
    width: 100%;
    margin-bottom: 20px;
  }

  .question {
    font-size: 1.5rem;
  }

  .quiz-container .answers {
    width: 100%;
  }

  .quiz-container .answers button {
    font-size: 1.2rem;
    min-height: 4rem;
  }

  .quiz-container .navigation {
    flex-wrap: wrap;
  }

  .quiz-container .navigation .nav-button {
    font-size: 1.2rem;
    height: 2.5rem;
    width: 8ch;
  }
}

@media (max-width: 480px) {
  .quiz-container {
    max-width: 95vw;
    margin: 0 auto;
  }

  .question {
    font-size: 1.5rem;
  }

  .quiz-container .answers button {
    font-size: 1.2rem;
    min-height: 3.5rem;
    padding: 8px;
  }

  .quiz-container .navigation .nav-button {
    font-size: 1.2rem;
    min-width: fit-content;
  }

  .questions-counter {
    font-size: 0.9rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .question-answer-wrapper {
    flex-direction: row;
    min-height: auto;
  }

  .quiz-container .question-wrapper {
    width: 40%;
  }

  .quiz-container .answers {
    width: 60%;
  }

  .question {
    font-size: 1.2rem;
  }
}

@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-wrapper {
  animation: fadeInSlide 0.5s ease-out;
}

@keyframes pulseSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
    background-color: #5ceb52;
  }
  100% {
    transform: scale(1);
  }
}

.quiz-container .answers button.correct {
  background-color: var(--ok);
  animation: pulseSuccess 0.4s ease-out;
}
