/* === VERSÃO C: VARIÁVEIS DE TEMA (FINAL CORRIGIDO) === */
:root {
  /* TEMA CLARO (PADRÃO) */
  --primary-color: #3498db;
  --success-color: #27ae60;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
  --text-secondary: #7f8c8d;
  --bg-color: #f4f6f9;
  --container-bg: #ffffff;
  --border-color: #e4e7ed;
  --footer-bg: #34495e;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  /* TEMA ESCURO (SOBRESCRITAS) */
  --primary-color: #00aaff;
  --success-color: #00e676;
  --text-dark: #ecf0f1;
  --text-secondary: #95a5a6;
  --bg-color: #121417;
  --container-bg: #1f2229;
  --border-color: #343a40;
  --footer-bg: #1f2229;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Manrope", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ================================================= */
/* === BOTÃO DE TEMA CORRIGIDO E VISÍVEL ========= */
/* ================================================= */
.theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000; /* Z-INDEX AUMENTADO PARA GARANTIR VISIBILIDADE */
  background-color: var(--container-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.2s ease-out;
}
.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.theme-icon {
  width: 24px;
  height: 24px;
}
.hidden {
  display: none !important;
}

/* === LAYOUT E HEADLINE === */
.headline {
  max-width: 650px;
  margin: 3rem auto;
  padding: 0 20px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-dark);
}
.headline b {
  font-weight: 800;
  color: var(--primary-color);
}
.quiz-main-container {
  max-width: 600px;
  margin: 1rem auto 5rem;
  padding: 30px 40px;
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ================================================= */
/* === PROGRESSO (STEPPER) CORRIGIDO ============= */
/* ================================================= */
.progress-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 10px;
  padding: 0; /* Reseta padding */
}
.step-indicator {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  font-size: 0; /* FORÇA O NÚMERO A SUMIR */
  color: transparent; /* GARANTIA EXTRA */
  transition: background-color 0.4s ease;
}
.step-indicator.completed,
.step-indicator.active {
  background-color: var(--primary-color);
}

/* === ESTILOS DO QUIZ === */
.quiz-step {
  display: none;
}
.quiz-step.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-title {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.3;
}

.options-container {
  display: grid;
  gap: 15px;
}
.options-container input[type="radio"] {
  display: none;
}
.option-card {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  background-color: var(--bg-color);
  transition: all 0.2s ease;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}
label:hover .option-card {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px var(--shadow-color);
}
input:checked + .option-card {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--text-light);
  transform: scale(1.02);
}

/* === TELAS DE PROCESSAMENTO E RESULTADOS === */
#processing-container,
#results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  text-align: center;
}
.loader {
  border: 5px solid var(--border-color);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
.processing-text {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 20px;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.results-headline {
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.results-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 450px;
  margin-bottom: 30px;
  line-height: 1.6;
}
.success-checkmark {
  /* Estilo do checkmark... */
}

.final-cta-button {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff !important;
  background-color: var(--success-color);
  width: 100%;
  max-width: 450px;
  padding: 18px 25px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 5px 20px rgba(46, 204, 113, 0.3);
  transition: all 0.2s ease;
}
.final-cta-button:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

/* === RODAPÉ === */
footer {
  display: flex;
  flex-direction: column;
  margin-top: 100vh;
  padding: 2.5rem 1.5rem;
  gap: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background-color: var(--footer-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-links a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}
.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ================================================== */
/* === OTIMIZAÇÕES DE RESPONSIVIDADE (MOBILE-FIRST) === */
/* ================================================== */

/* Para telas menores que 768px (tablets e celulares) */
@media (max-width: 768px) {
  /* ============================================== */
  /* === CORREÇÃO DA HEADLINE PARA MOBILE ========= */
  /* ============================================== */
  .headline {
    font-size: 1.4rem; /* Diminui o tamanho da fonte */
    margin: 1.5rem auto 2rem; /* REDUZ DRASTICAMENTE A MARGEM SUPERIOR E INFERIOR */
    line-height: 1.4; /* Melhora a legibilidade com a nova fonte */
  }

  .quiz-main-container {
    margin-left: 15px;
    margin-right: 15px;
    padding: 25px 20px;
    width: auto;
  }

  .question-title {
    font-size: 1.5rem;
  }

  .results-headline {
    font-size: 1.8rem;
  }

  .theme-toggle-btn {
    top: 15px;
    right: 15px;
  }
}
