/* Animated Background Styles */

.animated-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Particles Animation */
.animated-bg-particles {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
}

.animated-bg-particles .particle {
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* Waves Animation */
.animated-bg-waves {
    background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    background-size: 50% 100%;
    animation: wave-flow linear infinite;
}

.wave:nth-child(1) { animation-duration: 25s; opacity: 0.5; }
.wave:nth-child(2) { animation-duration: 20s; opacity: 0.3; bottom: 10px; }
.wave:nth-child(3) { animation-duration: 15s; opacity: 0.2; bottom: 20px; }

@keyframes wave-flow {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Gradient Animation */
.animated-bg-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient-flow ease infinite;
}

.animated-bg-gradient.speed-slow { animation-duration: 30s; }
.animated-bg-gradient.speed-normal { animation-duration: 15s; }
.animated-bg-gradient.speed-fast { animation-duration: 8s; }

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Geometric Shapes Animation */
.animated-bg-geometric {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
}

.geometric-shape {
    position: absolute;
    opacity: 0.1;
    animation: rotate-shape linear infinite;
}

.geometric-shape.square {
    border: 2px solid currentColor;
}

.geometric-shape.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid currentColor;
    background: transparent;
}

.geometric-shape.circle {
    border-radius: 50%;
    border: 2px solid currentColor;
}

@keyframes rotate-shape {
    0% { transform: rotate(0deg) translateY(0); }
    100% { transform: rotate(360deg) translateY(-100vh); }
}

/* Bubbles Animation */
.animated-bg-bubbles {
    background: linear-gradient(180deg, #0d1b2a 0%, #1b263b 100%);
}

.bubble {
    position: absolute;
    bottom: -150px;
    border-radius: 50%;
    opacity: 0.4;
    animation: rise-bubble ease-in infinite;
}

@keyframes rise-bubble {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-120vh) scale(0.5);
        opacity: 0;
    }
}

/* Stars Animation */
.animated-bg-stars {
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #fff 0%, transparent 100%);
    animation: shoot linear infinite;
    opacity: 0;
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(-500px) translateY(300px);
        opacity: 0;
    }
}

/* Matrix Rain Animation */
.animated-bg-matrix {
    background: #000;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.2;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    animation: matrix-fall linear infinite;
    white-space: nowrap;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(200vh);
        opacity: 0.3;
    }
}

/* Speed Modifiers */
.speed-slow .particle { animation-duration: 20s; }
.speed-normal .particle { animation-duration: 12s; }
.speed-fast .particle { animation-duration: 6s; }

.speed-slow .bubble { animation-duration: 20s; }
.speed-normal .bubble { animation-duration: 12s; }
.speed-fast .bubble { animation-duration: 6s; }

.speed-slow .star { animation-duration: 4s; }
.speed-normal .star { animation-duration: 2s; }
.speed-fast .star { animation-duration: 1s; }

.speed-slow .matrix-column { animation-duration: 20s; }
.speed-normal .matrix-column { animation-duration: 12s; }
.speed-fast .matrix-column { animation-duration: 6s; }

.speed-slow .geometric-shape { animation-duration: 40s; }
.speed-normal .geometric-shape { animation-duration: 25s; }
.speed-fast .geometric-shape { animation-duration: 12s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .particle, .bubble, .geometric-shape {
        transform: scale(0.7);
    }
    
    .matrix-column {
        font-size: 10px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animated-bg-container * {
        animation: none !important;
    }
    
    .animated-bg-gradient {
        animation: none !important;
        background-position: 0% 50% !important;
    }
}
