/* ============================================================
   test-app.css — Test de registrabilidad (página React)
   Tema vanguardista independiente del sitio principal
   ============================================================ */

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

html, body {
  min-height: 100%;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: #0a0a12;
  color: #e8e8f0;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ─────────────────────────────────────────────── */

.test-app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.test-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.test-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  transition: opacity 1.2s ease;
}

.test-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(124, 58, 237, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(6, 182, 212, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
    linear-gradient(160deg, #0a0a12 0%, #12101f 40%, #0d1520 100%);
}

.test-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.test-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 12s ease-in-out infinite;
}

.test-orb--1 {
  width: 400px;
  height: 400px;
  background: rgba(124, 58, 237, 0.25);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.test-orb--2 {
  width: 350px;
  height: 350px;
  background: rgba(6, 182, 212, 0.2);
  bottom: -5%;
  right: -5%;
  animation-delay: -4s;
}

.test-orb--3 {
  width: 250px;
  height: 250px;
  background: rgba(236, 72, 153, 0.15);
  top: 40%;
  left: 50%;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Top bar ───────────────────────────────────────────────── */

.test-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
}

.test-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.test-back:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
}

.test-back svg {
  width: 16px;
  height: 16px;
}

.test-logo {
  height: 32px;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.test-step-indicator {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Progress bar ──────────────────────────────────────────── */

.test-progress-wrap {
  position: relative;
  z-index: 10;
  padding: 0 2rem;
}

.test-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4, #ec4899);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

/* ── Main content area ─────────────────────────────────────── */

.test-main {
  position: relative;
  z-index: 5;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem 2rem;
}

.test-panel {
  width: 100%;
  max-width: 680px;
  animation: panelIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Intro ─────────────────────────────────────────────────── */

.test-intro {
  text-align: center;
}

.test-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.test-intro-badge svg {
  width: 14px;
  height: 14px;
}

.test-intro h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.test-intro p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.test-intro-visual {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.test-intro-card {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: cardBob 3s ease-in-out infinite;
}

.test-intro-card:nth-child(2) { animation-delay: -1s; }
.test-intro-card:nth-child(3) { animation-delay: -2s; }

@keyframes cardBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Question ──────────────────────────────────────────────── */

.test-question-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: #06b6d4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.test-question-text {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  margin-bottom: 1.75rem;
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.test-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  width: 100%;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
}

.test-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateX(4px);
}

.test-option.is-selected {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.5);
  color: #fff;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.15);
}

.test-option-radio {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.25s ease;
}

.test-option.is-selected .test-option-radio {
  border-color: #a78bfa;
  background: #7c3aed;
}

.test-option.is-selected .test-option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ── Advertencia contextual (respuesta de baja probabilidad) ── */

.test-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: hintIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.test-hint svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #fbbf24;
}

@keyframes hintIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Contact form ──────────────────────────────────────────── */

.test-contact-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.test-contact-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.test-field {
  margin-bottom: 1.25rem;
}

.test-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.test-field input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.test-field input:focus {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* ── Result ────────────────────────────────────────────────── */

.test-result {
  text-align: center;
}

.test-score-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
}

.test-score-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.test-score-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.test-score-ring-fill {
  fill: none;
  stroke: url(#scoreGradient);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.test-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.test-result-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.test-result-msg {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.test-disclaimer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.test-save-warning {
  font-size: 0.85rem;
  color: #fbbf24;
  margin-bottom: 1rem;
}

/* ── Buttons ───────────────────────────────────────────────── */

.test-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.test-actions--center {
  justify-content: center;
}

.test-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.test-btn--primary {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}

.test-btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

.test-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.test-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.test-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.test-btn--whatsapp {
  background: #25d366;
  color: #fff;
}

.test-btn--whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-2px);
}

.test-btn--whatsapp svg {
  width: 18px;
  height: 18px;
}

.test-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* ── Loading spinner ───────────────────────────────────────── */

.test-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .test-topbar {
    padding: 1rem 1.25rem;
  }

  .test-progress-wrap {
    padding: 0 1.25rem;
  }

  .test-main {
    padding: 1rem 1.25rem 1.5rem;
  }

  .test-intro-visual {
    gap: 0.75rem;
  }

  .test-intro-card {
    width: 72px;
    height: 72px;
    font-size: 1.5rem;
    border-radius: 14px;
  }

  .test-actions {
    flex-direction: column;
  }

  .test-btn {
    width: 100%;
  }

  .test-step-indicator {
    display: none;
  }
}
