/* FONTES */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Inter&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: #fcf5eb;
  color: #4a3b36;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.quiz-header {
  background-color: #e8cfc9;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.quiz-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #5a382c;
  margin: 0 auto;
  text-align: center;
  flex: 1 1 100%;
  padding-right: 80px; /* ADICIONADO: espaço para o botão */
}

/* BOTÃO VOLTAR */
.voltar-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background-color: #f4dfda;
  color: #5a382c;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.voltar-btn:hover {
  background-color: #dfc3bb;
}

/* CONTAINER PRINCIPAL */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-container {
  background: #fffaf5;
  border-radius: 16px;
  padding: 30px 20px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

/* TÍTULO */
.quiz-container h2 {
  font-size: 22px;
  color: #5a382c;
  margin-bottom: 25px;
  font-family: 'Playfair Display', serif;
}

/* PERGUNTAS */
.question {
  margin-bottom: 25px;
  text-align: left;
}
.question p {
  font-weight: 600;
  margin-bottom: 10px;
  color: #5a382c;
}

/* ALTERNATIVAS */
.question label {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #e4cfc0;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.3s ease, border 0.3s ease;
}
.question label:hover {
  background-color: #fcf2eb;
  border-color: #d1b0a3;
}
.question input[type="radio"] {
  margin-right: 12px;
  accent-color: #b6785e;
  transform: scale(1.2);
}

/* BOTÃO CTA */
.cta-btn {
  padding: 14px;
  background-color: #b6785e;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease, transform 0.2s ease;
}
.cta-btn:hover {
  background-color: #a4664b;
  transform: translateY(-2px);
}

/* RESULTADO */
.result {
  display: none;
  margin-top: 30px;
  background-color: #f0e0d8;
  padding: 20px;
  border-radius: 10px;
  animation: fadeIn 0.6s ease forwards;
  font-size: 16px;
  text-align: left;
  color: #4a3b36;
}
.result a {
  display: inline-block;
  margin-top: 20px;
  background-color: #25D366;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}
.result .voltar {
  background-color: #7a4e3b;
  margin-left: 10px;
}
.result .voltar:hover {
  background-color: #5a382c;
}

/* ANIMAÇÃO */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RODAPÉ */
.quiz-footer {
  background-color: #e8cfc9;
  padding: 16px;
  text-align: center;
  font-size: 0.9rem;
  color: #5a382c;
  flex-shrink: 0;
}

/* MOBILE: AJUSTES */
@media (max-width: 500px) {
  .quiz-container {
    padding: 24px 16px;
  }

  .quiz-header h1 {
    font-size: 18px;
  }

  .cta-btn {
    font-size: 15px;
    padding: 12px;
  }

  .question label {
    flex-direction: row;
    align-items: flex-start;
  }
}
