/* =========================================
   STUNNING TRANSPARENT PRELOADER STYLES
   ========================================= */

/* Enhanced transparent overlay preloader */
#preLoader.transparent-overlay {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Stunning geometric loader */
#preLoader .geometric-loader {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 20px auto;
}

#preLoader .geometric-loader::before,
#preLoader .geometric-loader::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-top: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: geometricSpin 1.5s linear infinite;
}

#preLoader .geometric-loader::after {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  animation: geometricSpin 1s linear infinite reverse;
}

/* Floating orbs effect */
#preLoader .floating-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

#preLoader .orb {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 70%, transparent 100%);
  border-radius: 50%;
  animation: floatOrb 8s linear infinite;
}

#preLoader .orb:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 6s;
}

#preLoader .orb:nth-child(2) {
  left: 20%;
  animation-delay: 1s;
  animation-duration: 8s;
}

#preLoader .orb:nth-child(3) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 7s;
}

#preLoader .orb:nth-child(4) {
  left: 40%;
  animation-delay: 3s;
  animation-duration: 9s;
}

#preLoader .orb:nth-child(5) {
  left: 50%;
  animation-delay: 4s;
  animation-duration: 6s;
}

#preLoader .orb:nth-child(6) {
  left: 60%;
  animation-delay: 5s;
  animation-duration: 8s;
}

#preLoader .orb:nth-child(7) {
  left: 70%;
  animation-delay: 6s;
  animation-duration: 7s;
}

#preLoader .orb:nth-child(8) {
  left: 80%;
  animation-delay: 7s;
  animation-duration: 9s;
}

#preLoader .orb:nth-child(9) {
  left: 90%;
  animation-delay: 8s;
  animation-duration: 6s;
}

/* Enhanced progress indicator */
#preLoader .progress-circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 20px auto;
}

#preLoader .progress-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

#preLoader .progress-circle .progress-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

#preLoader .progress-circle .progress-bar {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  animation: progressFill 3s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Keyframe animations */
@keyframes geometricSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatOrb {
  0% {
    transform: translateY(100vh) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0;
  }
}

@keyframes progressFill {
  0% {
    stroke-dashoffset: 377;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 377;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  #preLoader .geometric-loader {
    width: 80px;
    height: 80px;
  }
  
  #preLoader .progress-circle {
    width: 100px;
    height: 100px;
  }
  
  #preLoader .loading-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #preLoader .geometric-loader {
    width: 60px;
    height: 60px;
  }
  
  #preLoader .progress-circle {
    width: 80px;
    height: 80px;
  }
  
  #preLoader .loading-text {
    font-size: 14px;
  }
}

/* Performance optimizations */
#preLoader .geometric-loader,
#preLoader .orb,
#preLoader .progress-circle {
  will-change: transform;
}

/* Smooth transitions */
#preLoader * {
  transition: opacity 0.3s ease;
}

/* SEO-friendly preloader */
#preLoader {
  /* Ensure preloader doesn't block content indexing */
  pointer-events: none;
}

#preLoader.fade-out {
  /* Smooth fade out for better UX */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Accessibility improvements */
#preLoader .loading-text {
  /* Screen reader friendly */
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #preLoader *,
  #preLoader *::before,
  #preLoader *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
