/* ==========================================================================
   WinTradely Trading Platform — Quotex-Style Logo Preloader & Platform Sync
   Design: Ultra-Minimalist, Deep Cosmic Glass, Glowing Neon Breathing Emblem
   ========================================================================== */

.db-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 45%, #090e19 0%, #050811 60%, #020408 100%);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.db-loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.03);
}

/* Ambient Cyber Aurora Glows */
.db-loader-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.18;
  will-change: transform, opacity;
  animation: dbAuroraFloat 8s ease-in-out infinite alternate;
}

.db-loader-aurora-cyan {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #00e5ff 0%, rgba(0, 229, 255, 0) 70%);
  top: 20%;
  left: 25%;
  animation-duration: 7s;
}

.db-loader-aurora-emerald {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #00e676 0%, rgba(0, 230, 118, 0) 70%);
  bottom: 20%;
  right: 25%;
  animation-duration: 9s;
  animation-direction: alternate-reverse;
}

.db-loader-aurora-purple {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
}

@keyframes dbAuroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.06); }
  100% { transform: translate(-15px, 15px) scale(0.96); }
}

/* Background Cyber Grid */
.db-loader-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  pointer-events: none;
}

/* Center Stage */
.db-loader-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dbQuotexFloat 3s ease-in-out infinite;
}

@keyframes dbQuotexFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Orbital Rings & Logo Disc */
.db-loader-orbit-wrapper {
  position: relative;
  width: 136px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* Quotex-Style Conic Neon Sweep Ring */
.db-loader-orbit-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from 0deg, transparent 0%, #00e5ff 35%, #00e676 75%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: dbOrbitSpin 1.8s linear infinite;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.35);
}

/* Inner Pulsing Ring */
.db-loader-orbit-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.2);
  animation: dbInnerPulse 2s ease-in-out infinite;
}

/* Core Pulsing Glow Behind Logo */
.db-loader-orbit-halo {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.4) 0%, rgba(0, 230, 118, 0.2) 50%, transparent 75%);
  animation: dbHaloPulse 2s ease-in-out infinite;
}

/* Center Glassmorphism Logo Shield */
.db-loader-logo-shield {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: rgba(11, 16, 29, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75),
              inset 0 1px 1px rgba(255, 255, 255, 0.25),
              0 0 35px rgba(0, 229, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: dbShieldPulse 2s ease-in-out infinite;
}

/* Sheen Light Sweep */
.db-loader-logo-shield::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 48%,
    rgba(0, 229, 255, 0.35) 52%,
    transparent 65%
  );
  transform: rotate(25deg);
  animation: dbSheenSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

/* Animated Logo Image */
.db-loader-logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 12px rgba(0, 229, 255, 0.45));
  animation: dbLogoPulse 2s ease-in-out infinite;
  transition: transform 0.3s ease;
}

/* Quotex-Style Brand Typography (Only WinTradely, No Other Text) */
.db-loader-brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, #ffffff 30%, #00e5ff 65%, #00e676 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dbTextShimmer 2.6s linear infinite;
  margin: 0;
  padding: 0;
  text-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
}

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

@keyframes dbInnerPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.7; }
}

@keyframes dbHaloPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.45; }
  50% { transform: scale(1.25); opacity: 0.85; }
}

@keyframes dbShieldPulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 16px 40px rgba(0,0,0,0.75), 0 0 25px rgba(0, 229, 255, 0.22); 
  }
  50% { 
    transform: scale(1.03); 
    box-shadow: 0 20px 50px rgba(0,0,0,0.85), 0 0 40px rgba(0, 230, 118, 0.38); 
  }
}

@keyframes dbLogoPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 12px rgba(0, 229, 255, 0.45));
  }
  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 22px rgba(0, 230, 118, 0.75));
  }
}

@keyframes dbSheenSweep {
  0% { transform: translateY(-120%) rotate(25deg); opacity: 0; }
  25% { opacity: 1; }
  60% { transform: translateY(120%) rotate(25deg); opacity: 0; }
  100% { transform: translateY(120%) rotate(25deg); opacity: 0; }
}

@keyframes dbTextShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .db-loader-orbit-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
  }
  .db-loader-logo-shield {
    width: 80px;
    height: 80px;
    border-radius: 22px;
  }
  .db-loader-logo-img {
    width: 48px;
    height: 48px;
  }
  .db-loader-brand-title {
    font-size: 22px;
    letter-spacing: 1px;
  }
}
