
.preloader {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0a0f0d;
  z-index: 10000;
  transition: opacity 0.65s ease, transform 0.65s ease;
  overflow: hidden;
}

#preloader.sliding {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

#preloader.hidden {
  display: none;
}

#preloader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Scanline sweep */
.preloader-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(16, 185, 129, 0.04) 50%,
    transparent 100%
  );
  background-size: 100% 40px;
  animation: scanline-sweep 3s linear infinite;
}

@keyframes scanline-sweep {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* Center loader */
#rave-loader {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Logo orb */
.logo-orb {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-orb img {
  height: 72px;
  width: auto;
  position: relative;
  z-index: 3;
  animation: logo-breathe 2.4s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(16,185,129,0.55)) drop-shadow(0 0 2px rgba(52,211,153,0.4));
  }
  50% {
    filter: drop-shadow(0 0 24px rgba(16,185,129,0.95)) drop-shadow(0 0 48px rgba(16,185,129,0.25));
  }
}

/* Subtle radial glow behind logo */
.logo-orb::before {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  animation: logo-breathe-bg 2.4s ease-in-out infinite;
}

@keyframes logo-breathe-bg {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Orbit rings */
.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(16,185,129,0.22);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
}

.orb-ring::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  top: -3.5px;
  left: 50%;
  margin-left: -3.5px;
  box-shadow: 0 0 10px #10b981, 0 0 20px rgba(16,185,129,0.5);
}

.orb-ring-a {
  width: 118px;
  height: 118px;
  animation: ring-cw 3.2s linear infinite;
}

.orb-ring-b {
  width: 140px;
  height: 140px;
  border-color: rgba(52,211,153,0.12);
  animation: ring-ccw 5s linear infinite;
}

.orb-ring-b::after {
  width: 5px;
  height: 5px;
  background: #34d399;
  top: -2.5px;
  margin-left: -2.5px;
  box-shadow: 0 0 7px #34d399, 0 0 14px rgba(52,211,153,0.4);
}

@keyframes ring-cw  { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ring-ccw { to { transform: translate(-50%, -50%) rotate(-360deg); } }

/* Boot text */
.boot-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.boot-wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #f0fdf4;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.boot-status {
  font-family: 'Inter', monospace;
  font-size: 10px;
  color: #34d399;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0.75;
  min-height: 14px;
  transition: opacity 0.3s ease;
}

/* Progress bar */
.progress-track {
  width: 180px;
  height: 1.5px;
  background: rgba(16,185,129,0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(16,185,129,0.7);
  animation: progress-advance 2.8s ease-in-out forwards;
}

@keyframes progress-advance {
  0%   { width: 0%; }
  30%  { width: 45%; }
  60%  { width: 72%; }
  85%  { width: 88%; }
  100% { width: 96%; }
}

/* Tiny corner decorations */
.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(16,185,129,0.25);
  border-style: solid;
  border-width: 0;
}
.corner-tl { top: 24px; left: 24px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner-tr { top: 24px; right: 24px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner-bl { bottom: 24px; left: 24px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner-br { bottom: 24px; right: 24px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
