/* Animation 1: Classic Typewriter */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
}

.typewriter.animate {
  border-right: 3px solid #fff;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #fff;
  }
}

/* Animation 2: Fade In Character by Character */
.fade-in-chars span {
  opacity: 0;
  display: inline-block;
}

.fade-in-chars.animate span {
  animation: fadeInChar 0.1s ease-in forwards;
}

@keyframes fadeInChar {
  to {
    opacity: 1;
  }
}

/* Animation 3: Wave Reveal */
.wave-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

.wave-reveal.animate span {
  animation: waveIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes waveIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation 4: Glitch Reveal */
.glitch-reveal span {
  display: inline-block;
  opacity: 0;
}

.glitch-reveal.animate span {
  animation: glitchIn 0.4s ease forwards;
}

@keyframes glitchIn {
  0% {
    opacity: 0;
    transform: translateX(-10px) skew(-20deg);
    filter: blur(4px);
  }
  50% {
    opacity: 0.5;
    transform: translateX(5px) skew(10deg);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skew(0deg);
    filter: blur(0);
  }
}

.scroll-indicator {
  text-align: center;
  color: #fff;
  margin-top: 40px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.instructions {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto 100px;
  color: #fff;
}

.instructions h2 {
  margin-bottom: 20px;
  font-size: 24px;
}

.instructions code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.instructions pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 15px 0;
}

.instructions ul {
  margin: 15px 0 15px 25px;
}

.instructions li {
  margin: 8px 0;
}
