/* ===== Premium Minimal Overlay (Elveena) ===== */
#loading-overlay {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 0%, #ffffff 0%, #f7f9ff 45%, #eef3ff 100%);
  z-index: 9999;
  transition: opacity .6s ease, visibility .6s ease;
  opacity: 1; visibility: visible;
  overflow: hidden;
}

/* animated subtle gradient shimmer */
#loading-overlay::before,
#loading-overlay::after {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 30% at 20% 15%, rgba(30,136,229,.10) 0%, transparent 70%),
    radial-gradient(30% 25% at 80% 70%, rgba(212,175,55,.10) 0%, transparent 70%);
  filter: blur(20px);
  animation: overlayFloat 14s ease-in-out infinite alternate;
  pointer-events: none;
}
#loading-overlay::after {
  animation-delay: -7s; transform: rotate(15deg);
}

@keyframes overlayFloat {
  0%   { transform: translate3d(0,0,0) scale(1);   opacity: .9; }
  100% { transform: translate3d(2%, -2%, 0) scale(1.03); opacity: 1; }
}

/* container */
.overlay-wrap {
  display: grid; gap: 16px; place-items: center;
  padding: 24px 28px;
  background: rgba(255,255,255,.55);
  backdrop-filter: saturate(140%) blur(8px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(30, 58, 138, .12), 0 0 0 1px rgba(30, 58, 138, .06);
}

/* logo + ring */
.logo-wrap {
  position: relative;
  width: 140px; height: 140px;
  display: grid; place-items: center;
}

/* glowing ring behind the logo */
.logo-ring {
  position: absolute; inset: 0;
  border-radius: 999px;
  background:
    conic-gradient(from 0deg, #1E88E5, #42A5F5, #D4AF37, #1E88E5);
  -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
          mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
  filter: blur(0.4px);
  animation: ringSpin 2.4s cubic-bezier(.4,0,.2,1) infinite;
  box-shadow: 0 0 24px rgba(30,136,229,.25);
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

/* the logo itself with premium pulse */
.loading-logo {
  width: 104px; height: 104px;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
  animation: logoPulse 2.2s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes logoPulse {
  0%,100% { transform: scale(1);    opacity: 1;   }
  50%     { transform: scale(1.06); opacity: .92; }
}

/* thin auto-progress with shimmer under the logo */
.mini-progress {
  width: 180px; height: 4px; border-radius: 999px;
  background: rgba(30,136,229,.15);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(30,136,229,.08);
}
.mini-progress > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #1E88E5 0%, #42A5F5 55%, #D4AF37 100%);
  animation: autoGrow 2.8s ease-in-out infinite;
  transform-origin: left center;
}
@keyframes autoGrow {
  0%   { width: 10%; }
  50%  { width: 82%; }
  100% { width: 10%; }
}

/* hide overlay when complete */
#loading-overlay.loading-complete {
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* reduced motion: keep the premium look without movement */
@media (prefers-reduced-motion: reduce) {
  #loading-overlay::before, #loading-overlay::after,
  .logo-ring, .loading-logo, .mini-progress > span {
    animation: none !important;
  }
}
