/* 🔲 Preloader Wrapper */
#preloader {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 👻 Fade-out Animation */
#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* 🔄 Spinner Loader */
.loader-style-spinner:after {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 💧 Ripple Loader */
.loader-style-ripple {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #3498db 20%, transparent 21%);
  background-size: 100% 100%;
  animation: ripple 1.2s ease-out infinite;
}
@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* 📶 Progress Bar Loader */
.loader-style-bar {
  width: 70%;
  height: 6px;
  background: #ddd;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}
.loader-style-bar::before {
  content: "";
  position: absolute;
  width: 40%;
  height: 100%;
  background: #3498db;
  animation: progress-bar 1.2s linear infinite;
}
@keyframes progress-bar {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* 🟠 Bounce Loader */
.loader-style-bounce {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 40px;
}
.loader-style-bounce span {
  width: 12px;
  height: 12px;
  background: #3498db;
  border-radius: 50%;
  animation: bounce 0.6s infinite ease-in-out;
}
.loader-style-bounce span:nth-child(2) { animation-delay: 0.2s; }
.loader-style-bounce span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* 🔶 Rotating Squares */
.loader-style-squares {
  width: 40px;
  height: 40px;
  position: relative;
  animation: rotate-squares 1.2s infinite linear;
}
.loader-style-squares::before,
.loader-style-squares::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  background: #3498db;
  opacity: 0.6;
}
.loader-style-squares::after {
  transform: rotate(45deg);
}
@keyframes rotate-squares {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 🌀 Ring with Text */
.loader-style-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.loader-style-ring .ring {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}
.loader-style-ring .text {
  font-size: 14px;
  color: #555;
  font-family: sans-serif;
  letter-spacing: 1px;
}