/* ============================================
   PROTOCOLO DIGITAL ZERO — ESTILO CLASIFICADO
   Estética: Operación militar / Consola táctica
   Colores: Negro profundo + Verde neón (#00FF41)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* === VARIABLES === */
:root {
  --green-neon: #00FF41;
  --green-dim: #00cc33;
  --green-glow: rgba(0, 255, 65, 0.15);
  --green-glow-strong: rgba(0, 255, 65, 0.3);
  --bg-primary: #0a0a0a;
  --bg-secondary: #0d0d0d;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --border-dark: #1a1a1a;
  --border-green: rgba(0, 255, 65, 0.2);
  --text-primary: #e0e0e0;
  --text-secondary: #888888;
  --text-dim: #555555;
  --red-alert: #ff2d2d;
  --font-display: 'Orbitron', monospace;
  --font-mono: 'Share Tech Mono', monospace;
  --font-body: 'Rajdhani', sans-serif;
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* === SCANLINE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.01) 2px,
    rgba(0, 255, 65, 0.01) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* === GRID BACKGROUND === */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 255, 65, 0.03) 0%, transparent 70%),
    linear-gradient(rgba(0, 255, 65, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* === MAIN CONTAINER === */
.mission-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* === TOP CLASSIFIED BAR === */
.classified-bar {
  text-align: center;
  padding: 10px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-green);
  animation: fadeInDown 0.6s ease-out;
}

.classified-bar span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red-alert);
  letter-spacing: 6px;
  text-transform: uppercase;
  animation: blink-alert 3s infinite;
}

@keyframes blink-alert {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0.3; }
}

/* === MISSION STATUS BAR === */
.mission-status {
  margin-bottom: 32px;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.status-percent {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--green-neon);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-card);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-dark);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00cc33 0%, var(--green-neon) 100%);
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--green-neon), 0 0 24px rgba(0, 255, 65, 0.3);
  position: relative;
  animation: progress-glow 2s ease-in-out infinite;
}

.progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 23%,
    rgba(0, 0, 0, 0.25) 23%,
    rgba(0, 0, 0, 0.25) 25%
  );
  border-radius: 4px;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -40%; }
  100% { left: 140%; }
}

@keyframes progress-glow {
  0%, 100% { box-shadow: 0 0 8px var(--green-neon), 0 0 16px rgba(0, 255, 65, 0.2); }
  50% { box-shadow: 0 0 15px var(--green-neon), 0 0 30px rgba(0, 255, 65, 0.4); }
}

/* Phase steps under bar */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 2px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  background: var(--bg-primary);
  transition: all 0.4s ease;
}

.step-dot.completed {
  border-color: var(--green-neon);
  background: var(--green-neon);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

.step-dot.current {
  border-color: var(--green-neon);
  background: transparent;
  animation: pulse-current 2s ease-in-out infinite;
}

@keyframes pulse-current {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.3); }
  50% { box-shadow: 0 0 0 5px rgba(0, 255, 65, 0); }
}

.step-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.step-label.active {
  color: var(--green-neon);
}

/* === PHASE INDICATOR === */
.phase-indicator {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 12px;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

/* === MAIN TITLE === */
.mission-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.2;
  animation: fadeInUp 0.7s ease-out 0.4s both;
}

.mission-title.title-lg {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.mission-title.title-md {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
}

.mission-title .green {
  color: var(--green-neon);
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* === SUBTITLE === */
.mission-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 32px;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease-out 0.5s both;
}

.mission-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* === OPTION CARDS === */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
  animation: fadeInUp 0.7s ease-out 0.6s both;
}

.options-grid.single-col {
  grid-template-columns: 1fr;
}

.option-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--green-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.option-card:hover {
  border-color: var(--green-neon);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1), inset 0 0 20px rgba(0, 255, 65, 0.03);
}

.option-card:hover::before {
  opacity: 1;
}

.option-card.selected {
  border-color: var(--green-neon);
  background: var(--bg-card-hover);
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.15), inset 0 0 30px rgba(0, 255, 65, 0.05);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.75rem;
  color: var(--green-neon);
  font-weight: bold;
}

.option-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(0.3);
}

.option-card:hover .option-icon,
.option-card.selected .option-icon {
  filter: grayscale(0);
}

.option-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

.option-card:hover .option-label {
  color: #ffffff;
}

/* === DYNAMIC OPTIONS (Fase 5) === */
.dynamic-option {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.dynamic-option:hover {
  border-color: var(--green-neon);
  background: var(--bg-card-hover);
  padding-left: 24px;
}

.dynamic-option.selected {
  border-color: var(--green-neon);
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.dynamic-option .opt-marker {
  width: 8px;
  height: 8px;
  border: 2px solid var(--text-dim);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dynamic-option.selected .opt-marker,
.dynamic-option:hover .opt-marker {
  border-color: var(--green-neon);
  background: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon);
}

.dynamic-option .opt-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.dynamic-option:hover .opt-text,
.dynamic-option.selected .opt-text {
  color: var(--text-primary);
}

/* === FORM FIELDS (Fase 6) === */
.form-group {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease-out both;
}

.form-group:nth-child(2) {
  animation-delay: 0.1s;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--green-neon);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.1), inset 0 0 15px rgba(0, 255, 65, 0.03);
}

.form-input.error {
  border-color: var(--red-alert);
  box-shadow: 0 0 10px rgba(255, 45, 45, 0.15);
}

.error-message {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--red-alert);
  margin-top: 6px;
  letter-spacing: 1px;
  display: none;
}

.error-message.visible {
  display: block;
}

/* === CTA BUTTON === */
.btn-mission {
  width: 100%;
  padding: 16px 32px;
  background: transparent;
  border: 2px solid var(--green-neon);
  color: var(--green-neon);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  animation: fadeInUp 0.7s ease-out 0.7s both;
}

.btn-mission::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--green-neon);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.btn-mission:hover::before {
  left: 0;
}

.btn-mission:hover {
  color: #000000;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3), 0 0 60px rgba(0, 255, 65, 0.1);
}

.btn-mission span {
  position: relative;
  z-index: 1;
}

.btn-mission:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-mission:disabled:hover::before {
  left: -100%;
}

.btn-mission:disabled:hover {
  color: var(--green-neon);
  box-shadow: none;
}

/* === BACK LINK === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  transition: color 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

.back-link:hover {
  color: var(--green-neon);
}

/* === SUCCESS PAGE === */
.success-icon {
  width: 80px;
  height: 80px;
  border: 2px solid var(--green-neon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.2), 0 0 60px rgba(0, 255, 65, 0.1);
}

.success-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--green-neon);
  stroke-width: 2.5;
  fill: none;
}

.success-text {
  text-align: center;
}

.success-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 12px;
  line-height: 1.7;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--border-green);
  margin: 28px auto;
}

.upsell-box {
  background: var(--bg-card);
  border: 1px solid var(--border-green);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  margin-top: 20px;
  animation: fadeInUp 0.7s ease-out 1s both;
}

.upsell-box .upsell-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--green-neon);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.upsell-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.btn-upsell {
  display: inline-block;
  padding: 12px 28px;
  background: var(--green-neon);
  color: #000000;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.btn-upsell:hover {
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.5), 0 0 80px rgba(0, 255, 65, 0.2);
  transform: translateY(-2px);
}

/* === LOADING SPINNER === */
.spinner-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.92);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
}

.spinner-overlay.active {
  display: flex;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border: 2px solid var(--border-dark);
  border-top: 2px solid var(--green-neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.spinner-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green-neon);
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: blink-alert 2s infinite;
}

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

/* === FOOTER === */
.mission-footer {
  text-align: center;
  padding: 24px 0 12px;
  margin-top: auto;
}

.mission-footer a {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

.mission-footer a:hover {
  color: var(--green-neon);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .mission-container {
    padding: 16px 14px;
  }
  
  .options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .option-card {
    padding: 16px 10px;
  }
  
  .option-icon {
    font-size: 1.5rem;
  }
  
  .option-label {
    font-size: 0.75rem;
  }
  
  .btn-mission {
    font-size: 0.75rem;
    padding: 14px 24px;
  }
}
