/* 
Modified from original by Mehdi at https://codepen.io/meduzen/pen/zxbwRV
*/

.scanlines {
    overflow: hidden;
    position: relative;
}

.scanlines:before,
.scanlines:after {
    display: flex;
    pointer-events: none;
    content: "";
    position: absolute;
}

.scanlines:after {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483648;
    background: linear-gradient(to bottom,
            transparent 80%,
            var(--bg-color) 81%);
    background-size: 100% 4px;
    animation: scanlines 1s steps(60) infinite;
}

@keyframes scanlines {
    0% {
        background-position: 0 25%;
    }
}

div {
    margin: 0;
    padding: 0;
}

div.scanlines {
    position: relative;
}