/* ============================================
   PKM UNIVERSE - PREMIUM SPARKLE EFFECTS
   Unique animated background sparkles
   ============================================ */

.pkm-sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Individual sparkle particle */
.pkm-sparkle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Gold/Amber sparkles (primary) */
.pkm-sparkle.gold {
    background: radial-gradient(circle, #ffd700 0%, #d4af37 50%, transparent 70%);
    box-shadow: 0 0 10px 2px rgba(255, 215, 0, 0.6), 0 0 20px 4px rgba(212, 175, 55, 0.3);
}

/* White sparkles (secondary) */
.pkm-sparkle.white {
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.8) 40%, transparent 70%);
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.5);
}

/* Amber sparkles */
.pkm-sparkle.amber {
    background: radial-gradient(circle, #ffbf00 0%, #cc9900 50%, transparent 70%);
    box-shadow: 0 0 12px 3px rgba(255, 191, 0, 0.5);
}

/* Rose gold sparkles */
.pkm-sparkle.rose {
    background: radial-gradient(circle, #f4c2c2 0%, #e8a0a0 50%, transparent 70%);
    box-shadow: 0 0 10px 2px rgba(244, 194, 194, 0.5);
}

/* Crystal blue sparkles */
.pkm-sparkle.crystal {
    background: radial-gradient(circle, #87ceeb 0%, #5fa8d3 50%, transparent 70%);
    box-shadow: 0 0 10px 2px rgba(135, 206, 235, 0.5);
}

/* Star-shaped sparkles */
.pkm-sparkle.star {
    background: transparent;
    border-radius: 0;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: linear-gradient(135deg, #ffd700, #fff5cc);
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.4);
}

/* Diamond sparkles */
.pkm-sparkle.diamond {
    background: transparent;
    border-radius: 0;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, #ffffff, #d4af37);
    box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.5);
}

/* Floating animation - gentle drift upward */
@keyframes sparkleFloat {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--drift-x, 50px)) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* Twinkling in place */
@keyframes sparkleTwinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Pulse glow effect */
@keyframes sparklePulse {
    0%, 100% {
        box-shadow: 0 0 10px 2px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 6px rgba(255, 215, 0, 0.8);
        transform: scale(1.3);
    }
}

/* Orbit animation */
@keyframes sparkleOrbit {
    0% {
        transform: rotate(0deg) translateX(var(--orbit-radius, 30px)) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(var(--orbit-radius, 30px)) rotate(-360deg);
    }
}

/* Drift animation - side to side */
@keyframes sparkleDrift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(20px) translateY(-10px);
    }
    50% {
        transform: translateX(0) translateY(-20px);
    }
    75% {
        transform: translateX(-20px) translateY(-10px);
    }
}

/* Shimmer animation */
@keyframes sparkleShimmer {
    0% {
        opacity: 0.3;
        filter: brightness(1);
    }
    25% {
        opacity: 1;
        filter: brightness(1.5);
    }
    50% {
        opacity: 0.5;
        filter: brightness(1);
    }
    75% {
        opacity: 1;
        filter: brightness(1.3);
    }
    100% {
        opacity: 0.3;
        filter: brightness(1);
    }
}

/* Sparkle size classes */
.pkm-sparkle.tiny { width: 3px; height: 3px; }
.pkm-sparkle.small { width: 5px; height: 5px; }
.pkm-sparkle.medium { width: 8px; height: 8px; }
.pkm-sparkle.large { width: 12px; height: 12px; }
.pkm-sparkle.xlarge { width: 18px; height: 18px; }

/* Animation classes */
.pkm-sparkle.float {
    animation: sparkleFloat var(--float-duration, 15s) linear infinite;
}

.pkm-sparkle.twinkle {
    animation: sparkleTwinkle var(--twinkle-duration, 3s) ease-in-out infinite;
}

.pkm-sparkle.pulse {
    animation: sparklePulse var(--pulse-duration, 2s) ease-in-out infinite;
}

.pkm-sparkle.drift {
    animation: sparkleDrift var(--drift-duration, 8s) ease-in-out infinite;
}

.pkm-sparkle.shimmer {
    animation: sparkleShimmer var(--shimmer-duration, 4s) ease-in-out infinite;
}

/* Depth layers - further away = smaller, dimmer */
.pkm-sparkle.layer-far {
    opacity: 0.3;
    filter: blur(1px);
}

.pkm-sparkle.layer-mid {
    opacity: 0.6;
}

.pkm-sparkle.layer-near {
    opacity: 0.9;
    filter: none;
}

/* Mouse interaction glow area */
.pkm-sparkle-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pkm-sparkle-glow.active {
    opacity: 1;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .pkm-sparkle {
        animation: none !important;
        opacity: 0.5;
    }
}

/* Performance: hide sparkles on very small screens or when battery saver might be on */
@media (max-width: 480px) {
    .pkm-sparkle-container {
        display: none;
    }
}
