/* === PALETA DE COLORES (Drácula/Monokai) === */
:root {
    --bg-dark: #282a36;
    --bg-header: #44475a;
    --color-command: #50fa7b;
    --color-output: #f8f8f2;
    --color-keyword: #e07e23;
    --color-icon: #ffb86c;
    --color-error: #ff5555;
}

/* === ESTRUCTURA GLOBAL === */
body {
    background-color: #1e1e1e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Pixelify Sans', fantasy;
    padding: 10px;
    overflow: hidden;
}

/* === TERMINAL === */
#terminal-window {
    width: min(90vw, 700px);
    height: min(80vh, 600px);
    background-color: var(--bg-dark);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === BARRA SUPERIOR === */
.terminal-header {
    background-color: var(--bg-header);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    height: 30px;
}

.header-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

/* === CONTENIDO DE TERMINAL === */
.terminal-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    color: var(--color-output);
    line-height: 1.4;
    font-size: clamp(12px, 1.2vw, 18px);
    white-space: pre-wrap;
}

/* === LÍNEAS === */
.line-command { color: var(--color-command); }
.line-output { color: var(--color-output); }
.line-separator { color: var(--color-keyword); font-weight: bold; }

/* === NOMBRE PIXELADO === */
.name-pixel {
    font-family: 'Press Start 2P', fantasy;
    font-size: clamp(28px, 5vw, 60px);
    color: var(--color-keyword);
    text-shadow: 2px 2px 0px var(--color-error);
    line-height: 0.8;
    margin: 10px 0;
    display: block;
    word-spacing: -20px;
}

/* === CURSOR PARPADEANTE === */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--color-output);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* === ICONOS === */
.icon {
    color: var(--color-icon);
    font-size: clamp(14px, 1.5vw, 20px);
    margin-right: 5px;
}

/* === AVATAR PIXELADO === */
.pixel-avatar {
    width: clamp(60px, 10vw, 120px);
    height: auto;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    font-smoothing: none;
    margin: 0 auto 15px auto;
    display: block;
}

/* Clearfix para flotantes */
.terminal-content div::after {
    content: "";
    display: table;
    clear: both;
}

/* === MEDIA QUERIES === */

/* Móviles */
@media (max-width: 400px) {
    body {
        padding: 0;
        display: block;
    }

    #terminal-window {
        width: 95vw;
        height: 90vh;
        margin: 5vh auto;
        max-height: 1000px; /* Aumentar altura máxima */
    }

    .terminal-header {
        height: 25px;
        padding: 6px 10px;
    }

    .terminal-content {
        font-size: clamp(10px, 3vw, 14px); /* Reducir tamaño de fuente */
        padding: 15px;
    }

    .name-pixel {
        font-size: clamp(18px, 6vw, 32px); /* Reducir tamaño de fuente */
        text-align: left;
        line-height: 1.4; /* Aumentar interlineado para mejor legibilidad */
        margin: 5px 0;
        word-spacing: normal; /* Restablecer espaciado en móviles */
    }

    .icon {
        font-size: clamp(12px, 3.5vw, 16px); /* Reducir tamaño de fuente */
    }

    .pixel-avatar {
        width: clamp(50px, 25vw, 90px); /* Reducir tamaño */
    }
}

/* Pantallas grandes */
@media (min-width: 1400px) {
    #terminal-window {
        width: 50vw;
        height: 60vh;
    }

    .terminal-content {
        font-size: 16px;
    }

    .name-pixel {
        font-size: 35px;
    }
}
