/* ======= RESET GERAL ======= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

/* ======= CONTAINER DO QUIZ ======= */
.quiz-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 100%;
  max-width: 600px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
}

#start {
  padding: 12px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
  margin-top: 10px;
}

#start:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

#result {
  margin-top: 20px;
  font-size: 1.1rem;
  color: #333;
}

/* ======= MODAL ======= */
.modal {
  text-align: center;
  /* Mantenha o display: none aqui para o estado inicial */
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  
  /* Essas duas linhas precisam de "display: flex" para funcionar */
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  text-align: center;
  animation: fadeIn 0.3s ease;
  position: relative;
}

/* animação suave */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ======= BOTÃO DE FECHAR ======= */
.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #333;
}

/* ======= OPÇÕES ======= */
.option {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  background-color: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s, transform 0.2s;
}

.option:hover {
  background-color: #e2e6ea;
  transform: scale(1.02);
}

/* ======= BOTÃO PRÓXIMA ======= */
#next {
  padding: 10px 20px;
  margin-top: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

#next:hover {
  background-color: #0056b3;
}

#progress {
  margin-top: 15px;
  font-size: 0.95rem;
  color: #333;
}

/* ======= GARANTE CENTRALIZAÇÃO AO FECHAR ======= */
#modal {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

/* Reforça o alinhamento do botão */
.quiz-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#question-image {
  text-align: center;
  margin: 15px 0;
}

#question-image img {
  max-width: 80%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#next {
  display: block;
  margin: 15px auto 0 auto;
}

.restart-btn {
  padding: 12px 20px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 15px;
}

.restart-btn:hover {
  background-color: #218838;
}
