/* ===== Page Loader Styles ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a0e 0%, #2d1318 50%, #1a0a0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

[data-theme="light"] .page-loader {
  background: linear-gradient(135deg, #fff5f5 0%, #fffaf0 50%, #fff5f5 100%);
}

.page-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  text-align: center;
}

.loader-logo-container {
  position: relative;
  width: 150px;
  height: 150px;
  perspective: 1000px;
  margin: 0 auto 30px;
}

.loader-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: logoFlip 1.5s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(196, 30, 58, 0.4));
}

@keyframes logoFlip {
  0% {
    transform: perspective(1000px) rotateY(0deg);
  }
  50% {
    transform: perspective(1000px) rotateY(180deg);
  }
  100% {
    transform: perspective(1000px) rotateY(360deg);
  }
}

.loader-text {
  color: #FFD700;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: textPulse 1.5s ease-in-out infinite;
}

[data-theme="light"] .loader-text {
  color: #C41E3A;
}

@keyframes textPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Loader dots animation */
.loader-text::after {
  content: '';
  animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Shimmer effect around logo */
.loader-logo-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(196, 30, 58, 0.3),
    rgba(255, 215, 0, 0.3),
    transparent
  );
  animation: shimmerRotate 2s linear infinite;
  z-index: -1;
}

@keyframes shimmerRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .loader-logo-container {
    width: 120px;
    height: 120px;
  }

  .loader-logo-container::before {
    width: 150px;
    height: 150px;
  }

  .loader-text {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }
}

@media (max-width: 480px) {
  .loader-logo-container {
    width: 100px;
    height: 100px;
  }

  .loader-logo-container::before {
    width: 130px;
    height: 130px;
  }

  .loader-text {
    font-size: 1rem;
  }
}
