/* Full-screen loader: machine gears (min. 3 wheels) + 0–100% progress */

html.libl-preloader-active {
  overflow: hidden;
}

.libl-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  background: radial-gradient(ellipse at 50% 40%, rgba(30, 45, 92, 0.95) 0%, rgba(7, 13, 34, 1) 55%, #050a14 100%);
  color: #dfe5f3;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.libl-preloader--exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.libl-preloader__gears {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 11rem;
  min-height: 5.75rem;
  padding: 0 0.35rem;
}

.libl-preloader__gear {
  flex-shrink: 0;
  color: #9cb0e8;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 12px rgba(120, 144, 212, 0.35));
}

/* Three meshing wheels: outer pair clockwise, center counter-clockwise */
.libl-preloader__gear--a {
  width: 3.35rem;
  height: 3.35rem;
  z-index: 0;
  animation: libl-gear-spin-cw 2.05s linear infinite;
}

.libl-preloader__gear--b {
  width: 4.65rem;
  height: 4.65rem;
  margin-left: -0.55rem;
  margin-right: -0.55rem;
  z-index: 1;
  animation: libl-gear-spin-ccw 2.45s linear infinite;
}

.libl-preloader__gear--c {
  width: 3.35rem;
  height: 3.35rem;
  z-index: 0;
  animation: libl-gear-spin-cw 1.9s linear infinite;
}

@keyframes libl-gear-spin-cw {
  to {
    transform: rotate(360deg);
  }
}

@keyframes libl-gear-spin-ccw {
  to {
    transform: rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .libl-preloader__gear--a,
  .libl-preloader__gear--b,
  .libl-preloader__gear--c {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

.libl-preloader__track {
  width: min(18rem, 78vw);
  height: 0.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.libl-preloader__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b3e75, #7890d4, #dfe5f3);
  background-size: 200% 100%;
  animation: libl-preloader-shimmer 1.2s linear infinite;
  transition: width 0.2s ease-out;
}

@keyframes libl-preloader-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .libl-preloader__fill {
    animation: none;
    background: #7890d4;
  }
}

.libl-preloader__pct {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88);
}

.libl-preloader__label {
  margin-top: -0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(180, 198, 235, 0.65);
}
