body {
  background-color: black;
  color: white;
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

.glitch-container {
  text-align: center;
}

.glitch {
  font-size: 5em;
  position: relative;
  animation: flicker 2s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #f0f;
  clip: rect(0, 900px, 0, 0);
}

.glitch::before {
  animation: glitchTop 2s infinite;
}

.glitch::after {
  animation: glitchBottom 1.5s infinite;
  color: #0ff;
}

@keyframes glitchTop {
  0% {
    clip: rect(0, 9999px, 0, 0);
  }
  5% {
    clip: rect(0, 9999px, 100%, 0);
    transform: translate(-3px, -3px);
  }
  10% {
    clip: rect(0, 9999px, 0, 0);
    transform: translate(0, 0);
  }
  100% {
    clip: rect(0, 9999px, 0, 0);
  }
}

@keyframes glitchBottom {
  0% {
    clip: rect(0, 9999px, 0, 0);
  }
  5% {
    clip: rect(80%, 9999px, 100%, 0);
    transform: translate(3px, 3px);
  }
  10% {
    clip: rect(0, 9999px, 0, 0);
    transform: translate(0, 0);
  }
  100% {
    clip: rect(0, 9999px, 0, 0);
  }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.4;
  }
}
