:root {
  --primary-color: #f26c24;
  --primary-hover: #ff8547;
  --primary-glow: rgba(242, 108, 36, 0.6);
  --primary-light: rgba(242, 108, 36, 0.15);

  /* Tons do abismo sideral */
  --bg-darkest: #030100;

  /* Vidro fosco avançado */
  --card-glass: rgba(12, 8, 5, 0.65);
  --card-glass-hover: rgba(255, 255, 255, 0.05);

  --text-main: #ffffff;
  --text-muted: #a39c98;

  --error-color: #ff4a4a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(242, 108, 36, 0.8);

  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
  --font-accent: "Great Vibes", cursive;

  /* Curva de animação Apple-like */
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* --- FUNDO INFINITO COM TECH GRID --- */
body {
  font-family: var(--font-body);
  background-color: var(--bg-darkest);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  z-index: 0;
}

/* Malha Tecnológica (Tech Grid) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -3;
  pointer-events: none;
}

/* Bolhas de luz atmosféricas */
body::after {
  content: "";
  position: fixed;
  width: 70vw;
  height: 70vw;
  top: -20vw;
  left: 15vw;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(242, 108, 36, 0.15) 0%,
    transparent 60%
  );
  filter: blur(90px);
  z-index: -2;
  animation: drift 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(5vw, 10vw) scale(1.1);
  }
}

/* --- CONTAINER GLASSMORPHISM 3.0 --- */
.survey-container,
.success-screen {
  background: var(--card-glass);
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  width: 100%;
  max-width: 760px;
  border-radius: 32px;
  padding: 56px 48px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.9),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 1px rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  border: 1px solid var(--border-subtle);
  position: relative;
}

/* Reflexo superior (Efeito espelho mágico) */
.survey-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.survey-container > * {
  position: relative;
  z-index: 2;
}

/* --- ANIMAÇÕES 3D (Deslize Cinematográfico) --- */
.intro-screen,
.step {
  display: none;
  animation: cinematicReveal3D 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top center;
}

.intro-screen.active,
.step.active {
  display: flex;
  flex-direction: column;
}

@keyframes cinematicReveal3D {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95) rotateX(-5deg);
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
  }
}

/* --- CAPA E LOGO --- */
.intro-screen {
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.logo-wrapper {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 6s ease-in-out infinite;
}

.intro-logo {
  max-width: 340px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(242, 108, 36, 0.7));
  transition: var(--transition);
}
.intro-logo:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 20px 45px rgba(242, 108, 36, 0.9));
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.brand-badge {
  background: rgba(242, 108, 36, 0.1);
  color: #ffb594;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 24px;
  border-radius: 100px;
  letter-spacing: 3px;
  border: 1px solid rgba(242, 108, 36, 0.4);
  box-shadow: 0 0 25px rgba(242, 108, 36, 0.2);
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

/* Títulos com Brilho Atmosférico */
.intro-screen h1 {
  font-family: var(--font-heading);
  font-size: 56px;
  margin-bottom: 0;
  letter-spacing: 1px;
  line-height: 1.1;
  color: var(--text-main);
  text-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 255, 255, 0.1);
}

.font-delicate {
  font-family: var(--font-accent);
  font-size: 80px;
  font-weight: 400;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 10%, #ff9a66 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  transform: rotate(-4deg);
  margin-top: -10px;
  padding-right: 15px;
  filter: drop-shadow(0 0 15px rgba(242, 108, 36, 0.5));
}

.intro-text-box {
  max-width: 540px;
  margin: 16px 0 40px 0;
}
.intro-text-box p {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.intro-text-box strong {
  color: var(--text-main);
  font-weight: 600;
}

/* --- BOTÕES LIQUID SHIMMER (Puro Poder) --- */
.btn-large,
.btn-primary {
  padding: 20px 48px;
  font-size: 18px;
  width: 100%;
  max-width: 320px;
  border-radius: 100px;
  /* Gradiente Animado */
  background: linear-gradient(90deg, #ffffff, #ffb594, #ffffff);
  background-size: 200% auto;
  color: #030100 !important;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.5px;
  border: none;
  box-shadow:
    0 15px 40px rgba(242, 108, 36, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
  animation: liquidShimmer 3s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes liquidShimmer {
  to {
    background-position: 200% center;
  }
}

.btn-large:hover,
.btn-primary:hover:not(:disabled) {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 25px 50px rgba(242, 108, 36, 0.7);
}

/* --- WIZARD E PROGRESSO HUD --- */
header {
  margin-bottom: 56px;
}
.progress-wrapper span {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--primary-color);
  letter-spacing: 3px;
  display: block;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8547, #f26c24);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 0 20px var(--primary-glow);
}
/* Ponta brilhante da barra */
.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  border-radius: 50%;
}

h3 {
  margin-bottom: 40px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

/* Bloco de Informação Holográfico */
.info-block {
  background: linear-gradient(
    135deg,
    rgba(242, 108, 36, 0.1) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  padding: 32px;
  border-radius: 20px;
  margin-bottom: 40px;
  border: 1px solid rgba(242, 108, 36, 0.3);
  position: relative;
  overflow: hidden;
}
.info-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-color);
}
.info-block h4 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.question {
  margin-bottom: 56px;
}
.question label:first-child {
  font-weight: 500;
  font-size: 18px;
  display: block;
  margin-bottom: 24px;
  line-height: 1.5;
  color: var(--text-main);
}
.req {
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* --- CARDS MAGNÉTICOS HOLOGRÁFICOS --- */
.options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.option-card {
  font-weight: 400;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.option-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--card-glass-hover);
  transform: translateX(6px);
  color: #fff;
}

/* Estado Selecionado (Explosão de Luz) */
.option-card:has(input:checked) {
  border-color: var(--border-highlight);
  background: linear-gradient(
    145deg,
    rgba(242, 108, 36, 0.2),
    rgba(0, 0, 0, 0)
  );
  color: var(--text-main);
  box-shadow:
    0 10px 30px rgba(242, 108, 36, 0.2),
    inset 0 0 20px rgba(242, 108, 36, 0.15);
  transform: scale(1.02);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  accent-color: var(--primary-color);
  transform: scale(1.4);
  cursor: pointer;
  z-index: 2;
}

/* Inputs Premium */
.other-input,
.text-input,
textarea {
  width: 100%;
  padding: 20px 24px;
  margin-top: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-main);
}
.other-input:focus,
.text-input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.6);
  box-shadow:
    0 0 0 4px var(--primary-light),
    0 15px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Escala */
.scale-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.scale-btn {
  flex: 1;
  min-width: 44px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  padding: 16px 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: var(--transition);
  color: var(--text-muted);
}
.scale-btn input {
  display: none;
}
.scale-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  color: #fff;
}
.scale-btn:has(input:checked) {
  background: linear-gradient(135deg, #fff, #ffe0d1);
  color: var(--bg-darkest);
  border-color: #fff;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
  transform: scale(1.15);
  z-index: 10;
}

/* --- TELA DE SUCESSO EXTREMA --- */
.success-screen h2 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 20px;
  font-size: 56px;
  letter-spacing: 1px;
  line-height: 1;
  text-align: center;
}
.success-screen .icon-wrapper {
  background: linear-gradient(
    135deg,
    rgba(242, 108, 36, 0.2),
    rgba(0, 0, 0, 0)
  );
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 40px;
  border: 1px solid var(--border-highlight);
  box-shadow:
    0 0 80px var(--primary-glow),
    inset 0 0 40px rgba(242, 108, 36, 0.3);
  animation: floatSuccess 4s infinite ease-in-out;
}
.success-screen .icon {
  font-size: 72px;
  transform: translateY(-3px) translateX(3px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}
.success-screen h2 .font-delicate {
  font-size: 90px;
  margin-top: 0px;
}
.success-screen p {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1.7;
  max-width: 460px;
  text-align: center;
}

@keyframes floatSuccess {
  0%,
  100% {
    transform: translateY(0px) scale(1);
    box-shadow: 0 0 80px var(--primary-glow);
  }
  50% {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 0 120px rgba(242, 108, 36, 0.8);
  }
}

/* Erro e Toast, Form Actions omitidos mas mantidos padrão... */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 40px;
}
.btn-secondary {
  padding: 18px 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.hidden {
  display: none !important;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #030100;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.9);
  background: var(--text-main);
  color: var(--bg-darkest);
  padding: 16px 32px;
  border-radius: 100px;
  z-index: 1000;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}
.toast:not(.hidden) {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}
.error-highlight {
  border: 1px solid var(--error-color);
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 74, 74, 0.05);
  box-shadow: 0 0 20px rgba(255, 74, 74, 0.1);
}
.error-highlight > label:first-child {
  color: var(--error-color);
}

/* =========================================================
   RESPONSIVIDADE (MOBILE & TABLET) - 100% OTIMIZADO
========================================================= */
@media (max-width: 768px) {
  .survey-container,
  .success-screen {
    padding: 40px 32px;
  }
  .intro-screen h1 {
    font-size: 48px;
  }
  .font-delicate {
    font-size: 70px;
  }
  h3 {
    font-size: 32px;
  }
  .success-screen h2 {
    font-size: 48px;
  }
  .success-screen h2 .font-delicate {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px 12px;
  }
  .survey-container,
  .success-screen {
    padding: 32px 20px;
    border-radius: 24px;
  }
  .logo-wrapper {
    margin-bottom: 16px;
  }
  .intro-logo {
    max-width: 260px;
  }
  .brand-badge {
    font-size: 11px;
    padding: 6px 14px;
  }
  .intro-screen h1 {
    font-size: 38px;
  }
  .font-delicate {
    font-size: 56px;
  }
  .intro-text-box {
    padding: 20px;
    margin: 8px 0 24px 0;
  }
  .intro-text-box p {
    font-size: 15px;
  }
  .btn-large,
  .btn-primary,
  .btn-secondary {
    padding: 16px 20px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
  }
  .progress-wrapper span {
    font-size: 16px;
  }
  h3 {
    font-size: 26px;
    margin-bottom: 24px;
    line-height: 1.3;
  }
  .info-block {
    padding: 20px;
  }
  .info-block h4 {
    font-size: 14px;
  }
  .question {
    margin-bottom: 40px;
  }
  .question label:first-child {
    font-size: 16px;
  }
  .option-card {
    padding: 16px;
    font-size: 14px;
    gap: 12px;
  }
  .other-input,
  .text-input,
  textarea {
    padding: 16px 20px;
    font-size: 14px;
  }
  .scale-options {
    gap: 6px;
  }
  .scale-btn {
    min-width: 32px;
    padding: 12px 0;
    font-size: 14px;
  }
  .form-actions {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
  }
  .toast {
    width: 95%;
    padding: 12px 20px;
    font-size: 14px;
  }
  .success-screen {
    padding: 40px 16px;
  }
  .success-screen .icon-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
  }
  .success-screen .icon {
    font-size: 56px;
  }
  .success-screen h2 {
    font-size: 38px;
  }
  .success-screen h2 .font-delicate {
    font-size: 58px;
  }
  .success-screen p {
    font-size: 16px;
  }
}
