/* ===== LOADING SCREEN - Modern Black & White ===== */
#loading-screen {
  position: fixed; inset: 0; 
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center; 
  overflow: hidden;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
#loading-screen.fade-out { 
  opacity: 0; 
  transform: scale(1.02); 
  pointer-events: none; 
}

/* Subtle grid background */
.loading-bg-grid {
  position: absolute; inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridFloat 20s linear infinite;
}
@keyframes gridFloat { 
  from { background-position: 0 0; } 
  to { background-position: 60px 60px; } 
}

/* Minimal glow effect */
#loading-screen::before {
  content: ''; 
  position: absolute; 
  width: 600px; 
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
  border-radius: 50%; 
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse { 
  0%,100% { transform: scale(1); opacity: 0.3; } 
  50% { transform: scale(1.1); opacity: 0.6; } 
}

/* Content container */
.loading-content { 
  position: relative; 
  z-index: 2; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 40px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  animation: contentEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes contentEntrance { 
  from { opacity: 0; transform: translateY(-30px) scale(0.95); } 
  to { opacity: 1; transform: translateY(0) scale(1); } 
}

/* Logo section */
.loading-logo { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  animation: logoEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; 
}
@keyframes logoEntrance { 
  from { opacity: 0; transform: translateY(-20px) scale(0.8); } 
  to { opacity: 1; transform: translateY(0) scale(1); } 
}

/* Logo mark - Minimalist circles */
.logo-mark { 
  position: relative; 
  width: 48px; 
  height: 48px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}
.logo-ring { 
  position: absolute; 
  border-radius: 50%; 
  border: 2px solid white; 
}
.logo-ring-outer { 
  width: 48px; 
  height: 48px; 
  opacity: 0; 
  animation: ringExpand 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.2s; 
}
.logo-ring-inner { 
  width: 28px; 
  height: 28px; 
  opacity: 0; 
  animation: ringExpand 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.35s; 
}
.logo-dot { 
  width: 10px; 
  height: 10px; 
  background: white; 
  border-radius: 50%; 
  opacity: 0; 
  animation: dotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.5s; 
}
@keyframes ringExpand { 
  from { opacity: 0; transform: scale(0.4); } 
  to { opacity: 1; transform: scale(1); } 
}
@keyframes dotPop { 
  from { opacity: 0; transform: scale(0); } 
  to { opacity: 1; transform: scale(1); } 
}

/* Cloud icon */
.logo-cloud {
  display: flex; 
  align-items: center; 
  justify-content: center;
  animation: cloudPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}
@keyframes cloudPop {
  from { opacity: 0; transform: scale(0.5) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.logo-cloud svg { 
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.3)); 
}

/* Logo text */
.logo-text { 
  font-size: 32px; 
  font-weight: 700; 
  letter-spacing: -0.5px; 
  color: #ffffff; 
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Loading bar - Modern minimal design */
.loading-bar-wrap { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 12px; 
  width: 320px; 
  animation: fadeInUp 0.6s ease forwards 0.5s; 
  opacity: 0; 
}
@keyframes fadeInUp { 
  from { opacity: 0; transform: translateY(10px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.loading-bar { 
  width: 100%; 
  height: 3px; 
  background: rgba(255, 255, 255, 0.08); 
  border-radius: 2px; 
  overflow: hidden; 
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.loading-bar::before { 
  content: ''; 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); 
  animation: shimmer 2s ease-in-out infinite; 
}
@keyframes shimmer { 
  from { transform: translateX(-100%); } 
  to { transform: translateX(100%); } 
}

.loading-bar-fill { 
  height: 100%; 
  background: linear-gradient(90deg, #ffffff 0%, #e0e0e0 100%); 
  border-radius: 2px; 
  width: 0%; 
  transition: width 0.08s linear; 
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 0 0 4px rgba(255, 255, 255, 0.4);
  position: relative;
}
.loading-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
  filter: blur(4px);
}

.loading-percent { 
  font-size: 13px; 
  font-weight: 600; 
  color: rgba(255, 255, 255, 0.5); 
  letter-spacing: 2px; 
  font-family: 'Courier New', monospace;
}
.loading-status { 
  font-size: 13px; 
  color: rgba(255, 255, 255, 0.35); 
  letter-spacing: 0.5px; 
  animation: fadeInUp 0.6s ease forwards 0.7s; 
  opacity: 0;
  text-align: center;
}

/* Particles - Subtle floating dots */
.loading-particles { 
  position: absolute; 
  inset: 0; 
  pointer-events: none; 
  overflow: hidden; 
}
.particle { 
  position: absolute; 
  background: rgba(255, 255, 255, 0.25); 
  border-radius: 50%; 
  animation: particleFloat linear infinite; 
}
@keyframes particleFloat { 
  0% { transform: translateY(100vh) translateX(0); opacity: 0; } 
  10% { opacity: 0.6; } 
  90% { opacity: 0.6; } 
  100% { transform: translateY(-100px) translateX(var(--drift)); opacity: 0; } 
}
