/* =========================
   LOADING SPINNER
========================= */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff5f5 0%, #fffbeb 50%, #eff6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-container {
  text-align: center;
}

.logo-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 50px;
}

.loader-logo {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 20px rgba(220, 38, 38, 0.3));
}

.spinner-ring {
  position: absolute;
  top: -30px;
  left: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  border: 4px solid rgba(220, 38, 38, 0.1);
  border-top-color: #dc2626;
  border-right-color: #dc2626;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  z-index: 1;
}

.loader-text {
  font-size: 16px;
  color: #000;
  font-weight: 500;
  letter-spacing: 0.5px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-dots {
  display: inline-block;
  width: 30px;
}

.loader-dots::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

/* Responsive */
@media (max-width: 768px) {
  .logo-wrapper {
    width: 120px;
    height: 120px;
  }

  .spinner-ring {
    border-width: 3px;
    top: -25px;
    left: -25px;
    width: calc(100% + 50px);
    height: calc(100% + 50px);
  }

  .loader-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .logo-wrapper {
    width: 100px;
    height: 100px;
  }

  .spinner-ring {
    border-width: 3px;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
  }

  .loader-text {
    font-size: 13px;
  }
}