

/* ==========================================================================
   PANTALLA DE CARGA PREMIUM (Extropian Ultra-Glass Corregido)
   ========================================================================== */
/* ==========================================================================
   PANTALLA DE CARGA CRT / GLITCH CON TU ELIPSE DE TV (ERRAK-I)
   ========================================================================== */

.extropian-preloader { 
  position: fixed !important; 
  top: 0 !important; 
  left: 0 !important; 
  width: 100vw !important; 
  height: 100vh !important; 
  
  /* Tu fondo elipse exacto del body que simula pantalla de TV */
  background: #7B8488 !important;
  background: radial-gradient(ellipse at center, rgba(150, 160, 172, 1) 5%, rgba(0, 0, 0, 1) 100%) !important;
  
  z-index: 999999 !important; 
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  overflow: hidden;
}

/* Líneas de escaneo CRT animadas en movimiento continuo */
.crt-scanlines-animated {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
  background-size: 100% 8px;
  animation: crtScanlineScroll 0.45s linear infinite, crtScreenFlicker 4s infinite;
  pointer-events: none;
  z-index: 1;
}

/* Banda horizontal de interferencia glitch que barre la pantalla */
.crt-glitch-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(205, 250, 27, 0.14);
  box-shadow: 0 0 18px rgba(205, 250, 27, 0.25);
  pointer-events: none;
  z-index: 1;
  animation: crtGlitchSweep 3.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* Escenario flotante sin caja */
.preloader-minimal-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  text-align: center;
}

/* 🚀 ENVOLTURAS DE ANIMACIÓN INDEPENDIENTES
   Para que 'Float' y 'Pulse' no se anulen en la GPU, aplicamos una animación 
   al contenedor contenedor-padre y la otra directamente al SVG. */
.preloader-logo-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100px;
  
  /* El padre se encarga exclusivamente del rebote vertical flotante */
  animation: extropianFloat 3s infinite ease-in-out;
}

.preloader-svg-logo {
  height: 85px; 
  width: auto;
  display: block;
  
  /* El SVG hijo se encarga exclusivamente del pulso de escala */
  animation: extropianPulse 2s infinite ease-in-out;
  transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

.preloader-svg-logo.fase-inicial {
  height: 60px; 
  opacity: 0.7;
}

/* Porcentaje limpio en verde lima */
.preloader-counter-clean {
  font-family: 'Helvetica Neue STL Pro Extended', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 1.65rem;
  color: #CDFA1B !important;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-counter-clean.counter-visible-active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.preloader-counter-clean .pct-symbol {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-left: 2px;
}

/* Mensaje minimalista en Anonymous Pro */
.preloader-status-msg {
  font-family: 'Anonymous Pro', monospace !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.24em !important;
  color: rgba(255, 255, 255, 0.75) !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  animation: crtTextFlicker 3.2s infinite;
}

/* Salida suave */
.extropian-preloader.preloader-hidden-fade {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease !important;
}

/* Keyframes de movimiento CRT y Glitch */
@keyframes crtScanlineScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 8px; }
}

@keyframes crtGlitchSweep {
  0%, 75%, 100% {
    top: -10%;
    opacity: 0;
  }
  78% {
    top: 22%;
    opacity: 0.85;
    transform: skewX(-12deg);
  }
  82% {
    top: 68%;
    opacity: 0.5;
    transform: skewX(15deg);
  }
  85% {
    top: 105%;
    opacity: 0;
  }
}

@keyframes crtLogoGlitch {
  0%, 90%, 100% {
    transform: translate(0, 0) skew(0deg);
    filter: drop-shadow(0 0 12px rgba(205, 250, 27, 0.25));
  }
  91% {
    transform: translate(-4px, 1px) skew(-5deg);
    filter: drop-shadow(3px 0 #ff0037) drop-shadow(-3px 0 #00f0ff);
  }
  92% {
    transform: translate(4px, -1px) skew(4deg);
    filter: drop-shadow(-2px 0 #CDFA1B);
  }
  93% {
    transform: translate(-2px, 0) skew(0deg);
  }
}

@keyframes crtTextFlicker {
  0%, 100% { opacity: 0.75; }
  49% { opacity: 0.75; }
  50% { opacity: 0.3; }
  51% { opacity: 0.85; }
  88% { opacity: 0.75; }
  89% { opacity: 0.2; }
  90% { opacity: 0.75; }
}


/* ==========================================================================
   🎯 TUS KEYFRAMES ORIGINALES RECUPERADOS
   ========================================================================== */
@keyframes extropianFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

@keyframes extropianPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.crt-vignette-noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
  z-index: 1;
}

.crt-beam-collapse {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  background: #ffffff;
  box-shadow: 0 0 80px 30px rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
  z-index: 9999999;
}

.extropian-preloader.crt-turning-off {
  background: #000000 !important;
  animation: crtContainerFadeOut 1.15s ease forwards !important;
}

.extropian-preloader.crt-turning-off .crt-beam-collapse {
  animation: crtTvPowerOff 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes crtTvPowerOff {
  0% {
    opacity: 0.95;
    width: 100vw;
    height: 32vh;
    border-radius: 0;
  }
  35% {
    opacity: 1;
    width: 100vw;
    height: 4px;
    border-radius: 0;
  }
  68% {
    opacity: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: 0 0 55px 25px #ffffff, 0 0 90px 40px rgba(205, 250, 27, 0.4);
  }
  100% {
    opacity: 0;
    width: 0px;
    height: 0px;
    border-radius: 50%;
  }
}

@keyframes crtContainerFadeOut {
  0%, 75% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
