@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

body {
  background-color: #000;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.glitch-container {
  position: relative;
}

.glitch {
  font-size: 50px;
  position: relative;
  color: white;
  letter-spacing: 2px;
  animation: flicker 1.5s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  color: white;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 red;
  animation: glitchTop 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 blue;
  animation: glitchBottom 1.8s infinite linear alternate-reverse;
}

p {
  color: #999;
  margin-top: 15px;
  margin-bottom: 25px !important;
}

.btn-home {
  margin-top: 30px;
  text-decoration: none;
  background: #ffffff;
  color: #000;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-home:hover {
  background: #000;
  color: #fff;
  transform: scale(1.1);
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.4;
  }
}

@keyframes glitchTop {
  0% {
    clip: rect(0, 9999px, 0, 0);
  }
  20% {
    clip: rect(0, 9999px, 50px, 0);
    transform: translate(-3px, -2px);
  }
  40% {
    clip: rect(0, 9999px, 25px, 0);
    transform: translate(3px, 2px);
  }
  60% {
    clip: rect(0, 9999px, 60px, 0);
    transform: translate(-3px, 1px);
  }
  80% {
    clip: rect(0, 9999px, 40px, 0);
    transform: translate(2px, -1px);
  }
  100% {
    clip: rect(0, 9999px, 0, 0);
  }
}

@keyframes glitchBottom {
  0% {
    clip: rect(0, 9999px, 0, 0);
  }
  20% {
    clip: rect(60px, 9999px, 80px, 0);
    transform: translate(3px, 1px);
  }
  40% {
    clip: rect(40px, 9999px, 60px, 0);
    transform: translate(-3px, -2px);
  }
  60% {
    clip: rect(80px, 9999px, 100px, 0);
    transform: translate(2px, -1px);
  }
  80% {
    clip: rect(50px, 9999px, 70px, 0);
    transform: translate(-2px, 1px);
  }
  100% {
    clip: rect(0, 9999px, 0, 0);
  }
}
