@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Exo+2:wght@300;400;500;600&display=swap');

html,
body {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* Lock scrolling while loader is active */
html.loading,
body.loading {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

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

#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 9999;
}

#loader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

#container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.loader-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.loader-logo {
  margin-bottom: 20px;
  opacity: 0;
  animation: logoFadeIn 1s ease-out 0.2s forwards;
}

.loader-logo img {
  height: 60px;
  filter: drop-shadow(0 0 20px rgba(126, 34, 206, 0.8));
}

@keyframes logoFadeIn {
  from { 
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.loader-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #c084fc;
  text-align: center;
  padding: 15px 25px;
  margin-bottom: 20px;
  opacity: 0;
  animation: textGlow 2s ease-in-out 0.5s infinite;
  text-shadow: 
    0 0 10px rgba(192, 132, 252, 0.7),
    0 0 20px rgba(126, 34, 206, 0.5),
    0 0 30px rgba(74, 29, 150, 0.3);
  max-width: 90vw;
  word-wrap: break-word;
}

@keyframes textGlow {
  0%, 100% { 
    opacity: 0.7;
    text-shadow: 
      0 0 10px rgba(192, 132, 252, 0.7),
      0 0 20px rgba(126, 34, 206, 0.5),
      0 0 30px rgba(74, 29, 150, 0.3);
  }
  50% { 
    opacity: 1;
    text-shadow: 
      0 0 15px rgba(192, 132, 252, 0.9),
      0 0 30px rgba(126, 34, 206, 0.7),
      0 0 45px rgba(74, 29, 150, 0.5);
  }
}

.loading-progress {
  width: 300px;
  height: 4px;
  background: rgba(126, 34, 206, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, #7e22ce, #c084fc, #7e22ce);
  background-size: 200% 100%;
  border-radius: 2px;
  width: 0%;
  animation: loadingProgress 0.15s ease-out forwards;
}

@keyframes loadingProgress {
  to { width: 100%; }
}

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

/* Mobile responsive styles */
@media (max-width: 768px) {
  .loader-logo img {
    height: 45px;
  }
  
  .loader-text {
    font-size: 18px;
    padding: 12px 20px;
    line-height: 1.3;
  }
  
  .loading-progress {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .loader-logo img {
    height: 40px;
  }
  
  .loader-text {
    font-size: 16px;
    padding: 10px 15px;
    line-height: 1.4;
  }
  
  .loading-progress {
    width: 200px;
  }
}