/* --------------CODED BY @ICECOLD.CH ON INSTAGRAM-------------------- */

.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

body.loading {
  overflow: hidden;
}

.loader-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
  font-size: 1.2em;
  font-weight: 700;
  color: #ffffff;
  border-radius: 50%;
  background-color: transparent;
  user-select: none;
  letter-spacing: 0.1em;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 2s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 10px 20px 0 #ffffff5e inset,
      0 20px 30px 0 #000000cc inset,
      0 60px 60px 0 #000000c2 inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 10px 20px 0 #ffe07b9f inset,
      0 20px 10px 0 #d4af378f inset,
      0 40px 60px 0 #8b75256e inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 10px 20px 0 #f0c760a4 inset,
      0 20px 30px 0 #d4af37ad inset,
      0 60px 60px 0 #b8941fb7 inset;
  }
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.loader-letter:nth-child(1) { animation-delay: 0s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
.loader-letter:nth-child(4) { animation-delay: 0.3s; }
.loader-letter:nth-child(5) { animation-delay: 0.4s; }
.loader-letter:nth-child(6) { animation-delay: 0.5s; }
.loader-letter:nth-child(7) { animation-delay: 0.6s; }
.loader-letter:nth-child(8) { animation-delay: 0.7s; }
.loader-letter:nth-child(9) { animation-delay: 0.8s; }
.loader-letter:nth-child(10) { animation-delay: 0.9s; }

@keyframes loader-letter-anim {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.9), 0 0 40px rgba(212, 175, 55, 0.5);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}

.loader-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 40%, transparent 70%);
  animation: pulse-glow 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

.loader-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 50%, rgba(212, 175, 55, 0.03) 60%, transparent 70%);
  animation: pulse-outer 3s ease-in-out infinite;
  z-index: -2;
}

@keyframes pulse-outer {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.6;
  }
}

/* --------------CODED BY @ICECOLD.CH ON INSTAGRAM-------------------- */

@media(max-width: 600px) {
  .loader-wrapper { width: 150px; height: 150px; font-size: 1em; }
  .loader-wrapper::before { width: 180px; height: 180px; }
  .loader-wrapper::after { width: 230px; height: 230px; }
}

@media(max-width: 400px) {
  .loader-wrapper { width: 130px; height: 130px; font-size: 0.9em; }
  .loader-wrapper::before { width: 160px; height: 160px; }
  .loader-wrapper::after { width: 200px; height: 200px; }
}

@media(max-width: 320px) {
  .loader-wrapper { width: 110px; height: 110px; font-size: 0.8em; }
  .loader-wrapper::before { width: 140px; height: 140px; }
  .loader-wrapper::after { width: 170px; height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .loader,
  .loader-letter,
  .loader-wrapper::before,
  .loader-wrapper::after {
    animation: none !important;
  }
  .loader-letter { opacity: 0.8; }
  .loader {
    box-shadow:
      0 10px 20px 0 #d4af37 inset,
      0 20px 30px 0 #e8d085 inset,
      0 60px 60px 0 #8b7928 inset;
  }
}

/* --------------CODED BY @ICECOLD.CH ON INSTAGRAM-------------------- */
