
#underwater-light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 800px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    mask: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0) 100%);
}

.light-ray {
    position: absolute;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(135, 206, 235, 0.4) 40%,
        rgba(100, 149, 237, 0.2) 70%,
        transparent 100%
    );
    filter: blur(1px);
    animation: lightRayMove 8s ease-in-out infinite alternate;
    clip-path: polygon(45% 0%, 55% 0%, 60% 100%, 40% 100%);
    left: 50%;
    height: 700px;
}

@keyframes lightRayMove {
    0% {
        opacity: 0.3;
        filter: blur(1px) brightness(1);
    }
    25% {
        opacity: 0.5;
        filter: blur(2px) brightness(1.1);
    }
    50% {
        opacity: 0.4;
        filter: blur(1.5px) brightness(0.9);
    }
    75% {
        opacity: 0.6;
        filter: blur(2.5px) brightness(1.2);
    }
    100% {
        opacity: 0.35;
        filter: blur(1px) brightness(1);
    }
}

/* Scroll-based fade effect */
@media (min-height: 600px) {
    #underwater-light-rays {
        height: 60vh;
    }
}

@media (min-height: 800px) {
    #underwater-light-rays {
        height: 50vh;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #underwater-light-rays {
        height: 70vh;
    }
    .light-ray {
        height: 500px !important;
    }
}

@media (max-width: 480px) {
    #underwater-light-rays {
        height: 80vh;
    }
    .light-ray {
        height: 450px !important;
    }
}

/* Ensure content stays above light rays */
body * {
    position: relative;
    z-index: 2;
}

body::before,
body::after,
.background-element {
    z-index: 0;
}
