/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  line-height: 1.6;
}

/* Header */
.header {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header .logo {
  font-weight: 700;
  font-size: 24px;
  color: #fff;
}

.header nav a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 600;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  max-width: 600px;
  margin: auto;
}

/* Quiz */
.container {
  width: 90%;
  max-width: 900px;
  margin: auto;
}

.quiz-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  margin: 40px auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#questionCounter {
  text-align: right;
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: 600;
  color: #ffe082;
}

.question {
  margin-bottom: 20px;
}

.question h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.question img {
  max-width: 80px;
  margin-bottom: 15px;
  display: block;
}

/* Barra de progresso */
.progress {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  height: 10px;
  margin-bottom: 20px;
}

#progressBar {
  height: 10px;
  background: linear-gradient(90deg, #ff4b2b, #ff416c);
  width: 0%;
  transition: width 0.4s ease;
}

/* Animações */
.fade {
  animation: fadeIn 0.6s ease;
}

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

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

.question label {
  display: block;
  padding: 12px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transition: 0.3s;
  cursor: pointer;
}

.question label:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

/* Botão */
.btn-primary {
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  color: #fff;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin-top: 10px;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  margin-top: 40px;
}

/* Tracker */
#progressTracker {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.tracker-dot {
  width: 12px;
  height: 12px;
  margin: 0 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: 0.3s;
}

.tracker-dot.active {
  background: #ffe082;
}

.tracker-dot.done {
  background: #00e676;
}

/* Feedback visual opção */
.question label {
  display: block;
  padding: 14px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  transition: 0.3s;
  cursor: pointer;
  border: 2px solid transparent;
}

/* Slide animation */
.slide {
  animation: slideIn 0.6s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

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

/* Mobile */
@media (max-width: 600px) {
  .hero h2 {
    font-size: 28px;
  }

  .quiz-box {
    padding: 20px;
  }

  .btn-primary {
    width: 100%;
    font-size: 16px;
  }
}

/* Botão secundário */
.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 20px;
  border: 2px solid #fff;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Tela final com impacto */
.final-screen {
  text-align: center;
  padding: 20px;
}

.final-screen .celebration {
  font-size: 48px;
  margin-bottom: 15px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* Botão com destaque no final */
.btn-final {
  animation: glow 1.5s infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 224, 130, 0.6);
  }

  50% {
    box-shadow: 0 0 16px rgba(255, 224, 130, 0.9);
  }
}

/* Loading screen */
.loading-screen {
  text-align: center;
  padding: 40px 20px;
}

.loading-screen p {
  margin-top: 15px;
  font-size: 18px;
  font-weight: 500;
  color: #ffe082;
}

/* Spinner animado */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffe082;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Intro box */
.intro-box {
  max-width: 700px;
  margin: auto;
}

.intro-text p {
  margin: 15px 0;
  font-size: 18px;
  line-height: 1.6;
}

.highlight {
  font-weight: 700;
  color: #ffe082;
}

/* Badges para níveis */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 4px;
  color: #fff;
}

.badge.leve {
  background: #00e676;
}

/* verde */
.badge.moderada {
  background: #ffca28;
}

/* amarelo */
.badge.alta {
  background: #ff9100;
}

/* laranja */
.badge.grave {
  background: #e53935;
}

/* vermelho */

/* Botão maior */
.btn-big {
  padding: 18px 32px;
  font-size: 20px;
}

/* Grade de testes na Home */
.tests-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* Botão outline */
.btn-outline {
  background: transparent;
  color: #fff;
  padding: 15px 25px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* ===== BOTÕES EXCLUSIVOS DO INDEX ===== */
.tests-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 32px;
  width: 100%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.tests-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
}

/* Botão principal (ansiedade) */
.tests-list a.btn-primary {
  background: linear-gradient(135deg, #ff4e50, #fc913a);
  box-shadow: 0 4px 12px rgba(255, 78, 80, 0.3);
}

.tests-list a.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 78, 80, 0.4);
}

/* Demais botões */
.tests-list a.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tests-list a.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ===== HOVER COLORIDO PARA OS BOTÕES DO INDEX ===== */

/* Ansiedade (vermelho / laranja) */
.tests-list a.btn-primary:hover {
  background: linear-gradient(135deg, #fc913a, #ff4e50);
  box-shadow: 0 6px 16px rgba(255, 78, 80, 0.5);
  transform: translateY(-2px);
}

/* Depressão (azul claro / ciano) */
.tests-list a.btn-primary:nth-of-type(2):hover {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  box-shadow: 0 6px 16px rgba(0, 180, 216, 0.45);
  transform: translateY(-2px);
}

/* Psicopatia (vermelho escuro / magenta) */
.tests-list a.btn-secondary:nth-of-type(3):hover {
  background: linear-gradient(135deg, #ff0844, #ff5f6d);
  box-shadow: 0 6px 16px rgba(255, 8, 68, 0.45);
  transform: translateY(-2px);
}

/* Autoestima (verde / turquesa) */
.tests-list a.btn-secondary:nth-of-type(4):hover {
  background: linear-gradient(135deg, #00c9a7, #92fe9d);
  box-shadow: 0 6px 16px rgba(0, 201, 167, 0.4);
  transform: translateY(-2px);
}

/* ===== AJUSTE: botão principal igual aos outros ===== */

/* Estado normal (sem hover) */
.tests-list a.btn-primary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: none;
  transform: none;
}

/* Efeito hover (mantém o gradiente bonito) */
.tests-list a.btn-primary:hover {
  background: linear-gradient(135deg, #ff4e50, #fc913a);
  box-shadow: 0 6px 16px rgba(255, 78, 80, 0.4);
  transform: translateY(-2px);
}

/* ===== Campo de nome (tela inicial) ===== */
.input-nome-wrapper {
  max-width: 420px;
  margin: 22px auto 12px;
}

.input-nome-wrapper input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  font-family: "Inter", sans-serif;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
  transition: all 0.25s ease;
}

.input-nome-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.input-nome-wrapper input:focus {
  border-color: #22c55e;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}
/* ===== Botão iniciar (bloqueado) ===== */
#btnStart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(20%);
}

/* ===== Botão iniciar (ativo) ===== */
#btnStart:not(:disabled) {
  opacity: 1;
  cursor: pointer;
  animation: pulseStart 1.8s ease-in-out infinite;
}

@keyframes pulseStart {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}
@media (max-width: 600px) {
  .hero h2 {
    font-size: 22px;
  }

  .intro-text p {
    font-size: 15px;
    line-height: 1.6;
  }

  .input-nome-wrapper input {
    font-size: 16px;
    padding: 16px;
  }

  .btn-big {
    width: 100%;
    font-size: 17px;
    padding: 16px;
  }
}
.hint-nome {
  font-size: 13px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.75);
}

/* ===== NAV TOGGLER (SÓ MOBILE) ===== */

/* Desktop: botão some, nav normal */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

/* Ícone hamburger */
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile */
@media (max-width: 600px) {
  .header {
    padding: 10px 0;
  }

  .header .container {
    position: relative;
  }

  /* Mostra o botão no mobile */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Esconde o menu por padrão */
  .header .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    margin: 0 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
  }

  /* Quando abrir */
  .header .nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .header .nav a {
    margin-left: 0;
    padding: 12px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
  }

  /* animação hamburger -> X quando aberto */
  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ===== SPINNER PEQUENO PARA BOTÕES REALIZAR PAGAMENTO===== */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  vertical-align: -3px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
