/* === BASIC RESET === */
body {
  background: #000;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
}

/* === TYPEWRITER CENTERED === */
main {
  text-align: center;
  z-index: 2;
}

.typewriter-wrapper {
  position: relative;
  display: inline-block;
  width: fit-content;
  margin: 0 auto;
}

/* === TYPEWRITER EFFECT === */
.typewriter {
  font-size: 2rem;
  position: relative;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid white;
  animation: typewriter 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  --text: "If you read this, you've been chosen.";
}

/* === RGB SHADOW LAYERS === */
.typewriter.rgb::before,
.typewriter.rgb::after {
  content: var(--text);
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
  animation: typewriter 3.5s steps(40, end);
}

.typewriter.rgb::before {
  color: red;
  opacity: 0.35;
  z-index: -1;
  animation: rgb-jitter 0.3s infinite;
  top: -2px;
  left: -1px;
}

.typewriter.rgb::after {
  color: cyan;
  opacity: 0.35;
  z-index: -1;
  animation: rgb-jitter 0.3s infinite reverse;
  top: 1px;
  left: 1px;
}

/* === CARET === */
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: white; }
}

/* === JITTER ANIMATION === */
@keyframes rgb-jitter {
  0%   { transform: translate(1px, -1px); }
  25%  { transform: translate(-1px, 0); }
  50%  { transform: translate(1px, 1px); }
  75%  { transform: translate(-2px, -1px); }
  100% { transform: translate(0, 0); }
}

/* === #notacultbtw ANIMATION === */
.hashtag {
  margin-top: 1rem;
  font-size: 1rem;
  color: #888;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  animation-delay: 4s;
}

@keyframes fadeIn {
  to { opacity: 0.6; }
}

/* === SCANLINES === */
.scanlines {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.2) 1px,
    transparent 1px,
    transparent 5px
  );
  z-index: 1;
  animation: scroll-lines 2s linear infinite;
}

@keyframes scroll-lines {
  from { background-position-y: 0; }
  to   { background-position-y: 10px; }
}

/* === MOBILE SUPPORT === */
@media (max-width: 600px) {
  .typewriter {
    font-size: 1rem;
  }

  .hashtag {
    font-size: 0.8rem;
  }
}
