@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&display=swap');

body {
  background-color: #232323;
  color: #fff;
  font-family: 'Fira Code', monospace;
}

/* Glitch text */
.glitch {
  position: relative;
  font-size: 4rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  margin: 2rem auto;
  width: fit-content;
  color: white;
}

.glitch::before,
.glitch::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  opacity: 0.8;
  pointer-events: none;
}

.glitch::before {
  color: #0ff;
  z-index: -1;
  animation: glitch 1.5s infinite linear alternate-reverse;
}

.glitch::after {
  color: #f0f;
  z-index: -2;
  animation: glitch 1.5s infinite linear alternate;
}

@keyframes glitch {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Mobile responsiveness */
@media (max-width: 400px) {
  .glitch {
    font-size: 2rem;
  }
}
