/* ===================================
   Background Animations - Neon Theme
   =================================== */

/* Layer 1: Floating Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 234, 255, 0.1), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(154, 77, 255, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 31, 113, 0.1), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0, 234, 255, 0.1), transparent),
        radial-gradient(2px 2px at 90% 40%, rgba(154, 77, 255, 0.1), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(255, 31, 113, 0.1), transparent),
        radial-gradient(2px 2px at 40% 60%, rgba(0, 234, 255, 0.1), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(154, 77, 255, 0.1), transparent);
    background-size: 200% 200%;
    animation: particleFloat 30s ease infinite;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 90% 60%, 10% 80%, 40% 60%, 70% 20%;
        opacity: 0.6;
    }
    25% {
        background-position: 25% 25%, 75% 75%, 60% 40%, 60% 40%, 70% 50%, 30% 60%, 50% 70%, 50% 30%;
        opacity: 0.8;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 50% 50%, 20% 80%, 10% 40%, 90% 20%, 60% 40%, 30% 80%;
        opacity: 0.6;
    }
    75% {
        background-position: 75% 75%, 25% 25%, 40% 60%, 40% 60%, 30% 50%, 70% 40%, 50% 30%, 50% 70%;
        opacity: 0.8;
    }
}

/* Layer 2: Neon Rings */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    right: 10%;
    width: 600px;
    height: 600px;
    border: 2px dashed rgba(0, 234, 255, 0.2);
    border-radius: 50%;
    transform: translate(50%, -50%);
    animation: ringExpand 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 40px rgba(0, 234, 255, 0.1);
}

@keyframes ringExpand {
    0%, 100% {
        transform: translate(50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(50%, -50%) scale(1.2);
        opacity: 0.1;
    }
}

/* Create multiple rings using pseudo-elements on container */
.container::before {
    content: '';
    position: fixed;
    top: 50%;
    right: 15%;
    width: 400px;
    height: 400px;
    border: 2px dashed rgba(154, 77, 255, 0.15);
    border-radius: 50%;
    transform: translate(50%, -50%);
    animation: ringExpand 10s ease-in-out infinite 2s;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(154, 77, 255, 0.08);
}

.container::after {
    content: '';
    position: fixed;
    top: 50%;
    right: 5%;
    width: 800px;
    height: 800px;
    border: 2px dashed rgba(255, 31, 113, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
    animation: ringExpand 12s ease-in-out infinite 4s;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 50px rgba(255, 31, 113, 0.05);
}

/* Layer 3: Moving Gradient Lines */
.background-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 234, 255, 0.03) 20%, 
        rgba(154, 77, 255, 0.03) 50%, 
        rgba(255, 31, 113, 0.03) 80%, 
        transparent 100%);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.1);
}

.line-1 {
    top: 20%;
    animation: lineMove 15s linear infinite;
}

.line-2 {
    top: 40%;
    animation: lineMove 20s linear infinite 5s;
}

.line-3 {
    top: 60%;
    animation: lineMove 18s linear infinite 10s;
}

.line-4 {
    top: 80%;
    animation: lineMove 22s linear infinite 7s;
}

@keyframes lineMove {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Animated Grid Background */
.animated-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: 
        linear-gradient(rgba(0, 234, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

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

/* Glowing Line Animation for Header */
.header-animated-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 234, 255, 0.5) 20%, 
        rgba(154, 77, 255, 0.5) 50%, 
        rgba(0, 234, 255, 0.5) 80%, 
        transparent 100%);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
    animation: headerLineMove 3s ease-in-out infinite;
}

@keyframes headerLineMove {
    0%, 100% {
        opacity: 0.5;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.1);
    }
}

/* Pulse Animation for Neon Elements */
@keyframes neonPulse {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2);
    }
}

.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 234, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 234, 255, 0.8), 0 0 60px rgba(0, 234, 255, 0.4);
    }
}

.neon-glow {
    animation: glow 3s ease-in-out infinite;
}

/* Rotate Animation for Cube */
@keyframes rotate {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.rotate {
    animation: rotate 20s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}
