.particle-effect {
  position: relative;
}


.particle-effect:not(body) {
  overflow: hidden; /* Only apply overflow: hidden to non-body elements */
}

.particle-effect > * {
  position: relative;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(102, 126, 234, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: particleRise linear forwards;
}

/* Particles on body stay behind content */
body.particle-effect .particle {
  position: fixed;
  z-index: -1;
}

.particle.light {
  background: rgba(147, 197, 253, 0.5);
}

@keyframes particleRise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  5% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(var(--rise-distance)) translateX(var(--drift));
  }
}