/* ==========================================================================
   FORMULÁRIO ANTES DO LEILÃO - ESTILOS PRINCIPAIS (VANILLA CSS)
   Mantém a identidade visual premium com gradientes, efeitos glassmorphism e glows.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --bg-color: #0a0a0b;
  --primary: #c5a059;
  --primary-hover: #d4b475;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-card: rgba(255, 255, 255, 0.07);
  --border-input: rgba(255, 255, 255, 0.14);
  --bg-input: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efeito de granulação clássico */
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Background Hero Image */
.hero-bg {
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 106%;
  height: 100%;
  object-fit: cover;
  object-position: 15% 15%;
  filter: brightness(1.04) contrast(1.06) saturate(1.02);
  z-index: 0;
}

/* Gradientes de sobreposição do background */
.bg-overlay-radial {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.26) 100%);
  z-index: 2;
}

.bg-overlay-linear {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.24) 44%, rgba(0, 0, 0, 0.36) 100%);
  z-index: 2;
}

/* ==========================================================================
   EFEITOS DE GLOWS NO TOPO (dS Component)
   ========================================================================== */
.glow-container {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 560px;
  overflow: hidden;
  z-index: 5;
}

.glow-1 {
  position: absolute;
  left: 50%;
  top: 0;
  width: 60rem;
  max-width: 120vw;
  height: 360px;
  transform: translate(-50%, -55%);
  background: radial-gradient(ellipse at center, rgba(255, 228, 170, 0.34) 0%, rgba(197, 160, 89, 0.18) 32%, transparent 68%);
  filter: blur(22px);
  border-radius: 9999px;
  mix-blend-mode: screen;
  opacity: 0.95;
}

.glow-2 {
  position: absolute;
  left: 50%;
  top: 0;
  width: 46rem;
  max-width: 112vw;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 55% 92% at 50% 0%, rgba(255, 225, 165, 0.46) 0%, rgba(197, 160, 89, 0.20) 22%, transparent 58%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.88) 38%, rgba(0, 0, 0, 0.32) 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.88) 38%, rgba(0, 0, 0, 0.32) 76%, transparent 100%);
  transform-origin: top;
  mix-blend-mode: screen;
  opacity: 0.92;
}

.glow-3 {
  position: absolute;
  left: 50%;
  top: 0;
  width: 26rem;
  max-width: 92vw;
  height: 176px;
  transform: translate(-50%, -42%);
  background: radial-gradient(ellipse at center, rgba(255, 240, 200, 0.6) 0%, rgba(255, 210, 140, 0.30) 38%, transparent 72%);
  filter: blur(24px);
  border-radius: 9999px;
  mix-blend-mode: screen;
}

.glow-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 26rem;
  max-width: 80vw;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 228, 170, 0.95) 50%, transparent 100%);
  box-shadow: 0 0 14px rgba(255, 210, 140, 0.85), 0 0 30px rgba(197, 160, 89, 0.55);
}

.glow-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 0 16px 4px rgba(255, 238, 196, 0.95), 0 0 38px 8px rgba(255, 210, 140, 0.6), 0 0 70px 18px rgba(197, 160, 89, 0.35);
}

/* ==========================================================================
   CONTEÚDO E CARD PRINCIPAL
   ========================================================================== */
.main-wrapper {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 64px 20px;
}

.card-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.glow-card-top-radial {
  pointer-events: none;
  position: absolute;
  left: 2.5rem;
  right: 2.5rem;
  top: -6rem;
  height: 10rem;
  background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.08), transparent 70%);
  filter: blur(40px);
}

.form-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border-card);
  box-shadow: 0 46px 110px -44px rgba(0, 0, 0, 0.75), 0 24px 70px -42px rgba(197, 160, 89, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.48) 0%, rgba(18, 17, 18, 0.58) 44%, rgba(9, 9, 10, 0.68) 100%);
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

@media(min-width: 640px) {
  .form-card {
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }
}

/* Linhas brilhantes dentro do Card */
.card-highlight-top {
  pointer-events: none;
  position: absolute;
  left: 2.5rem;
  right: 2.5rem;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 180, 117, 0.8) 50%, transparent);
}

.card-glow-top {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10rem;
  background: radial-gradient(ellipse at top, rgba(212, 180, 117, 0.10), transparent 75%);
}

/* ==========================================================================
   HEADER DO CARD (Progresso e Voltar)
   ========================================================================== */
.card-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 0 20px;
  z-index: 10;
}

.back-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  outline: none;
}

.back-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.back-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.progress-track {
  height: 5px;
  flex: 1;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.55);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-indicator {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

/* ==========================================================================
   CONTEÚDO DOS PASSOS (ETAPAS)
   ========================================================================== */
.card-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 20px 24px 20px;
  z-index: 10;
}

.step-content {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.step-content.active {
  display: flex;
  animation: fadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-info-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

/* Círculo do Emoji */
.emoji-badge {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #3a2f1d, #1a1410);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 14px 34px -14px rgba(197, 160, 89, 0.55);
  border: 1px solid rgba(197, 160, 89, 0.45);
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.welcome-title {
  background: linear-gradient(135deg, #FFF6E5, var(--primary), #8a6d3b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.welcome-desc {
  max-width: 34ch;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   INPUTS E ELEMENTOS DE FORMULÁRIO
   ========================================================================== */
.field-input {
  height: 52px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.field-input::placeholder {
  color: rgba(229, 231, 235, 0.45);
  font-weight: 500;
}

.field-input:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.field-input:focus {
  border-color: rgba(197, 160, 89, 0.62);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.11);
  background: rgba(255, 255, 255, 0.04);
}

/* Botões de Ação do formulário (Bora começar / Continuar) */
.action-button {
  background-color: var(--primary);
  color: #0a0a0b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  height: 48px;
  width: 100%;
  border: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(197, 160, 89, 0.55);
  transition: background-color 0.2s ease, transform 0.1s ease;
  outline: none;
  text-decoration: none;
}

.action-button:hover {
  background-color: var(--primary-hover);
}

.action-button:disabled {
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.action-button svg {
  transition: transform 0.2s ease;
}

.action-button:hover svg {
  transform: translateX(2px);
}

/* ==========================================================================
   BOTÕES DE SELEÇÃO MULTIPLA ESCOLHA (Choice)
   ========================================================================== */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.choice-option {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.choice-option:hover {
  border-color: rgba(197, 160, 89, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.choice-option.selected {
  border-color: var(--primary);
  background: rgba(197, 160, 89, 0.12);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.55), 0 8px 24px -12px rgba(197, 160, 89, 0.4);
}

.option-emoji {
  display: flex;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.choice-option:hover .option-emoji {
  background: rgba(197, 160, 89, 0.15);
  color: var(--primary);
}

.choice-option.selected .option-emoji {
  background: rgba(197, 160, 89, 0.25);
  border-color: rgba(197, 160, 89, 0.55);
}

.option-label {
  flex: 1;
  margin-left: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}

.choice-option.selected .option-label {
  color: #ffffff;
}

/* Indicador de Checkmark */
.option-check {
  display: flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: transparent;
  transition: all 0.2s ease;
}

.choice-option:hover .option-check {
  border-color: rgba(197, 160, 89, 0.55);
}

.choice-option.selected .option-check {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #0a0a0b;
}

.option-check svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   TELA DE LOADING / ANÁLISE
   ========================================================================== */
.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 8px;
  text-align: center;
}

.spinner-outer {
  position: relative;
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
}

.spinner-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: rgba(197, 160, 89, 0.15);
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(197, 160, 89, 0.2);
  border-top-color: var(--primary);
  animation: spin 1.1s linear infinite;
}

.spinner-emoji {
  position: relative;
  font-size: 28px;
  line-height: 1;
}

.loading-title {
  background: linear-gradient(135deg, #FFF6E5, var(--primary), #8a6d3b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.loading-desc {
  max-width: 28ch;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  min-height: 40px;
}

/* ==========================================================================
   TELA DE SUCESSO (FIM)
   ========================================================================== */
.success-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 8px;
  text-align: center;
}

.success-badge {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(197, 160, 89, 0.15);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

.success-title {
  background: linear-gradient(135deg, #FFF6E5, var(--primary), #8a6d3b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   FOOTER (Nota de Proteção)
   ========================================================================== */
.footer-note {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  z-index: 10;
}

.footer-note svg {
  width: 10px;
  height: 10px;
}

/* ==========================================================================
   ANIMAÇÕES E KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
