body {
    margin: 0;
    overflow: hidden; /* Evita barras de scroll */
    background-color: #000; /* Fondo negro inicial */
    color: white;
    font-family: 'Courier New', Courier, monospace;
}

#game-canvas {
    display: none; /* Empieza oculto */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#intro-overlay, #game-instructions, #end-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 2em;
    z-index: 10; /* Asegura que esté sobre el canvas */
    pointer-events: none; /* No interfiere con clics */
    width: 80%;
    display: flex; /* Usar flex para centrar vertical/horizontal */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* Ocultar overlay por defecto, se muestra desde JS */
#intro-overlay {
     display: none;
     /* Ajustes específicos si es necesario */
     height: 100vh; /* Ocupar toda la altura para centrar bien */
}


#intro-overlay p {
    margin: 10px 0;
}

#signature {
    margin-top: 30px;
    font-style: italic;
}

#press-key-prompt {
    margin-top: 20px;
    font-size: 0.7em;
    opacity: 0.8;
    animation: blink 1.5s linear infinite;
}

#game-instructions {
    display: none; /* Oculto inicialmente */
    top: 10%; /* Posiciona las instrucciones arriba */
    font-size: 1.5em;
    color: #333; /* Color más oscuro para instrucciones */
    text-shadow: 0 0 2px white;
}

#end-message {
    display: none; /* Oculto inicialmente */
    font-size: 3em;
    font-weight: bold;
    color: #0f0; /* Color verde brillante para éxito */
    text-shadow: 0 0 10px #0f0;
}
#end-message.error {
    color: #f00; /* Color rojo para error */
    text-shadow: 0 0 10px #f00;
}


@keyframes blink {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.2; }
}