/**
 * Animated Gradient Background System
 * Creates flowing colorful gradient orbs for glassmorphism effect
 */

/* Main Background Container */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f8faff 0%, #fff 50%, #fffdf5 100%);
}

/* Animated Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: floatOrb 20s ease-in-out infinite;
    will-change: transform;
}

/* Blue Orb - Top Left */
.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, rgba(44, 62, 149, 0.3) 50%, transparent 70%);
    top: -200px;
    left: -150px;
    animation-delay: 0s;
}

/* Gold Orb - Right Side */
.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.5) 0%, rgba(245, 215, 110, 0.3) 50%, transparent 70%);
    top: 40%;
    right: -150px;
    animation-delay: -5s;
    animation-duration: 25s;
}

/* Light Blue Orb - Bottom */
.gradient-orb-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.4) 0%, rgba(147, 197, 253, 0.2) 50%, transparent 70%);
    bottom: -300px;
    left: 25%;
    animation-delay: -10s;
    animation-duration: 30s;
}

/* White/Light Orb - Center */
.gradient-orb-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
    top: 25%;
    left: 15%;
    animation-delay: -15s;
    animation-duration: 22s;
}

/* Small accent orb - Gold */
.gradient-orb-5 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, transparent 70%);
    bottom: 20%;
    right: 20%;
    animation-delay: -8s;
    animation-duration: 18s;
}

/* Floating Animation */
@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(60px, -40px) scale(1.05);
    }
    50% {
        transform: translate(30px, 60px) scale(0.95);
    }
    75% {
        transform: translate(-40px, 30px) scale(1.02);
    }
}

/* Subtle pulse animation for extra depth */
@keyframes pulseOrb {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.75;
    }
}

.gradient-orb-1 {
    animation: floatOrb 20s ease-in-out infinite, pulseOrb 8s ease-in-out infinite;
}

.gradient-orb-2 {
    animation: floatOrb 25s ease-in-out infinite, pulseOrb 10s ease-in-out infinite;
    animation-delay: -5s, -3s;
}

/* Tablet - Reduce orb sizes */
@media (max-width: 1024px) {
    .gradient-orb-1 { width: 450px; height: 450px; }
    .gradient-orb-2 { width: 400px; height: 400px; }
    .gradient-orb-3 { width: 500px; height: 500px; }
    .gradient-orb-4 { width: 350px; height: 350px; }
}

/* Mobile - Simplify for performance */
@media (max-width: 768px) {
    .gradient-orb {
        filter: blur(60px);
    }

    .gradient-orb-1 { width: 350px; height: 350px; top: -150px; left: -100px; }
    .gradient-orb-2 { width: 300px; height: 300px; }
    .gradient-orb-3 { display: none; }
    .gradient-orb-4 { width: 250px; height: 250px; }
    .gradient-orb-5 { display: none; }
}

/* Small mobile - Minimal orbs */
@media (max-width: 480px) {
    .gradient-orb {
        filter: blur(50px);
        opacity: 0.5;
    }

    .gradient-orb-1 { width: 280px; height: 280px; }
    .gradient-orb-2 { width: 220px; height: 220px; }
    .gradient-orb-4 { width: 180px; height: 180px; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .gradient-orb {
        animation: none !important;
    }

    .gradient-background {
        background: linear-gradient(
            135deg,
            rgba(44, 62, 149, 0.05) 0%,
            rgba(255, 255, 255, 1) 25%,
            rgba(255, 255, 255, 1) 75%,
            rgba(212, 175, 55, 0.05) 100%
        );
    }
}
