/* ==========================================================================
   PRELOADER — PREMIUM ORBITAL PROTECTION
   ========================================================================== */

#preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    #0f172a 0%,
    #020617 70%
  );
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* LOGO CENTRAL */
.loader-logo {
  width: 110px;
  z-index: 3;
  animation: logo-breathe 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(14,165,233,0.25));
}

/* ANÉIS */
.loader-ring {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
  border-color: transparent;
  will-change: transform;
}

/* Anel externo */
.loader-ring.outer {
  width: 200px;
  height: 200px;
  border-width: 2px;
  border-top-color: rgba(14,165,233,0.6);
  border-left-color: rgba(14,165,233,0.15);
  animation: spin-slow 2.2s linear infinite;
  box-shadow: 0 0 25px rgba(14,165,233,0.15);
}

/* Anel interno */
.loader-ring.inner {
  width: 150px;
  height: 150px;
  border-width: 2px;
  border-bottom-color: rgba(56,189,248,0.8);
  border-right-color: rgba(56,189,248,0.2);
  animation: spin-reverse 1.6s linear infinite;
}

/* Animações */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}

@keyframes logo-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.96);
    opacity: 0.85;
  }
}

/* ESCONDER PRELOADER */
#preloader.hide-preloader {
  opacity: 0;
  visibility: hidden;
}

body.loading {
  overflow: hidden;
}
