/*
 * Interactive Background Styles
 * Enhanced visual effects for the dynamic eco background
 */

/* ===== ENHANCED BACKGROUND EFFECTS ===== */
body {
    background: linear-gradient(135deg, 
        #0a0f0a 0%, 
        #1a2e1a 25%, 
        #0f1b0f 50%, 
        #1a2e1a 75%, 
        #0a0f0a 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== PARTICLE GLOW EFFECTS ===== */
#interactive-eco-bg {
    background: radial-gradient(circle at 20% 80%, rgba(45, 90, 39, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(107, 191, 89, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ===== ENHANCED PARTICLE STYLES ===== */
.eco-particle {
    position: absolute;
    font-size: 24px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 8px currentColor) 
            drop-shadow(0 0 16px currentColor) 
            brightness(1.2);
    animation: particleFloat 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 8px currentColor) brightness(1.2);
    }
    25% { 
        transform: translateY(-15px) rotate(90deg) scale(1.1);
        filter: drop-shadow(0 0 12px currentColor) brightness(1.4);
    }
    50% { 
        transform: translateY(-8px) rotate(180deg) scale(0.9);
        filter: drop-shadow(0 0 16px currentColor) brightness(1.6);
    }
    75% { 
        transform: translateY(-20px) rotate(270deg) scale(1.05);
        filter: drop-shadow(0 0 10px currentColor) brightness(1.3);
    }
}

/* ===== HOVER EFFECTS ===== */
.eco-particle:hover {
    animation: particleHover 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px currentColor) 
            drop-shadow(0 0 40px currentColor) 
            brightness(2) 
            saturate(1.5);
    transform: scale(1.5) !important;
    z-index: 10;
}

@keyframes particleHover {
    0%, 100% { 
        transform: scale(1.5) rotate(0deg);
        filter: drop-shadow(0 0 20px currentColor) brightness(2);
    }
    50% { 
        transform: scale(1.7) rotate(180deg);
        filter: drop-shadow(0 0 30px currentColor) brightness(2.5);
    }
}

/* ===== CLICK EXPLOSION EFFECTS ===== */
.eco-particle.exploding {
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 10px currentColor) brightness(1.5);
    }
    50% {
        transform: scale(2) rotate(180deg);
        opacity: 0.8;
        filter: drop-shadow(0 0 30px currentColor) 
                drop-shadow(0 0 60px currentColor) 
                brightness(3);
    }
    100% {
        transform: scale(3) rotate(360deg);
        opacity: 0;
        filter: drop-shadow(0 0 50px currentColor) brightness(4);
    }
}

/* ===== SPECIAL PARTICLE TYPES ===== */
.eco-particle.recycling {
    color: #22c55e;
    text-shadow: 0 0 15px #22c55e, 0 0 30px #16a34a;
    animation: recycleRotate 3s linear infinite;
}

@keyframes recycleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.eco-particle.energy {
    color: #eab308;
    text-shadow: 0 0 15px #eab308, 0 0 30px #ca8a04;
    animation: energyPulse 1.5s ease-in-out infinite;
}

@keyframes energyPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1.5);
    }
    50% { 
        transform: scale(1.2);
        filter: brightness(2.5) saturate(1.5);
    }
}

.eco-particle.nature {
    color: #16a34a;
    text-shadow: 0 0 15px #16a34a, 0 0 30px #15803d;
    animation: natureGrow 2s ease-in-out infinite;
}

@keyframes natureGrow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(0.9) rotate(-3deg); }
    75% { transform: scale(1.05) rotate(2deg); }
}

/* ===== TRAIL EFFECTS ===== */
.eco-particle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(2);
    border-radius: 50%;
    animation: trailPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes trailPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(3);
        opacity: 0.3;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .eco-particle {
        font-size: 18px;
    }
    
    .eco-particle:hover {
        transform: scale(1.3) !important;
    }
}

@media (max-width: 480px) {
    .eco-particle {
        font-size: 16px;
    }
    
    #interactive-eco-bg {
        opacity: 0.8;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    #interactive-eco-bg,
    .eco-particle,
    body {
        animation: none !important;
        transition: none !important;
    }
    
    .eco-particle {
        filter: none !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
#interactive-eco-bg * {
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ===== SPECIAL EFFECTS FOR INTERACTIONS ===== */
.screen-shake {
    animation: shake 0.2s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

/* ===== PARTICLE BURST EFFECT ===== */
.particle-burst {
    position: absolute;
    pointer-events: none;
    animation: burstExpand 0.8s ease-out forwards;
}

@keyframes burstExpand {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(4) rotate(360deg);
        opacity: 0;
    }
}

/* ===== ENHANCED GLOW ZONES ===== */
.glow-zone {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
    animation: glowZonePulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowZonePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.5);
        opacity: 0.6;
    }
}