/* --- GERAL --- */
:root {
  --bg-color: #000;
  --text-color: #fff;
  --progress-bar-bg: #333;
  --progress-bar-fill: #ccc;
  --button-bg: #444;
  --button-hover-bg: #555;
  --green-btn: #00b050;
  --green-btn-hover: #008c40;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

.quiz-container {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  overflow-x: hidden;
}

/* --- LÓGICA DAS PÁGINAS --- */
.pagina {
  display: none; /* Esconde todas as páginas por padrão */
  animation: fadeIn 0.5s;
}

.pagina.active {
  display: block; /* Mostra apenas a página ativa */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- BARRA DE PROGRESSO (TOPO) --- */
.progress-container {
  width: 100%;
  background-color: var(--progress-bar-bg);
  height: 10px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: var(--progress-bar-fill);
  transition: width 0.4s ease;
}

/* --- ELEMENTOS COMUNS --- */
.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px;
  background-color: var(--button-bg);
  color: var(--text-color);
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--button-hover-bg);
}

.btn-option {
  display: block;
  width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #222;
  border: 1px solid #444;
  color: var(--text-color);
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-option:hover {
  background-color: #333;
}

.btn-green {
  background-color: var(--green-btn);
}
.btn-green:hover {
  background-color: var(--green-btn-hover);
}

/* --- TELA INÍCIO --- */
#pagina-inicio h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
}
.brain-image {
  width: 150px;
  margin: 20px 0;
}
#pagina-inicio p {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 30px;
}

/* --- TELA PERGUNTA --- */
#pagina-pergunta-1 h3,
#pagina-pergunta-2 h3,
#pagina-pergunta-3 h3,
#pagina-pergunta-4 h3,
#pagina-pergunta-5 h3,
#pagina-pergunta-6 h3,
#pagina-pergunta-7 h3,
#pagina-pergunta-8 h3,
#pagina-pergunta-9 h3 {
  font-size: 1.4em;
  margin-bottom: 30px;
}

#pagina-pergunta-4 p,
#pagina-pergunta-5 p,
#pagina-pergunta-6 p,
#pagina-pergunta-7 p,
#pagina-pergunta-8 p,
#pagina-pergunta-9 p {
  font-size: 1.1em;
  color: #ccc;
  margin: 20px 0;
}

/* --- TELA ANALISANDO --- */
.loading-bar-container {
  width: 100%;
  height: 20px; /* Mais fino */
  background-color: #222;
  border-radius: 10px; /* Metade da altura */
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}
.loading-bar-fill {
  width: 0%;
  height: 100%;
  background-color: var(--progress-bar-fill);
  border-radius: 10px; /* Metade da altura */
  transition: width 0.2s linear;
}
.loading-bar-container span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9em; /* Texto menor */
  font-weight: bold;
  color: #000;
}
#pagina-analisando h2 {
  font-size: 2em;
}
#pagina-analisando p {
  font-size: 1.2em;
  color: #aaa;
}

/* --- TELA RESULTADO --- */
.resultado-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

/* Adicionando bordas como na imagem */
.resultado-box {
  padding: 20px;
  min-height: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #333; /* Borda adicionada */
  border-radius: 8px; /* Borda arredondada */
  background-color: transparent; /* Fundo transparente */
}
.box-title {
  font-size: 0.9em;
  color: #aaa;
  font-weight: bold;
}
.result-image {
  width: 100%;
  max-width: 180px;
  border-radius: 8px;
}

/* Donut Chart */
.donut-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  position: relative;
  /* O gradiente será aplicado via JS */
}
.donut-chart::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--bg-color);
  border-radius: 50%;
}
.donut-text {
  font-size: 3em;
  font-weight: bold;
  z-index: 10;
}

/* Slider (Removido do HTML, mas mantido no CSS caso volte) */
.slider-container {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  position: relative;
  background-image: linear-gradient(to right, #222 1px, transparent 1px),
    linear-gradient(to bottom, #222 1px, transparent 1px);
  background-size: 20px 20px;
}
.slider-label-right {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.9em;
  color: #aaa;
  font-weight: bold;
}
.slider-track {
  width: 90%;
  height: 10px;
  background-color: #555;
  border-radius: 5px;
  margin: 40px auto 10px auto;
  position: relative;
}
.slider-thumb {
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 85%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}
.slider-callout {
  position: absolute;
  bottom: 65px;
  left: 85%;
  transform: translateX(-50%);
  background: var(--button-bg);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
}
.slider-callout::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--button-bg);
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 90%;
  margin: 0 auto;
  font-size: 0.9em;
  color: #888;
}

/* Ajuste de texto da página de resultado */
#pagina-resultado h3 {
  font-size: 1.2em;
  color: #fff;
  margin: 25px 0 10px 0;
}
#pagina-resultado p {
  font-size: 0.95em;
  color: #ccc;
  text-align: left;
  line-height: 1.5;
  max-width: 95%;
  margin: 10px auto;
}
#pagina-resultado p strong {
  color: #fff;
}

/* --- TELA LANDING PAGE --- */
#pagina-landing .landing-subtitle {
  font-size: 1.2em;
  margin: 20px 0;
}
.product-item {
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  text-align: left;
}
.product-item img {
  width: 60px;
  height: 80px;
  margin-right: 15px;
  border-radius: 4px;
}
.product-item p {
  font-size: 1em;
  font-weight: bold;
}
.whatsapp-box {
  background-color: #1c1c1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 640px) {
  .quiz-container {
    margin: 0;
    padding: 15px;
  }
  .resultado-grid {
    grid-template-columns: 1fr; /* Coluna única em telas pequenas */
  }
  .donut-chart {
    width: 150px;
    height: 150px;
  }
  .donut-chart::before {
    width: 125px;
    height: 125px;
  }
  .donut-text {
    font-size: 2.5em;
  }
}

/* --- AJUSTE: Animação de Pulsar --- */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 3px rgba(0, 176, 80, 0.3);
  }
  50% {
    transform: scale(1.02); /* Aumento sutil de 2% */
    box-shadow: 0 0 10px rgba(0, 176, 80, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 3px rgba(0, 176, 80, 0.3);
  }
}

/* Aplica a animação a todos os botões verdes de CTA */
.btn-green,
.btn-option[style*="#00b050"] {
  animation: pulse 2s infinite ease-in-out;
}
