
:root {
    /* fondo */
    --bg-primary: #300a24;        /* color principal de ubuntu */
    --bg-dark: #1a1a2e;           /* fondo oscuro del escritorio */
    --bg-accent: #3d0c30;         /* otro tono de fondo */
    --bg-highlight: #4a1040;      /* hover */

    /* texto */
    --text-primary: #ffffff;      /* texto normal */
    --text-secondary: #cccccc;    /* texto secundario */
    --text-muted: #888888;        /* texto apagado */

    /* acentos */
    --accent-cyan: #00d4aa;       /* categorias, info */
    --accent-yellow: #e95420;     /* nombres de herramientas (naranja ubuntu) */
    --accent-blue: #729fcf;       /* links */
    --accent-green: #4e9a06;      /* ok, exito */
    --accent-red: #cc0000;        /* errores */

    /* bordes */
    --border-light: #5c3d6e;      /* bordes normales */
    --border-dark: #2a1a35;       /* bordes oscuros */

    /* scrollbar */
    --scrollbar-thumb: #5c3d6e;
    --scrollbar-track: #300a24;
}

/* reset html */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(to right, #7B0D42, #B32E25);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    padding-bottom: 40px;
}

.terminalcontainer {
    position: absolute;
    top: 20px;
    left: calc(50% - 450px);
    width: 900px;
    max-width: calc(100vw - 40px);
    height: calc(100vh - 100px);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.6);
    border-radius: 8px 8px 0 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    z-index: 100;
    resize: both;
    min-width: 400px;
    min-height: 300px;
}

.title-bar {
    background-color: #2c001e;
    color: #ffffff;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    user-select: none;
    border-bottom: 1px solid #5c3d6e;
    flex-shrink: 0;
    cursor: grab;
}

.title-bar:active {
    cursor: grabbing;
}

.title-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-icon {
    color: #e95420;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}


.win-btn {
    width: 26px;
    height: 18px;
    text-align: center;
    line-height: 16px;
    font-size: 14px;
    cursor: pointer;
}

.win-btn:hover {
    background-color: #e5e5e5;
}

.win-btn.close:hover {
    background-color: #e81123;
    color: white;
}

.console-body {
    padding: 12px;
    color: var(--text-primary);
    font-family: 'Consolas', 'Lucida Console', monospace;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    overflow-y: auto;
}

.console-body::-webkit-scrollbar {
    width: 8px;
}

.console-body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.console-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

p {
    margin: 0;
    padding: 0;
}

.prompt-line {
    margin-bottom: 8px;
}

.prompt {
    color: #4e9a06;
}

.input-wrapper {
    position: relative;
    flex-shrink: 0;
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Consolas', 'Lucida Console', monospace;
    font-size: 14px;
    flex: 1;
    caret-color: var(--text-primary);
}

.autocomplete {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-highlight);
    border: 1px solid var(--border-light);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    font-family: 'Consolas', 'Lucida Console', monospace;
    font-size: 13px;
}

.ac-item {
    padding: 6px 10px;
    color: var(--text-secondary);
    cursor: pointer;
}

.ac-item:hover,
.ac-item.active {
    background-color: var(--bg-highlight);
    color: var(--text-primary);
}

.command {
    color: var(--text-primary);
}

.section-header {
    text-align: center;
    margin: 14px 0 18px 0;
    padding: 0;
}

.separator {
    border-top: 2px solid var(--accent-green);
    margin: 0;
}

.section-bar {
    display: none;
}

.section-title {
    color: var(--accent-green);
    font-size: 14px;
    margin: 12px 0;
}

.category {
    color: var(--accent-cyan);
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: bold;
}

.tool {
    margin-bottom: 10px;
}

.tool-name {
    color: var(--accent-yellow);
}

.tool-desc {
    color: var(--text-secondary);
}

.tool-link {
    color: var(--accent-blue);
}

.disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Consolas', monospace;
}

.end {
    padding: 16px 0;
    margin: 20px 0;
}

/* Player UI styles are under .player-ui selector */

#player {
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#player iframe {
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.player-ui {
    text-align: left;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0;
    margin: 10px 0;
    font-family: 'Consolas', monospace;
    color: var(--text-primary);
    font-size: 14px;
}

.player-ui .now-playing {
    color: var(--text-primary);
    margin: 0 0 4px 0;
    font-size: 14px;
}

.player-ui .track-title {
    color: var(--text-primary);
    font-size: 14px;
    margin: 0 0 12px 0;
    word-break: break-all;
}

.player-ui .time-display {
    color: var(--text-primary);
    font-family: 'Consolas', monospace;
    font-size: 12px;
    min-width: 36px;
    text-align: center;
}

.player-ui .seek-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: var(--border-light);
    border-radius: 0;
    outline: none;
    cursor: pointer;
    flex: 1;
    accent-color: var(--accent-green);
}

.player-ui .seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 14px;
    border-radius: 0;
    background: var(--accent-green);
    cursor: pointer;
}

.player-ui .seek-slider::-moz-range-thumb {
    width: 8px;
    height: 14px;
    border-radius: 0;
    background: var(--accent-green);
    cursor: pointer;
    border: none;
}

.player-ui .controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.player-ui .seek-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.player-ui .ctrl-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Consolas', monospace;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s;
}

.player-ui .ctrl-btn:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.player-ui .ctrl-btn.active {
    background-color: var(--accent-green);
    color: var(--bg-primary);
    border-color: var(--accent-green);
}

.player-ui .volume-label {
    color: var(--text-primary);
    margin-left: 8px;
    font-family: 'Consolas', monospace;
}

.player-ui .volume-slider {
    width: 80px;
    accent-color: var(--accent-green);
    background: var(--border-light);
    border-radius: 0;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.player-ui .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 14px;
    border-radius: 0;
    background: var(--accent-green);
    cursor: pointer;
}

.player-ui .volume-slider::-moz-range-thumb {
    width: 8px;
    height: 14px;
    border-radius: 0;
    background: var(--accent-green);
    cursor: pointer;
    border: none;
}

.player-ui .queue-title {
    color: var(--accent-cyan);
    margin-bottom: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

.player-ui .queue-item {
    color: var(--text-primary);
    padding: 2px 0;
    cursor: pointer;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

.player-ui .queue-item:hover {
    color: var(--accent-yellow);
}

.player-ui .queue-item.active {
    color: var(--accent-green);
}

.player-ui .error-text {
    color: var(--accent-red);
}

.player-ui .success-text {
    color: var(--accent-green);
}

.player-ui .info-text {
    color: var(--accent-cyan);
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #4F0C2C;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    z-index: 1000;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    padding: 0;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    padding: 0 12px;
}

.taskbar-tray {
    font-size: 14px;
    padding: 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
}

.taskbar-btn {
    background: transparent;
    border: none;
    width: 44px;
    height: 100%;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    position: relative;
}

.taskbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-btn svg {
    color: #fff;
}

.taskbar-btn img {
    width: 20px;
    height: 20px;
}

.taskbar-tray svg {
    color: #fff;
}

.taskbar-btn.active-app::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #e95420;
    border-radius: 2px;
}

.taskbar-btn.active-app {
    background: rgba(233, 84, 32, 0.2);
}

.taskbar-tray:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-clock {
    color: #fff;
    font-family: 'Ubuntu', 'Segoe UI', sans-serif;
    font-size: 12px;
    text-align: right;
    line-height: 1.2;
    padding: 4px 12px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.taskbar-clock:hover {
    background: rgba(255, 255, 255, 0.1);
}

.resize-handle {
    position: absolute;
    z-index: 200;
}

.resize-n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.resize-s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }
.resize-e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }
.resize-w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.resize-ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.resize-se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }
.resize-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }

@media (max-width: 600px) {
    body {
        padding: 0;
        padding-bottom: 44px;
        overflow: hidden;
    }

    .terminalcontainer {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 44px;
        width: 100% !important;
        height: auto;
        max-width: none;
        max-height: none;
        min-width: 0;
        min-height: 0;
        transform: none;
        border-radius: 0;
        resize: none;
        box-shadow: none;
    }

    .resize-handle { display: none; }

    .title-bar {
        font-size: 11px;
        padding: 3px 8px;
        cursor: default;
    }

    .title-bar:active { cursor: default; }

    .console-body {
        font-size: 12px;
        padding: 8px;
        line-height: 1.3;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 0;
        min-height: 0;
    }

    .input-wrapper {
        flex-shrink: 0;
        border-top: 1px solid var(--border-light);
    }

    .input-line {
        margin-top: 0;
        padding: 6px 8px;
    }

    .terminal-input {
        font-size: 16px;
        padding: 4px 0;
    }

    .tool-desc { font-size: 11px; }
    .tool-link { font-size: 11px; word-break: break-all; }
    .tool-name { font-size: 12px; }
    .category { font-size: 12px; margin-top: 16px; }
    .disclaimer { font-size: 10px; padding: 0 6px; }
    .prompt-line { margin-bottom: 6px; }

    .player-ui {
        padding: 8px;
        margin: 6px 0;
    }

    .player-ui .controls {
        gap: 4px;
        flex-wrap: wrap;
    }

    .player-ui .ctrl-btn {
        padding: 8px 10px;
        font-size: 16px;
        min-width: 40px;
        min-height: 40px;
    }

    .player-ui .volume-slider { width: 50px; }
    .player-ui .volume-label { margin-left: 2px; }
    .player-ui .seek-row { gap: 6px; margin-bottom: 8px; }
    .player-ui .seek-slider { height: 4px; }
    .player-ui .time-display { font-size: 11px; min-width: 30px; }
    .player-ui .track-title { font-size: 12px; margin-bottom: 8px; }
    .player-ui .now-playing { font-size: 12px; }

    .taskbar {
        height: 44px;
    }

    .taskbar-btn {
        width: 42px;
        height: 100%;
    }

    .taskbar-btn svg { width: 18px; height: 18px; }
    .taskbar-tray svg { width: 14px; height: 14px; }
    .taskbar-tray { padding: 0 6px; }

    .taskbar-clock {
        font-size: 10px;
        padding: 2px 8px;
        line-height: 1.2;
    }

    .autocomplete {
        font-size: 13px;
        max-height: 150px;
    }
}
