/* ===================== BASE GLOBAL ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #0f131e;
  color: #f6f7f8;
}

/* ===================== ANIMAÇÕES ===================== */
@keyframes fadeUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0%   { transform: scale(0.98); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; display: none; }
}

/* ===================== BOTÕES ===================== */
.btn, .start-btn, .nav-btn {
  background-color: #00a2ff;
  color: #0f131e;
  padding: 12px 28px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn:hover, .start-btn:hover, .nav-btn:hover {
  background-color: #00c2ff;
  transform: translateY(-2px);
}

.nav-btn[disabled] {
  background-color: #888;
  cursor: not-allowed;
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid #f6f7f8;
  border-right: 2px solid #f6f7f8;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

/* ===================== SCREENS (INICIAL / FINAL) ===================== */
.intro-screen,
.thankyou-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  background-color: #0f131e;
  padding: 24px;
  box-sizing: border-box;
}

.intro-overlay,
.thankyou-screen .intro-overlay {
  background: rgba(15, 19, 30, 0.92);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 100%;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  color: #f6f7f8;
}

.thankyou-screen.show {
  opacity: 1;
  transform: translateY(0);
}

.thankyou-screen h1 {
  font-size: 24px;
  color: #00a2ff;
  margin-bottom: 12px;
  font-weight: 600;
}

.thankyou-screen p {
  font-size: 15px;
  color: #c9d1d9;
  line-height: 1.6;
}

/* ===================== FORMULÁRIO ===================== */
.form-step {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100dvh;
  background: linear-gradient(to bottom, #0f131e, #1a1f2c);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 0 16px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  scroll-margin-top: 40px;
}

.form-step.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.form-content {
  background: rgba(15, 19, 30, 0.85);
  padding: 40px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  animation: fadeInUp 0.4s ease;
}

.form-content.animated {
  animation: bounceIn 0.3s ease;
}

label {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
  color: #00a2ff;
  text-align: left;
}

input {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  border: none;
  border-bottom: 2px solid #00a2ff;
  background: transparent;
  color: #f6f7f8;
  transition: border-color 0.25s ease;
}

input:focus {
  outline: none;
  border-color: #00a2ff;
}

input.input-error {
  border-bottom: 2px solid #ff6b6b;
}

/* ===================== ERROS ===================== */
.error-msg {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-4px);
  animation: fadeIn 0.2s ease-out forwards;
  text-align: left;
  width: 100%;
}

.radio-group + .error-msg {
  margin-bottom: 12px;
}

/* ===================== RADIO GROUP ===================== */
.radio-group {
  display: flex;
  flex-direction: column;
  margin-bottom: -8px;
}

.radio-group label {
  background-color: #1e2433;
  border: 1px solid #555;
  padding: 12px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  text-align: left;
}

.radio-group label:hover {
  background-color: #2a3245;
  border-color: #00a2ff;
}

.radio-group .option {
  font-weight: bold;
  background-color: #333;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 12px;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group input[type="radio"]:checked + .option {
  background-color: #00a2ff;
  color: #fff;
}

/* ===================== NAVIGATION ===================== */
.nav-controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  margin-top: 20px;
  position: sticky;
  bottom: 20px;
  background: rgba(15, 19, 30, 0.85);
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===================== PROGRESS BAR ===================== */
.progress-wrapper {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background-color: #0f131e;
  padding: 6px 0;
}

.progress-bar {
  height: 4px;
  width: 0%;
  background-color: #00a2ff;
  border-radius: 3px;
  transition: width 0.4s ease-in-out;
}

/* ===================== MOBILE ===================== */
@media (max-width: 600px) {
  .form-step, .intro-screen {
    padding: 0 !important;
  }

  .intro-overlay {
    max-width: 100% !important;
  }

  .form-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 40px;
  }

  .nav-btn {
    touch-action: manipulation;
    user-select: none;
    height: 48px;
  }

  .nav-btn.left {
    flex: 0 0 15%;
    min-width: 45px;
    font-size: 22px;
    text-align: center;
    padding: 10px 0;
  }

  .nav-btn.right {
    flex: 1 1 85%;
    font-size: 18px;
  }

  .start-btn {
    width: 100%;
    height: 48px;
  }

  .progress-wrapper {
    padding: 4px 0;
    z-index: 15;
  }

  .nav-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: space-between;
  }

  .nav-btn.left {
    flex: 0 0 10%; /* Botão de voltar menor */
    min-width: 48px;
    font-size: 20px;
    text-align: center;
    padding: 10px 0;
  }

  .nav-btn.right {
    flex: 1 1 75%; /* Botão de avançar ocupa o restante */
    font-size: 16px;
  }

  .radio-group label {
    font-size: 15px;
    line-height: 1.4;
  }

  .radio-group .option {
    font-size: 14px;
    font-weight: 600;
    background-color: #333;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 12px;
  }

  .radio-group input[type="radio"]:checked + .option {
    background-color: #00a2ff;
    color: #0f131e;
  }

}

/* ===================== COMPLEMENTOS VISUAIS ESSENCIAIS ===================== */

/* Restaura estilo visual da div final de resumo */
#resumoDados {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #f6f7f8;
  text-align: left;
}

#resumoDados p strong {
  color: #00a2ff;
}

#resumoDados p{
  line-height: 1.2;
}

/* Estilo de destaque para palavras azuis */
.azul {
  color: #00a2ff;
}

/* Texto semi-negrito */
.semi-bold {
  font-weight: 600;
  color: #f6f7f8;
}

/* Ajuste do <small> dentro da intro-overlay */
.intro-overlay small {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.85;
  color: #00a2ff;
  margin-top: 12px;
}

.intro-overlay p{
  line-height: 1.8;
}