/* Preloader Styles */
:root {
  --color-preloader-bg: #111111;
  --color-preloader-accent-1: #cd43ff;
  --color-preloader-accent-2: #fd65a6;
  --color-preloader-accent-3: #fc8967;
  --color-preloader-accent-4: #ffbd72;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-preloader-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

.loader-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 4px;
}

.progress-ring-circle {
  fill: transparent;
  stroke: var(--color-preloader-accent-1);
  stroke-width: 4px;
  stroke-dasharray: 565.48; /* 2 * PI * r (r=90) */
  stroke-dashoffset: 565.48;
  transition: stroke 0.5s ease;
  stroke-linecap: round;
}

.loader-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Onest', sans-serif;
}

.loading-stage {
  position: relative;
  height: 24px;
  width: 100px;
  overflow: hidden;
}

.stage-current,
.stage-next {
  position: absolute;
  width: 100%;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.stage-current {
  transform: translateY(0);
}

.stage-next {
  transform: translateY(24px);
}

.percentage {
  font-size: 3rem;
  font-weight: 700;
  margin-top: 2px;
}

.loader-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
}

.preloader-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  transform: scale(0);
}

.preloader-shape-1 {
  width: 350px;
  height: 350px;
  top: 20%;
  left: 20%;
  background: radial-gradient(circle, var(--color-preloader-accent-1), transparent 70%);
}

.preloader-shape-2 {
  width: 450px;
  height: 450px;
  top: 60%;
  right: 20%;
  background: radial-gradient(circle, var(--color-preloader-accent-2), transparent 70%);
}

.preloader-shape-3 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: 30%;
  background: radial-gradient(circle, var(--color-preloader-accent-3), transparent 70%);
}

/* Hide content until loaded if needed, but we handle via JS y-offset */
body.preloading {
  overflow: hidden !important;
}
