/* ===================================
   DJ CATEGORIES - Columna Vertical
   Efecto pantalla digital / glassmorphism
   =================================== */

/* Columna principal */
#djCategoriesPanel {
    width: 155px;
    min-width: 155px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 18, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

/* Borde luminoso superior - efecto pantalla digital */
#djCategoriesPanel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.6) 20%,
        rgba(139, 92, 246, 0.8) 50%,
        rgba(99, 102, 241, 0.6) 80%,
        transparent 100%);
    z-index: 1;
}

/* Glow interior superior - efecto pantalla encendida */
#djCategoriesPanel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(99, 102, 241, 0.08) 0%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Header compacto */
.djcat-header {
    padding: 3px 6px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Botón check - visibilidad de categorías */
.djcat-visibility-btn {
    width: 20px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 3px;
    color: #8b5cf6;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.djcat-visibility-btn:hover {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.25));
    border-color: #8b5cf6;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.djcat-visibility-btn:active {
    transform: scale(0.92);
}

.djcat-visibility-btn svg {
    width: 12px;
    height: 12px;
}

/* Modal de categorías en modo panel (pegado a la columna, altura completa) */
.category-context-menu.panel-mode {
    top: 0;
    bottom: 56px;
    left: 155px;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    border-radius: 0 8px 8px 0;
    display: flex;
    flex-direction: column;
}

.category-context-menu.panel-mode .category-menu-list {
    flex: 1;
    max-height: none;
}

/* Botón carpeta local */
.djcat-folder-btn {
    width: 20px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 3px;
    color: #22c55e;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.djcat-folder-btn:hover {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.25));
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.djcat-folder-btn:active {
    transform: scale(0.92);
}

.djcat-folder-btn svg {
    width: 12px;
    height: 12px;
}

/* Lista de categorías - scroll vertical */
.djcat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1px 0;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.djcat-list::-webkit-scrollbar {
    width: 3px;
}

.djcat-list::-webkit-scrollbar-track {
    background: transparent;
}

.djcat-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

/* Item de categoría - ultra compacto */
.djcat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px 1px 4px;
    margin: 0 2px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid transparent;
    user-select: none;
}

.djcat-item:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(99, 102, 241, 0.4);
}

/* Categoría activa */
.djcat-item.active {
    color: white;
    background: linear-gradient(90deg,
        rgba(99, 102, 241, 0.2) 0%,
        rgba(99, 102, 241, 0.05) 100%);
    border-left-color: var(--dj-primary, #6366f1);
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

/* Contador de canciones */
.djcat-count {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.2);
    margin-left: auto;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.djcat-item.active .djcat-count {
    color: rgba(139, 92, 246, 0.6);
}

/* Tab de carpeta local */
.djcat-item.djcat-local {
    color: #22c55e;
    border-left-color: rgba(34, 197, 94, 0.3);
}

.djcat-item.djcat-local.active {
    background: linear-gradient(90deg,
        rgba(34, 197, 94, 0.2) 0%,
        rgba(34, 197, 94, 0.05) 100%);
    border-left-color: #22c55e;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.djcat-local-close {
    font-size: 11px;
    line-height: 1;
    opacity: 0.5;
    cursor: pointer;
    margin-left: 2px;
}

.djcat-local-close:hover {
    opacity: 1;
    color: #ef4444;
}

/* Separador sutil */
.djcat-separator {
    height: 1px;
    margin: 1px 6px;
    background: rgba(255, 255, 255, 0.05);
}

/* Glow inferior - efecto pantalla */
.djcat-list::after {
    content: '';
    position: sticky;
    bottom: 0;
    display: block;
    height: 20px;
    background: linear-gradient(0deg,
        rgba(8, 8, 18, 0.9) 0%,
        transparent 100%);
    pointer-events: none;
}

/* Scanline efecto digital sutil */
#djCategoriesPanel .djcat-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 2;
}
