/* Beautiful Initialization Animation */

/* Create a loading overlay that appears on page load */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000 1%, #FA7F08 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 3s ease-in forwards 3s;
}

.page-loader.hidden {
  animation: fadeOut 0.5s ease-out forwards;
}

/* Animated loader content */
.loader-content {
  text-align: center;
  color: white;
}

/* Main loader circle animation */
.loader-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  position: relative;
  animation: scaleUp 3s ease-out forwards;
}

.loader-circle svg {
  width: 100%;
  height: 100%;
}

.loader-spinner {
  animation: spin 2s linear infinite;
  transform-origin: center;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes scaleUp {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-text {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  animation: fadeInUp 1s ease-out 0.5s forwards;
  opacity: 0;
  width: 100%;
}

.loader-subtext {
  font-size: 1.2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 1s forwards;
  opacity: 0;
}

/* Dot animation */
.loader-dots {
  display: inline-block;
  margin-left: 8px;
}

.loader-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  margin: 0 4px;
  animation: bounce 1.4s infinite;
}

.loader-dot:nth-child(1) {
  animation-delay: 0s;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    visibility: visible;
  }
  99% {
    opacity: 0;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Progress bar animation */
.loader-progress {
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin: 20px auto 0;
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  background: white;
  border-radius: 3px;
  animation: progressFill 3s ease-in-out forwards;
}

@keyframes progressFill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Page content fade in after loader */
.page-content {
  animation: fadeInContent 1s ease-out 2.5s forwards;
  opacity: 0;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Stagger animation for elements */
@keyframes staggerFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-element {
  animation: staggerFadeIn 0.6s ease-out forwards;
}

.stagger-element:nth-child(1) {
  animation-delay: 2.6s;
}

.stagger-element:nth-child(2) {
  animation-delay: 2.8s;
}

.stagger-element:nth-child(3) {
  animation-delay: 3s;
}
