/* Container Background Effects CSS */

.has-custom-background-effect {
    position: relative;
    overflow: hidden;
}

.background-effect-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
    touch-action: none;
}

.background-effect-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.background-effect-liquid_ether .background-effect-container {
    touch-action: none;
}

.background-effect-gradient_waves .background-effect-container {
    pointer-events: none;
}

.background-effect-particles_flow .background-effect-container {
    pointer-events: none;
}

.background-effect-geometric_shapes .background-effect-container {
    pointer-events: none;
}

.background-effect-prism .background-effect-container {
    pointer-events: auto;
}

.background-effect-prismatic_burst .background-effect-container {
    pointer-events: auto;
    position: relative;
}

.background-effect-prismatic_burst canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.background-effect-prismatic_burst .prismatic-burst-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(82, 39, 255, 0.3) 0%, rgba(255, 159, 252, 0.2) 50%, transparent 70%);
    opacity: 0.8;
}

.background-effect-aurora .background-effect-container {
    pointer-events: none;
}

.background-effect-plasma .background-effect-container {
    pointer-events: auto;
    position: relative;
}

.background-effect-plasma .plasma-canvas {
    pointer-events: auto;
}

/* Ensure content stays above background but allows mouse events to pass through */
.has-custom-background-effect > *:not(.background-effect-container) {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.has-custom-background-effect > .elementor-container,
.has-custom-background-effect > .elementor-row,
.has-custom-background-effect > .elementor-column,
.has-custom-background-effect > .elementor-widget,
.has-custom-background-effect > div,
.has-custom-background-effect > section {
    position: relative;
    z-index: 1;
}

/* Liquid ether uses JavaScript event forwarding to maintain full interactivity */

/* Liquid Ether specific styles */
.liquid-ether-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Performance optimizations */
.background-effect-container {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Gradient Blinds Effect */
.background-effect-gradient_blinds .background-effect-container {
    pointer-events: auto;
    position: relative;
    mix-blend-mode: lighten;
}

.background-effect-gradient_blinds canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.background-effect-gradient_blinds .gradient-blinds-fallback {
    background: linear-gradient(90deg, #FF9FFC 0%, #5227FF 100%);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

/* Beams Effect */
.background-effect-beams .background-effect-container {
    pointer-events: none;
    position: relative;
}

.background-effect-beams canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.background-effect-beams .beams-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Dither Effect */
.background-effect-dither .background-effect-container {
    pointer-events: auto;
    position: relative;
}

.background-effect-dither canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.background-effect-dither .dither-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

/* Terminal Effect */
.background-effect-terminal .background-effect-container {
    pointer-events: auto;
    position: relative;
}

.background-effect-terminal canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.background-effect-terminal .terminal-fallback {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(0deg, #001100 0%, #002200 50%, #001100 100%);
    font-family: 'Courier New', monospace;
    color: #00ff00;
    padding: 20px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Loading state */
.background-effect-loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.background-effect-loaded {
    opacity: 1;
}