/* ===================================
   Loading Screen Animations
   =================================== */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-background) 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.loader-text {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  gap: 0.2rem;
  justify-content: center;
}

.loader-char {
  display: inline-block;
  opacity: 0;
  animation: charFloat 2s ease-in-out infinite;
}

.loader-char:nth-child(1) { animation-delay: 0s; }
.loader-char:nth-child(2) { animation-delay: 0.1s; }
.loader-char:nth-child(3) { animation-delay: 0.2s; }
.loader-char:nth-child(4) { animation-delay: 0.3s; }
.loader-char:nth-child(5) { animation-delay: 0.4s; }
.loader-char:nth-child(6) { animation-delay: 0.5s; }
.loader-char:nth-child(7) { animation-delay: 0.6s; }

@keyframes charFloat {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.8) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translateY(50px) scale(0.8) rotate(10deg);
  }
}

.loader-tagline {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--color-secondary);
  opacity: 0.7;
  animation: fadeInOut 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Decorative elements around the loader */
.loader-circles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
}

.loader-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: circleFloat 8s infinite ease-in-out;
}

.loader-circle-1 {
  width: 100px;
  height: 100px;
  background: var(--color-primary);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.loader-circle-2 {
  width: 150px;
  height: 150px;
  background: var(--color-accent);
  bottom: 15%;
  right: 15%;
  animation-delay: -2s;
}

.loader-circle-3 {
  width: 80px;
  height: 80px;
  background: var(--color-secondary);
  top: 50%;
  right: 20%;
  animation-delay: -4s;
}

@keyframes circleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-15px, -50px) scale(0.9);
  }
  75% {
    transform: translate(30px, -25px) scale(1.05);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .loader-text {
    font-size: 2.5rem;
  }
  
  .loader-tagline {
    font-size: var(--text-base);
  }
}
