/* CSS-based Text Preloader */
.premium-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

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

/* HTML: <div class="loader"></div> */
.loader {
  width: fit-content;
  font-size: 40px;
  font-family: system-ui,sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  color: #0000;
  -webkit-text-stroke: 1px #000;
  background: 
    conic-gradient(from -135deg at 100% 50%,#000 90deg,#0000 0) text no-repeat,
    conic-gradient(from -135deg at 1lh  50%,#0000 90deg,#000 0) text no-repeat;
  animation: l6 2s linear infinite;
}
.loader:before {
  content: "Loading";
}
@keyframes l6 {
  0%     {background-size: 0                200%;background-position:0 0   ,100% 0   }
  50%    {background-size: calc(60% + .5lh) 200%;background-position:0 0   ,100% 0   }
  50.01% {background-size: calc(60% + .5lh) 200%;background-position:0 100%,100% 100%}
  100%   {background-size: 0                200%;background-position:0 100%,100% 100%}
}

/* Alternative Loader Animation */
.loader-alt {
  height: 15px;
  aspect-ratio: 5;
  display: grid;
  animation: l39-0 1s infinite linear; 
}
.loader-alt:before,
.loader-alt:after {
  content: "";
  width: calc(140%/3);
  grid-area: 1/1;
  --_g: no-repeat radial-gradient(farthest-side,#000 94%,#0000);
  background:
    var(--_g) left,
    var(--_g) right;
  background-size: calc(300%/7) 100%;
  animation: l39-1 1s infinite linear; 
}
.loader-alt:after {
  margin-left: auto;
  --s:-1;
}
@keyframes l39-0 {
  0%,30% {transform: rotate(0)}
  50%,100% {transform: rotate(.5turn)}
}
@keyframes l39-1 {
  30%,70% {transform:translate(calc(var(--s,1)*400%/14))}
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .loader {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .loader {
        font-size: 28px;
    }
}

@media (max-width: 320px) {
    .loader {
        font-size: 24px;
    }
}
