/* New styles for the main background particle container */
#main-background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind all other content */
}

#main-background-particles-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* On top of the other particle container */
}

/**
 * Advanced 3D Particle Styles
 * Inspired by DOTDNA video aesthetics
 */

/* Hero particles container */
#hero-3d-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: all;
    cursor: pointer;
}

#hero-3d-particles canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Particle loading indicator */
.particle-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: #39ff14;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Depth and layering effects */
.hero-visual {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hero-visual #hero-3d-particles {
    transform: translateZ(20px);
}

.hero-visual .logo-container-hero {
    transform: translateZ(50px);
    position: relative;
    z-index: 10;
}

/* Light rays effect */
@keyframes lightRay {
    0% {
        opacity: 0;
        transform: translateY(-100%) scaleY(0);
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translateY(100%) scaleY(1);
    }
}

.hero-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(57, 255, 20, 0.6),
        transparent
    );
    animation: lightRay 3s ease-in-out infinite;
    pointer-events: none;
}

/* Particle interaction feedback */
.particle-interactive {
    cursor: pointer;
    user-select: none;
}

.particle-interactive:active {
    transform: scale(0.98);
}

/* Enhanced glow for active particles */
.particle-active {
    box-shadow: 
        0 0 50px rgba(57, 255, 20, 0.6),
        0 0 100px rgba(57, 255, 20, 0.4),
        inset 0 0 50px rgba(57, 255, 20, 0.2);
}

/* Distortion effect */
@keyframes distortionWave {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        filter: hue-rotate(15deg) brightness(1.2);
    }
}

#hero-3d-particles:hover {
    animation: distortionWave 2s ease-in-out infinite;
}
