/* Фоновые анимации для всех страниц */

/* Контейнер для частиц */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.3;
}

/* Дополнительные анимации */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.15;
    animation: floatAround 25s infinite linear;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.floating-element:nth-child(1) { animation-delay: 0s; }
.floating-element:nth-child(2) { animation-delay: 1s; }
.floating-element:nth-child(3) { animation-delay: 2s; }
.floating-element:nth-child(4) { animation-delay: 3s; }
.floating-element:nth-child(5) { animation-delay: 4s; }
.floating-element:nth-child(6) { animation-delay: 5s; }
.floating-element:nth-child(7) { animation-delay: 6s; }
.floating-element:nth-child(8) { animation-delay: 7s; }
.floating-element:nth-child(9) { animation-delay: 8s; }
.floating-element:nth-child(10) { animation-delay: 9s; }
.floating-element:nth-child(11) { animation-delay: 10s; }
.floating-element:nth-child(12) { animation-delay: 11s; }
.floating-element:nth-child(13) { animation-delay: 12s; }
.floating-element:nth-child(14) { animation-delay: 13s; }
.floating-element:nth-child(15) { animation-delay: 14s; }

@keyframes floatAround {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Фоновые градиенты */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 35%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(255, 209, 102, 0.1) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.01)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.01)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.01)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}
