body {
  background-color: #000;
  color: #00FF99;
  font-family: 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;

  /* Cuadriculado verde tenue */
  background-image:
    linear-gradient(0deg, rgba(0,255,153,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,153,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
  z-index: 1;
}

@keyframes scanline-move {
  0% {
    background-position-y: 0;
  }
  100% {
    background-position-y: 20px; /* el tamaño de tu patrón */
  }
}

/* Scanlines (líneas CRT suaves) */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 153, 0.04),
    rgba(0, 255, 153, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 0;
  
  animation: scanline-move 5s linear infinite;
}


.top-bar {
  font-size: 2rem;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px #00FF99, 0 0 20px #00FF99;
  margin-bottom: 30px;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #00FF99;
  width: 0;
  animation: typing 3s steps(20, end) forwards, blink 0.7s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 17ch }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.clock {
  font-size: 5rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px #00FF99, 0 0 20px #00FF99;
  border: 4px solid #00FF99;
  padding: 40px 60px;
  border-radius: 15px;
  background-color: #001a0d;
  box-shadow: 0 0 30px #00ff99aa;
  z-index: 1;
}

.counter {
  margin-top: 30px;
  font-size: 2rem;
  text-shadow: 0 0 5px #00FF99, 0 0 10px #00FF99;
  text-align: center;
  line-height: 1.5;
  z-index: 1;
}

@media (max-width: 500px) {
  .top-bar {
    font-size: 1.5rem;
  }

  .clock {
    font-size: 3rem;
    padding: 20px 30px;
  }

  .counter {
    font-size: 1.5rem;
  }
}

@keyframes glitch {
  0% { transform: none; opacity: 1; }
  10% { transform: translate(1px, 0); opacity: 0.8; }
  20% { transform: translate(-1px, 0); opacity: 1; }
  30% { transform: translate(1px, 1px); opacity: 0.9; }
  40% { transform: translate(-1px, -1px); opacity: 1; }
  50% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}

.glitch-effect {
  animation: glitch 0.4s ease-in-out;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(0,255,153,0) 0%,
    rgba(0,255,153,0.08) 50%,
    rgba(0,255,153,0) 100%
  );
  background-size: 200% 100%;
  animation: glow-move 4s linear infinite;
}

@keyframes glow-move {
  0% { background-position-x: 200%; }
  100% { background-position-x: 0%; }
}
