/* =====================================================================
   HUD PRELOADER (ISOLATED MODULE)
   Cyber-Clubs Dual Division Cinematic 3D Loader
   ===================================================================== */

/* Hide main application layout during 3D preloader phase without translation offset */
body:not(.site-ready) .app-layout {
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-layout {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Sakura Petals Wind Canvas (Full-screen 60 FPS) */
.sakura-wind-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99997;
  transition: opacity 0.8s ease-out;
}

.sakura-wind-canvas.fading {
  opacity: 0;
}

.flying-sakura {
  display: none !important;
}

.hud-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 75px;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Chakra Petch', 'Barlow Condensed', sans-serif;
  user-select: none;
  pointer-events: all;
  cursor: pointer;
}

.hud-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Glassmorphism HUD Bar beneath the 3D globe */
.preloader-hud-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px 36px 18px;
  border-radius: 12px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08), 0 0 16px rgba(2, 132, 199, 0.12);
  animation: preloader-hud-fadein 0.5s ease-out;
}

/* Brand Subtitle */
.preloader-brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #0f172a;
  margin-bottom: 14px;
}

.preloader-brand-title span {
  color: #0284c7;
}

/* Progress Bar */
.preloader-bar-wrap {
  width: 320px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 60%, #d97706 100%);
  border-radius: 2px;
  transition: width 0.08s linear;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

/* Meta Info / Percentage & Telemetry */
.preloader-meta {
  display: flex;
  justify-content: space-between;
  width: 320px;
  font-family: 'Roboto Mono', 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

.preloader-status {
  letter-spacing: 1px;
  color: #0284c7;
  min-height: 16px;
}

.preloader-percent {
  color: #0f172a;
  font-weight: 700;
}

@keyframes preloader-hud-fadein {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
