/**
 * Animated Background Styles
 * Beautiful floating gradient animations for frontend pages
 * Usage: Include this CSS and add the 'animated-bg' class to body and 'background-layer' div
 */

/* Base styles for animated background */
.animated-bg {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #f0f2f5;
}

/* Fixed background layer with animations */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #151c28 0%, #0a0e1a 100%);
    z-index: -1;
    overflow: hidden;
}

/* Main content wrapper that can scroll */
.main-wrapper {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Animated background effects */
.background-layer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100vw + 100px);
    height: calc(100vh + 100px);
    background: radial-gradient(circle at 20% 80%, rgba(28, 160, 242, 0.35) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: float 60s ease-in-out infinite;
    pointer-events: none;
}

.background-layer::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100vw + 100px);
    height: calc(100vh + 100px);
    background: radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 30% 70%, rgba(34, 211, 238, 0.2) 0%, transparent 40%);
    animation: floatReverse 70s ease-in-out infinite;
    pointer-events: none;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { 
        transform: translate(0px, 0px) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translate(20px, -10px) rotate(120deg) scale(1.05); 
    }
    66% { 
        transform: translate(-15px, 15px) rotate(240deg) scale(0.98); 
    }
}

@keyframes floatReverse {
    0%, 100% { 
        transform: translate(0px, 0px) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translate(-15px, 10px) rotate(-120deg) scale(0.95); 
    }
    66% { 
        transform: translate(10px, -15px) rotate(-240deg) scale(1.02); 
    }
}

/* Variants for different page layouts */

/* Centered content layout (like login/register forms) */
.main-wrapper.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Full page layout (like dashboard) */
.main-wrapper.fullpage {
    min-height: 100vh;
    padding: 0;
}

/* Content with header layout */
.main-wrapper.with-header {
    padding-top: 0; /* Hero image displays right after header */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-wrapper.centered {
        padding: 1rem 0;
    }
    
    .main-wrapper.with-header {
        padding-top: 0;
    }
}