/* Loading Screen Styles */
body {
  margin: 0;
  padding: 0;
  background-color: #000e28;
}

.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000e28;
  z-index: 9999;
  overflow: hidden;
}

/* Subtle grid pattern */
.loading-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  opacity: 0.5;
}

/* Animated glow orb */
.loading-container::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  animation: orbFloat 8s ease-in-out infinite;
  pointer-events: none;
}

.loading-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-logo-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.loading-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  display: block;
  animation: logoBreath 4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.4)) 
          drop-shadow(0 0 80px rgba(255, 255, 255, 0.2));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Minimal orbital rings */
.loading-logo-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: rotateRing 3s linear infinite;
  display: none; /* Hidden - removed rotating ring */
}

.loading-logo-ring::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 1px solid transparent;
  border-bottom-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: rotateRing 4s linear infinite reverse;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.loading-spinner::before {
  width: 50px;
  height: 50px;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.8);
  border-right-color: rgba(255, 255, 255, 0.8);
  animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loading-spinner::after {
  width: 40px;
  height: 40px;
  top: 5px;
  left: 5px;
  border: 2px solid transparent;
  border-bottom-color: rgba(255, 255, 255, 0.4);
  border-left-color: rgba(255, 255, 255, 0.4);
  animation: spin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

.loading-text {
  margin-top: 35px;
  color: rgba(255, 255, 255, 0.95);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: textShimmer 3s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  position: relative;
}

.loading-text::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: lineExpand 2s ease-in-out infinite;
}

.loading-progress {
  width: 240px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-top: 40px;
  overflow: hidden;
  position: relative;
}

.loading-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    rgba(255, 255, 255, 0.4), 
    transparent
  );
  border-radius: 10px;
  animation: progressSlide 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  width: 40%;
}

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

@keyframes logoBreath {
  0%, 100% { 
    transform: scale(1);
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.4)) 
            drop-shadow(0 0 80px rgba(255, 255, 255, 0.2));
  }
  50% { 
    transform: scale(1.02);
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.5)) 
            drop-shadow(0 0 100px rgba(255, 255, 255, 0.3));
  }
}

@keyframes rotateRing {
  0% { 
    transform: translate(-50%, -50%) rotate(0deg); 
  }
  100% { 
    transform: translate(-50%, -50%) rotate(360deg); 
  }
}

@keyframes textShimmer {
  0%, 100% { 
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  50% { 
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  }
}

@keyframes lineExpand {
  0%, 100% { 
    width: 40px;
    opacity: 0.6;
  }
  50% { 
    width: 80px;
    opacity: 1;
  }
}

@keyframes progressSlide {
  0% { 
    transform: translateX(-100%); 
  }
  100% { 
    transform: translateX(350%); 
  }
}

@keyframes gridMove {
  0% { 
    transform: translate(0, 0); 
  }
  100% { 
    transform: translate(50px, 50px); 
  }
}

@keyframes orbFloat {
  0%, 100% { 
    transform: translate(-20%, -20%) scale(1);
    opacity: 0.5;
  }
  33% { 
    transform: translate(10%, -30%) scale(1.1);
    opacity: 0.7;
  }
  66% { 
    transform: translate(-30%, 10%) scale(0.9);
    opacity: 0.6;
  }
}

/* Fade out animation */
.loading-container.fade-out {
  animation: fadeOut 0.8s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(1.05);
    filter: blur(10px);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .loading-logo {
    width: 110px;
    height: 110px;
    padding: 16px;
  }
  
  .loading-logo-ring {
    width: 150px;
    height: 150px;
  }
  
  .loading-spinner::before {
    width: 40px;
    height: 40px;
  }
  
  .loading-spinner::after {
    width: 32px;
    height: 32px;
    top: 4px;
    left: 4px;
  }
  
  .loading-text {
    font-size: 13px;
    letter-spacing: 3px;
  }
  
  .loading-progress {
    width: 180px;
  }
  
  .loading-container::after {
    width: 400px;
    height: 400px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .loading-logo,
  .loading-logo-ring,
  .loading-spinner::before,
  .loading-spinner::after,
  .loading-text,
  .loading-progress-bar,
  .loading-container::before,
  .loading-container::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

