html,
body,
#root {
  touch-action: manipulation;
}

#initial-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  color: #f2f4ff;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(88, 101, 242, 0.13), transparent 44%),
    linear-gradient(180deg, #10111b 0%, #0b0c13 48%, #090a10 100%);
  z-index: 9999;
}

#initial-loader .loader-card {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  width: min(100%, 420px);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(32px, 7vw, 48px);
  border: 1px solid rgba(135, 145, 255, 0.14);
  border-radius: 32px;
  background: rgba(17, 19, 31, 0.78);
  box-shadow: 0 24px 90px rgba(5, 7, 22, 0.58), 0 0 70px rgba(88, 101, 242, 0.06);
  text-align: center;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

#initial-loader .ring-wrap {
  position: relative;
  display: grid;
  width: clamp(112px, 30vw, 140px);
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 4px;
}

#initial-loader .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(88, 101, 242, 0.16);
  border-top-color: #5865F2;
  border-right-color: rgba(88, 101, 242, 0.44);
  animation: initial-loader-spin 3s linear infinite;
  will-change: transform;
}

#initial-loader .halo {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-radius: 50%;
  animation: initial-loader-pulse 2.8s ease-in-out infinite;
}

#initial-loader .orbit-dot {
  position: absolute;
  top: 13%;
  right: 13%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7d87ff;
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.9);
}

#initial-loader .logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 68%;
  height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(88, 101, 242, 0.3));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#initial-loader .brand-name {
  margin-top: 2px;
  color: #8e98ff;
  font-family: "Zain", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
}

#initial-loader .status {
  margin: 0;
  color: #e9eaf6;
  font-family: "Zain", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

#initial-loader .progress-track {
  width: 132px;
  height: 4px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.14);
}

#initial-loader .progress-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(88, 101, 242, 0.4), #7180ff, rgba(88, 101, 242, 0.45));
  animation: initial-loader-travel 1.9s ease-in-out infinite;
}

@keyframes initial-loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes initial-loader-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.52; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes initial-loader-travel {
  0% { transform: translateX(-115%); opacity: 0.4; }
  50% { opacity: 1; }
  100% { transform: translateX(245%); opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  #initial-loader .ring,
  #initial-loader .halo,
  #initial-loader .progress-fill {
    animation: none;
  }
}

/* Keep the mobile bottom navigation's glass surface explicit in production browsers. */
@media (max-width: 767px) {
  .site-header-surface.absolute.bottom-0.left-3.right-3 {
    background: rgba(10, 8, 14, 0.80);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}