/* Category List Premium Redesign - v4 (Ultimate Cinematic Glass) */

:root {
    --cat-bg: #0b0d14;
    --cat-item-bg: rgba(255, 255, 255, 0.03);
    --cat-item-hover: rgba(255, 255, 255, 0.08);
    --cat-active-gradient: linear-gradient(135deg, rgba(64, 196, 255, 0.2) 0%, rgba(30, 30, 40, 0.9) 100%);
    --cat-accent-color: #40c4ff;
    /* A cyan/blue accent fits "BleuPlayer" better than gold, or user adjustable */
    --cat-text-main: #e0e6ed;
    --cat-text-muted: #8a94a6;
    --cat-border-color: rgba(255, 255, 255, 0.05);
}

.categories-column {
    background: var(--cat-bg);
    border-right: 1px solid var(--cat-border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* For blur effects */
    min-width: 320px;
    /* Increased from default */
    width: 28%;
    /* Increased width */
    max-width: 400px;
}

/* Background Ambient Glow */
.categories-column::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 50% 0%, rgba(64, 196, 255, 0.03), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.column-header {
    padding: 10px 20px 5px;
    background: transparent;
    z-index: 1;
    position: relative;
    border-bottom: 1px solid var(--cat-border-color);
    margin-bottom: 15px;
}

.column-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cat-text-main);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: linear-gradient(90deg, #fff, #b4bccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.column-header .sub-text {
    font-size: 0.8rem;
    color: var(--cat-accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    display: inline-block;
    background: rgba(64, 196, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(64, 196, 255, 0.2);
}

/* List Container */
#categories-ul {
    padding: 10px 20px 40px 20px;
    overflow-y: overlay; /* Reverted to native scroll */
    overflow-x: hidden;
    flex-grow: 1;
    z-index: 1;
    scroll-behavior: auto; /* NO SMOOTH SCROLL FOR INSTANT RESPONSE */
    will-change: transform;
    transform: translateZ(0);
}

/* Scrollbar styling */
#categories-ul::-webkit-scrollbar {
    width: 4px; 
}

#categories-ul::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#categories-ul::-webkit-scrollbar-track {
    background: transparent;
}

#categories-ul .list-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 16px;
    cursor: pointer;
    /* transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); */
    background: var(--cat-item-bg);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    color: var(--cat-text-muted);
}

/* Glass Shine Effect on Hover */
#categories-ul .list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    pointer-events: none;
}

#categories-ul .list-item:hover::before {
    left: 150%;
    transition: 0.7s;
}

/* Icon Container */
.cat-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    font-size: 20px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    flex-shrink: 0;
}

/* Text Styling */
/* Text Styling - Increased Specificity */
#categories-ul .list-item .item-name {
    flex-grow: 1;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
    line-height: 1.4;
    /* transition: 0.3s; */
}

#categories-ul .category-color-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 0 4px;
    list-style: none;
}

#categories-ul .category-color-action {
    flex: 1 1 0;
    height: 34px;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
    cursor: pointer;
}

#categories-ul .category-color-action i {
    color: #ffffff;
    font-size: 0.9rem;
    pointer-events: none;
}

#categories-ul .category-color-action.color-red {
    background: linear-gradient(135deg, #ff6b6b 0%, #d63031 100%);
}

#categories-ul .category-color-action.color-green {
    background: linear-gradient(135deg, #7bed9f 0%, #2ecc71 100%);
}

#categories-ul .category-color-action.color-yellow {
    background: linear-gradient(135deg, #ffe082 0%, #f1c40f 100%);
}

#categories-ul .category-color-action.color-blue {
    background: linear-gradient(135deg, #74c0fc 0%, #1e90ff 100%);
}

/* Badge Styling */
.item-count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.4);
    min-width: 30px;
    text-align: center;
    /* transition: all 0.3s; */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hover State */
#categories-ul .list-item:hover {
    background: var(--cat-item-hover);
    /* transform: translateY(-2px) scale(1.01); */
    color: #fff;
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); */
    border-color: rgba(255, 255, 255, 0.1);
}

#categories-ul .list-item:hover .cat-icon-box {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    /* transform: scale(1.1); */
}

/* ============================
   ACTIVE / FOCUS STATE
   ============================ */

#categories-ul .list-item:focus,
#categories-ul .list-item.active {
    background: var(--cat-active-gradient);
    border: 1px solid rgba(64, 196, 255, 0.5);
    color: #fff;
    outline: none;
    /* transform: scale(1.03) translateX(6px); */
    /* box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(64, 196, 255, 0.2) inset,
        0 0 20px rgba(64, 196, 255, 0.2); */
    z-index: 2;
}

/* Active Icon */
#categories-ul .list-item:focus .cat-icon-box,
#categories-ul .list-item.active .cat-icon-box {
    color: var(--cat-accent-color);
    /* box-shadow: 0 0 15px rgba(255, 255, 255, 0.5); */
    /* transform: rotate(-10deg) scale(1.2); */
}

/* Active Text */
#categories-ul .list-item:focus .item-name,
#categories-ul .list-item.active .item-name {
    color: #00b7ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0);
}

/* Active Badge */
#categories-ul .list-item:focus .item-count,
#categories-ul .list-item.active .item-count {
    background: #fff;
    color: var(--cat-accent-color);
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); */
}

/* Special Items (Favorites / History) */
#categories-ul .list-item[data-type="special"] {
    margin-bottom: 30px;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1), transparent);
    border-left: 3px solid #e74c3c;
}

#categories-ul .list-item[data-type="special"] .cat-icon-box {
    color: #e74c3c;
}

#categories-ul .list-item[data-type="special"]:focus,
#categories-ul .list-item[data-type="special"].active {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.4), rgba(0, 0, 0, 0.9));
    border-color: #e74c3c;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

#categories-ul .list-item[data-type="special"]:focus .cat-icon-box,
#categories-ul .list-item[data-type="special"].active .cat-icon-box {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
}
