@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =====================================================
   CONFIGURAÇÕES GERAIS
===================================================== */
body {
  font-family: 'Poppins', sans-serif;

}

section.quiz {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 2px solid rgb(61, 35, 100);
  border-radius: 12px;
  height: 80vh;
  position: relative;
  transition: opacity 0.5s ease;

}

section.resultado .resultado-mensagem,
section.resultado .resultado-casa {
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  justify-content: center !important;
  align-items: center !important;

}

.processo {
  width: 85%;
  height: 12px;
  background: #e7d9ff;
  border-radius: 20px;
  overflow: hidden;
  margin: 20px auto;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9b79c9, #b998f0);
  border-radius: 20px;
  transition: width 0.4s ease-in-out;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9b79c9, #b998f0);
  border-radius: 20px;
  transition: width 0.4s ease-in-out;
}


.main-header {
  width: 100%;
  background-color: #3D2364;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.header-inner {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo {
  height: 100px;
  object-fit: contain;
  user-select: none;
}


/* ESTILO ESPECIAL PARA H1 DAS PARTES INICIAIS DO QUIZ */
section#questao-1 h1,
section#quiz-intro h1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Centraliza o texto */
  padding: 20px 15px;
  width: 90%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin:0 auto;
  /* Centraliza */
  font-size: 26px;
  line-height: 1.4;
  background: rgba(61, 35, 100, 0.07);
  /* Fundo suave */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  animation: fadeInDown 0.8s ease;
  color: rgb(61, 35, 100);

}


.main-header {
  width: 100%;
  background-color: #3D2364;
  padding: 20px 0;
  /* 🔹 estava errado antes */
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo {
  height: 100px;
  object-fit: contain;
}

/* -----------------------------------------------------
   4️⃣ SEÇÃO DO QUIZ
----------------------------------------------------- */
section.quiz {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 2px solid rgb(61, 35, 100);
  border-radius: 12px;
  height: 80vh;
  position: relative;
  transition: opacity 0.5s ease;
}

/* -----------------------------------------------------
   5️⃣ TÍTULOS GERAIS DO QUIZ
----------------------------------------------------- */
h1,
h3 {
  text-align: center;
  margin-bottom: 20px;
  color: rgb(61, 35, 100);
}

/* Título principal */
h1 {
  font-size: 26px;
  font-weight: 600;
}

/* Subtítulo */
h3 {
  font-size: 22px;
  font-weight: 500;
}

/* -----------------------------------------------------
   6️⃣ TÍTULOS QUE RECEBEM EFEITO DE MAGIA
----------------------------------------------------- */
.title-magic {
  position: relative;
  font-weight: 600;
}

.title-magic::after {
  content: "";
  position: absolute;
  width: 150%;
  height: 120%;
  top: -10%;
  left: -25%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 70%);
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    transform: translateX(-150%);
  }

  50% {
    transform: translateX(0) translateY(-10%);
  }

  100% {
    transform: translateX(150%);
  }
}

/* -----------------------------------------------------
   8️⃣ ALTERNATIVAS DO QUIZ
----------------------------------------------------- */
.alternativas {
  width: 100%;
  margin-top: 10%;
  display: grid;
  grid-template-columns: repeat(3, 15%);
  grid-template-rows: repeat(2, 1fr);
  gap: 5%;
  justify-content: center;
}

/* -----------------------------------------------------
   9️⃣ BOTÕES
----------------------------------------------------- */
.botao1,
.botao-continuar,
.btn-reiniciar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgb(61, 35, 100);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

.botao1:hover,
.botao-continuar:hover,
.btn-reiniciar:hover {
  background-color: rgb(248, 151, 42);
  color: black;
  transform: scale(1.05);
}

/* -----------------------------------------------------
   🔟 TELA FINAL DO RESULTADO
----------------------------------------------------- */
section.resultado {
  display: none;
  text-align: center;
  padding: 30px;
  border: 2px solid rgb(61, 35, 100);
  border-radius: 12px;
}

.resultado-casa,
.resultado-mensagem {
  font-size: 18px;
}

/* -----------------------------------------------------
   1️⃣1️⃣ RESPONSIVIDADE (CELULAR)
----------------------------------------------------- */
@media (max-width: 768px) {
  section.quiz {
    width: 95%;
    height: auto;
  }

  h1 {
    font-size: 22px;
  }

  .alternativas {
    grid-template-columns: repeat(2, 45%);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  .alternativas {
    grid-template-columns: 100%;
  }
}

/* Responsividade para celulares */
@media (max-width: 768px) {

  section#questao-1 h1,
  section#quiz-intro h1 {
    font-size: 20px;
    padding: 15px;
  }
}

/* Animação de entrada suave */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   HEADERS E TEXTOS
===================================================== */
h1,
h3 {
  text-align: center;
  margin-bottom: 20px;
  color: rgb(61, 35, 100);
}

h1 {
  font-size: 26px;
  text-align: justify;
  font-weight: 600;
}

h3 {
  font-size: 22px;
  font-weight: 500;
}

/* =====================================================
   ALTERNATIVAS
===================================================== */
.alternativas {
  width: 100%;
  margin-top: 10%;
  display: grid;
  grid-template-columns: repeat(3, 15%);
  grid-template-rows: repeat(2, 1fr);
  gap: 5%;
  justify-content: center;
}

@media (max-width: 480px) {
  .alternativas {
    grid-template-columns: repeat(2, 40%);
    grid-template-rows: repeat(3, auto);
  }
}

/* =====================================================
   BOTÕES
===================================================== */
.botao1,
.botao-continuar,
.btn-reiniciar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgb(61, 35, 100);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s, color 0.3s;
}

.botao1:hover,
.botao-continuar:hover,
.btn-reiniciar:hover {
  background-color: rgb(248, 151, 42);
  color: black;
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
}

.botao-continuar {
  position: absolute;
  right: 5%;
  bottom: 5%;
}

.btn-reiniciar {
  position: absolute;
  left: 5%;
  bottom: 5%;
}

@media (max-width: 480px) {

  .botao-continuar,
  .btn-reiniciar {
    position: static;
    width: 100%;
    margin-top: 10px;
    transform: none !important;
  }
}

.botao1 img {
  width: 24px;
  height: 24px;
}

/* =====================================================
   RESULTADO DO QUIZ (SEM BARRA DE PROGRESSO)
===================================================== */
section.resultado {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background: #fff;
  border: 2px solid rgb(61, 35, 100);
  border-radius: 12px;
  height: 80vh;
  position: relative;
  transition: opacity 0.5s ease;
}

section.resultado h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: rgb(61, 35, 100);
}

.resultado-mensagem,
.resultado-casa {
  font-size: 18px;
  font-weight: 500;
  color: rgb(61, 35, 100);
  margin-top: 10px;
  margin-bottom: 10px;
}

.personagem {
  width: 30vh;
  height: auto;
}

/* =====================================================
   FORMULÁRIO
===================================================== */
.formulario {
  background: rgba(72, 98, 149, 0.12);
  padding: 40px;
  max-width: 650px;
  margin: 60px auto;
  border-radius: 12px;
  border: 2px solid rgb(61, 35, 100);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80vh;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.form-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: rgb(61, 35, 100);
}

.form-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 90%;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  text-align: left;
  font-size: 16px;
  color: rgb(61, 35, 100);
}

.input-wrapper {
  display: flex;
  align-items: flex-start;
  border: 2px solid rgb(61, 35, 100);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  transition: 0.3s;
}

.input-wrapper i {
  margin-right: 10px;
  font-size: 17px;
  color: rgb(61, 35, 100);
}

.input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
}

.input-wrapper:focus-within {
  border-color: rgb(248, 151, 42);
  box-shadow: 0 0 8px rgba(248, 161, 66, 0.5);
}

.form-btn-container {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.btn-enviar {
  background: linear-gradient(45deg, rgb(61, 35, 100), #8154d4);
  border: none;
  color: white;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-enviar:hover {
  background-color: rgb(248, 151, 42);
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   RESPONSIVIDADE GERAL
===================================================== */
/* 📱 RESPONSIVIDADE INCRÍVEL PARA CELULARES */
@media (max-width: 768px) {

  /* 🔹 Caixa do quiz mais adaptada */
  section.quiz {
    width: 95%;
    height: auto;
    padding: 15px;
  }

  /* 🔹 Títulos mais equilibrados */
  h1 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  /* 🔹 Alternativas maiorzinhas e melhor espaçadas */
  .alternativas {
    grid-template-columns: repeat(2, 45%);
    grid-template-rows: repeat(3, auto);
    gap: 15px;
    margin-top: 5%;
  }

  /* 🔹 Ajuste dos botões */
  .botao1 {
    padding: 10px;
    font-size: 14px;
  }

  .botao-continuar,
  .btn-reiniciar {
    position: static;
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    font-size: 16px;
  }

  /* 🔹 Imagem/personagem menor */
  .personagem {
    width: 25vh;
    max-width: 220px;
  }
}

/* 📲 RESPONSIVO PARA TELAS MUITO PEQUENAS (tipo celular pequeno) */
@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  .alternativas {
    grid-template-columns: 100%;
    grid-template-rows: repeat(6, auto);
    gap: 10px;
  }

  .botao1 {
    width: 100%;
    padding: 12px;
  }

  section.resultado {
    width: 95%;
    height: auto;
    padding: 20px;
  }

  .resultado-mensagem,
  .resultado-casa {
    font-size: 16px;
  }

  .botao-continuar,
  .btn-reiniciar {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
  }
}