/* Animated Background Styles */

/* Main animated background */
.animated-background-body {
    background: linear-gradient(135deg, #02291f 0%, #054634 25%, #065f46 50%, #073828 75%, #10b981 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow-x: hidden;
    will-change: background-position;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Performance Monitor Overlay */
.performance-monitor {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #10b981;
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.performance-monitor h3 {
    margin-bottom: 10px;
    color: white;
    font-size: 14px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.stat-value {
    font-weight: bold;
}

.status-good { color: #10b981; }
.status-warning { color: #f59e0b; }
.status-poor { color: #ef4444; }

/* 3D Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.25;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    width: 110%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridFloat 20s linear infinite;
}

@keyframes gridFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating Particles */
.particles-container {
    position: fixed;
    top: -10vh;
    left: 0;
    width: 100%;
    height: 110vh;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.166);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(odd) {
    background: rgba(16, 185, 129, 0.175);
    animation-duration: 12s;
}

.particle:nth-child(3n) {
    background: rgba(251, 190, 36, 0.247);
    animation-duration: 18s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) translateX(10px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) translateX(-10px) scale(1);
    }
    100% {
        transform: translateY(-10vh) translateX(0) scale(0);
        opacity: 0;
    }
}

/* Geometric Shapes */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: shapeRotate 30s linear infinite;
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 26px solid rgba(16, 185, 129, 0.1);
    border-radius: 3px;
}

.shape.circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.shape.hexagon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
}

@keyframes shapeRotate {
    0% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(90deg) translateX(20px); }
    50% { transform: rotate(180deg) translateX(0); }
    75% { transform: rotate(270deg) translateX(-20px); }
    100% { transform: rotate(360deg) translateX(0); }
}

/* Demo box from background.html - you can remove this if not needed */
.demo-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: boxFloat 6s ease-in-out infinite;
}

@keyframes boxFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.demo-box h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.demo-box p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.ai-badge-demo {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}