/* quiz.css */

/* Reset e fonte divertida */
body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(135deg, #e6f2e6, #b3d9b3);
  margin: 0;
  padding: 0 20px 40px;
  color: #2e4a1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Cabeçalho */
header {
  margin: 20px 0;
  text-align: center;
  position: relative;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 8px;
  color: #4a6b31;
  text-shadow: 2px 2px 6px #a1c490;
  letter-spacing: 1.5px;
  font-weight: 900;
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

/* Animação suave para título */
@keyframes pulseGlow {
  0% {
    text-shadow:
      0 0 6px #a1c490,
      0 0 12px #7fc97f;
  }
  100% {
    text-shadow:
      0 0 14px #90be6d,
      0 0 30px #4a6b31;
  }
}

/* Navegação no header */
header nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

header nav a,
header nav button {
  color: #2e4a1f;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #7fc97f;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px #4a6b31cc;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease,
    border-color 0.3s ease;
  font-size: 1rem;
  user-select: none;
}

header nav a:hover,
header nav button:hover {
  background: #90be6d;
  box-shadow: 0 6px 12px #4a6b31ff;
  transform: scale(1.1);
  border-color: #4a6b31;
}

/* Seção de escolha de nível */
#nivelSelection {
  margin: 30px 0 50px;
  text-align: center;
  width: 100%;
  max-width: 480px;
}

#nivelSelection h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #3b5a20;
  text-shadow: 1px 1px 2px #a1c490;
  letter-spacing: 0.7px;
  font-weight: 800;
}

/* Botões de nível */
#nivelSelection button {
  background: linear-gradient(135deg, #7fc97f, #4a6b31);
  border: none;
  border-radius: 16px;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  margin: 10px 12px;
  padding: 16px 36px;
  cursor: pointer;
  box-shadow:
    0 6px 15px #4a6b31cc,
    inset 0 -3px 8px #7fc97f99;
  transition:
    background-color 0.35s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

#nivelSelection button:hover {
  background: linear-gradient(135deg, #90be6d, #3b5a20);
  box-shadow:
    0 9px 22px #365214ee,
    inset 0 -5px 10px #90be6dcc;
  transform: scale(1.12) rotate(-1deg);
  filter: drop-shadow(0 4px 2px #2c4315aa);
}

/* Área do quiz */
#quizSection {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(135deg, #d5ebd3, #a9d18e);
  border-radius: 22px;
  padding: 30px 40px 40px;
  box-shadow:
    0 12px 24px rgba(74,107,49,0.55),
    inset 0 0 30px #7fc97f77;
  box-sizing: border-box;
  user-select: none;
  font-weight: 600;
  position: relative;
}

/* Scoreboard com Axé e vidas */
.scoreboard {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #3b5a20;
  text-shadow: 1px 1px 2px #a1c490;
  user-select: none;
}

.hearts span {
  font-size: 1.8rem;
  margin-left: 8px;
  filter: drop-shadow(0 1px 0 #7fc97fcc);
  transition: transform 0.3s ease;
}

.hearts span:hover {
  transform: scale(1.4) rotate(-15deg);
  filter: drop-shadow(0 0 5px #f94144);
}

/* Imagem do orixá */
.imagem-container {
  text-align: center;
  margin-bottom: 25px;
  user-select: none;
}

.quiz-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  border: 5px solid #4a6b31;
  box-shadow:
    0 0 20px #6bb768cc,
    inset 0 0 8px #a1c490bb;
  margin-bottom: 8px;
  transition: transform 0.4s ease;
}

.quiz-img:hover {
  transform: scale(1.05) rotate(3deg);
}

#quizOrixaNome {
  font-weight: 900;
  font-size: 2rem;
  color: #2e4a1f;
  text-shadow: 1px 1px 4px #a1c490;
  letter-spacing: 1.4px;
  user-select: none;
}

/* Pergunta */
.question-text {
  font-size: 1.6rem;
  margin-bottom: 28px;
  font-weight: 700;
  min-height: 75px;
  color: #375222;
  text-align: center;
  text-shadow:
    0 1px 2px #7fc97fcc,
    0 0 5px #4a6b31aa;
  user-select: none;
}

/* Lista de opções */
.options {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  user-select: none;
}

.options li {
  background: linear-gradient(135deg, #a8d5a8, #79b779);
  margin-bottom: 16px;
  padding: 18px 24px;
  border-radius: 18px;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 6px 14px #639b46cc,
    inset 0 -3px 8px #a8d5a899;
  transition:
    background-color 0.35s ease,
    transform 0.15s ease,
    box-shadow 0.3s ease;
  user-select: none;
  letter-spacing: 0.9px;
}

.options li:hover {
  background: linear-gradient(135deg, #92c482, #5f934f);
  transform: scale(1.07) translateX(6px);
  box-shadow:
    0 10px 20px #457329cc,
    inset 0 -5px 10px #5f934fcc;
}

/* Estilos para respostas corretas e erradas definidos pelo JS */
.options li.correct {
  background: #90be6d !important;
  box-shadow: 0 6px 15px #4a6b31cc !important;
  cursor: default;
  color: #1a330a;
  font-weight: 900;
  transform: scale(1.05);
}

.options li.wrong {
  background: #f94144 !important;
  box-shadow: 0 6px 15px #a12727cc !important;
  cursor: default;
  color: #3d0000;
  font-weight: 900;
  transform: scale(1.05);
}

/* Botões Próximo e Recomeçar */
.btn-next,
.btn-restart {
  background: linear-gradient(135deg, #4a6b31, #3b5a20);
  border: none;
  border-radius: 16px;
  padding: 14px 36px;
  color: #dcead9;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 8px 18px #3b5a2077,
    inset 0 -4px 10px #6bb768cc;
  transition:
    background-color 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.3s ease;
  display: inline-block;
  margin-top: 15px;
  user-select: none;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.btn-next:hover,
.btn-restart:hover {
  background: linear-gradient(135deg, #6bb768, #4a6b31);
  box-shadow:
    0 12px 28px #4a6b31ff,
    inset 0 -6px 14px #90be6dcc;
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px #7fc97fbb);
}

/* Toast container e mensagens */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast-message {
  background: #4a6b31dd;
  color: #dcead9;
  padding: 14px 28px;
  margin-top: 12px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px #3b5a20cc;
  user-select: none;
  animation: toastFade 3s forwards;
  pointer-events: auto;
}

/* Animação para toast */
@keyframes toastFade {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px);
  }
}

/* Modal Tutorial */
#tutorialModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  user-select: none;
}

#tutorialModal > div {
  background: #d5ebd3;
  padding: 30px 40px;
  border-radius: 24px;
  max-width: 440px;
  color: #2e4a1f;
  box-shadow:
    0 10px 24px rgba(74,107,49,0.75);
  text-align: center;
  font-weight: 600;
  font-size: 1.2rem;
  position: relative;
}

#tutorialModal h2 {
  font-weight: 900;
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px #7fc97f;
  user-select: none;
}

#tutorialModal button {
  margin-top: 30px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #4a6b31, #3b5a20);
  border: none;
  border-radius: 16px;
  color: #dcead9;
  font-weight: 900;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow:
    0 8px 18px #3b5a2077,
    inset 0 -4px 10px #6bb768cc;
  transition:
    background-color 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.3s ease;
  user-select: none;
  letter-spacing: 1.1px;
}

#tutorialModal button:hover {
  background: linear-gradient(135deg, #6bb768, #4a6b31);
  box-shadow:
    0 12px 28px #4a6b31ff,
    inset 0 -6px 14px #90be6dcc;
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px #7fc97fbb);
}

/* Responsividade */
@media (max-width: 600px) {
  body {
    padding: 0 15px 40px;
  }
  header h1 {
    font-size: 2.2rem;
  }
  #nivelSelection h2 {
    font-size: 1.7rem;
  }
  #nivelSelection button {
    font-size: 1.1rem;
    padding: 14px 28px;
    margin: 8px 8px;
  }
  #quizSection {
    padding: 25px 25px 35px;
  }
  .quiz-img {
    width: 110px;
    height: 110px;
  }
  #quizOrixaNome {
    font-size: 1.6rem;
  }
  .question-text {
    font-size: 1.3rem;
    min-height: 65px;
  }
  .options li {
    font-size: 1.1rem;
    padding: 14px 18px;
  }
  .btn-next, .btn-restart {
    font-size: 1.1rem;
    padding: 12px 28px;
  }
}
