#matrix {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5; /* <--- możesz zmniejszyć lub zwiększyć */
}

/*404 Glitch Effect*/
.glitch-wrapper {
  position: relative;
  text-align: center;
}

.glitch {
  font-size: 8rem;
  font-weight: 800;
  position: relative;
  color: white;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(255, 255, 255, 0.2);
  animation: glitch-skew 1.5s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #ff006a;
  animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #00f0ff;
  animation: glitch-2 1.8s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(0 0 80% 0);
  }
  10% {
    clip-path: inset(10% 0 60% 0);
  }
  20% {
    clip-path: inset(20% 0 40% 0);
  }
  30% {
    clip-path: inset(40% 0 20% 0);
  }
  40% {
    clip-path: inset(10% 0 60% 0);
  }
  50% {
    clip-path: inset(0 0 80% 0);
  }
  60% {
    clip-path: inset(30% 0 40% 0);
  }
  70% {
    clip-path: inset(20% 0 50% 0);
  }
  80% {
    clip-path: inset(10% 0 70% 0);
  }
  90% {
    clip-path: inset(5% 0 85% 0);
  }
  100% {
    clip-path: inset(0 0 80% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(80% 0 0 0);
  }
  10% {
    clip-path: inset(60% 0 10% 0);
  }
  20% {
    clip-path: inset(40% 0 20% 0);
  }
  30% {
    clip-path: inset(20% 0 30% 0);
  }
  40% {
    clip-path: inset(60% 0 10% 0);
  }
  50% {
    clip-path: inset(80% 0 0 0);
  }
  60% {
    clip-path: inset(40% 0 20% 0);
  }
  70% {
    clip-path: inset(50% 0 20% 0);
  }
  80% {
    clip-path: inset(70% 0 10% 0);
  }
  90% {
    clip-path: inset(85% 0 5% 0);
  }
  100% {
    clip-path: inset(80% 0 0 0);
  }
}

@keyframes glitch-skew {
  0% {
    transform: skew(0deg);
  }
  20% {
    transform: skew(2deg);
  }
  40% {
    transform: skew(-2deg);
  }
  60% {
    transform: skew(1deg);
  }
  80% {
    transform: skew(-1deg);
  }
  100% {
    transform: skew(0deg);
  }
}

.glitch-sub {
  margin-top: -10px;
  color: #aaa;
  font-size: 1.2rem;
  letter-spacing: 2px;
}
