/* ═══════════════════════════════════════════════════════════════ */
/* ANIMATED PRELOADER - FLINT TECHNOLOGIES */
/* ═══════════════════════════════════════════════════════════════ */

.preloader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0e12 0%, #1a1d21 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.preloader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html:not(.dark) .preloader-wrapper {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

/* ─────────────────────────────────────────────────────────────── */
/* PRELOADER CONTAINER */
/* ─────────────────────────────────────────────────────────────── */

.preloader-content {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────── */
/* ANIMATED RINGS */
/* ─────────────────────────────────────────────────────────────── */

.preloader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: #ff6b35;
  border-right-color: #ff6b35;
}

.preloader-ring:nth-child(1) {
  animation: spin-cw 2s linear infinite;
  opacity: 1;
}

.preloader-ring:nth-child(2) {
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-top-color: #ff8c42;
  border-left-color: #ff8c42;
  animation: spin-ccw 2.5s linear infinite;
  opacity: 0.8;
}

.preloader-ring:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-bottom-color: #ff5a00;
  border-right-color: #ff5a00;
  animation: spin-cw 3s linear infinite;
  opacity: 0.6;
}

/* ─────────────────────────────────────────────────────────────── */
/* CENTER LOGO/ICON */
/* ─────────────────────────────────────────────────────────────── */

.preloader-logo {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-logo svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.5));
}

.preloader-logo i {
  font-size: 24px;
  color: #ff6b35;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.5));
}

/* ─────────────────────────────────────────────────────────────── */
/* ANIMATED PARTICLES/DOTS */
/* ─────────────────────────────────────────────────────────────── */

.preloader-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6b35;
  opacity: 0.7;
}

.preloader-particle:nth-child(4) {
  animation: float-particle-1 3s ease-in-out infinite;
}

.preloader-particle:nth-child(5) {
  animation: float-particle-2 3.5s ease-in-out infinite;
}

.preloader-particle:nth-child(6) {
  animation: float-particle-3 3.2s ease-in-out infinite;
}

.preloader-particle:nth-child(7) {
  animation: float-particle-4 2.8s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────── */
/* LOADING TEXT */
/* ─────────────────────────────────────────────────────────────── */

.preloader-text {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff6b35;
}

.preloader-text span {
  opacity: 0;
  animation: text-pulse 1.5s ease-in-out infinite;
}

.preloader-text span:nth-child(1) {
  animation-delay: 0s;
}

.preloader-text span:nth-child(2) {
  animation-delay: 0.2s;
}

.preloader-text span:nth-child(3) {
  animation-delay: 0.4s;
}

.preloader-text span:nth-child(4) {
  animation-delay: 0.6s;
}

/* ─────────────────────────────────────────────────────────────── */
/* ANIMATIONS */
/* ─────────────────────────────────────────────────────────────── */

@keyframes spin-cw {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-ccw {
  from {
    transform: translate(-50%, -50%) rotate(360deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}

@keyframes float-particle-1 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) translateX(50px);
    opacity: 0;
  }
}

@keyframes float-particle-2 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-70px) translateX(-60px);
    opacity: 0;
  }
}

@keyframes float-particle-3 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-90px) translateX(0px);
    opacity: 0;
  }
}

@keyframes float-particle-4 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-75px) translateX(55px);
    opacity: 0;
  }
}

@keyframes text-pulse {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* ─────────────────────────────────────────────────────────────── */
/* LIGHT MODE PRELOADER */
/* ─────────────────────────────────────────────────────────────── */

html:not(.dark) .preloader-ring {
  border-top-color: #ff6b35;
  border-right-color: #ff6b35;
}

html:not(.dark) .preloader-ring:nth-child(2) {
  border-top-color: #ff8c42;
  border-left-color: #ff8c42;
}

html:not(.dark) .preloader-ring:nth-child(3) {
  border-bottom-color: #ff5a00;
  border-right-color: #ff5a00;
}

html:not(.dark) .preloader-particle {
  background: #ff6b35;
}

html:not(.dark) .preloader-text {
  color: #ff6b35;
}

html:not(.dark) .preloader-logo {
  color: #ff6b35;
}
