/**
 * STREAMRANK PRO - MISSION CONTROL WEBDOCK STYLESHEET
 * Consola de Mando Web con Paleta Oficial Tema Morado (Espamo / Twitch Dark)
 * Perfecta coherencia visual con el Dashboard general de StreamRank.
 */

@font-face {
    font-family: "Formula1";
    src: url("../../fonts/Formula1-Display-Bold-Bold.ttf.woff") format("woff"),
         url("../fonts/Formula1-Display-Bold-Bold.ttf.woff") format("woff"),
         url("/fonts/Formula1-Display-Bold-Bold.ttf.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Formula1";
    src: url("../../fonts/Formula1-Regular_web_0.ttf") format("truetype"),
         url("../fonts/Formula1-Regular_web_0.ttf") format("truetype"),
         url("/fonts/Formula1-Regular_web_0.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root, [data-theme="espamo"] {
    /* Superficies Oficiales Dashboard Morado */
    --bg-base: #18181B;
    --bg-surface: #1F1F23;
    --bg-card: #26262C;
    --bg-card-hover: #38383F;
    --bg-inner: #18181B;
    --bg-input: #18181B;

    /* Bordes */
    --border-subtle: #38383F;
    --border-card: #38383F;
    --border-card-hover: rgba(145, 71, 255, 0.45);
    --border-focus: #9147FF;

    /* Tipografía */
    --text-main: #EFEFF1;
    --text-muted: #ADADB8;
    --text-subtle: #70707C;

    /* Espectro Morado Principal (Twitch & StreamRank) */
    --accent-purple: #9147FF;
    --accent-purple-hover: #772CE8;
    --accent-purple-light: #BF94FF;
    --accent-purple-glow: rgba(145, 71, 255, 0.35);
    --accent-purple-subtle: rgba(145, 71, 255, 0.16);
    --accent-purple-dim: rgba(145, 71, 255, 0.08);

    /* Acentos Complementarios */
    --accent-teal: #BF94FF;
    --accent-teal-glow: rgba(191, 148, 255, 0.35);
    --accent-teal-subtle: rgba(191, 148, 255, 0.16);

    --accent-emerald: #00F59B;
    --accent-emerald-glow: rgba(0, 245, 155, 0.35);
    --accent-amber: #FFD166;
    --accent-red: #EB0400;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: var(--bg-base);
}
*::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(145, 71, 255, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse at 85% 85%, rgba(191, 148, 255, 0.04) 0%, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    padding: 20px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =======================================================
   ESTRUCTURA PRINCIPAL Y HEADER SUPERIOR
   ======================================================= */
.webdock-app-container {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    transition: max-width 0.3s ease;
}

.webdock-app-container.chat-mode-hidden {
    max-width: 1560px;
}

.webdock-master-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.webdock-brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.webdock-brand-logo {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--accent-purple-glow));
}

.webdock-brand-titles {
    display: flex;
    flex-direction: column;
}

.webdock-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-main);
}

.webdock-subtitle {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-purple-light);
    letter-spacing: 0.12em;
}

/* Ticker central en cabecera */
.webdock-center-ticker {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-card);
}

.webdock-ticker-clock {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-purple-light);
    letter-spacing: 0.06em;
}

.webdock-ticker-category {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Perfil y canal en cabecera */
.webdock-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dock-channel-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 6px 12px;
    background: rgba(0, 245, 155, 0.1);
    border: 1px solid rgba(0, 245, 155, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-emerald);
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.btn-header-action:hover {
    color: #ffffff;
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

/* Selector de Posición del Chat en Cabecera */
.webdock-chat-dock-selector {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 2px;
    gap: 2px;
}

.chat-selector-label {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 0 4px 0 6px;
    letter-spacing: 0.5px;
}

.chat-mode-btn {
    padding: 5px 9px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.chat-mode-btn:hover {
    color: var(--text-main);
    background: var(--bg-card-hover);
}

.chat-mode-btn.active {
    background: var(--accent-purple);
    color: #ffffff;
    border-color: var(--accent-purple-hover);
    box-shadow: 0 2px 10px var(--accent-purple-glow);
}

.chat-mode-btn.popout {
    color: var(--accent-purple-light);
}

.chat-mode-btn.popout:hover {
    color: #ffffff;
    background: rgba(145, 71, 255, 0.2);
}

/* =======================================================
   ESTRUCTURA BIPARTITA CON CHAT LATERAL INTEGRADO
   ======================================================= */
.webdock-main-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.webdock-workspace {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panel Lateral de Chat Fijo en Pantalla */
.webdock-chat-panel {
    width: 360px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    min-height: 580px;
    position: sticky;
    top: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 50;
}

.webdock-chat-panel:hover {
    border-color: var(--border-card-hover);
}

/* Modos de posición izquierda / derecha / oculto */
.chat-mode-right .webdock-chat-panel {
    order: 2;
}
.chat-mode-right .webdock-workspace {
    order: 1;
}

.chat-mode-left .webdock-chat-panel {
    order: 1;
}
.chat-mode-left .webdock-workspace {
    order: 2;
}

.chat-mode-hidden .webdock-chat-panel {
    display: none !important;
}

/* Interior del Panel de Chat */
.webdock-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-card);
    flex-shrink: 0;
}

.webdock-chat-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.webdock-chat-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.webdock-chat-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.webdock-chat-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.webdock-chat-btn:hover {
    background: var(--bg-card-hover);
    color: #ffffff;
    border-color: var(--border-card-hover);
}

.webdock-chat-frame-container {
    flex: 1;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    position: relative;
}

.webdock-chat-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.webdock-chat-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-mono);
    text-align: center;
    padding: 20px;
}

@media (max-width: 1199px) {
    .webdock-main-body {
        flex-direction: column;
    }
    .webdock-chat-panel {
        width: 100%;
        height: 520px;
        position: static;
        order: 3 !important;
    }
}

/* =======================================================
   BARRA DE NAVEGACIÓN SUPERIOR (TABS UNIFORMES MORADAS)
   ======================================================= */
.tab-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    background: var(--bg-surface);
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1200px) {
    .tab-bar {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .tab-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-sans);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.tab-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-subtle);
}

.tab-btn.active {
    color: #ffffff;
    background: var(--accent-purple);
    border-color: var(--accent-purple-hover);
    box-shadow: 0 4px 14px rgba(145, 71, 255, 0.45);
}

/* Sub-pestañas estilizadas */
.subtab-bar {
    display: flex;
    gap: 8px;
    background: var(--bg-inner);
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    margin-bottom: 16px;
    width: 100%;
}

.subtab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.subtab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.subtab-btn.active {
    color: #ffffff;
    background: var(--bg-card);
    border-color: var(--border-card-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* =======================================================
   PANEL 0: DIRECTO // TELEMETRÍA (MISSION CONTROL DECK)
   ======================================================= */
.deck-live-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Fila de 4 KPI Cards Superiores */
.live-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .live-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .live-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.live-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.live-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-card-hover);
}

.live-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(145, 71, 255, 0.14);
    border: 1px solid rgba(145, 71, 255, 0.25);
    color: var(--accent-purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.live-kpi-icon.teal {
    background: rgba(191, 148, 255, 0.12);
    border-color: rgba(191, 148, 255, 0.25);
    color: #BF94FF;
}

.live-kpi-icon.purple {
    background: rgba(145, 71, 255, 0.16);
    border-color: var(--accent-purple-subtle);
    color: var(--accent-purple-light);
}

.live-kpi-icon.green {
    background: rgba(0, 245, 155, 0.12);
    border-color: rgba(0, 245, 155, 0.25);
    color: var(--accent-emerald);
}

.live-kpi-icon.amber {
    background: rgba(255, 209, 102, 0.12);
    border-color: rgba(255, 209, 102, 0.25);
    color: var(--accent-amber);
}

.live-kpi-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.live-kpi-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-kpi-value {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-main);
    line-height: 1.2;
    margin: 2px 0;
}

.live-kpi-desc {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes kpi-flash {
    0%   { opacity: 1;    transform: scale(1);    }
    25%  { opacity: 0.55; transform: scale(1.07); }
    100% { opacity: 1;    transform: scale(1);    }
}

.live-kpi-value.kpi-updated {
    animation: kpi-flash 0.4s ease-out forwards;
}

/* Constelación Central de Telemetría (3 Columnas con Avatar Orb de 160px) */
.live-constellation-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 380px 1fr;
    gap: 32px;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1150px) {
    .live-constellation-box {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.live-side-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.live-data-row:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

.live-data-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-data-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(145, 71, 255, 0.1);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple-light);
    flex-shrink: 0;
}

.live-data-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.live-data-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.live-data-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.live-data-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.live-data-trend {
    font-size: 10px;
    color: var(--text-muted);
}

/* Hub Central del Streamer con Anillo Cuántico */
.live-avatar-quantum-hub {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 0;
}

.live-avatar-orb-wrap {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(145, 71, 255, 0.2) 0%, rgba(31, 31, 35, 0.95) 70%);
    border: 3px solid var(--border-card);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.live-avatar-orb-wrap.is-live {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 35px var(--accent-emerald-glow), inset 0 0 25px rgba(0, 245, 155, 0.3);
    animation: live-ring-breathe 2.8s infinite ease-in-out;
}

@keyframes live-ring-breathe {
    0% { transform: scale(1); box-shadow: 0 0 25px rgba(0, 245, 155, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 0 50px rgba(0, 245, 155, 0.65); }
    100% { transform: scale(1); box-shadow: 0 0 25px rgba(0, 245, 155, 0.3); }
}

.live-avatar-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-surface);
    display: block;
}

.live-orb-channel-title {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--text-main);
}

.live-status-pill {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
}

.live-status-pill.online {
    background: rgba(0, 245, 155, 0.15);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
}

.live-status-pill.offline {
    background: rgba(235, 4, 0, 0.12);
    border: 1px solid var(--accent-red);
    color: #f87171;
}

/* Barra de Acciones de Control */
.live-command-console {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.btn-command-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-sans);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-command-action:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-command-action.primary {
    background: var(--accent-purple);
    border-color: var(--accent-purple-hover);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(145, 71, 255, 0.35);
}

.btn-command-action.primary:hover {
    background: var(--accent-purple-hover);
    box-shadow: 0 6px 22px rgba(145, 71, 255, 0.5);
    filter: brightness(1.05);
}

.btn-command-action.teal {
    background: var(--bg-card);
    border-color: var(--border-card);
    color: var(--accent-purple-light);
}

.btn-command-action.teal:hover {
    background: rgba(145, 71, 255, 0.16);
    border-color: var(--border-card-hover);
    color: #ffffff;
}

/* =======================================================
   ESTRUCTURA DE REJILLA WEB PARA MÓDULOS DEL DOCK
   ======================================================= */
.dock-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.webdock-2col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

@media (max-width: 960px) {
    .webdock-2col-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-content-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.telemetry-viewport {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 140px;
    max-height: 420px;
    overflow-y: auto;
}

.empty-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-subtle);
    font-size: 13px;
    padding: 32px 16px;
}

/* Inputs y Selectores Web Modernos */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px var(--accent-purple-subtle);
    background: var(--bg-card);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    color: var(--text-main);
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
}

.btn-small.active {
    color: #ffffff;
    background: var(--accent-purple);
    border-color: var(--accent-purple-hover);
}

.btn-launch {
    width: 100%;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-purple-hover);
    background: var(--accent-purple);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px var(--accent-purple-glow);
    transition: all 0.2s ease;
}

.btn-launch:hover {
    background: var(--accent-purple-hover);
    box-shadow: 0 6px 20px var(--accent-purple-glow);
}

.btn-cancel {
    background: rgba(235, 4, 0, 0.12);
    border-color: rgba(235, 4, 0, 0.3);
    color: #f87171;
}

.btn-cancel:hover {
    background: var(--accent-red);
    color: #ffffff;
    border-color: var(--accent-red);
}

.btn-morado-primary {
    width: 100%;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 700;
    background: var(--accent-purple);
    border: 1px solid var(--accent-purple-hover);
    color: #ffffff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-purple-glow);
}

.btn-morado-primary:hover {
    background: var(--accent-purple-hover);
    box-shadow: 0 6px 24px var(--accent-purple-glow);
}

/* Modales */
.dock-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 24px;
}

.dock-modal-card {
    max-width: 480px;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-card-hover);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.dock-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.dock-modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.dock-modal-row {
    display: flex;
    gap: 10px;
}

.dock-modal-btn-action {
    padding: 10px 20px;
    background: var(--accent-purple);
    border: 1px solid var(--accent-purple-hover);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px var(--accent-purple-glow);
}

.dock-modal-btn-action:hover {
    background: var(--accent-purple-hover);
}

.dock-auth-feedback-msg {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(235, 4, 0, 0.12);
    border: 1px solid rgba(235, 4, 0, 0.3);
    color: #f87171;
    text-align: center;
}

.dock-auth-feedback-msg.warning {
    background: rgba(255, 209, 102, 0.12);
    border-color: rgba(255, 209, 102, 0.3);
    color: var(--accent-amber);
}

.dock-modal-link-dashboard {
    font-size: 12px;
    color: var(--accent-purple-light);
    text-decoration: none;
    text-align: center;
    margin-top: 6px;
}

.dock-modal-link-dashboard:hover {
    text-decoration: underline;
}

/* Presets & Sliders */
.dock-slider-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dock-slider-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    width: 110px;
    flex-shrink: 0;
}

.dock-slider-input {
    flex: 1;
    cursor: pointer;
    accent-color: var(--accent-purple);
}

.dock-slider-val {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    width: 50px;
    text-align: right;
}

/* Minimapa HUD en Web */
.hud-drag-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    background: #090a0f;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    margin: 0 auto;
    overflow: hidden;
    cursor: default;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
    user-select: none;
}

.hud-grid-guide-h {
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    top: 50%;
    pointer-events: none;
}

.hud-grid-guide-v {
    position: absolute;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.07);
    left: 50%;
    pointer-events: none;
}

.hud-drag-node {
    position: absolute;
    width: 32px;
    height: 15px;
    border-radius: 3px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0 1px;
    box-sizing: border-box;
    opacity: 0.65;
    transition: opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hud-drag-node:hover {
    opacity: 0.95;
    z-index: 25;
}

.hud-drag-node:active {
    cursor: grabbing;
}

.hud-drag-node.active {
    opacity: 1 !important;
    z-index: 40 !important;
    outline: 1.5px solid #ffffff;
    outline-offset: 1px;
}

.hud-node-label {
    font-size: 7.5px;
    font-weight: 800;
    font-family: var(--font-sans);
    pointer-events: none;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hud-node-chat {
    background: rgba(16, 185, 129, 0.22);
    border: 1.5px solid var(--accent-emerald);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.35);
    color: var(--accent-emerald);
}

.hud-node-level {
    background: rgba(255, 24, 1, 0.22);
    border: 1.5px solid #ff1801;
    box-shadow: 0 0 6px rgba(255, 24, 1, 0.35);
    color: #ff1801;
}

.hud-node-achievements {
    background: rgba(245, 158, 11, 0.22);
    border: 1.5px solid #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.hud-node-goals {
    background: rgba(0, 210, 190, 0.22);
    border: 1.5px solid #00d2be;
    box-shadow: 0 0 6px rgba(0, 210, 190, 0.35);
    color: #00d2be;
}

.hud-node-so {
    background: rgba(145, 71, 255, 0.22);
    border: 1.5px solid #9147ff;
    box-shadow: 0 0 6px rgba(145, 71, 255, 0.35);
    color: #9147ff;
}

.hud-node-rewards {
    background: rgba(236, 72, 153, 0.22);
    border: 1.5px solid #ec4899;
    box-shadow: 0 0 6px rgba(236, 72, 153, 0.35);
    color: #ec4899;
}

.hud-node-poll {
    background: rgba(56, 189, 248, 0.22);
    border: 1.5px solid #38bdf8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.hud-node-pred {
    background: rgba(168, 85, 247, 0.22);
    border: 1.5px solid #a855f7;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.35);
    color: #a855f7;
}

.hud-node-alerts {
    background: rgba(0, 242, 254, 0.22);
    border: 1.5px solid #00f2fe;
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.35);
    color: #00f2fe;
}

.hud-node-subathon {
    background: rgba(217, 70, 239, 0.22);
    border: 1.5px solid #d946ef;
    box-shadow: 0 0 6px rgba(217, 70, 239, 0.35);
    color: #d946ef;
}

.hud-node-video {
    background: rgba(239, 68, 68, 0.22);
    border: 1.5px solid #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

/* Selector de Capa y Calibración HUD */
.hud-layer-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
}

.hud-layer-select-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    height: 24px;
    box-sizing: border-box;
}

.hud-layer-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.hud-layer-dropdown {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.hud-layer-dropdown option {
    background: var(--bg-card);
    color: var(--text-main);
}

.hud-btn-reset {
    width: auto;
    min-width: 48px;
    height: 24px;
    font-family: var(--font-sans);
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    cursor: pointer;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.15s ease;
    outline: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.hud-btn-reset:hover {
    color: var(--text-main);
    border-color: var(--accent-purple-light);
    background: rgba(145, 71, 255, 0.1);
}

.hud-calibration-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    box-sizing: border-box;
}

.hud-slider-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hud-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8.5px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.hud-slider-val {
    font-weight: 800;
    color: var(--accent-purple-light);
}

.hud-clean-slider {
    width: 100%;
    height: 4px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 3px 0 1px 0;
}

.hud-clean-slider::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.hud-clean-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Subathon */
.dock-subathon-timer-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dock-subathon-timer-digits {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 800;
    color: var(--accent-emerald);
    letter-spacing: 0.08em;
}

.dock-subathon-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dock-subathon-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.dock-subathon-stat-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.dock-subathon-stat-val-green {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-emerald);
}

.dock-subathon-stat-val-purple {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-purple-light);
}

.dock-subathon-stat-val-cyan {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-purple-light);
}

/* Música */
.dock-music-player-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dock-music-now-playing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dock-music-title-wrap {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dock-music-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dock-music-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
}

@media (max-width: 860px) {
    .dock-music-grid {
        grid-template-columns: 1fr;
    }
}

/* Tags de estado */
.live-tag {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(145, 71, 255, 0.15);
    color: var(--accent-purple-light);
    border: 1px solid rgba(145, 71, 255, 0.3);
}

.live-tag.idle {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-subtle);
    border-color: var(--border-card);
}

.status-pulse-dot {
    animation: status-pulse 2s infinite ease-in-out;
}

@keyframes status-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 155, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(0, 245, 155, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 155, 0); }
}

/* ==========================================================================
   MODERNA INTERFAZ DE MÚSICA WEBDOCK (.music-app) - STREAMRANK MUSIC
   ========================================================================== */

#deck-music {
    grid-column: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.music-app {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    background-color: #1f2128;
    border-radius: 8px 8px 22px 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
}

/* Cabecera / Cover Inmersivo banner sin disco circular */
.music-cover,
.cover {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: linear-gradient(180deg, rgba(31, 33, 40, 0.15) 0%, rgba(31, 33, 40, 0.50) 65%, #1f2128 100%), url('https://images.unsplash.com/photo-1501386761578-eac5c94b800a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80');
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    flex-shrink: 0;
    background-color: #191b22;
}

.music-cover::before,
.cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 33, 40, 0.1) 0%, rgba(31, 33, 40, 0.4) 65%, rgba(31, 33, 40, 0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

.cover-title {
    display: none !important;
}

.cover-title .title-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.cover-title .title {
    color: #ffffff;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    display: inline-block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    letter-spacing: 0.2px;
    transition: transform 0.2s;
}

.cover-title .title.marquee {
    display: inline-block;
    padding-left: 100%;
    animation: cover-marquee-scroll 14s linear infinite;
}

@keyframes cover-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Avatar del Artista circular retirado para ganar espacio vertical */
.artist,
.music-artist-disc {
    display: none !important;
}

/* Contenido Principal con padding superior optimizado para aprovechar espacio */
.music-content,
.content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 175px 16px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.content-title {
    color: #ffffff;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-all {
    display: none !important;
}

/* Lista de Canciones (Peticiones / Queue) */
.playlist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    transition: background 0.15s;
}

.list-item-image {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #121318;
}

.list-item-info {
    flex: 1;
    min-width: 0;
}

.info-title {
    color: #ffffff;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.info-artist {
    color: #59657c;
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-action {
    color: #ffffff;
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.2s;
}

.btn-action:hover {
    color: #6343e4;
    transform: scale(1.15);
}

.music-sr-badge {
    font-size: 9.5px;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    background: rgba(99, 67, 228, 0.25);
    color: #bf94ff;
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid rgba(99, 67, 228, 0.4);
}

.music-micro-btn {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #8a94a6;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.15s;
}

.music-micro-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.music-micro-btn.btn-danger:hover {
    background: rgba(235, 4, 0, 0.2);
    color: #ff6b6b;
    border-color: rgba(235, 4, 0, 0.4);
}

/* Playlists del canal (Albums Circulares con imágenes reales Unsplash) */
.album-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
    margin-bottom: 18px;
    gap: 8px;
}

.album-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.album-item:hover {
    transform: translateY(-2px);
}

.album-art {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 7px;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background-size: cover;
    background-position: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.album-item.active .album-art {
    border-color: #9147ff;
    box-shadow: 0 0 14px rgba(145, 71, 255, 0.5);
}

.album-art-1 {
    background-image: url('https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80');
}

.album-art-2 {
    background-image: url('https://images.unsplash.com/photo-1492684223066-81342ee5ff30?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80');
}

.album-art-3 {
    background-image: url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80');
}

.album-badge {
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    padding: 1px 6px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.album-title {
    color: #ffffff;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.album-subtitle {
    color: #59657c;
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* Editor colapsable de presets */
.dock-music-editor {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #191b22;
    border: 1px solid rgba(99, 67, 228, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

.dock-music-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9.5px;
    font-weight: 800;
    color: #bf94ff;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 4px;
}

.dock-music-editor-inputs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 2px;
}

.dock-preset-input-row {
    display: grid;
    grid-template-columns: 85px 1fr;
    gap: 4px;
}

.dock-preset-input-row input {
    height: 24px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    padding: 0 6px;
    min-width: 0;
}

.dock-preset-input-row input:focus {
    border-color: #6343e4;
    outline: none;
}

.dock-music-editor-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

#dock-presets-save-status {
    font-size: 9px;
    color: #8a94a6;
}

.btn-music-action {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: #6343e4;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-music-action:hover {
    background: #7555fa;
}

/* Reproductor Inferior Visible con Color Unificado de Superficie del Dock */
.music-mini-player,
.player {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background-color: #14171f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 10px 14px 11px 14px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

/* Fila 1: Pista y Transporte */
.player-top {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Vinilo Realista Giratorio (Chill 12s/rev, Circular Isótropo) */
.vinyl-record-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    background: radial-gradient(circle, #2a2c31 0%, #151619 45%, #0d0e10 70%, #1a1b1f 92%, #0d0e10 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    cursor: default;
    will-change: transform;
}

.vinyl-record-wrap.spinning {
    animation: vinyl-spin 12s linear infinite;
}

.vinyl-grooves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50% !important;
    background: repeating-radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.035) 0px,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1.5px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 1;
}

.vinyl-label-art,
.player-art {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    object-fit: cover;
    z-index: 2;
    background-color: #121318;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.vinyl-center-hole {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50% !important;
    background: #161719;
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 3;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.9);
}

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

.player-info {
    flex: 1;
    min-width: 0;
    overflow: hidden !important;
    position: relative;
}

.player-info .info-title {
    color: #ffffff;
    font-family: 'Formula1', 'Titillium Web', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.player-info .info-title.marquee-active,
.list-item-info .info-title.marquee-active {
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline-block !important;
    width: max-content !important;
    min-width: 100% !important;
    animation: sr-title-marquee var(--marquee-duration, 6s) ease-in-out infinite alternate !important;
    will-change: transform;
}

.list-item-info.sr-track-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden !important;
}

.player-info .info-artist {
    color: #8b9bb4;
    font-size: 11px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-mini-control {
    background: linear-gradient(135deg, #383d43, #2d3035);
    border: none;
    color: #8b9bb4;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5), inset 0px 1px 2px rgba(255, 255, 255, 0.15);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-mini-control:hover {
    color: #ffffff;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.6), inset 0px 1px 2px rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-mini-control:active {
    transform: scale(0.95);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4), inset 0px 2px 4px rgba(0, 0, 0, 0.6);
}

.btn-mini-control.btn-play-main {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3d3b48, #2a2636);
    color: #bf94ff;
    box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.6), inset 0px 1px 2px rgba(191, 148, 255, 0.3), 0 0 12px rgba(145, 71, 255, 0.3);
    padding: 0;
}

.btn-mini-control.btn-play-main:hover {
    background: linear-gradient(135deg, #484457, #332d43);
    color: #ffffff;
    box-shadow: 0px 7px 16px rgba(0, 0, 0, 0.7), inset 0px 1px 2px rgba(255, 255, 255, 0.3), 0 0 16px rgba(145, 71, 255, 0.5);
    transform: translateY(-1px);
}

.btn-mini-control.btn-play-main:active {
    transform: scale(0.94);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6), inset 0px 3px 6px rgba(0, 0, 0, 0.7);
}

/* Fila 2: Tiempos y Barra de Progreso Interactiva Táctil */
.player-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.time-label {
    color: #8b9bb4;
    font-size: 9.5px;
    font-family: var(--font-mono, monospace);
    min-width: 28px;
}

.progress-bar-wrap {
    flex: 1;
    position: relative;
    height: 8px;
    display: flex;
    align-items: center;
    background: #18191b;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.8), 0px 1px 1px rgba(255, 255, 255, 0.06);
    transition: height 0.15s ease;
}

.progress-bar-wrap:hover {
    height: 10px;
}

.dock-seek-input {
    display: none !important;
}

.progress-fill {
    display: block !important;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #78268b, #9147ff, #bf94ff);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(145, 71, 255, 0.6);
    pointer-events: none;
    transition: width 0.15s linear;
}

/* Fila 3: Opciones y Herramientas (Contenedor Fresado Segmentado) */
.player-tools-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    padding: 3px;
    background: #161719;
    border-radius: 10px;
    box-shadow: inset 0px 3px 6px rgba(0, 0, 0, 0.6), 0px 1px 1px rgba(255, 255, 255, 0.04);
}

.tool-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: #6a7482;
    font-size: 9.5px;
    font-weight: 700;
    padding: 5px 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.tool-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tool-btn.active {
    background: linear-gradient(135deg, #383d43, #2d3035) !important;
    color: #bf94ff !important;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.4), inset 0px 1px 1px rgba(255, 255, 255, 0.12) !important;
    text-shadow: 0px 0px 8px rgba(145, 71, 255, 0.7);
}

.tool-btn:active {
    transform: scale(0.96);
}

/* Fila 4: Control de Volumen horizontal (Fader de Mezcla Fresado Milled con Thumb Clay Estriado) */
.player-volume-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #161719;
    border-radius: 12px;
    padding: 5px 10px;
    box-sizing: border-box;
    box-shadow: inset 0px 3px 6px rgba(0, 0, 0, 0.6), 0px 1px 1px rgba(255, 255, 255, 0.04);
}

.vol-btn {
    background: transparent;
    border: none;
    color: #6a7482;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: all 0.15s;
}

.vol-btn:hover {
    color: #bf94ff;
    transform: scale(1.1);
}

.vol-slider-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    height: 18px;
}

.player-vol-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    cursor: ew-resize;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #9147ff 0%, #bf94ff var(--vol-pct, 50%), #18191b var(--vol-pct, 50%), #18191b 100%);
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.8), 0px 1px 1px rgba(255, 255, 255, 0.06);
    outline: none;
    margin: 0;
    transition: filter 0.15s ease;
}

.player-vol-slider:hover {
    filter: brightness(1.15);
}

/* Thumb tipo Fader Físico Clay con relieve y estrías táctiles centrales */
.player-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 24px;
    border-radius: 4px;
    background: 
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 3px,
            #1e2023 3px,
            #1e2023 5px,
            rgba(255, 255, 255, 0.08) 5px,
            rgba(255, 255, 255, 0.08) 6px
        ),
        linear-gradient(135deg, #3d4248, #2a2c31);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7), inset 0px 1px 2px rgba(255, 255, 255, 0.2), 0 0 8px rgba(145, 71, 255, 0.4);
    cursor: ew-resize;
    margin-top: -8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.player-vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8), inset 0px 1px 2px rgba(255, 255, 255, 0.25), 0 0 12px rgba(145, 71, 255, 0.6);
}

.player-vol-slider::-webkit-slider-thumb:active {
    transform: scale(0.96);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6), inset 0px 2px 4px rgba(0, 0, 0, 0.7);
}

.player-vol-slider::-moz-range-thumb {
    width: 18px;
    height: 24px;
    border-radius: 4px;
    background: 
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 3px,
            #1e2023 3px,
            #1e2023 5px,
            rgba(255, 255, 255, 0.08) 5px,
            rgba(255, 255, 255, 0.08) 6px
        ),
        linear-gradient(135deg, #3d4248, #2a2c31);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7), inset 0px 1px 2px rgba(255, 255, 255, 0.2), 0 0 8px rgba(145, 71, 255, 0.4);
    cursor: ew-resize;
}

.vol-label {
    font-size: 10px;
    font-family: 'Formula1', var(--font-mono, monospace);
    font-weight: 700;
    color: #9147ff;
    min-width: 32px;
    text-align: right;
    letter-spacing: 0.3px;
    text-shadow: 0 0 6px rgba(145, 71, 255, 0.35);
}

/* ==================== SR QUEUE & MINI PLAYER MARQUEE ==================== */
.sr-track-marquee.marquee-active {
    animation: sr-title-marquee var(--marquee-duration, 6s) ease-in-out infinite alternate;
}

@keyframes sr-title-marquee {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(var(--marquee-dist, -30px));
    }
}

