/* Modern Animated Background CSS - Premium Trading Effect */

/* Base Styling for Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: -3;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Premium Glass Effect Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.85) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -2;
}

/* Advanced Particle Animation */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Premium Gradient Glow Effect */
.gradient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 70%;
    background: radial-gradient(ellipse at center, 
                rgba(212, 175, 55, 0.15) 0%, 
                rgba(212, 175, 55, 0.05) 40%, 
                rgba(0, 0, 0, 0) 70%);
    filter: blur(40px);
    z-index: -2;
    animation: pulse-glow 8s infinite alternate;
}

/* Side Accent Glows */
.accent-glow-1 {
    position: absolute;
    top: 20%;
    right: -5%;
    width: 40%;
    height: 40%;
    background: radial-gradient(ellipse at center, 
                rgba(30, 58, 138, 0.2) 0%, 
                rgba(30, 58, 138, 0.05) 50%, 
                rgba(0, 0, 0, 0) 70%);
    filter: blur(50px);
    z-index: -2;
    animation: float-slow 15s infinite alternate;
}

.accent-glow-2 {
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 35%;
    height: 35%;
    background: radial-gradient(ellipse at center, 
                rgba(212, 175, 55, 0.15) 0%, 
                rgba(212, 175, 55, 0.05) 50%, 
                rgba(0, 0, 0, 0) 70%);
    filter: blur(50px);
    z-index: -2;
    animation: float-slow 20s infinite alternate-reverse;
}

/* Floating 3D Trading Elements */
.trading-element {
    position: absolute;
    z-index: -1;
    opacity: 0;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
    animation: fade-in 0.8s forwards, float-3d 15s infinite ease-in-out;
}

.trading-element.chart-up {
    width: 120px;
    height: 120px;
    top: 15%;
    right: 10%;
    background-image: url('../images/chart-up.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation-delay: 0.3s, 0s;
}

.trading-element.candles {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 12%;
    background-image: url('../images/candles.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation-delay: 0.6s, 0.5s;
}

.trading-element.coin-gold {
    width: 80px;
    height: 80px;
    top: 25%;
    left: 15%;
    background-image: url('../images/bitcoin.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation-delay: 0.9s, 1s;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.trading-element.trend {
    width: 90px;
    height: 90px;
    bottom: 25%;
    right: 15%;
    background-image: url('../images/trend.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation-delay: 1.2s, 1.5s;
}

/* 3D Grid Background */
.grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    perspective: 1000px;
    transform: rotateX(60deg) scale(2.5) translateY(-10%);
    transform-origin: center center;
    opacity: 0.3;
    z-index: -2;
    animation: grid-move 30s linear infinite;
}

/* Animated Light Rays */
.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    opacity: 0.3;
    overflow: hidden;
}

.light-ray {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0));
    top: -20%;
    height: 120%;
    animation: light-ray-fall 10s linear infinite;
    transform: rotate(15deg);
}

/* Animations */
@keyframes pulse-glow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
}

@keyframes float-slow {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-30px) translateX(15px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes float-3d {
    0% { transform: translateY(0) translateX(0) translateZ(0) rotate(0); }
    25% { transform: translateY(-15px) translateX(10px) translateZ(5px) rotate(2deg); }
    50% { transform: translateY(0) translateX(20px) translateZ(0) rotate(0); }
    75% { transform: translateY(15px) translateX(10px) translateZ(5px) rotate(-2deg); }
    100% { transform: translateY(0) translateX(0) translateZ(0) rotate(0); }
}

@keyframes fade-in {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 0.7; transform: scale(1); }
}

@keyframes grid-move {
    0% { background-position: 0px 0px; }
    100% { background-position: 0px 1000px; }
}

@keyframes light-ray-fall {
    0% { transform: translateY(-100%) rotate(15deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(100%) rotate(15deg); opacity: 0; }
}

/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .trading-element {
        transform: scale(0.85);
    }
}

@media (max-width: 992px) {
    .trading-element {
        transform: scale(0.7);
    }
}

@media (max-width: 768px) {
    .trading-element {
        transform: scale(0.6);
    }
    .grid-background {
        transform: rotateX(60deg) scale(3) translateY(-10%);
    }
}

@media (max-width: 576px) {
    .trading-element {
        transform: scale(0.5);
    }
    .light-rays {
        opacity: 0.2;
    }
    .grid-background {
        opacity: 0.2;
    }
}
