.starfieldLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.starfieldLayer.regMode .starParticle {
  box-shadow:
    0 0 9px rgba(255, 255, 255, 0.5),
    0 0 24px color-mix(in srgb, var(--accent, #7c3aed) 58%, transparent);
}

.starfieldLayer.regMode .starComet {
  filter: drop-shadow(0 0 14px rgba(184, 147, 255, 0.88));
}

.starParticle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.65) 35%, rgba(255,255,255,0.04) 100%);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.45),
    0 0 20px color-mix(in srgb, var(--accent, #3aa8ff) 42%, transparent);
  transform-origin: center;
  animation:
    starTwinkle var(--twinkle) ease-in-out infinite,
    starSpin var(--spin) linear infinite,
    starLife var(--life) ease-in-out 1;
}

.starParticle::before,
.starParticle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: calc(var(--size) * 3.2);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
  transform: translate(-50%, -50%) rotate(var(--angle));
  opacity: 0.52;
}

.starParticle::after {
  transform: translate(-50%, -50%) rotate(calc(var(--angle) + 90deg));
  opacity: 0.36;
}

.starParticle.big {
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.6),
    0 0 24px color-mix(in srgb, var(--accent, #3aa8ff) 60%, transparent);
}

.starComet {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #d5ebff 50%, transparent 100%);
  filter: drop-shadow(0 0 12px rgba(140, 212, 255, 0.8));
  animation: cometFly var(--duration) cubic-bezier(0.22, 0.7, 0, 1) 1;
}

.starComet::after {
  content: "";
  position: absolute;
  left: -120px;
  top: 2px;
  width: 130px;
  height: 2px;
  background: linear-gradient(90deg, rgba(110, 185, 255, 0), rgba(150, 216, 255, 0.8), rgba(255,255,255,0));
  transform: rotate(-14deg);
  transform-origin: right center;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes starSpin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes starLife {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes cometFly {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(120vw, 38vh, 0) scale(1.08);
    opacity: 0;
  }
}

.appShell,
.authContainer,
.bg {
  position: relative;
  z-index: 2;
}

