/* Page Loader Styles */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    45deg,
    #0d2d1c,
    #0b2a16,
    #0d3b1e,
    #084a29,
    #1f4a36
  );
  background-size: 400% 400%; /* Larger background size for smooth transition */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* High z-index to ensure it covers the page initially */
  opacity: 0; /* Start hidden */
  animation: backgroundAnimation 12s ease infinite; /* Animate the background */
  transition: opacity 1s ease-out; /* Smooth opacity transition */
}

/* Define the keyframes for background animation */
@keyframes backgroundAnimation {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* When the loader is visible, smoothly transition in */
.loader-container.visible {
  opacity: 0.95;
}

/* After loader disappears, reset the z-index to make it non-blocking */
.loader-container.hidden {
  opacity: 0;
  z-index: -1; /* Lower the z-index to hide the loader behind other elements */
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 50px; /* Adjust logo size */
  margin-bottom: 10px;
}

.loader-ellipsis {
  font-size: 30px;
  font-weight: bold;
  color: #333;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.loader-ellipsis span {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  background-color: #f0f8ff;
  animation: bounce 2s infinite; /* Increased duration for smoother bounce */
}

.loader-ellipsis span:nth-child(1) {
  animation-delay: 0s;
}

.loader-ellipsis span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-ellipsis span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Bounce animation with smoother transition */
@keyframes bounce {
  0%,
  20%,
  40%,
  60%,
  80%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
