/* =========================================================================================
   SWASTIK GROUP - 5-STAR ULTRA-PREMIUM ANIMATED SPLASH SCREEN (60 FPS HARDWARE ACCELERATED)
   ========================================================================================= */

/* 1. Prevent Background Scrolling When Splash Screen is Active */
body.splash-active {
  overflow: hidden !important;
}

/* 2. Zero-Flicker Instant Hide When Already Shown in Session */
html.splash-already-shown #swastik-splash-screen {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  animation: none !important;
  transition: none !important;
}

html.splash-already-shown #swastik-splash-screen * {
  animation: none !important;
  transition: none !important;
}

html.splash-already-shown body.splash-active {
  overflow: auto !important;
}

/* 2. Full-Screen Overlay Container with Matte Black Background (#0A0A0A) */
#swastik-splash-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #0A0A0A !important;
  background: radial-gradient(circle at center, #111111 0%, #0A0A0A 75%) !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, visibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3. Smooth Fade-Out State */
#swastik-splash-screen.splash-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 4. Center Logo & Circular Arc Container */
.splash-logo-container {
  position: relative !important;
  width: 190px !important;
  height: 190px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateZ(0);
  will-change: transform;
}

/* 5. Soft Golden Glow Behind Logo */
.splash-golden-glow {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 130px !important;
  height: 130px !important;
  margin-top: -65px !important;
  margin-left: -65px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.55) 0%, rgba(184, 150, 40, 0.25) 45%, rgba(0, 0, 0, 0) 75%) !important;
  filter: blur(18px) !important;
  -webkit-filter: blur(18px) !important;
  animation: splashGlowPulse 3s ease-in-out infinite alternate !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

@keyframes splashGlowPulse {
  0% {
    transform: scale(0.85) translateZ(0);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1) translateZ(0);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.2) translateZ(0);
    opacity: 0.8;
  }
}

/* 6. Outer Arc Loader (Rotates Clockwise) */
.splash-arc-outer {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  border: 2.5px solid transparent !important;
  border-top: 2.5px solid #D4AF37 !important;
  border-right: 2.5px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3) !important;
  animation: splashRotateClockwise 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  z-index: 2 !important;
  will-change: transform;
}

@keyframes splashRotateClockwise {
  0% {
    transform: rotate(0deg) translateZ(0);
  }
  100% {
    transform: rotate(360deg) translateZ(0);
  }
}

/* 7. Inner Arc Loader (Rotates Anti-Clockwise) */
.splash-arc-inner {
  position: absolute !important;
  top: 18px !important;
  left: 18px !important;
  width: calc(100% - 36px) !important;
  height: calc(100% - 36px) !important;
  border-radius: 50% !important;
  border: 2px solid transparent !important;
  border-bottom: 2px solid #EAD07D !important;
  border-left: 2px solid rgba(234, 208, 125, 0.45) !important;
  box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.25) !important;
  animation: splashRotateAntiClockwise 1.25s linear infinite !important;
  z-index: 3 !important;
  will-change: transform;
}

@keyframes splashRotateAntiClockwise {
  0% {
    transform: rotate(360deg) translateZ(0);
  }
  100% {
    transform: rotate(0deg) translateZ(0);
  }
}

/* 8. Fade-in & Slight Zoom-in Animation for the Logo */
.splash-logo {
  position: relative !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.splash-logo img {
  max-width: 95px !important;
  max-height: 95px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  animation: splashLogoFadeZoom 3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  will-change: transform, opacity, filter;
}

@keyframes splashLogoFadeZoom {
  0% {
    opacity: 0;
    transform: scale(0.72) translateZ(0);
    filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0));
  }
  35% {
    opacity: 1;
    transform: scale(1.02) translateZ(0);
    filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.5));
  }
  100% {
    opacity: 1;
    transform: scale(1.08) translateZ(0);
    filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.75));
  }
}

/* 9. Elegant Branding Text Below Logo */
.splash-branding {
  margin-top: 38px !important;
  text-align: center !important;
  z-index: 5 !important;
  animation: splashTextFadeIn 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  will-change: transform, opacity;
}

@keyframes splashTextFadeIn {
  0% {
    opacity: 0;
    transform: translateY(18px) translateZ(0);
  }
  30% {
    opacity: 0;
    transform: translateY(18px) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.splash-brand-title {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: 5px !important;
  color: #FFFFFF !important;
  text-shadow: 0 2px 12px rgba(212, 175, 55, 0.4) !important;
  margin: 0 0 6px 0 !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

.splash-brand-subtitle {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 4px !important;
  color: #D4AF37 !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  opacity: 0.95 !important;
  line-height: 1.2 !important;
}

/* 10. Responsive Adjustments for Mobile and Tablet (< 768px) */
@media (max-width: 767px) {
  .splash-logo-container {
    width: 160px !important;
    height: 160px !important;
  }
  .splash-golden-glow {
    width: 110px !important;
    height: 110px !important;
    margin-top: -55px !important;
    margin-left: -55px !important;
  }
  .splash-logo img {
    max-width: 82px !important;
    max-height: 82px !important;
  }
  .splash-brand-title {
    font-size: 22px !important;
    letter-spacing: 3.5px !important;
  }
  .splash-brand-subtitle {
    font-size: 10px !important;
    letter-spacing: 3px !important;
  }
}
