.text::before, .text::after {
    content: attr(data-text);
    position: absolute;
    font-size: 13px;
    margin: auto;
    margin-left: -10px;
    text-align: center;
    width: 97.5%;
    height: 0;
    z-index: -1;
}

.text::before {
    color: #ff0000;
    animation: glitch-effect 3s infinite;
}

.text::after {
    color: #000000;
    animation: glitch-effect 2s infinite;
}

@keyframes glitch-effect {
    0% {
        left: -2px;
        top: -2px;
    }
    25% {
        left: 2px;
        top: 0px;
    }
    50% {
        left: -1px;
        top: 2px;
    }
    75% {
        left: 1px;
        top: -1px;
    }
    100% {
        left: 0px;
        top: -2px;
    }
}