/* LOADER STYLES */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

/* Loader Container */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Logo/Brand */
.loader-brand {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 8px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

/* Spinner */
.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Alternative Spinner - Dots */
.loader-dots {
  display: flex;
  gap: 10px;
}

.loader-dot {
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0s;
}

/* Loading Text */
.loader-text {
  color: white;
  font-size: 16px;
  letter-spacing: 2px;
  opacity: 0.8;
  animation: fadeInOut 2s ease-in-out infinite;
}

/* Progress Bar */
.loader-progress {
  width: 250px;
  height: 4px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  animation: progress 2s ease-in-out infinite;
  border-radius: 10px;
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .loader-brand {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .loader-spinner {
    width: 50px;
    height: 50px;
  }

  .loader-progress {
    width: 200px;
  }
}
