/* =============================================
   SpiderWebAI — Premium Animated Loading Screen
   ============================================= */

#swai-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #050816;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', sans-serif;
  cursor: default;
}

/* ── Canvas layer ── */
#swai-loader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Skip button ── */
#swai-skip {
  position: absolute;
  bottom: 36px;
  right: 36px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  transition: color 0.25s, border-color 0.25s;
  z-index: 10;
}
#swai-skip:hover {
  color: rgba(0, 174, 239, 0.9);
  border-color: rgba(0, 174, 239, 0.45);
}

/* ── Progress bar ── */
#swai-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 10;
}
#swai-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00aeef, #7b61ff);
  box-shadow: 0 0 12px rgba(0, 174, 239, 0.7);
  transition: width 0.1s linear;
}

/* ── Central stage ── */
#swai-stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

/* ── Logo text ── */
#swai-logo-text {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#swai-logo-text.visible {
  opacity: 1;
  transform: translateY(0);
}
#swai-logo-text .sw-blue {
  background: linear-gradient(90deg, #00aeef 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#swai-logo-text .sw-purple {
  background: linear-gradient(90deg, #7b61ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Individual letter reveal */
#swai-logo-text .l {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#swai-logo-text .l.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Tagline ── */
#swai-tagline {
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#swai-tagline.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pulse ring on logo glow ── */
#swai-glow-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(0, 174, 239, 0);
  transform: scale(0.85);
  opacity: 0;
  transition: none;
  pointer-events: none;
}
#swai-glow-ring.pulse {
  animation: ringPulse 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ringPulse {
  0%   { border-color: rgba(0, 174, 239, 0.6); transform: scale(0.85); opacity: 1; }
  100% { border-color: rgba(0, 174, 239, 0);   transform: scale(1.6);  opacity: 0; }
}

/* ── Exit dissolve ── */
#swai-loader.dissolve-out {
  animation: loaderDissolve 0.9s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes loaderDissolve {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0px);   }
  100% { opacity: 0; transform: scale(1.04); filter: blur(4px);   }
}

/* ── Floating ambient orbs ── */
.swai-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat linear infinite;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1);   opacity: 0.18; }
  33%  { transform: translate(30px, -20px) scale(1.05); opacity: 0.22; }
  66%  { transform: translate(-20px, 15px) scale(0.95); opacity: 0.16; }
  100% { transform: translate(0, 0) scale(1);   opacity: 0.18; }
}
