@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap');

body {
    margin: 0;
    background-color: #0f0f0f;
    color: #00ffcc;
    font-family: 'Courier Prime', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    flex-direction: column;
    user-select: none;
    padding: 10px;
}

#particulas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.contenedor {
    max-width: 720px;
    padding: 30px 35px;
    text-align: left;
    border: 2px solid #00ffccaa;
    border-radius: 10px;
    background: rgba(0, 255, 204, 0.12);
    box-shadow:
        0 0 1px #00ffccdd,
        inset 0 0 40px #00ffcc55;
    animation: aparecerSubir 1.8s ease forwards, brilloPulso 4s ease-in-out infinite;
}

h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow:
        0 0 6px #00ffffaa,
        0 0 12px #00ffccbb;
}

.maquina-escribir {
    font-size: 1.3em;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #00ffcc;
    color: #00ffccdd;
    animation: escribir 4.5s steps(22, end) forwards;
    width: 22ch;
}

.sin-cursor {
    border-right: none;
}

.mensaje2 {
    margin-top: 22px;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #00ffccbb;
    color: #00ffccbb;
    opacity: 0;
    animation:
        escribir2 3.5s steps(20, end) forwards,
        parpadeoCursor 0.8s step-end infinite;
    animation-delay: 4.6s, 4.6s;
    animation-fill-mode: forwards;
}

footer {
    margin-top: 44px;
    font-size: 0.9em;
    color: #555;
    text-align: center;
    font-style: italic;
    user-select: text;
    text-transform: lowercase;
}

/* Animaciones */
@keyframes escribir {
    from {
        width: 0ch;
        opacity: 1;
    }
    to {
        width: 22ch;
        opacity: 1;
    }
}

@keyframes escribir2 {
    0% {
        width: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        width: 15ch;
        opacity: 1;
    }
}

@keyframes parpadeoCursor {
    50% {
        border-color: transparent;
    }
}

@keyframes aparecerSubir {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes brilloPulso {
    0%, 100% {
        box-shadow:
            0 0 18px #00ffccdd,
            inset 0 0 40px #00ffcc55;
    }
    50% {
        box-shadow:
            0 0 28px #00ffccff,
            inset 0 0 60px #00ffcc88;
    }
}

@media (max-width: 480px) {
    .contenedor {
        max-width: 90vw;
        padding: 20px 25px;
    }

    h1 {
        font-size: 2em;
    }

    .maquina-escribir,
    .mensaje2 {
        font-size: 1.1em;
    }
}
