/* ==========================================================================
   DESIGN SYSTEM - IMERSÃO AGENTE IA
   Inspirado nas técnicas e visual premium do inlead.digital
   ========================================================================== */

/* Variáveis Globais */
:root {
  --bg-color: #08080c;
  --card-bg: rgba(13, 13, 22, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-focus: rgba(0, 242, 254, 0.8);
  
  /* Cores Principais (Neon / Tech) */
  --primary-cyan: #00f2fe;
  --primary-purple: #7f00ff;
  --text-white: #ffffff;
  --text-muted: #8f92a1;
  --text-dark: #121217;
  
  /* Gradientes */
  --grad-cyan-purple: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-purple) 100%);
  --grad-border: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(127, 0, 255, 0.15) 100%);
  
  /* Fontes */
  --font-title: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

/* Reset Básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   LAYOUT DA CENA (BACKGROUND & GLOW EFFECTS)
   ========================================================================== */
.scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, #12121a 0%, #08080c 100%);
}

/* Efeitos de Glow de Fundo */
.glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  filter: blur(130px);
}

.glow-cyan {
  background-color: var(--primary-cyan);
  top: 15%;
  left: 10%;
  animation: floatGlow 15s ease-in-out infinite alternate;
}

.glow-purple {
  background-color: var(--primary-purple);
  bottom: 15%;
  right: 10%;
  animation: floatGlow 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 40px) scale(1.2);
  }
}

/* ==========================================================================
   ESTILO DO CARD (GLASSMORPHISM)
   ========================================================================== */
.card {
  width: 100%;
  max-width: 580px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Borda luminosa no topo do card para detalhe premium */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-cyan-purple);
  opacity: 0.8;
}

/* ==========================================================================
   CABEÇALHO DO CARD (EYEBROW, PROGRESS & STEP COUNT)
   ========================================================================== */
.card-head {
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 1rem;
}

.eyebrow {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.step-count {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  justify-self: end;
}

.step-count span#stepNow {
  color: var(--text-white);
  font-weight: 800;
}

/* Barra de Progresso */
.progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad-cyan-purple);
  box-shadow: 0 0 8px var(--primary-cyan);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CONTEÚDO DAS ETAPAS E TRANSIÇÕES
   ========================================================================== */
.step {
  display: none;
  animation: none;
}

/* Classe ativa para mostrar a etapa */
.step.is-active {
  display: block;
  animation: stepEnter 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Animações de Transição */
@keyframes stepEnter {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.step.is-exiting {
  display: block;
  animation: stepExit 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes stepExit {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* Textos e Títulos das Etapas */
.step h1 {
  font-family: var(--font-title);
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: -0.5px;
}

.step h2 {
  font-family: var(--font-title);
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.step .sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Tag indicadora superior das perguntas (ex: Requisito 1 de 2) */
.q-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
}

/* ==========================================================================
   CAMPOS DE ENTRADA (ETAPA 1)
   ========================================================================== */
.field {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.field input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.field input:focus {
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 254, 0.02);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.field input:focus + label {
  color: var(--primary-cyan);
}

/* ==========================================================================
   BOTÃO DE PRÓXIMO E OPÇÕES DO QUIZ
   ========================================================================== */
.btn-next {
  width: 100%;
  padding: 1.1rem;
  background: var(--grad-cyan-purple);
  color: var(--text-white);
  border: none;
  border-radius: 12px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(127, 0, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-top: 1rem;
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.4);
}

.btn-next:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-next:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.2rem;
  font-weight: 400;
}

/* OPÇÕES DE SELEÇÃO RÁPIDA (Notebook, Investimento, etc.) */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.options-col {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.option {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.2rem;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.option .opt-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

/* Hover e Foco no Botão de Opção */
.option:hover {
  border-color: rgba(0, 242, 254, 0.3);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

/* Estado Ativo/Selecionado (A técnica inlead.digital de feedback visual imediato) */
.option.is-selected {
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
  transform: translateY(0) scale(0.99);
}

.option.is-selected .opt-icon {
  background: var(--primary-cyan);
  color: var(--text-dark);
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* Estilo para opção de "Não" selecionada */
.option[data-value="nao"].is-selected {
  border-color: #ff4a5a;
  background: rgba(255, 74, 90, 0.08);
  box-shadow: 0 0 20px rgba(255, 74, 90, 0.15);
}

.option[data-value="nao"].is-selected .opt-icon {
  background: #ff4a5a;
  color: var(--text-white);
  box-shadow: 0 0 10px rgba(255, 74, 90, 0.5);
}

/* Opções de coluna única sem ícone padrão (Etapas 4 e 5) */
.options-col .option {
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
}

.options-col .option::after {
  content: '→';
  opacity: 0.4;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

.options-col .option:hover::after {
  opacity: 1;
  transform: translateX(3px);
  color: var(--primary-cyan);
}

.options-col .option.is-selected::after {
  content: '✔';
  opacity: 1;
  color: var(--primary-cyan);
  transform: scale(1.2);
}

/* ==========================================================================
   TELA DE CARREGAMENTO SIMULADO (AI LOADING STEP)
   ========================================================================== */
.step-loading {
  text-align: center;
  padding: 2rem 0;
}

.ai-loader {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 2.5rem;
}

/* Spinner animado com duas camadas */
.spinner {
  width: 100%;
  height: 100%;
  position: relative;
}

.spinner-circle {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  border-top-color: var(--primary-cyan);
  border-bottom-color: var(--primary-purple);
  animation: spin 1.8s cubic-bezier(0.53, 0.21, 0.29, 0.67) infinite;
}

.spinner-core {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 2px dashed rgba(0, 242, 254, 0.2);
  border-radius: 50%;
  animation: spin-reverse 4s linear infinite;
}

.loader-glow {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: var(--grad-cyan-purple);
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0.35;
  animation: pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.25; }
  100% { transform: scale(1.1); opacity: 0.45; }
}

.loading-title {
  font-family: var(--font-title);
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
}

/* Efeito de pulsação sutil na mudança de status */
#loadingStatus {
  font-size: 1.15rem;
  color: var(--primary-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 28px;
}

.pulse-text {
  animation: pulseText 1.5s infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Barra de progresso específica da tela de análise */
.loading-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-cyan-purple);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ==========================================================================
   TELA DE RESULTADO (QUALIFICADO E NÃO QUALIFICADO)
   ========================================================================== */
.result {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

/* Ícones de Sucesso e Alerta */
.result-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 auto 2rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.result-icon.success {
  background: rgba(0, 242, 254, 0.1);
  border: 2px solid var(--primary-cyan);
  color: var(--primary-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.result-icon.warn {
  background: rgba(255, 74, 90, 0.1);
  border: 2px solid #ff4a5a;
  color: #ff4a5a;
  box-shadow: 0 0 25px rgba(255, 74, 90, 0.3);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result h2 {
  font-family: var(--font-title);
  font-size: 1.7rem;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}

.result #nomeQualificado {
  color: var(--primary-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
  display: inline-block;
}

.result-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.08);
  border: 1px dashed var(--primary-cyan);
  border-radius: 8px;
  padding: 12px 18px;
  color: var(--primary-cyan);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   BOTÃO WHATSAPP — PREMIUM
   ========================================================================== */

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, #1fba57 0%, #128c7e 100%);
  color: #ffffff;
  border-radius: 16px;
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow:
    0 8px 28px rgba(31, 186, 87, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-top: 2rem;
  margin-bottom: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Efeito shimmer de brilho passando */
.btn-whatsapp::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
}

.btn-whatsapp:hover::before {
  left: 160%;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(31, 186, 87, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  background: linear-gradient(135deg, #22cc60 0%, #14a88e 100%);
}

.btn-whatsapp:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(31, 186, 87, 0.4);
}

/* Ícone do WhatsApp dentro de um círculo semi-transparente */
.btn-whatsapp-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.3s ease;
}

.btn-whatsapp:hover .btn-whatsapp-icon {
  background: rgba(255, 255, 255, 0.22);
}

/* Bloco de texto central com título e subtítulo */
.btn-whatsapp-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  padding: 0 1rem;
}

.btn-wa-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-wa-sub {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.2px;
}

/* Seta animada à direita */
.btn-wa-arrow {
  font-size: 1.4rem;
  font-weight: bold;
  opacity: 0.8;
  transition: all 0.3s ease;
  line-height: 1;
}

.btn-whatsapp:hover .btn-wa-arrow {
  opacity: 1;
  transform: translateX(5px);
}

/* Wrapper de barra de progresso de redirecionamento automático */
.redirect-bar-wrapper {
  margin-top: 1.5rem;
  width: 100%;
  text-align: left;
}

.redirect-bar-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.redirect-bar-label strong {
  color: var(--primary-cyan);
  font-family: var(--font-title);
}

.redirect-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.redirect-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #25d366 0%, #00f2fe 100%);
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
  border-radius: 10px;
  transition: width 1s linear;
}

/* ==========================================================================
   RODAPÉ E NOTAS DE RODAPÉ
   ========================================================================== */
.footer-note {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 600px) {
  .card {
    padding: 1.8rem 1.4rem;
    border-radius: 20px;
  }
  
  .step h1 {
    font-size: 1.5rem;
  }
  
  .step h2 {
    font-size: 1.4rem;
  }
  
  .step .sub {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .option {
    font-size: 1.05rem;
    padding: 1rem;
  }
  
  .options-col .option {
    padding: 1rem 1.2rem;
  }
  
  .field input {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
  }
}
