

.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}


.loader__glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(184, 245, 61, 0.07) 0%,
    rgba(184, 245, 61, 0.02) 50%,
    transparent 72%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: loaderGlowPulse 3s ease-in-out infinite;
}


.loader__grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.loader__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: loaderFadeUp 0.5s var(--ease-out) both;
}


.loader__icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-md);
  animation: loaderIconPulse 2s var(--ease-out) infinite;
}

.loader__icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 1px solid rgba(184, 245, 61, 0.12);
  animation: loaderRingPing 2.5s ease-out infinite;
}

.loader__icon-letter {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--c-accent);
  letter-spacing: -1px;
  line-height: 1;
  user-select: none;
}


.loader__bar-track {
  width: 120px;
  height: 1.5px;
  background: var(--c-border2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.loader__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--c-accent);
  border-radius: var(--r-full);
  transition: width 2s var(--ease-out);
}


.loader__pulse-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  box-shadow: 0 0 24px var(--c-accent-glow);
  animation: loaderPulse 1.4s var(--ease-out) infinite;
}


.loader__dots {
  display: flex;
  gap: 6px;
}

.loader__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  animation: loaderDotBounce 1.4s var(--ease-spring) infinite;
}

.loader__dot:nth-child(1) { animation-delay: 0s; }
.loader__dot:nth-child(2) { animation-delay: 0.2s; }
.loader__dot:nth-child(3) { animation-delay: 0.4s; }


.loader__status {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--c-muted2);
  font-weight: 300;
  font-family: var(--ff-body);
  text-align: center;
  white-space: nowrap;
}


@keyframes loaderGlowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.8; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes loaderIconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes loaderRingPing {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.5); }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.4; }
  50%      { transform: scale(1.2); opacity: 1; }
}

@keyframes loaderDotBounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

@keyframes loaderFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}