@font-face {
    font-family: 'OPTIEdgarBold-Extended';
    src: url('./OPTIEdgarBold-Extended.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color del VU meter cuando habla el usuario */
    --user-voice-color: #00ff88;
    --user-voice-rgb: 0, 255, 136;
}

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

body {
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    padding-top: 5px; /* Reducido de 20px a 5px */
    padding-bottom: 310px; /* Espacio para el panel de logs */
}


.kitt-container {
    text-align: center;
    padding: 0;
    position: relative;
    z-index: 1;
    display: none; /* Oculto inicialmente */
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Reducido de 20px a 10px */
    margin-top: -10px; /* Mover todo más arriba */
}

/* Panel KITT recreado con elementos HTML */
.kitt-panel {
    width: 100%;
    max-width: 1400px;
    height: 700px;
    position: relative;
    margin-bottom: 20px;
    margin-top: 120px;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px;
}

.kitt-panel.show-bg {
    background: url('kitt-panel.jpg') no-repeat center calc(50% + 50px);
    background-size: calc(100% + 50px) auto;
}

h1 {
    color: #ff3300;
    text-transform: uppercase;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 0 0 10px #ff3300;
    letter-spacing: 3px;
}

.led-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    position: relative;
    z-index: 10;
}

.led-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.led-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.center-column-top, .center-column-bottom {
    margin: 0 3px;
}

.left-column-top, .right-column-top,
.left-column-bottom, .right-column-bottom {
    margin: 0 3px;
}

.led {
    width: 45px;
    height: 16px;
    background: #000000;
    border-radius: 1px;
    border: none;
    position: relative;
    transition: all 0.05s ease;
    box-shadow: none;
}

/* Estados de activación de LEDs - Color más rojo (por defecto) */
.led.level-10 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 1.0;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.95), 0 0 15px rgba(255, 30, 30, 0.8), 0 0 8px rgba(255, 50, 50, 0.6);
}

/* Estados de activación de LEDs - Color VERDE (cuando usuario habla) */
.led-panel.user-speaking .led.level-10 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 1.0;
    box-shadow: 0 0 25px rgba(var(--user-voice-rgb), 0.95), 0 0 15px rgba(var(--user-voice-rgb), 0.8), 0 0 8px rgba(var(--user-voice-rgb), 0.6) !important;
}

.led.level-9 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.9;
    box-shadow: 0 0 22px rgba(255, 0, 0, 0.85), 0 0 13px rgba(255, 30, 30, 0.7), 0 0 7px rgba(255, 50, 50, 0.5);
}

.led-panel.user-speaking .led.level-9 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.9;
    box-shadow: 0 0 22px rgba(var(--user-voice-rgb), 0.85), 0 0 13px rgba(var(--user-voice-rgb), 0.7), 0 0 7px rgba(var(--user-voice-rgb), 0.5) !important;
}

.led.level-8 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.75), 0 0 12px rgba(255, 30, 30, 0.6), 0 0 6px rgba(255, 50, 50, 0.4);
}

.led-panel.user-speaking .led.level-8 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(var(--user-voice-rgb), 0.75), 0 0 12px rgba(var(--user-voice-rgb), 0.6), 0 0 6px rgba(var(--user-voice-rgb), 0.4) !important;
}

.led.level-7 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.7;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.65), 0 0 10px rgba(255, 30, 30, 0.5), 0 0 5px rgba(255, 50, 50, 0.35);
}

.led-panel.user-speaking .led.level-7 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.7;
    box-shadow: 0 0 18px rgba(var(--user-voice-rgb), 0.65), 0 0 10px rgba(var(--user-voice-rgb), 0.5), 0 0 5px rgba(var(--user-voice-rgb), 0.35) !important;
}

.led.level-6 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.6;
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.55), 0 0 9px rgba(255, 30, 30, 0.4), 0 0 4px rgba(255, 50, 50, 0.3);
}

.led-panel.user-speaking .led.level-6 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.6;
    box-shadow: 0 0 16px rgba(var(--user-voice-rgb), 0.55), 0 0 9px rgba(var(--user-voice-rgb), 0.4), 0 0 4px rgba(var(--user-voice-rgb), 0.3) !important;
}

.led.level-5 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.5;
    box-shadow: 0 0 14px rgba(255, 0, 0, 0.45), 0 0 8px rgba(255, 30, 30, 0.35), 0 0 4px rgba(255, 50, 50, 0.25);
}

.led-panel.user-speaking .led.level-5 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.5;
    box-shadow: 0 0 14px rgba(var(--user-voice-rgb), 0.45), 0 0 8px rgba(var(--user-voice-rgb), 0.35), 0 0 4px rgba(var(--user-voice-rgb), 0.25) !important;
}

.led.level-4 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.4;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.4), 0 0 6px rgba(255, 30, 30, 0.3), 0 0 3px rgba(255, 50, 50, 0.2);
}

.led-panel.user-speaking .led.level-4 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.4;
    box-shadow: 0 0 12px rgba(var(--user-voice-rgb), 0.4), 0 0 6px rgba(var(--user-voice-rgb), 0.3), 0 0 3px rgba(var(--user-voice-rgb), 0.2) !important;
}

.led.level-3 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.3;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.35), 0 0 5px rgba(255, 30, 30, 0.25), 0 0 2px rgba(255, 50, 50, 0.15);
}

.led-panel.user-speaking .led.level-3 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.3;
    box-shadow: 0 0 10px rgba(var(--user-voice-rgb), 0.35), 0 0 5px rgba(var(--user-voice-rgb), 0.25), 0 0 2px rgba(var(--user-voice-rgb), 0.15) !important;
}

.led.level-2 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.15;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3), 0 0 4px rgba(255, 30, 30, 0.2), 0 0 2px rgba(255, 50, 50, 0.1);
}

.led-panel.user-speaking .led.level-2 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.15;
    box-shadow: 0 0 8px rgba(var(--user-voice-rgb), 0.3), 0 0 4px rgba(var(--user-voice-rgb), 0.2), 0 0 2px rgba(var(--user-voice-rgb), 0.1) !important;
}

.led.level-1 {
    background: #ff0000;
    border-color: #ff0000;
    opacity: 0.08;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.25), 0 0 3px rgba(255, 30, 30, 0.15), 0 0 1px rgba(255, 50, 50, 0.05);
}

.led-panel.user-speaking .led.level-1 {
    background: var(--user-voice-color) !important;
    border-color: var(--user-voice-color) !important;
    opacity: 0.08;
    box-shadow: 0 0 6px rgba(var(--user-voice-rgb), 0.25), 0 0 3px rgba(var(--user-voice-rgb), 0.15), 0 0 1px rgba(var(--user-voice-rgb), 0.05) !important;
}

/* Glow progresivo para VU meter */
.led.medium-glow {
    box-shadow:
        0 0 15px rgba(255, 0, 0, 0.8),
        0 0 8px rgba(255, 30, 30, 0.6) !important;
}

.led.high-glow {
    box-shadow:
        0 0 25px rgba(255, 0, 0, 1.0),
        0 0 15px rgba(255, 30, 30, 0.9),
        0 0 8px rgba(255, 50, 50, 0.8) !important;
}

/* Botones del panel KITT */
.kitt-panel-layout {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    grid-template-rows: 1fr auto;
    gap: 10px;
    width: 100%;
    height: 100%;
}

.left-buttons {
    display: flex;
    flex-direction: column;
    gap: 46px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px; /* Reducido de 119px a 80px */
    padding-bottom: 20px; /* Espacio inferior */
    margin-left: -9px;
}

.right-buttons {
    display: flex;
    flex-direction: column;
    gap: 46px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px; /* Reducido de 119px a 80px */
    padding-bottom: 20px; /* Espacio inferior */
    margin-right: -9px;
}

/* Spacer elástico entre botones P2/P4 y micrófono/hamburguesa */
.button-spacer {
    flex-grow: 1;
    min-height: 20px;
}

.center-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding-top: -50px;
}

.cruise-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-top: 25px;
}

/* Botones laterales (AIR, OIL, P1, P2, S1, S2, P3, P4) */
.side-button {
    width: 100px;
    height: 65px;
    border-radius: 45px;
    border: none;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    font-size: 35px;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    letter-spacing: 1px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    /* Estado apagado por defecto */
    background: linear-gradient(145deg, #222, #111);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.side-button:active {
    transform: scale(0.98);
}

/* Estado encendido para botones laterales */
.side-button.powered-on {
    /* Se activará con las clases orange o red específicas */
}

/* Botones amarillo-naranjas (AIR, OIL, S1, S2) - solo cuando están encendidos */
.side-button.orange.powered-on {
    background: linear-gradient(145deg, #ffb000, #ff8c00);
    color: #000000 !important;
    text-shadow: none;
    box-shadow:
        0 0 15px rgba(255, 176, 0, 0.7),
        0 0 25px rgba(255, 140, 0, 0.5);
}

.side-button.orange.powered-on:active {
    background: linear-gradient(145deg, #ff8c00, #ff6600);
    color: #000000 !important;
    box-shadow:
        0 0 20px rgba(255, 140, 0, 0.9),
        0 0 30px rgba(255, 102, 0, 0.7);
}

/* Botones rojos (P1, P2, P3, P4) - solo cuando están encendidos */
.side-button.red.powered-on {
    background: linear-gradient(145deg, #ff0020, #dd001a);
    color: #000000 !important;
    text-shadow: none;
    box-shadow:
        0 0 15px rgba(255, 0, 32, 0.7),
        0 0 25px rgba(221, 0, 26, 0.5);
}

.side-button.red.powered-on:active {
    background: linear-gradient(145deg, #dd001a, #bb0015);
    color: #000000 !important;
    box-shadow:
        0 0 20px rgba(221, 0, 26, 0.9),
        0 0 30px rgba(187, 0, 21, 0.7);
}

/* Botones de crucero centrales */
.cruise-button {
    width: 185px;
    height: 56px;
    border-radius: 12px;
    border: none;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    font-size: 18px;
    color: #000000;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cruise-button:active {
    transform: scale(0.98);
}

/* Botones centrales - estado inactivo por defecto */
.cruise-button {
    background: linear-gradient(145deg, #333, #222);
    color: #000000 !important;
    box-shadow: 0 0 8px rgba(85, 85, 85, 0.4);
}

/* Botones centrales - estado activo (amarillo por defecto) */
.cruise-button.active {
    background: linear-gradient(145deg, #ffee44, #ffdd00);
    color: #000000 !important;
    text-shadow: none;
    box-shadow:
        0 0 15px rgba(255, 238, 68, 0.8),
        0 0 25px rgba(255, 221, 0, 0.6);
}

.cruise-button.active:active {
    background: linear-gradient(145deg, #ffdd00, #ffcc00);
    color: #000000 !important;
    box-shadow:
        0 0 20px rgba(255, 221, 0, 1.0),
        0 0 30px rgba(255, 204, 0, 0.8);
}

/* PURSUIT activo - estado rojo más intenso */
.cruise-button.pursuit.active {
    background: linear-gradient(145deg, #ff0020, #dd001a);
    color: #000000 !important;
    text-shadow: none;
    box-shadow:
        0 0 15px rgba(255, 0, 32, 0.8),
        0 0 25px rgba(221, 0, 26, 0.6);
}

.cruise-button.pursuit.active:active {
    background: linear-gradient(145deg, #dd001a, #bb0015);
    color: #000000 !important;
    box-shadow:
        0 0 20px rgba(221, 0, 26, 1.0),
        0 0 30px rgba(187, 0, 21, 0.8);
}

/* Eliminar efectos por defecto - LEDs completamente negros cuando apagados */

/* Botón de micrófono permanente - integrado en left-buttons */
.permanent-mic-btn {
    width: 100px;
    height: 65px;
    border-radius: 45px;
    border: none;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    font-size: 35px;
    color: #000000;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    /* Estado apagado por defecto */
    background: linear-gradient(145deg, #222, #111);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.permanent-mic-btn.powered-on {
    cursor: pointer;
    pointer-events: auto;
    background: linear-gradient(145deg, #ff0020, #dd001a);
    box-shadow:
        0 0 15px rgba(255, 0, 32, 0.7),
        0 0 25px rgba(221, 0, 26, 0.5);
}

.permanent-mic-btn:hover {
    box-shadow:
        0 0 20px rgba(255, 0, 32, 0.8),
        0 0 30px rgba(221, 0, 26, 0.6);
}

.permanent-mic-btn:active {
    transform: scale(0.98);
    background: linear-gradient(145deg, #dd001a, #bb0015);
    box-shadow:
        0 0 20px rgba(221, 0, 26, 0.9),
        0 0 30px rgba(187, 0, 21, 0.7);
}

.permanent-mic-btn.active {
    background: linear-gradient(145deg, var(--user-voice-color), #00cc66);
    box-shadow: 0 0 30px rgba(var(--user-voice-rgb), 0.8),
                0 0 60px rgba(var(--user-voice-rgb), 0.6);
}

.permanent-mic-btn svg {
    width: 40px;
    height: 40px;
    stroke: #000000;
    filter: none;
}

/* Menú hamburguesa - integrado en right-buttons */
.hamburger-btn {
    width: 100px;
    height: 65px;
    border-radius: 45px;
    border: none;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    font-size: 35px;
    color: #000000;
    cursor: not-allowed;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Estado apagado por defecto */
    background: linear-gradient(145deg, #222, #111);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.hamburger-btn.powered-on {
    cursor: pointer;
    pointer-events: auto;
    background: linear-gradient(145deg, #ff0020, #dd001a);
    box-shadow:
        0 0 15px rgba(255, 0, 32, 0.7),
        0 0 25px rgba(221, 0, 26, 0.5);
}

.hamburger-btn:focus {
    outline: none;
}

.hamburger-btn:hover {
    box-shadow:
        0 0 20px rgba(255, 0, 32, 0.8),
        0 0 30px rgba(221, 0, 26, 0.6);
}

.hamburger-btn:active {
    transform: scale(0.98);
    background: linear-gradient(145deg, #dd001a, #bb0015);
    box-shadow:
        0 0 20px rgba(221, 0, 26, 0.9),
        0 0 30px rgba(187, 0, 21, 0.7);
}

.hamburger-btn.active {
    background: linear-gradient(145deg, #dd001a, #bb0015);
}

.hamburger-line {
    width: 35px;
    height: 5px;
    background: #000000;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
}

.menu-controls {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff3300;
    border-radius: 12px;
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px rgba(255, 51, 0, 0.4);
    z-index: 100;
}

.menu-controls.show {
    display: flex;
}

/* ============================================
   ANIMATION CONTROLS
   ============================================ */

.animation-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff88;
    border-radius: 8px;
    padding: 10px 15px;
    display: none !important; /* Oculto por defecto, solo visible al activar desde menú */
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    z-index: 9000;
    font-family: 'Courier New', monospace;
}

.animation-controls.visible {
    display: flex !important;
}

.anim-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.anim-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anim-name {
    font-size: 12px;
    color: #00ff88;
    font-weight: bold;
    white-space: nowrap;
}

.anim-btn {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    color: #00ff88;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anim-btn:hover {
    background: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

.anim-btn:active {
    transform: scale(0.95);
}

.anim-btn.test {
    width: auto;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 1px;
    margin-left: 5px;
    border-color: #ffdd00;
    color: #ffdd00;
    background: rgba(255, 221, 0, 0.2);
}

.anim-btn.test:hover {
    background: rgba(255, 221, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 221, 0, 0.5);
}

.anim-btn.test.active {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

.anim-btn.select {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
    font-size: 18px;
}

.anim-btn.select:hover {
    background: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.anim-btn.select.selected {
    background: rgba(0, 255, 136, 0.6);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    transform: scale(1.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .animation-controls {
        top: 10px;
        right: 10px;
        padding: 8px 10px;
        gap: 6px;
    }

    .anim-label {
        font-size: 8px;
    }

    .anim-name {
        font-size: 10px;
    }

    .anim-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .anim-btn.test {
        padding: 0 8px;
        font-size: 10px;
    }
}

.menu-btn {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffee44, #ffdd00);
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 15px;
    transition: all 0.1s ease;
    font-size: 13px;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(255, 238, 68, 0.8), 0 0 25px rgba(255, 221, 0, 0.6);
}

.menu-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #ffdd00, #ffcc00);
    box-shadow: 0 0 20px rgba(255, 221, 0, 1.0), 0 0 30px rgba(255, 204, 0, 0.8);
    transform: scale(0.98);
}

.menu-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #666;
    border-color: #666;
}

/* Modal de Control de Sensibilidad */
.sensitivity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.sensitivity-modal.show {
    display: flex;
}

.sensitivity-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ff3300;
    border-radius: 12px;
    padding: 30px;
    max-width: 300px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 51, 0, 0.5);
    backdrop-filter: blur(15px);
}

.sensitivity-content h3 {
    color: #ff3300;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(255, 51, 0, 0.5);
}

.sensitivity-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sensitivity-btn {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffee44, #ffdd00);
    color: #000000;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: normal;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 0 15px rgba(255, 238, 68, 0.8), 0 0 25px rgba(255, 221, 0, 0.6);
}

.sensitivity-btn:hover {
    background: linear-gradient(145deg, #ffdd00, #ffcc00);
    box-shadow: 0 0 20px rgba(255, 221, 0, 1.0), 0 0 30px rgba(255, 204, 0, 0.8);
    transform: scale(0.98);
}

.sensitivity-btn.active {
    background: linear-gradient(145deg, #ffdd00, #ffcc00);
    color: #000000;
    box-shadow: 0 0 20px rgba(255, 221, 0, 1.0), 0 0 30px rgba(255, 204, 0, 0.8);
}

/* Botones de selección de color */
.color-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-btn {
    width: 100%;
    height: 50px;
    border: 2px solid #333;
    border-radius: 12px;
    color: #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'OPTIEdgarBold-Extended', Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.color-btn:hover {
    transform: scale(1.05);
    border-color: #fff;
    box-shadow: 0 0 20px currentColor;
}

.color-btn:active {
    transform: scale(0.98);
}

/* Responsive para modal de sensibilidad */
@media (max-width: 768px) {
    .sensitivity-content {
        max-width: 280px;
        padding: 25px;
    }

    .sensitivity-content h3 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .sensitivity-btn {
        height: 36px;
        font-size: 12px;
    }
}



button {
    padding: 12px 24px;
    background: linear-gradient(145deg, #333, #111);
    color: #ff3300;
    border: 2px solid #ff3300;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover:not(:disabled) {
    background: linear-gradient(145deg, #ff3300, #ff1500);
    color: #000;
    box-shadow: 0 0 20px #ff3300;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    color: #ff3300;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sin efectos cuando está activo */
.kitt-container.active .led-panel {
    /* Sin efectos */
}

/* Responsive */
@media (max-width: 1024px) {
    .kitt-panel {
        width: 95%;
        height: 600px;
        padding: 40px;
        background: none;
    }

    .kitt-panel.show-bg {
        background: url('kitt-panel.jpg') no-repeat center center;
        background-size: 110%;
    }

    .left-buttons {
        gap: 38px;
        padding-top: 60px; /* Reducido de 89px */
        padding-bottom: 20px;
        margin-left: -8px;
    }

    .right-buttons {
        gap: 38px;
        padding-top: 60px; /* Reducido de 89px */
        padding-bottom: 20px;
        margin-right: -8px;
    }

    .center-section {
        padding-top: -120px;
    }


    .side-button {
        width: 95px;
        height: 55px;
        border-radius: 40px;
        font-size: 29px;
        letter-spacing: 0.9px;
    }

    .cruise-button {
        width: 165px;
        height: 42px;
        border-radius: 10px;
        font-size: 16px;
        letter-spacing: 0.7px;
    }

    /* Botones responsive - micrófono y hamburguesa */
    .permanent-mic-btn,
    .hamburger-btn {
        width: 95px;
        height: 55px;
        border-radius: 40px;
        font-size: 29px;
    }

    .permanent-mic-btn svg {
        width: 36px;
        height: 36px;
    }

    .hamburger-line {
        width: 32px;
        height: 4.5px;
    }
}

@media (max-width: 768px) {
    .kitt-panel {
        width: 100%;
        max-width: none;
        height: 530px;
        padding: 15px;
        background: none;
    }

    .kitt-panel.show-bg {
        background: url('kitt-panel.jpg') no-repeat center center;
        background-size: 120%;
    }

    .kitt-panel-layout {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 5px;
    }

    .left-buttons {
        gap: 33px;
        padding-top: 70px; /* Reducido de 99px */
        padding-bottom: 20px;
        margin-left: -8px;
    }

    .right-buttons {
        gap: 33px;
        padding-top: 70px; /* Reducido de 99px */
        padding-bottom: 20px;
        margin-right: -8px;
    }

    .center-section {
        padding-top: -95px;
    }


    .side-button {
        width: 85px;
        height: 52px;
        border-radius: 35px;
        font-size: 27px;
        letter-spacing: 0.8px;
    }

    .cruise-button {
        width: 150px;
        height: 38px;
        border-radius: 10px;
        font-size: 15px;
        letter-spacing: 0.6px;
    }

    /* Botones responsive - micrófono y hamburguesa */
    .permanent-mic-btn,
    .hamburger-btn {
        width: 85px;
        height: 52px;
        border-radius: 35px;
        font-size: 27px;
    }

    .permanent-mic-btn svg {
        width: 32px;
        height: 32px;
    }

    .hamburger-line {
        width: 28px;
        height: 4px;
    }
}

/* Portrait orientation - Background más ancho */
@media (max-width: 768px) and (orientation: portrait) {
    .kitt-panel {
        width: 100vw;
        max-width: none;
        margin: 30px -15px 0 -15px;
        padding: 10px;
        background: none;
    }

    .kitt-panel.show-bg {
        background: url('kitt-panel.jpg') no-repeat calc(50% - 5px) center;
        background-size: 140%;
    }

    .kitt-panel-layout {
        grid-template-columns: 1fr 1.8fr 1fr;
        gap: 3px;
    }

    .left-buttons {
        padding-left: 2px;
        margin-left: -8px;
        padding-top: 60px; /* Reducido de 89px */
        padding-bottom: 20px;
    }

    .right-buttons {
        padding-right: 2px;
        margin-right: -8px;
        padding-top: 60px; /* Reducido de 89px */
        padding-bottom: 20px;
    }

    .center-section {
        padding-top: -85px;
    }

    .cruise-button {
        height: 46px;
    }

    /* Botones responsive - micrófono y hamburguesa */
    .permanent-mic-btn,
    .hamburger-btn {
        width: 85px;
        height: 52px;
        border-radius: 35px;
        font-size: 27px;
    }

    .permanent-mic-btn svg {
        width: 32px;
        height: 32px;
    }

    .hamburger-line {
        width: 28px;
        height: 4px;
    }
}

/* =======================================
   MODAL DE VINCULACIÓN DE DISPOSITIVO
   ======================================= */

.link-device-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 18000;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.link-device-modal.show {
    display: flex;
}

.link-device-content {
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border: 3px solid #ff3300;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow:
        0 0 50px rgba(255, 51, 0, 0.5),
        inset 0 0 30px rgba(255, 51, 0, 0.1);
    color: #ff3300;
}

.link-device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #ff3300;
    padding-bottom: 15px;
}

.link-device-header h3 {
    margin: 0;
    font-size: 20px;
    text-shadow: 0 0 10px #ff3300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-link-device-btn {
    background: #ff3300;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.close-link-device-btn:hover {
    background: #ff5533;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.6);
    transform: scale(1.1);
}

.link-device-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.link-instructions {
    text-align: center;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 51, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-container:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 51, 0, 0.5);
}

.link-url {
    display: flex;
    gap: 10px;
    width: 100%;
}

.link-url input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 51, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    text-align: center;
}

.copy-link-btn {
    padding: 12px 20px;
    background: linear-gradient(145deg, #ffee44, #ffdd00);
    border: none;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 238, 68, 0.5);
}

.copy-link-btn:hover {
    background: linear-gradient(145deg, #ffdd00, #ffcc00);
    box-shadow: 0 0 25px rgba(255, 221, 0, 0.7);
    transform: translateY(-2px);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 51, 0, 0.1);
    border: 1px solid rgba(255, 51, 0, 0.3);
    border-radius: 8px;
    width: 100%;
    justify-content: center;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.waiting {
    background: #ffdd00;
}

.status-indicator.connected {
    background: var(--user-voice-color);
    animation: connectedPulse 1s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes connectedPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(var(--user-voice-rgb), 0.8); }
    50% { box-shadow: 0 0 20px rgba(var(--user-voice-rgb), 1); }
}

.connection-status span {
    color: #ccc;
    font-size: 13px;
}

.peer-info {
    text-align: center;
    color: #666;
    font-size: 11px;
}

.peer-info span {
    color: #999;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    .link-device-content {
        padding: 20px;
        margin: 10px;
    }

    .link-device-header h3 {
        font-size: 16px;
    }

    .link-url {
        flex-direction: column;
    }

    .copy-link-btn {
        width: 100%;
    }
}

/* =======================================
   SISTEMA DE COLA DE TRABAJOS - VISUAL
   ======================================= */

/* Modal principal de cola de trabajos */
.job-queue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 15000;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.job-queue-modal.show {
    display: flex;
}

.job-queue-content {
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border: 3px solid var(--user-voice-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 1400px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    box-shadow:
        0 0 50px rgba(var(--user-voice-rgb), 0.5),
        inset 0 0 30px rgba(var(--user-voice-rgb), 0.1);
    color: var(--user-voice-color);
}

/* Header del modal */
.job-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--user-voice-color);
    padding-bottom: 15px;
}

.job-queue-header h2 {
    margin: 0;
    font-size: 28px;
    text-shadow: 0 0 15px var(--user-voice-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 15px var(--user-voice-color); }
    to { text-shadow: 0 0 25px var(--user-voice-color), 0 0 35px var(--user-voice-color); }
}

.close-job-queue-btn {
    background: #ff3300;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 51, 0, 0.5);
}

.close-job-queue-btn:hover {
    background: #ff5533;
    box-shadow: 0 0 20px rgba(255, 51, 0, 0.8);
    transform: scale(1.1);
}

/* Controles superiores */
.job-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.job-control-btn {
    padding: 12px 24px;
    border: 2px solid var(--user-voice-color);
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    color: var(--user-voice-color);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-control-btn:hover {
    background: linear-gradient(145deg, var(--user-voice-color), #00cc66);
    color: #000;
    box-shadow: 0 0 20px rgba(var(--user-voice-rgb), 0.6);
    transform: translateY(-2px);
}

.job-control-btn.add {
    border-color: var(--user-voice-color);
}

.job-control-btn.clear {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.job-control-btn.clear:hover {
    background: linear-gradient(145deg, #ff6b6b, #ff5555);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
}

/* Estadísticas en tiempo real */
.job-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.stat {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--user-voice-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(var(--user-voice-rgb), 0.2);
    white-space: nowrap;
}

.stat span {
    color: #ffdd00;
    font-weight: bold;
    text-shadow: 0 0 5px #ffdd00;
}

/* Animación para contadores actualizados */
.counter-update {
    animation: counterPulse 0.3s ease-in-out;
}

@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: #ffdd00; }
}

/* Contenedor de las tres colas */
.job-queues {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 1200px) {
    .job-queues {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Cola individual */
.job-queue {
    background: linear-gradient(145deg, #111, #222);
    border-radius: 15px;
    padding: 20px;
    min-height: 400px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-queue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(var(--user-voice-rgb), 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.job-queue.pending {
    border-color: #feca57;
    box-shadow: 0 0 20px rgba(254, 202, 87, 0.2);
}

.job-queue.running {
    border-color: #48ca48;
    box-shadow: 0 0 20px rgba(72, 202, 72, 0.2);
    animation: runningPulse 2s ease-in-out infinite;
}

@keyframes runningPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(72, 202, 72, 0.2); }
    50% { box-shadow: 0 0 30px rgba(72, 202, 72, 0.4); }
}

.job-queue.completed {
    border-color: #5dade2;
    box-shadow: 0 0 20px rgba(93, 173, 226, 0.2);
}

/* Header de cada cola */
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(var(--user-voice-rgb), 0.3);
}

.queue-header h3 {
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.queue-count {
    background: linear-gradient(145deg, var(--user-voice-color), #00cc66);
    color: #000;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 0 10px rgba(var(--user-voice-rgb), 0.5);
    animation: countBounce 0.3s ease-in-out;
}

@keyframes countBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Lista de trabajos */
.job-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.job-list::-webkit-scrollbar {
    width: 6px;
}

.job-list::-webkit-scrollbar-track {
    background: rgba(var(--user-voice-rgb), 0.1);
    border-radius: 3px;
}

.job-list::-webkit-scrollbar-thumb {
    background: var(--user-voice-color);
    border-radius: 3px;
}

/* Item de trabajo individual */
.job-item {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
}

.job-item.job-appear {
    opacity: 1;
    transform: translateY(0);
}

.job-item.job-disappear {
    opacity: 0;
    transform: translateX(-100%);
}

.job-item.job-completed-flash {
    animation: completedFlash 1s ease-in-out;
}

@keyframes completedFlash {
    0%, 100% { background: linear-gradient(145deg, #1a1a1a, #2a2a2a); }
    50% { background: linear-gradient(145deg, #48ca48, #2dd92d); }
}

/* Colores de prioridad */
.job-item.low {
    border-left-color: #48ca48;
    box-shadow: 0 2px 10px rgba(72, 202, 72, 0.2);
}

.job-item.medium {
    border-left-color: #feca57;
    box-shadow: 0 2px 10px rgba(254, 202, 87, 0.2);
}

.job-item.high {
    border-left-color: #ff9f43;
    box-shadow: 0 2px 10px rgba(255, 159, 67, 0.2);
}

.job-item.critical {
    border-left-color: #ff6b6b;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
    animation: criticalPulse 1s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4); }
}

.job-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--user-voice-rgb), 0.3);
}

/* Header del trabajo */
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.job-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.job-priority, .job-status {
    font-size: 16px;
    filter: drop-shadow(0 0 3px currentColor);
}

.job-id {
    background: rgba(var(--user-voice-rgb), 0.2);
    color: var(--user-voice-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.job-title {
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    flex: 1;
    text-align: left;
}

/* Acciones del trabajo */
.job-actions {
    display: flex;
    gap: 5px;
}

.job-action-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
    filter: drop-shadow(0 0 3px currentColor);
}

.job-action-btn:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px currentColor);
}

.job-action-btn.start:hover {
    background: rgba(72, 202, 72, 0.2);
}

.job-action-btn.stop:hover {
    background: rgba(255, 107, 107, 0.2);
}

.job-action-btn.remove:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* Descripción del trabajo */
.job-description {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-style: italic;
}

/* Contenedor de progreso */
.job-progress-container {
    margin-bottom: 10px;
}

.job-progress-bar {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--user-voice-rgb), 0.3);
    margin-bottom: 8px;
}

.job-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    border-radius: 10px;
    transition: width 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.job-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Información de tiempo */
.job-time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-duration {
    font-size: 11px;
    color: #999;
}

.job-spinner {
    font-size: 12px;
    color: var(--user-voice-color);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Timestamps */
.job-timestamps {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: #666;
    flex-wrap: wrap;
}

.job-timestamps span {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.job-timestamps .created {
    color: #999;
}

.job-timestamps .started {
    color: #48ca48;
}

.job-timestamps .completed {
    color: #5dade2;
}

/* Mensaje de cola vacía */
.empty-queue {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    border: 2px dashed rgba(var(--user-voice-rgb), 0.2);
    border-radius: 10px;
    background: rgba(var(--user-voice-rgb), 0.05);
}

/* Modal para nuevo trabajo */
.new-job-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 16000;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.new-job-modal.show {
    display: flex;
}

.new-job-content {
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border: 3px solid var(--user-voice-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 0 50px rgba(var(--user-voice-rgb), 0.5),
        inset 0 0 30px rgba(var(--user-voice-rgb), 0.1);
    color: var(--user-voice-color);
}

.new-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--user-voice-color);
    padding-bottom: 15px;
}

.new-job-header h3 {
    margin: 0;
    font-size: 24px;
    text-shadow: 0 0 10px var(--user-voice-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-new-job-btn {
    background: #ff3300;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.close-new-job-btn:hover {
    background: #ff5533;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.6);
    transform: scale(1.1);
}

/* Formulario de nuevo trabajo */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--user-voice-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(var(--user-voice-rgb), 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--user-voice-color);
    box-shadow: 0 0 15px rgba(var(--user-voice-rgb), 0.3);
    background: rgba(var(--user-voice-rgb), 0.05);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Acciones del formulario */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.submit-job-btn,
.cancel-job-btn {
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.submit-job-btn {
    background: linear-gradient(145deg, var(--user-voice-color), #00cc66);
    border-color: var(--user-voice-color);
    color: #000;
    box-shadow: 0 0 15px rgba(var(--user-voice-rgb), 0.3);
}

.submit-job-btn:hover {
    background: linear-gradient(145deg, #00cc66, #00aa55);
    box-shadow: 0 0 25px rgba(var(--user-voice-rgb), 0.5);
    transform: translateY(-2px);
}

.cancel-job-btn {
    background: transparent;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.cancel-job-btn:hover {
    background: #ff6b6b;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

/* Mensajes de notificación */
.job-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    z-index: 20000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.job-message.show {
    transform: translateX(0);
    opacity: 1;
}

.job-message.success {
    background: linear-gradient(145deg, #48ca48, #2dd92d);
    color: #fff;
    border-left-color: #fff;
}

.job-message.warning {
    background: linear-gradient(145deg, #feca57, #ff9f43);
    color: #000;
    border-left-color: #000;
}

.job-message.info {
    background: linear-gradient(145deg, #5dade2, #3498db);
    color: #fff;
    border-left-color: #fff;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .job-queue-content {
        padding: 20px;
        margin: 10px;
    }

    .job-queues {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .job-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .job-stats {
        justify-content: center;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .job-actions {
        align-self: flex-end;
    }

    .form-actions {
        flex-direction: column;
    }

    .job-message {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }

    .job-message.show {
        transform: translateY(0);
    }
}

/* =======================================
   MODAL DE LOGS DE TRABAJOS
   ======================================= */

.job-logs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 17000;
    font-family: 'Courier New', monospace;
    padding: 20px;
}

.job-logs-modal.show {
    display: flex;
}

.job-logs-content {
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border: 3px solid var(--user-voice-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 50px rgba(var(--user-voice-rgb), 0.5),
        inset 0 0 30px rgba(var(--user-voice-rgb), 0.1);
    color: var(--user-voice-color);
}

.job-logs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--user-voice-color);
    padding-bottom: 15px;
    gap: 20px;
}

.job-logs-title h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    text-shadow: 0 0 10px var(--user-voice-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.job-logs-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.logs-job-id {
    background: rgba(var(--user-voice-rgb), 0.2);
    color: var(--user-voice-color);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logs-job-title {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.logs-job-status {
    background: linear-gradient(145deg, #feca57, #ff9f43);
    color: #000;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.job-logs-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.logs-action-btn {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.logs-action-btn.copy {
    background: linear-gradient(145deg, var(--user-voice-color), #00cc66);
    border-color: var(--user-voice-color);
    color: #000;
}

.logs-action-btn.copy:hover {
    background: linear-gradient(145deg, #00cc66, #00aa55);
    box-shadow: 0 0 15px rgba(var(--user-voice-rgb), 0.5);
    transform: translateY(-2px);
}

.logs-action-btn.clear {
    background: transparent;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.logs-action-btn.clear:hover {
    background: #ff6b6b;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.close-logs-btn {
    background: #ff3300;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.close-logs-btn:hover {
    background: #ff5533;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.6);
    transform: scale(1.1);
}

.job-logs-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.logs-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.log-stat {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--user-voice-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 8px rgba(var(--user-voice-rgb), 0.2);
    white-space: nowrap;
}

.log-stat span {
    color: #ffdd00;
    font-weight: bold;
    text-shadow: 0 0 3px #ffdd00;
}

.logs-output {
    background: linear-gradient(145deg, #111, #222);
    border: 2px solid rgba(var(--user-voice-rgb), 0.3);
    border-radius: 12px;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.logs-output::-webkit-scrollbar {
    width: 8px;
}

.logs-output::-webkit-scrollbar-track {
    background: rgba(var(--user-voice-rgb), 0.1);
    border-radius: 4px;
}

.logs-output::-webkit-scrollbar-thumb {
    background: var(--user-voice-color);
    border-radius: 4px;
}

.logs-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 60px 20px;
    border: 2px dashed rgba(var(--user-voice-rgb), 0.2);
    border-radius: 8px;
    background: rgba(var(--user-voice-rgb), 0.05);
}

.log-entry {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    align-items: center;
    transition: all 0.2s ease;
    font-size: 13px;
    line-height: 1.4;
}

.log-entry:hover {
    background: rgba(var(--user-voice-rgb), 0.05);
}

.log-entry.info {
    border-left: 3px solid #48ca48;
    background: rgba(72, 202, 72, 0.02);
}

.log-entry.warning {
    border-left: 3px solid #feca57;
    background: rgba(254, 202, 87, 0.02);
}

.log-entry.error {
    border-left: 3px solid #ff6b6b;
    background: rgba(255, 107, 107, 0.02);
    animation: errorPulse 1s ease-in-out;
}

@keyframes errorPulse {
    0%, 100% { background: rgba(255, 107, 107, 0.02); }
    50% { background: rgba(255, 107, 107, 0.1); }
}

.log-timestamp {
    color: #999;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    white-space: nowrap;
    min-width: 80px;
}

.log-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 2px currentColor);
}

.log-level {
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 50px;
    text-align: left;
}

.log-entry.info .log-level {
    color: #48ca48;
}

.log-entry.warning .log-level {
    color: #feca57;
}

.log-entry.error .log-level {
    color: #ff6b6b;
}

.log-message {
    color: #ddd;
    word-break: break-word;
    line-height: 1.3;
}

/* Efectos especiales para logs de error */
.log-entry.error .log-message {
    color: #ffcccc;
    font-weight: 500;
}

/* Responsivo para logs */
@media (max-width: 768px) {
    .job-logs-content {
        padding: 20px;
        margin: 10px;
        max-height: 95vh;
    }

    .job-logs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .job-logs-info {
        order: -1;
        width: 100%;
    }

    .job-logs-actions {
        align-self: flex-end;
        width: 100%;
        justify-content: space-between;
    }

    .logs-stats {
        justify-content: center;
    }

    .log-entry {
        grid-template-columns: auto auto 1fr;
        gap: 8px;
        font-size: 12px;
    }

    .log-level {
        display: none;
    }

    .logs-action-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ============================================
   ERROR LOG CONTAINER - Console Debug Panel
   ============================================ */

.error-log-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 2px solid #ff0000;
    box-shadow: 0 -4px 20px rgba(255, 0, 0, 0.3);
    z-index: 99999;
    max-height: 300px;
    display: flex !important;
    flex-direction: column;
    font-family: 'Courier New', monospace;
    transition: max-height 0.3s ease;
}

.error-log-container.minimized {
    max-height: 40px;
}

.error-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: rgba(20, 0, 0, 0.9);
    border-bottom: 1px solid #ff0000;
    user-select: none;
}

.error-log-title {
    font-size: 14px;
    font-weight: bold;
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-log-actions {
    display: flex;
    gap: 8px;
}

.error-log-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.error-log-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.error-log-btn:active {
    transform: scale(0.95);
}

.error-log-output {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px;
    font-size: 11px;
    line-height: 1.3;
    max-height: 250px;
    background: rgba(0, 0, 0, 0.8);
}

.error-log-container.minimized .error-log-output {
    display: none;
}

.error-log-output::-webkit-scrollbar {
    width: 10px;
}

.error-log-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.error-log-output::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.5);
    border-radius: 5px;
}

.error-log-output::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.7);
}

.error-log-empty {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.log-entry {
    margin-bottom: 4px;
    padding: 4px 8px;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.log-entry.error {
    border-left-color: #ff0000;
    color: #ff6666;
}

.log-entry.warn {
    border-left-color: #ffaa00;
    color: #ffcc66;
}

.log-entry.info {
    border-left-color: #00aaff;
    color: #66ccff;
}

.log-entry.log {
    border-left-color: #00ff88;
    color: #88ffbb;
}

.log-timestamp {
    color: #999;
    font-size: 9px;
    margin-right: 6px;
}

.log-type {
    font-weight: bold;
    margin-right: 6px;
    text-transform: uppercase;
    font-size: 9px;
}

.log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        padding-bottom: 180px; /* Menos espacio en mobile */
    }

    .error-log-container {
        max-height: 150px;
    }

    .error-log-header {
        padding: 6px 10px;
    }

    .error-log-output {
        max-height: 110px;
        font-size: 10px;
        padding: 6px 8px;
        line-height: 1.2;
    }

    .error-log-title {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .error-log-btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .log-entry {
        margin-bottom: 3px;
        padding: 3px 6px;
        font-size: 10px;
    }

    .log-timestamp {
        font-size: 8px;
        margin-right: 4px;
    }

    .log-type {
        font-size: 8px;
        margin-right: 4px;
    }

    .log-message {
        font-size: 10px;
    }
}

/* Extra small mobile (portrait) */
@media (max-width: 480px) {
    body {
        padding-bottom: 140px;
    }

    .error-log-container {
        max-height: 120px;
    }

    .error-log-header {
        padding: 5px 8px;
    }

    .error-log-output {
        max-height: 80px;
        font-size: 9px;
        padding: 4px 6px;
    }

    .error-log-title {
        font-size: 10px;
    }

    .error-log-btn {
        padding: 2px 5px;
        font-size: 10px;
    }

    .log-entry {
        margin-bottom: 2px;
        padding: 2px 4px;
    }

    .log-timestamp,
    .log-type {
        font-size: 7px;
    }
}