/* ============================================
   JULIO SIN FILTROS — Herramienta de Mensajería
   Ultra-premium dark UI · Depth · Luxury aesthetic
   ============================================ */

:root {
  --bg-body: #060609;
  --bg-surface: #0c0c14;
  --bg-card: rgba(14, 14, 22, 0.82);
  --bg-card-solid: #0e0e16;
  --bg-elevated: rgba(18, 18, 30, 0.9);
  --bg-input: rgba(14, 14, 24, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.025);
  --text-primary: #f2efe8;
  --text-secondary: #a8a39a;
  --text-muted: #7a7670;
  --gold: #d4af5a;
  --gold-bright: #f0d078;
  --gold-dim: #9a7d3a;
  --gold-glow: rgba(212, 175, 90, 0.10);
  --gold-glow-strong: rgba(212, 175, 90, 0.22);
  --red: #e05555;
  --red-dim: rgba(224, 85, 85, 0.10);
  --green: #4cc48a;
  --green-dim: rgba(76, 196, 138, 0.10);
  --tone-firme: #d4af5a;
  --tone-frio: #6fa8d6;
  --tone-estrategico: #a87ad4;
  --tone-directo: #e07050;
  --border: rgba(255, 255, 255, 0.045);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 90, 0.18);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 56px rgba(0,0,0,0.6);
  --shadow-gold: 0 8px 32px rgba(212,175,90,0.18);
  --shadow-glow: 0 0 60px rgba(212,175,90,0.08);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient gradient mesh — multi-orb background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 600px at 20% 10%, rgba(212,175,90,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(100,80,180,0.03) 0%, transparent 50%),
    radial-gradient(ellipse 400px 400px at 50% 80%, rgba(212,175,90,0.025) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

/* ============================================
   SCREENS — Navigation
   ============================================ */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}
.screen.active { display: flex; justify-content: center; }
.screen.active.visible { opacity: 1; transform: translateY(0); }

.screen-content {
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 60px;
}

/* ============================================
   LANDING
   ============================================ */
.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px 24px;
  position: relative;
}

/* Large ambient glow behind headline */
.landing-content::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212,175,90,0.06) 0%, rgba(212,175,90,0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.landing-content > * { position: relative; z-index: 1; }

/* Brand separator */
.landing-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 56px;
}

.brand-line {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.brand-text {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212,175,90,0.15);
}

.landing-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.6rem, 10vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.landing-headline em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.landing-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 340px;
  margin-bottom: 48px;
  line-height: 1.75;
}


/* Trust indicators */
.landing-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.trust-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-dim);
  opacity: 0.5;
}

/* Historial button */
.btn-historial {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
  backdrop-filter: blur(16px);
  z-index: 2;
  letter-spacing: 0.3px;
}

.btn-historial:active { background: rgba(255,255,255,0.06); }

/* ============================================
   BUTTONS — Premium feel
   ============================================ */
.btn-primary {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 40%, #a08530 100%);
  color: var(--bg-body);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s var(--ease);
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
}

/* Inner light gradient */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}

/* Animated shimmer on CTA */
.btn-glow {
  box-shadow: 0 8px 36px rgba(212,175,90,0.28), 0 2px 12px rgba(212,175,90,0.18);
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-primary:disabled::after { display: none; }

.btn-secondary {
  padding: 14px 24px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
}

.btn-secondary:active { background: rgba(255,255,255,0.04); }
.btn-secondary:disabled { opacity: 0; pointer-events: none; }

/* ============================================
   DIAGNÓSTICO
   ============================================ */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 44px;
  padding-top: 24px;
}

.step-segment {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  transition: all 0.4s var(--ease);
  background: rgba(255,255,255,0.015);
}

.step-segment.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  box-shadow: 0 0 24px rgba(212,175,90,0.1), 0 0 8px rgba(212,175,90,0.05);
}

.step-segment.completed {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--bg-body);
}

.step-connector {
  width: 52px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  transition: background 0.4s var(--ease);
  border-radius: 1px;
}
.step-connector.active {
  background: linear-gradient(90deg, var(--gold), var(--gold-dim));
}

.step-container {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.step-container.active { display: block; }
.step-container.active.visible { opacity: 1; transform: translateX(0); }

.step-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.step-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 32px;
}

.option-btn {
  padding: 16px 14px;
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  position: relative;
}

.option-btn:active { transform: scale(0.96); }
.option-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

.option-btn.selected {
  background: rgba(212,175,90,0.07);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(212,175,90,0.07), inset 0 1px 0 rgba(212,175,90,0.08);
}

/* Gradient border effect on selected */
.option-btn.selected::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(212,175,90,0.3), rgba(212,175,90,0.05));
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}

/* Textarea */
.context-input { margin-bottom: 28px; }
.context-input label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.optional-tag { color: var(--text-muted); font-weight: 400; }

.context-input textarea {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
}

.context-input textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212,175,90,0.06), 0 0 24px rgba(212,175,90,0.04);
}

.context-input textarea::placeholder { color: var(--text-muted); }
.char-count { text-align: right; font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; }

/* Screenshot */
.screenshot-input { margin-bottom: 28px; }
.screenshot-input > label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 10px; }

.screenshot-dropzone {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s;
  background: rgba(255,255,255,0.015);
}
.screenshot-dropzone:active { border-color: var(--gold-dim); }

.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.screenshot-icon { font-size: 1.4rem; opacity: 0.4; }

.screenshot-preview { position: relative; padding: 8px; background: var(--bg-input); }
.screenshot-preview img { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--radius-xs); }
.screenshot-remove {
  position: absolute; top: 12px; right: 12px;
  min-width: 44px; min-height: 44px; width: 44px; height: 44px;
  border-radius: 50%; border: none;
  background: rgba(0,0,0,0.75); color: var(--text-primary);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none;
}

.step-nav { display: flex; gap: 12px; margin-top: 12px; }
.step-nav .btn-back { flex: 0 0 auto; width: auto; min-width: 100px; }
.step-nav .btn-next, .step-nav .btn-submit { flex: 1; }

/* ============================================
   PROCESANDO
   ============================================ */
.procesando-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  gap: 52px;
}

.procesando-icon {
  position: relative;
  width: 80px;
  height: 80px;
}

.pulse-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(212,175,90,0.6), 0 0 8px rgba(212,175,90,0.4);
}

.pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 80px; height: 80px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  animation: pulse 2.5s cubic-bezier(0.4,0,0.6,1) infinite;
}

.pulse-ring-2 { animation-delay: 1.25s; }

@keyframes pulse {
  0% { transform: translate(-50%,-50%) scale(0.3); opacity: 0.8; }
  100% { transform: translate(-50%,-50%) scale(1.8); opacity: 0; }
}

.procesando-phrases {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.loading-phrase {
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.5s ease;
}
.loading-phrase.visible { opacity: 1; transform: translateY(0); }
.loading-phrase.active { color: var(--text-primary); }

.progress-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 1px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  border-radius: 1px;
  transition: none;
}

@keyframes indeterminate-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   RESULTADOS
   ============================================ */
.resultado-content { padding-top: 44px; }

.resultado-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  background: linear-gradient(180deg, var(--text-primary) 60%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.resultado-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.65;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Credits counter */
.credits-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--gold-dim);
  padding: 10px 22px;
  background: rgba(212,175,90,0.05);
  border: 1px solid rgba(212,175,90,0.08);
  border-radius: 28px;
  margin-bottom: 22px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  backdrop-filter: blur(12px);
}
.credits-icon { color: var(--gold); font-size: 0.6rem; }
.credits-counter strong { color: var(--gold-bright); }

/* ============================================
   CARDS — Premium glass with gradient borders
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: visible;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm), 0 0 0 0.5px rgba(255,255,255,0.02);
  position: relative;
}

/* Gradient top edge — premium light refraction */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  border-radius: 1px;
}

.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.025);
}

.card-body { padding: 22px; }

/* Card: Mensaje — Hero card with accent glow */
.card-mensaje {
  border-color: rgba(212,175,90,0.15);
  background: linear-gradient(180deg, rgba(212,175,90,0.05) 0%, var(--bg-card) 40%);
  box-shadow: var(--shadow-md), 0 0 80px rgba(212,175,90,0.04);
}

.card-mensaje::before {
  background: linear-gradient(90deg, transparent, rgba(212,175,90,0.2), transparent);
}

/* Outer glow ring on hero card */
.card-mensaje::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(212,175,90,0.12) 0%, transparent 50%);
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}

.mensaje-blockquote {
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-primary);
  padding: 20px;
  background: linear-gradient(135deg, rgba(212,175,90,0.06) 0%, rgba(212,175,90,0.02) 100%);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-bottom: 18px;
  position: relative;
  overflow-wrap: break-word;
  word-break: break-word;
}

.mensaje-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.mensaje-meta-label {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.tone-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(212,175,90,0.1);
}
.tone-badge[data-tone="Frío"],
.tone-badge[data-tone="Frio"] { background: rgba(111,168,214,0.1); color: var(--tone-frio); border-color: rgba(111,168,214,0.1); }
.tone-badge[data-tone="Estratégico"],
.tone-badge[data-tone="Estrategico"] { background: rgba(168,122,212,0.1); color: var(--tone-estrategico); border-color: rgba(168,122,212,0.1); }
.tone-badge[data-tone="Directo"] { background: rgba(224,112,80,0.1); color: var(--tone-directo); border-color: rgba(224,112,80,0.1); }

/* Copy Button — prominent, gold border */
.btn-copy {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(212,175,90,0.05);
  color: var(--gold);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
}

.btn-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,90,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.btn-copy:active { transform: scale(0.97); }
.btn-copy .copy-success { display: none; }
.btn-copy.copied { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.btn-copy.copied .copy-text { display: none; }
.btn-copy.copied .copy-success { display: inline; }

/* Card: Lectura de Él */
.card-lectura .card-body p {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.85;
  font-style: italic;
}
.card-lectura .card-label {
  color: var(--gold);
}

/* Card: Por Qué */
.card-porque .card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* Card: Escenarios */
.escenarios-explainer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.escenario-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.025);
}
.escenario-item:last-child { border-bottom: none; padding-bottom: 0; }

.escenario-si {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.escenario-si strong { color: var(--text-secondary); }

.escenario-significa {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 10px;
  font-style: italic;
  opacity: 0.85;
}
.escenario-significa strong { color: var(--gold); }

.escenario-entonces {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  padding-left: 16px;
  border-left: 2px solid var(--gold-dim);
  line-height: 1.6;
}
.escenario-entonces strong { color: var(--text-secondary); }

/* Card: Líneas Rojas */
.card-lineas-rojas { border-color: rgba(224,85,85,0.1); }

.riesgo-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 4px 12px;
  border-radius: 20px;
}
.riesgo-badge[data-riesgo="Bajo"] { background: var(--green-dim); color: var(--green); }
.riesgo-badge[data-riesgo="Medio"] { background: var(--gold-glow); color: var(--gold); }
.riesgo-badge[data-riesgo="Alto"] { background: var(--red-dim); color: var(--red); }

/* Discrete risk alert — bottom of results */
.alerta-riesgo-bottom {
  margin-top: 20px;
  padding: 14px 16px;
  border-top: 1px solid rgba(224,85,85,0.12);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.alerta-riesgo-bottom .alert-signal-text {
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 0.74rem;
}
.alerta-riesgo-bottom .alerta-lineas {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.alerta-riesgo-bottom .alerta-lineas strong {
  color: var(--text-secondary);
}
.alerta-riesgo-bottom.hidden { display: none; }

#lineas-rojas-lista { list-style: none; padding: 0; }
#lineas-rojas-lista li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 10px 0 10px 24px;
  position: relative;
}
#lineas-rojas-lista li::before {
  content: '';
  position: absolute;
  left: 0; top: 17px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0.5;
  box-shadow: 0 0 8px rgba(224,85,85,0.3);
}

/* ============================================
   PREMIUM: Alternative Messages
   ============================================ */
.card-alt .card-label { color: var(--gold-dim); }

.premium-badge-small {
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212,175,90,0.12), rgba(212,175,90,0.06));
  color: var(--gold);
  border: 1px solid rgba(212,175,90,0.12);
}

.alt-explainer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.55;
}

.alt-message-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.alt-tab {
  flex: 1;
  padding: 11px 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
  text-align: center;
}
.alt-tab.active {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(212,175,90,0.06);
}

.alt-message-content { display: none; }
.alt-message-content.active { display: block; }

.alt-message-text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-primary);
  padding: 18px 20px;
  background: rgba(255,255,255,0.015);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-bottom: 12px;
}

.alt-copy-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
}
.alt-copy-btn:active { transform: scale(0.97); }
.alt-copy-btn.copied { border-color: var(--green); color: var(--green); }

/* ============================================
   FOLLOW-UP
   ============================================ */
.followup-section { margin-bottom: 16px; }

.card-followup {
  cursor: pointer;
  border-color: var(--border-gold);
  background: linear-gradient(135deg, rgba(212,175,90,0.03), var(--bg-card));
}

.followup-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.followup-info { flex: 1; }

.followup-title {
  font-size: 0.92rem;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.followup-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.followup-arrow {
  font-size: 1.3rem;
  color: var(--gold-dim);
  transition: transform 0.3s var(--ease);
}

.followup-form { display: none; margin-top: 16px; }
.followup-form.active { display: block; }

.followup-form textarea {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 80px;
  -webkit-appearance: none;
  margin-bottom: 10px;
}
.followup-form textarea:focus { outline: none; border-color: var(--gold-dim); }
.followup-form textarea::placeholder { color: var(--text-muted); }

.followup-loading {
  text-align: center;
  padding: 12px 0;
  color: var(--gold-dim);
  font-size: 0.8rem;
  animation: followup-pulse 1.5s ease-in-out infinite;
}
.followup-loading.hidden { display: none; }

@keyframes followup-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.followup-cost {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ============================================
   SHARE + RATING + FEEDBACK
   ============================================ */
.btn-share {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
  margin-bottom: 8px;
}
.btn-share:active { background: rgba(255,255,255,0.03); }
.btn-share.shared { border-color: var(--green); color: var(--green); }

.rating-section {
  text-align: center;
  padding: 28px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.rating-section.visible { opacity: 1; transform: translateY(0); }

.rating-prompt { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 16px; }

.rating-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.rating-btn {
  width: 56px; height: 56px;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.02);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
}
.rating-btn:active { transform: scale(0.93); }
.rating-btn.selected { border-color: var(--gold); background: var(--gold-glow); }
.rating-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rating-btn.selected:disabled { opacity: 1; }

.rating-thanks { font-size: 0.78rem; color: var(--gold-dim); }

.feedback-section { margin-top: 4px; margin-bottom: 16px; }

.feedback-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
}

.toggle-arrow { margin-left: auto; transition: transform 0.3s var(--ease); font-size: 1.1rem; }
.feedback-toggle.open .toggle-arrow { transform: rotate(90deg); }

.feedback-form {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 16px;
}
.feedback-form.visible { max-height: 300px; opacity: 1; padding: 16px; }

.feedback-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  resize: vertical;
  min-height: 80px;
  -webkit-appearance: none;
  margin-bottom: 10px;
}
.feedback-form textarea:focus { outline: none; border-color: var(--gold-dim); }
.feedback-form textarea::placeholder { color: var(--text-muted); }
.feedback-form .btn-secondary { width: 100%; margin-bottom: 8px; }
.feedback-thanks { font-size: 0.78rem; color: var(--gold-dim); text-align: center; }

.resultado-content > .btn-primary { margin-top: 12px; display: block; max-width: 400px; margin-left: auto; margin-right: auto; }
.disclaimer {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
  line-height: 1.7;
  padding: 0 8px;
  opacity: 0.7;
}

/* ============================================
   DISCLAIMER CHECKBOX (Step 3 clickwrap)
   ============================================ */
.disclaimer-check {
  margin-top: 20px;
  padding: 0 4px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-label input:focus-visible + .checkmark {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  background: var(--bg-input);
  margin-top: 1px;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.checkbox-label input:checked ~ .checkmark {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.checkbox-label input:checked ~ .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--gold-bright);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-text {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.checkbox-text strong {
  color: var(--text-primary);
}
.checkbox-text a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Terms modal */
.modal-terms-content {
  max-height: 80vh;
  overflow-y: auto;
}
.terms-body {
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 16px 0 20px;
}
.terms-body p {
  margin-bottom: 12px;
}
.terms-body strong {
  color: var(--text-primary);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 36px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 120px rgba(0,0,0,0.4);
}

.modal-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.modal-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.65;
}

.modal-content .btn-primary { max-width: 200px; margin: 0 auto; }

/* ============================================
   HISTORIAL
   ============================================ */
.modal-historial-content {
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-historial-content h3 { margin-bottom: 16px; }

#historial-lista {
  overflow-y: auto;
  max-height: 50vh;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.historial-entry {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 16px;
  margin-bottom: 10px;
}
.historial-entry:last-child { margin-bottom: 0; }
.historial-fecha { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 6px; }
.historial-situacion { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.historial-mensaje {
  font-size: 0.85rem; color: var(--text-primary); font-weight: 500;
  padding: 12px 14px;
  background: rgba(212,175,90,0.04);
  border-left: 2px solid var(--gold-dim);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  line-height: 1.55;
}
.historial-tono { font-size: 0.68rem; color: var(--gold-dim); margin-top: 8px; }
.historial-empty { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 24px 0; }

/* ============================================
   PAYWALL — Premium 3-Tier Pricing
   ============================================ */
.paywall-content {
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 24px !important;
  text-align: left;
  background: linear-gradient(180deg, #111118 0%, var(--bg-card-solid) 100%);
}

.paywall-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem !important;
  text-align: center;
  margin-bottom: 10px !important;
}

.paywall-desc {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  text-align: center;
  line-height: 1.65 !important;
  margin-bottom: 24px !important;
}

.pricing-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pricing-card {
  background: var(--bg-body);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.pricing-card:active { transform: scale(0.98); }

/* Inner glow on selected */
.pricing-card.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,175,90,0.05) 0%, rgba(212,175,90,0.01) 100%);
  box-shadow: 0 0 32px rgba(212,175,90,0.06), inset 0 1px 0 rgba(212,175,90,0.06);
}

.pricing-card.recommended { border-width: 2px; padding: 17px; }
.pricing-card.decoy { opacity: 0.5; }

.pricing-card-badge {
  position: absolute;
  top: -9px;
  right: 16px;
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 12px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--bg-body);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(212,175,90,0.25);
}

.pricing-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.pricing-card-credits {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pricing-card-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2px;
}

.pricing-card.decoy .pricing-card-price { color: var(--text-muted); }

.pricing-card-per {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pricing-card-extras {
  font-size: 0.72rem;
  color: var(--gold-dim);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.paywall-cta {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 40%, #a08530 100%);
  color: var(--bg-body);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-appearance: none;
  box-shadow: var(--shadow-gold);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.paywall-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}
.paywall-cta:active { transform: scale(0.97); }
.paywall-cta:disabled { opacity: 0.35; cursor: not-allowed; }

.paywall-trust { text-align: center; }

.paywall-guarantee {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.paywall-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.paywall-method {
  font-size: 0.6rem;
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.015);
  letter-spacing: 0.3px;
  font-weight: 500;
}

.paywall-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 14px 28px;
  min-height: 48px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
  .screen-content { max-width: 520px; padding: 36px; }
  .landing-subtitle { max-width: 400px; font-size: 1.05rem; }
  .btn-primary { max-width: 360px; margin-left: auto; margin-right: auto; }
  .options-grid { gap: 12px; }
  .option-btn { padding: 18px; font-size: 0.9rem; }
  .card-body { padding: 26px; }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

@supports (-webkit-touch-callout: none) {
  .screen-content { -webkit-overflow-scrolling: touch; }
}

/* Card entrance animation */
.card-tactica {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.card-tactica.visible { opacity: 1; transform: translateY(0); }

/* 320px small screens — single column */
@media (max-width: 359px) {
  .options-grid { grid-template-columns: 1fr; }
  .screen-content { padding: 16px 14px 48px; }
  .landing-content { padding: 32px 16px; }
  .landing-brand { gap: 10px; }
  .brand-text { font-size: 0.58rem; letter-spacing: 2px; }
  .landing-headline { font-size: clamp(2rem, 9vw, 2.6rem); }
  .landing-trust { gap: 6px; }
  .paywall-content { padding: 24px 16px !important; }
}

/* backdrop-filter fallback */
/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not (backdrop-filter: blur(16px)) {
  .card { background: var(--bg-card-solid); }
  .option-btn { background: rgba(14, 14, 24, 0.95); backdrop-filter: none; }
  .credits-counter { background: rgba(20, 18, 12, 0.95); backdrop-filter: none; }
  .btn-historial { background: rgba(14, 14, 24, 0.95); backdrop-filter: none; }
}

/* ============================================
   TOAST (subtle notification)
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.78rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.hidden { display: none; }

/* ============================================
   EMAIL CAPTURE MODAL
   ============================================ */
.modal-email-content {
  text-align: center;
  max-width: 380px;
}
.email-modal-title {
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.email-modal-desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.email-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  outline: none;
  width: 100%;
}
.email-input:focus {
  border-color: var(--gold);
}
.email-error {
  color: var(--red);
  font-size: 0.75rem;
  margin: -4px 0 0;
}
.email-error.hidden { display: none; }

/* Cancel processing button */
.btn-cancel-processing {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 24px;
  padding: 8px 16px;
}
.btn-cancel-processing:hover {
  color: var(--text-secondary);
}
