/* ========================================
   FULLSCREEN LOADER - Cyber Terminal Theme
   ======================================== */

.fullscreen-loader {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 18, 0.98);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.fullscreen-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  text-align: center;
  position: relative;
}

/* Animated terminal spinner */
.loader-spinner {
  width: 120px;
  height: 120px;
  position: relative;
  margin: 0 auto 2rem;
}

.loader-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: #00ffff;
  border-right-color: #00ffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid transparent;
  border-bottom-color: #ff2df0;
  border-left-color: #ff2df0;
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Terminal icon in center */
.loader-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lucide-loader-icon {
  width: 56px;
  height: 56px;
  color: #00ffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.6));
  animation:
    pulse-glow 2s ease-in-out infinite,
    icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
  }
  50% {
    opacity: 0.6;
    text-shadow: 0 0 40px rgba(0, 255, 255, 1);
  }
}

/* Status text */
.loader-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #00ffff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.loader-subtext {
  font-family: "Roboto Mono", monospace;
  font-size: 0.85rem;
  color: rgba(0, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

.loader-subtext::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

/* Scanline effect */
.loader-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.03) 2px, rgba(0, 255, 255, 0.03) 4px);
  pointer-events: none;
  animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100px;
  }
}

/* Progress bar */
.loader-progress {
  width: 280px;
  height: 4px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 2rem;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff2df0, #00ffff);
  background-size: 200% 100%;
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
  animation: progress-wave 2s linear infinite;
}

@keyframes progress-wave {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* Glitch effect on text (optional) */
.loader-text.glitch {
  position: relative;
}

.loader-text.glitch::before,
.loader-text.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.loader-text.glitch::before {
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
  color: #ff2df0;
  z-index: -1;
}

.loader-text.glitch::after {
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
  color: #00ffff;
  z-index: -2;
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: translate(0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: translate(-2px, 2px);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
    transform: translate(2px, -2px);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
    transform: translate(-2px, 0);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
    transform: translate(2px, 2px);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
    transform: translate(0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip-path: inset(65% 0 20% 0);
    transform: translate(0);
  }
  20% {
    clip-path: inset(45% 0 26% 0);
    transform: translate(2px, -2px);
  }
  40% {
    clip-path: inset(3% 0 78% 0);
    transform: translate(-2px, 2px);
  }
  60% {
    clip-path: inset(78% 0 15% 0);
    transform: translate(2px, 0);
  }
  80% {
    clip-path: inset(12% 0 53% 0);
    transform: translate(-2px, -2px);
  }
  100% {
    clip-path: inset(45% 0 40% 0);
    transform: translate(0);
  }
}
