@keyframes moveLineHorizontal-1 {
  0% {
    top: 0;
    transform: translateX(0);
  }
  100% {
    top: 100%;
    transform: translateX(0);
  }
}

@keyframes moveLineHorizontal-2 {
  0% {
    top: 5%;
    transform: translateX(0);
  }
  100% {
    top: 95%;
    transform: translateX(0);
  }
}

@keyframes moveLineVertical-1 {
  0% {
    left: 0;
    transform: translateY(0);
  }
  100% {
    left: 100%;
    transform: translateY(0);
  }
}

@keyframes moveLineVertical-2 {
  0% {
    left: 5%;
    transform: translateY(0);
  }
  100% {
    left: 95%;
    transform: translateY(0);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes flash-1 {
  from {
    background-color: rgb(217, 217, 217, 0.4);
  }
  to {
    background-color: #d5d5d5; /* Alternate flash color */
  }
}

@keyframes flash-2 {
  from {
    background-color: rgba(164, 164, 164, 0.4);
  }
  to {
    background-color: #d5d5d5; /* Alternate flash color */
  }
}

@keyframes glitch {
  2%,
  64% {
    transform: translate(2px, 0) skew(0deg);
  }
  4%,
  60% {
    transform: translate(-2px, 0) skew(0deg);
  }
  62% {
    transform: translate(0, 0) skew(5deg);
  }
}

@keyframes glitchTop {
  2%,
  64% {
    transform: translate(2px, -2px);
  }
  4%,
  60% {
    transform: translate(-2px, 2px);
  }
  62% {
    transform: translate(13px, -1px) skew(-13deg);
  }
}

@keyframes glitchBotom {
  2%,
  64% {
    transform: translate(-2px, 0);
  }
  4%,
  60% {
    transform: translate(-2px, 0);
  }
  62% {
    transform: translate(-22px, 5px) skew(21deg);
  }
}

body {
  overflow: hidden;
}

.btn:hover div {
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: 4px;
  animation: glitch 1s ease-in-out infinite;
}

.btn:hover div:before,
.btn:hover div:after {
  content: attr(title);
  position: absolute;
  left: 0;
}

.btn:hover div:before {
  animation: glitchTop 1s linear infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.btn:hover div:after {
  animation: glitchBotom 1.5s linear infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

.button-container {
  position: absolute;
  top: 25vh;
  right: 15vw;
  display: grid;
  grid-template-columns: auto auto;
  gap: 1em;
}

.btn {
  padding: 2em;
  text-align: center;
  border-radius: 20px;
  background-color: rgb(217, 217, 217, 0.4);
  filter: drop-shadow(4px 4px 2px #686868);
  height: 5vh;
  display: flex;
  justify-content: center;
  width: 8vw;
  align-items: center;
  color: #171717;
  font-family: "Neuropol", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.btn:hover {
  cursor: pointer;
  animation: flash-1 0.2s ease-in-out infinite alternate; /* Apply flash animation */
}

.btn:nth-child(1),
.btn:nth-child(4),
.btn:nth-child(5) {
  background-color: rgba(164, 164, 164, 0.4);
}

.btn:nth-child(1):hover,
.btn:nth-child(4):hover,
.btn:nth-child(5):hover {
  animation: flash-2 0.3s ease-in-out infinite alternate; /* Apply flash animation */
}

.code {
  position: absolute;
  font-size: 1vh;
  color: white;
  opacity: 0.25;
  top: 25vh;
  left: 2vw;
}

.code pre {
  overflow: hidden;
  animation: typing 10s ease-in-out infinite;
}

.dot-container {
  background: url("../assets/images/larger-dots.webp") repeat;
  opacity: 25%;
  position: absolute;
  box-sizing: border-box;
  width: 40vw;
  height: 30vh;
  z-index: 10;
}

.dot-container-top {
  mask-image: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0)
  );
  top: 0;
  left: 0;
}

.dot-container-bottom {
  mask-image: linear-gradient(
    to top left,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0)
  );

  bottom: 0;
  right: 0;
}

.moving-line {
  position: absolute; /* Or fixed, depending on desired behavior */
  background-color: white; /* Color of the line */
  opacity: 0.1;
}

.moving-line-h {
  height: 2px; /* Thickness of the line */
  width: 100%; /* Initial length of the line */
  animation: moveLineHorizontal-1 5s ease-in-out infinite alternate;
}

.moving-line-h2 {
  animation: moveLineHorizontal-2 5s ease-in-out infinite alternate;
}

.moving-line-v {
  width: 2px;
  height: 100%;
  animation: moveLineVertical-1 5s ease-in-out infinite alternate;
}

.moving-line-v2 {
  animation: moveLineVertical-2 5s ease-in-out infinite alternate;
}

.video-container {
  width: auto;
  position: absolute;
  z-index: 10;
}

.video-container-top {
  height: 40vh;
  right: -4em;
  top: -4em;
}

.video-container-top img {
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

.video-container-bottom {
  height: 40vh;
  left: -10em;
  bottom: -5em;
}

.video-container-bottom img {
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    24,
    109,
    255,
    0.3
  ); /* Semi-transparent background for the filter effect */
  backdrop-filter: grayscale(20%); /* Apply desired filters */
  z-index: 0; /* Place overlay between video and content */
}

/* Style the video: 100% width and height to cover the entire window */
#myVideo {
  position: fixed;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
