* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #d9d9d9;
    font-family: "Courier New", monospace;
    height: 100vh;
    overflow: hidden;
}

/* =========================================
TERMINAL
========================================= */

#terminal {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

#chat {
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 1.05rem;
}

#input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #222;
}

#input-area span {
    color: #888;
}

#userInput {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

#userInput::placeholder {
    color: #444;
}

.oculta {
    display: none;
}

/* =========================================
COLAPSO / GLITCH
========================================= */

#pantalla-colapso {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: #000;
    color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#pantalla-colapso.oculta {
    display: none;
}

#texto-colapso {
    width: min(900px, 100%);
    max-height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: "Courier New", monospace;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1.8;
    text-align: left;
}

/* =========================================
ANIMACIÓN 8-BIT
========================================= */

#pantalla-animacion {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#pantalla-animacion.oculta {
    display: none;
}

#canvas-8bit {
    width: 100vw;
    height: 100vh;
    background: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* =========================================
PÁGINA PRINCIPAL MEMENTO
========================================= */

#pagina-principal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    color: #000;
    opacity: 0;
    transition: opacity 1.8s ease;
    overflow-y: auto;

    background:
        radial-gradient(
            circle at 15% 30%,
            rgba(255, 255, 255, 0.18) 0px,
            rgba(255, 255, 255, 0.18) 2px,
            transparent 3px
        ),
        linear-gradient(
            115deg,
            #e8ff00 0%,
            #e8ff00 48%,
            #ff1717 48%,
            #ff1717 100%
        );

    background-size:
        22px 22px,
        100% 100%;
}

#pagina-principal.oculta {
    display: none;
}

/* =========================================
LAYOUT
========================================= */

.memento-layout {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns:
        minmax(320px, 520px)
        minmax(320px, 1fr);
    gap: 50px;
    align-items: center;
}

/* =========================================
PORTADA
========================================= */

.memento-cover-wrap {
    position: relative;
    width: 100%;
    filter: drop-shadow(14px 14px 0 #000);
}

.memento-cover {
    display: block;
    width: 100%;
    height: auto;
    border: 8px solid #000;
    object-fit: cover;
}

/* =========================================
CONTENIDO PRINCIPAL
========================================= */

.memento-contenido {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border: 7px solid #000;
    box-shadow: 15px 15px 0 #000;
    padding: 34px;
}

.memento-contenido::before {
    content: "";
    display: block;
    width: 72px;
    height: 12px;
    margin-bottom: 20px;
    background: #ff1717;
    border: 3px solid #000;
}

.memento-contenido::after {
    content: "";
    display: block;
    width: 100%;
    height: 8px;
    margin-top: 28px;

    background:
        repeating-linear-gradient(
            90deg,
            #000 0,
            #000 18px,
            transparent 18px,
            transparent 27px
        );
}

/* =========================================
ARTISTA
========================================= */

.nombre-artista {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 14px;
    background: #000;
    color: #fff;
    font-size: clamp(0.8rem, 1.7vw, 1rem);
    font-weight: 900;
    letter-spacing: 0.25em;
}

/* =========================================
TÍTULO
========================================= */

.memento-contenido h1 {
    margin-bottom: 15px;
    color: #000;

    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: clamp(4rem, 9vw, 7.4rem);
    line-height: 0.82;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

/* =========================================
SUBTÍTULO
========================================= */

.subtitulo-principal {
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 5px solid #000;
    color: #222;
    font-size: clamp(0.95rem, 1.7vw, 1.15rem);
    font-weight: 700;
    line-height: 1.5;
}

/* =========================================
TRACKLIST
========================================= */

.lista-canciones {
    display: grid;
    gap: 10px;
}

.cancion {
    width: 100%;
    min-height: 68px;

    display: grid;
    grid-template-columns:
        54px
        1fr
        45px;

    align-items: center;
    gap: 10px;

    padding: 12px 15px;
    border: 4px solid #000;
    background: #fff;
    color: #000;

    font-family: "Courier New", monospace;

    cursor: pointer;
    text-align: left;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.cancion:hover,
.cancion:focus-visible {
    background: #e8ff00;
    transform: translateX(5px);
    box-shadow: 7px 7px 0 #000;
    outline: none;
}

.cancion.activa {
    background: #ff1717;
    color: #fff;
    transform: translateX(7px);
    box-shadow: 8px 8px 0 #000;
}

.numero-cancion {
    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: 1.5rem;
}

.titulo-cancion {
    font-size: clamp(1rem, 2vw, 1.25rem);
    letter-spacing: 0.04em;
}

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 3px solid currentColor;
    font-size: 0.9rem;
}

/* =========================================
REPRODUCTOR
========================================= */

.reproductor-memento {
    margin-top: 25px;
    padding-top: 22px;
    border-top: 5px solid #000;
}

.reproductor-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.reproduciendo-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #555;
}

#titulo-actual {
    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: clamp(1.5rem, 3vw, 2.3rem);
    color: #000;
    text-transform: uppercase;
}

#audio-player {
    width: 100%;
    height: 46px;
}

/* =========================================
BOTÓN CRÉDITOS
========================================= */

.btn-creditos {
    width: 100%;
    margin-top: 18px;
    padding: 15px 20px;

    border: 4px solid #000;

    background: #000;
    color: #fff;

    font-family: "Courier New", monospace;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.18em;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-creditos:hover,
.btn-creditos:focus-visible {
    background: #e8ff00;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 7px 7px 0 #000;
    outline: none;
}

/* =========================================
PANTALLA DE CRÉDITOS
========================================= */

.pantalla-creditos {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding: 45px 30px 70px;

    overflow-y: auto;

    background:
        radial-gradient(
            circle,
            rgba(0, 0, 0, 0.14) 1px,
            transparent 1.5px
        ),
        linear-gradient(
            115deg,
            #e8ff00 0%,
            #e8ff00 50%,
            #ff1717 50%,
            #ff1717 100%
        );

    background-size:
        12px 12px,
        100% 100%;
}

.pantalla-creditos.oculta {
    display: none;
}

/* =========================================
PANEL CRÉDITOS
========================================= */

.creditos-panel {
    position: relative;

    width: min(760px, 100%);

    padding: 45px;

    border: 7px solid #000;

    background: #f5f5f0;
    color: #000;

    box-shadow: 16px 16px 0 #000;
}

/* =========================================
BOTÓN CERRAR
========================================= */

.cerrar-creditos {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 45px;
    height: 45px;

    border: 4px solid #000;

    background: #ff1717;
    color: #fff;

    font-size: 2rem;
    font-weight: 900;
    line-height: 1;

    cursor: pointer;
}

.cerrar-creditos:hover,
.cerrar-creditos:focus-visible {
    background: #e8ff00;
    color: #000;
    outline: none;
}

/* =========================================
MARCA CRÉDITOS
========================================= */

.creditos-marca {
    display: inline-block;

    margin-bottom: 20px;
    padding: 7px 12px;

    background: #000;
    color: #fff;

    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.25em;
}

/* =========================================
TÍTULO CRÉDITOS
========================================= */

.creditos-panel h2 {
    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: clamp(4rem, 12vw, 7rem);
    line-height: 0.8;
    margin-bottom: 20px;
}

.creditos-subtitulo {
    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: 2rem;
    letter-spacing: 0.08em;
}

.creditos-linea {
    width: 100%;
    height: 6px;

    margin: 20px 0 30px;

    background: #000;
}

/* =========================================
SECCIONES DE CRÉDITOS
========================================= */

.creditos-seccion {
    margin-bottom: 35px;
}

.creditos-seccion h3 {
    margin-bottom: 15px;
    padding: 12px 14px;

    border: 4px solid #000;

    background: #e8ff00;
    color: #000;

    font-family:
        Impact,
        Haettenschweiler,
        "Arial Narrow Bold",
        sans-serif;

    font-size: clamp(1.5rem, 4vw, 2.2rem);
    letter-spacing: 0.04em;
}

/* =========================================
CONTENIDO DE CRÉDITOS
========================================= */

.creditos-contenido {
    display: grid;
    gap: 10px;
}

.creditos-contenido p {
    display: grid;

    grid-template-columns:
        minmax(170px, 230px)
        1fr;

    gap: 20px;

    padding: 12px 0;

    border-bottom: 2px solid #000;

    font-size: 0.95rem;
    line-height: 1.4;
}

.creditos-contenido span {
    font-weight: 900;
    letter-spacing: 0.06em;
}

/* =========================================
FOOTER CRÉDITOS
========================================= */

.creditos-footer {
    margin-top: 30px;
    padding-top: 20px;

    border-top: 5px solid #000;

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-align: center;
}

/* =========================================
TABLET
========================================= */

@media (max-width: 900px) {

    body {
        overflow: auto;
    }

    #pagina-principal {
        align-items: flex-start;
        padding: 35px 24px;
    }

    .memento-layout {
        grid-template-columns: 1fr;
        max-width: 620px;
        gap: 35px;
    }

    .memento-cover-wrap {
        max-width: 520px;
        margin: 0 auto;
    }

    .memento-contenido {
        box-shadow: 10px 10px 0 #000;
    }
}

/* =========================================
CELULAR
========================================= */

@media (max-width: 600px) {

    #terminal {
        padding: 24px 18px;
    }

    #pantalla-colapso {
        padding: 24px 18px;
    }

    #pagina-principal {
        padding: 24px 16px 45px;
    }

    .memento-layout {
        gap: 27px;
    }

    .memento-cover-wrap {
        filter: drop-shadow(8px 8px 0 #000);
    }

    .memento-cover {
        border-width: 5px;
    }

    .memento-contenido {
        padding: 25px 18px;
        border-width: 5px;
        box-shadow: 8px 8px 0 #000;
    }

    .nombre-artista {
        font-size: 0.72rem;
    }

    .memento-contenido h1 {
        font-size: clamp(3.7rem, 19vw, 5.5rem);
    }

    .cancion {
        min-height: 62px;

        grid-template-columns:
            42px
            1fr
            36px;

        padding: 10px 11px;
    }

    .numero-cancion {
        font-size: 1.25rem;
    }

    .titulo-cancion {
        font-size: 0.95rem;
    }

    .play-icon {
        width: 32px;
        height: 32px;
        border-width: 2px;
        font-size: 0.75rem;
    }

    .pantalla-creditos {
        padding: 22px 15px 45px;
    }

    .creditos-panel {
        padding: 60px 20px 30px;
        border-width: 5px;
        box-shadow: 8px 8px 0 #000;
    }

    .creditos-panel h2 {
        font-size: 4rem;
    }

    .creditos-contenido p {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}