/* ================= PRELOADER SPINNER ================= */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner-container {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.preloader-text {
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
}

.preloader-subtext {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

/* Loading dots animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Alternative spinner styles */
.spinner-ring {
  display: inline-block;
  width: 60px;
  height: 60px;
}

.spinner-ring::after {
  content: " ";
  display: block;
  width: 46px;
  height: 46px;
  margin: 2px;
  border-radius: 50%;
  border: 4px solid #fff;
  border-color: #fff transparent #fff transparent;
  animation: spin 1.2s linear infinite;
}

/* Pulse spinner */
.spinner-pulse {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
