/* ══════════════════════════════════════════════════════════════════
   API WARHEAD SHOP — CYBERNETIC NEON LOADER
   Directly matching API WARHEAD SHOP Cyan & Cobalt Theme
   Pure Vector Neon Tracing + High-Tech HUD Telemetry
   ══════════════════════════════════════════════════════════════════ */

#app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999999999;
  background-color: #04060c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  padding: 0;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s;
  pointer-events: all;
  user-select: none;
  -webkit-user-select: none;
}

#app-loading-screen.loader-fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.035);
}

/* Ambient Cyber Glow Backdrop */
.loader-ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.loader-glow-circle-1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 210, 246, 0.22) 0%, rgba(7, 98, 235, 0.12) 50%, transparent 70%);
  filter: blur(60px);
  animation: loader-glow-breath 3.5s ease-in-out infinite alternate;
}

.loader-glow-circle-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 210, 246, 0.28) 0%, transparent 70%);
  filter: blur(35px);
  animation: loader-glow-breath 2.5s ease-in-out infinite alternate-reverse;
}

.loader-grid-lines {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(8, 210, 246, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(8, 210, 246, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 80%);
}

/* Keyframes */
@keyframes bat-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bat-trace {
  to { stroke-dashoffset: -720; }
}

@keyframes bat-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes bolt-pulse {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.97);
    filter: drop-shadow(0 0 6px #08d2f6) drop-shadow(0 0 14px rgba(7, 98, 235, 0.6));
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
    filter: drop-shadow(0 0 10px #1edcf3) drop-shadow(0 0 22px rgba(8, 210, 246, 0.85));
  }
}

@keyframes loader-glow-breath {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

@keyframes hud-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating SVG Wrapper */
.loader-svg-wrap {
  position: relative;
  width: 230px;
  max-width: 82vw;
  height: auto;
  animation: bat-float 3.6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.85));
}

.bat-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.bat-base {
  fill: rgba(7, 12, 24, 0.75);
  stroke: rgba(8, 210, 246, 0.28);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bat-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120 600;
  animation: bat-trace 2.4s linear infinite;
  filter:
    drop-shadow(0 0 4px #08d2f6)
    drop-shadow(0 0 10px #0762eb)
    drop-shadow(0 0 22px #08d2f6);
}

.bat-core-bolt {
  fill: url(#clutchBoltGrad);
  transform-origin: 210px 100px;
  animation: bolt-pulse 2.2s ease-in-out infinite;
}

.bat-orbit-ring {
  fill: none;
  stroke: rgba(8, 210, 246, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 12 18;
  transform-origin: 210px 110px;
  animation: hud-spin 14s linear infinite;
}

/* Center HUD Details */
.loader-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  width: 240px;
  max-width: 85vw;
}

.loader-brand-title {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 7px;
  text-transform: uppercase;
  font-family: 'Space Grotesk', 'JetBrains Mono', monospace;
  text-shadow: 0 0 14px rgba(8, 210, 246, 0.75);
  animation: bat-pulse 1.8s ease-in-out infinite;
  text-align: center;
  white-space: nowrap;
}

.loader-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.loader-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #08d2f6;
  box-shadow: 0 0 8px #08d2f6;
  animation: bat-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.loader-status-text {
  color: #38bdf8;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  transition: color 0.3s;
  white-space: nowrap;
}

/* Futuristic Progress Bar */
.loader-progress-track {
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(8, 210, 246, 0.15);
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0762eb, #08d2f6, #38bdf8);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(8, 210, 246, 0.9), 0 0 18px rgba(7, 98, 235, 0.6);
  transition: width 0.15s ease-out;
}

.loader-meta-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #64748b;
  letter-spacing: 0.5px;
}

.loader-meta-latency {
  color: #64748b;
}

.loader-meta-pct {
  color: #08d2f6;
  font-weight: 700;
}

@media (max-width: 640px) {
  .loader-svg-wrap {
    width: 190px;
  }
  .loader-brand-title {
    font-size: 10px;
    letter-spacing: 5px;
  }
  .loader-details {
    width: 210px;
  }
}
