/* RESET GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--black-deep);
  font-family: var(--font-primary);
}


/* LOADING SCREEN */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* LOGO ANIMADO */
.loading-logo-img {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 0 20px var(--cyan));
  animation: logoPulse 1.8s infinite ease-in-out;
}

@keyframes logoPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--cyan)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 25px var(--cyan)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--cyan)); }
}

/* CONTENEDOR DEL RAYO */
.ray-progress-container {
  width: 260px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-top: 25px;
  position: relative;
  overflow: visible;
}

/* BARRA QUE AVANZA */
.ray-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #00ffff, var(--cyan));
  animation: rayProgress 2.2s ease-out forwards, rayShadow 2.2s ease-out forwards;
  position: relative; 
  z-index: 2;
}

/* ANIMACIÓN DE ANCHO */
@keyframes rayProgress {
  0% { width: 0%; }
  30% { width: 40%; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* SHADOW QUE CRECE */
@keyframes rayShadow {
  0%   { box-shadow: 0 0 12px var(--cyan); }
  25%  { box-shadow: 0 0 18px var(--cyan); }
  50%  { box-shadow: 0 0 25px var(--cyan); }
  75%  { box-shadow: 0 0 32px var(--cyan); }
  100% { box-shadow: 0 0 40px var(--cyan); }
}


/* DESTELLO */
.ray-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 100%;
  background: white;
  filter: blur(6px);
  opacity: 0;
  animation: rayFlash 2.2s ease-out forwards;
}

@keyframes rayFlash {
  0% { left: 0; opacity: 0; }
  20% { opacity: 1; }
  60% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* TEXTO */
.loading-text {
  margin-top: 18px;
  font-size: 1.1rem;
  opacity: 0.8;
  color: var(--cyan);
  animation: fade 1.8s infinite ease-in-out;
}

@keyframes fade {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

