/* ============================================
   FLOATING WHITE PARTICLE BACKGROUND EFFECT
   Pure CSS Implementation
   ============================================ */

/* Particle Container - sits behind all content */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Individual Particle */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: float linear infinite;
}

/* Particle Size Variations - Bigger particles */
.particle.small {
    width: 2px;
    height: 2px;
    opacity: 0.4;
}

.particle.medium {
    width: 4px;
    height: 4px;
    opacity: 0.6;
}

.particle.large {
    width: 6px;
    height: 6px;
    opacity: 0.8;
}

/* Floating Animation - Slow upward drift */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) translateX(var(--drift-x, 0));
        opacity: 0;
    }
}

/* Subtle horizontal drift variations */
.particle:nth-child(3n) {
    --drift-x: 20px;
}

.particle:nth-child(3n+1) {
    --drift-x: -20px;
}

.particle:nth-child(3n+2) {
    --drift-x: 10px;
}

/* Shimmer effect - subtle opacity pulse */
@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

.particle.shimmer {
    animation: float linear infinite, shimmer 3s ease-in-out infinite;
}

/* Performance Optimization: Reduce particles on mobile */
@media (max-width: 768px) {
    .particle:nth-child(n+101) {
        display: none;
    }
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .particle {
        animation: none;
        opacity: 0.2;
    }
}

/* ============================================
   ALTERNATIVE: SNOW EFFECT VARIATION
   Uncomment to use snow-like falling particles
   ============================================ */

/*
@keyframes snowfall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  
  10% {
    opacity: 0.6;
  }
  
  90% {
    opacity: 0.6;
  }
  
  100% {
    transform: translateY(110vh) translateX(var(--drift-x, 0)) rotate(360deg);
    opacity: 0;
  }
}

.particle.snow {
  animation: snowfall linear infinite;
}
*/

/* ============================================
   GLOW VARIATION - More magical feel
   ============================================ */

.particle.glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* ============================================
   STAR DUST VARIATION - Twinkle effect
   ============================================ */

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.particle.stardust {
    animation: float linear infinite, twinkle 2s ease-in-out infinite;
    animation-delay: calc(var(--particle-index) * 0.1s);
}