/* ===== TRACK LIBRARY INLINE FILTERS ===== */
.tl-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.tl-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tl-filter-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tl-filter-label i { font-size: 0.76rem; color: var(--accent-light); }
.tl-filter-input {
    width: 64px;
    height: 30px;
    padding: 0 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -moz-appearance: textfield;
}
.tl-filter-input::-webkit-inner-spin-button,
.tl-filter-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tl-filter-input:focus { border-color: rgba(108,92,231,0.4); background: rgba(108,92,231,0.06); }
.tl-filter-input::placeholder { color: var(--text-muted); font-size: 0.72rem; }
.tl-filter-sep { color: var(--text-muted); font-size: 0.72rem; }
.tl-filter-select {
    height: 30px;
    padding: 0 26px 0 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 80px;
}
.tl-filter-select:focus { border-color: rgba(108,92,231,0.4); background-color: rgba(108,92,231,0.06); }
.tl-filter-select option { background: var(--bg-card); color: #fff; }
.tl-filter-select optgroup { color: var(--text-muted); font-weight: 600; }
.tl-filter-apply {
    width: auto;
    min-width: 32px;
    padding: 0 12px;
    height: 30px;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: filter 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.tl-filter-apply:hover { filter: brightness(1.2); transform: translateY(-1px); }
.tl-filter-apply:active { transform: translateY(0); }
.tl-filter-clear {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,118,117,0.12);
    color: #ff7675;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.tl-filter-clear:hover { background: rgba(255,118,117,0.25); color: #fff; transform: scale(1.1); }

/* ===== ACTIVE FILTERS BAR ===== */
.active-filters-bar {
    background: var(--bg-card);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(108,92,231,0.25);
    box-shadow: 0 0 20px rgba(108,92,231,0.08);
    margin-bottom: 16px;
    animation: filterBarIn 0.3s ease both;
}
@keyframes filterBarIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
.active-filters-label {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-right: 4px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
    transition: var(--transition);
}
.filter-chip i:first-child {
    font-size: 0.7rem;
}
.filter-chip-bpm {
    background: rgba(0,206,201,0.12);
    color: #00cec9;
    border-color: rgba(0,206,201,0.3);
}
.filter-chip-genre {
    background: rgba(108,92,231,0.12);
    color: var(--accent-light);
    border-color: rgba(108,92,231,0.3);
}
.filter-chip-sort {
    background: rgba(253,203,110,0.12);
    color: #fdcb6e;
    border-color: rgba(253,203,110,0.3);
}
.filter-chip-key {
    background: rgba(116,185,255,0.12);
    color: #74b9ff;
    border-color: rgba(116,185,255,0.3);
}
.filter-chip-version {
    background: rgba(255,118,117,0.12);
    color: #ff7675;
    border-color: rgba(255,118,117,0.3);
}
.filter-chip-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: inherit;
    text-decoration: none;
    font-size: 0.55rem;
    margin-left: 2px;
    transition: var(--transition);
}
.filter-chip-close:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: scale(1.15);
}
.filter-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
    margin-left: auto;
}
.filter-clear-btn:hover {
    background: rgba(214,48,49,0.15);
    color: #ff7675;
    border-color: rgba(214,48,49,0.3);
}

.btn-outline-light {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-outline-light:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--accent);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ===== TRACK LIST (NEW) ===== */
@keyframes slideInRow {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
@keyframes detailSlideDown {
    from { opacity: 0; max-height: 0; transform: translateY(-8px); }
    to   { opacity: 1; max-height: 400px; transform: none; }
}
@keyframes detailSlideUp {
    from { opacity: 1; max-height: 400px; }
    to   { opacity: 0; max-height: 0; }
}
@keyframes fadeUpIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(108,92,231,0.25); }
    50%      { box-shadow: 0 0 20px rgba(108,92,231,0.45); }
}

.anim-slide-in  { animation: slideInRow 0.2s ease both; }
.anim-slide-in:nth-child(n+9) { animation: none; opacity: 1; } /* skip animation after 8th row */
.anim-fade-up   { animation: fadeUpIn 0.3s ease both; }
.anim-slide-right { animation: slideRight 0.2s ease both; }
.anim-slide-right:nth-child(n+6) { animation: none; opacity: 1; }

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .anim-slide-in, .anim-fade-up, .anim-slide-right { animation: none !important; opacity: 1; }
    .rpool-ad-shimmer { display: none !important; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== SKELETON LOADING ===== */
@keyframes skeletonShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes skeletonRowIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
@keyframes skeletonFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Container: visible only when skeleton-active */
.skeleton-track-container {
    display: none;
}
.track-list.skeleton-active .skeleton-track-container {
    display: block;
}

/* Hide real content when skeleton is active */
.track-list.skeleton-active > .track-row,
.track-list.skeleton-active > .track-date-separator,
.track-list.skeleton-active > .track-detail-panel,
.track-list.skeleton-active > .track-empty {
    display: none !important;
}

/* Skeleton row — matches .track-row layout */
.skeleton-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 0;
    position: relative;
    animation: skeletonRowIn 0.4s ease both;
    opacity: 0;
}
.skeleton-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: rgba(108,92,231,0.06);
}
.skeleton-row:last-child::after {
    display: none;
}

/* Skeleton cells — same widths as track-row children */
.sk-cell {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.sk-num {
    width: 36px;
    justify-content: center;
}
.sk-play {
    width: 36px;
    justify-content: center;
}
.sk-main {
    flex: 1;
    min-width: 0;
    padding: 0 8px 0 4px;
    flex-direction: column;
    gap: 7px;
}
.sk-artist {
    width: 150px;
    padding: 0 6px;
}
.sk-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sk-acts {
    width: 70px;
    justify-content: center;
    gap: 6px;
}

/* Bone base — the shimmer element */
.sk-bone {
    background: rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.sk-bone::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(108,92,231,0.15) 30%,
        rgba(162,155,254,0.25) 50%,
        rgba(108,92,231,0.15) 70%,
        transparent 100%
    );
    animation: skeletonShimmer 1.6s ease-in-out infinite;
    background-size: 200% 100%;
}

/* Bone variants — sized to match real content */
.sk-bone-num   { width: 18px; height: 12px; border-radius: 3px; }
.sk-circle     { width: 30px; height: 30px; border-radius: 50%; }
.sk-circle-sm  { width: 26px; height: 26px; border-radius: 50%; }
.sk-bar-title  { width: 65%; height: 14px; max-width: 220px; }
.sk-bar-subtitle { width: 40%; height: 10px; max-width: 140px; }
.sk-bar-artist { width: 80%; height: 12px; }
.sk-pill       { width: 80px; height: 22px; border-radius: 20px; }
.sk-bar-bpm    { width: 36px; height: 12px; }
.sk-bar-key    { width: 36px; height: 12px; }

/* Stagger shimmer for visual depth */
.skeleton-row:nth-child(even) .sk-bone::after {
    animation-delay: 0.15s;
}
.skeleton-row:nth-child(3n) .sk-bone::after {
    animation-delay: 0.3s;
}

/* Fade-out transition when hiding skeleton */
.skeleton-track-container.skeleton-fade-out {
    animation: skeletonFadeOut 0.3s ease forwards;
    pointer-events: none;
}

/* Sort bar shimmer while skeleton active */
.skeleton-active ~ .track-sort-bar,
.track-list.skeleton-active {
    position: relative;
}

/* Mobile: hide num + artist columns like real tracks */
@media (max-width: 768px) {
    .sk-num { display: none; }
    .sk-artist { display: none; }
    .sk-play { width: 32px; }
    .sk-meta { gap: 4px; }
    .sk-pill { width: 60px; height: 18px; }
    .sk-bar-bpm { width: 28px; height: 10px; }
    .sk-bar-key { width: 28px; height: 10px; }
    .sk-acts { width: 60px; gap: 4px; }
    .sk-circle-sm { width: 22px; height: 22px; }
    .sk-bar-title { max-width: 160px; }
    .sk-bar-subtitle { max-width: 100px; }
}

/* Sort Bar */
.track-sort-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--border);
    border-bottom: 1px solid rgba(108,92,231,0.12);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    user-select: none;
}
.sort-col { padding: 0 6px; }
.sort-num { width: 36px; text-align: center; flex-shrink: 0; }
.sort-play { width: 36px; flex-shrink: 0; }
.sort-title { flex: 1; min-width: 0; padding-left: 4px; }
.sort-artist { width: 150px; flex-shrink: 0; }
.sort-genre { width: 120px; text-align: center; flex-shrink: 0; }
.sort-bpm { width: 60px; text-align: center; flex-shrink: 0; white-space: nowrap; }
.sort-key { width: 60px; text-align: center; flex-shrink: 0; white-space: nowrap; }
.sort-actions { width: 70px; text-align: center; flex-shrink: 0; }

.sortable-header {
    cursor: pointer;
    transition: color 0.2s ease;
}
.sortable-header:hover {
    color: var(--accent-light) !important;
}
.sortable-header i { margin-left: 3px; font-size: 0.65rem; }

/* Track List Container */
.track-list {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: visible;
    background: var(--bg-secondary);
}
.track-list > .track-row:last-child {
    border-radius: 0 0 12px 12px;
}

/* Empty State */
.track-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.track-empty i { font-size: 3rem; margin-bottom: 12px; display: block; opacity: 0.55; }
.track-empty p { font-size: 0.95rem; margin: 0; }
.track-empty .empty-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
}

/* Track Row */
.track-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.25s ease, transform 0.15s ease;
    border-bottom: none;
}
.track-row:nth-child(even) {
    background: rgba(108,92,231,0.03);
}
.track-row:focus-visible {
    outline: 2px solid var(--accent-light);
    z-index: 1;
}
.track-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.25), rgba(162,155,254,0.15), transparent);
    transition: opacity 0.3s ease;
}
.track-row:last-child::after {
    display: none;
}
.track-row:hover::after {
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.45), rgba(162,155,254,0.3), transparent);
}
.track-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.track-row:hover {
    background: rgba(108,92,231,0.06);
}
.track-row:hover::before {
    transform: scaleY(1);
}
.track-row.expanded {
    background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(162,155,254,0.06));
}
.track-row.expanded::before {
    transform: scaleY(1);
    background: var(--accent-light);
}
.track-row.expanded::after {
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.5), rgba(162,155,254,0.35), transparent);
}

/* Now Playing Row Highlight */
.track-row.now-playing {
    background: linear-gradient(135deg, rgba(108,92,231,0.14), rgba(162,155,254,0.07)) !important;
    border-left: 3px solid var(--accent-light);
    padding-left: calc(14px - 3px);
    position: relative;
}
.track-row.now-playing::before {
    transform: scaleY(1);
    background: var(--accent-light);
    opacity: 0;
}
.track-row.now-playing::after {
    background: linear-gradient(90deg, transparent, rgba(108,92,231,0.4), rgba(162,155,254,0.25), transparent);
}
.track-row.now-playing .track-row-num {
    color: var(--accent-light);
}
.track-row.now-playing .track-name {
    color: var(--accent-light);
}
@keyframes nowPlayingPulse {
    0%, 100% { border-left-color: var(--accent-light); }
    50% { border-left-color: var(--accent); }
}
.track-row.now-playing {
    animation: nowPlayingPulse 3s ease-in-out infinite;
}

/* Row Number */
.track-row-num {
    width: 36px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Play Button Column */
.track-row-play {
    width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Exclusive artwork thumbnail */
.track-row-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 4px;
}
.track-thumb-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.06);
}

/* Main Info */
.track-row-main {
    flex: 1;
    min-width: 0;
    padding: 0 8px 0 4px;
}
.track-row-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.3;
}
.track-row-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.track-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-ver-icon {
    color: var(--accent-light);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.track-ver-badge {
    background: rgba(108,92,231,0.2);
    color: var(--accent-light);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid rgba(108,92,231,0.3);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.exc-tag {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: #000;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    margin-left: 4px;
}
.track-row-artist {
    width: 150px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    padding: 0 6px;
}
.artist-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}
.artist-link:hover {
    color: var(--accent-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.artist-sep {
    color: var(--text-muted);
    font-size: 0.7rem;
}
.artist-unknown {
    color: var(--text-muted);
    font-style: italic;
}

/* Meta (genre, bpm, key) */
.track-row-meta {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.track-genre-pill {
    background: rgba(108,92,231,0.12);
    color: var(--accent-light);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.2);
    white-space: nowrap;
    width: 120px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.track-genre-pill:hover {
    background: rgba(108,92,231,0.25);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.track-bpm-key {
    display: contents;
}
.track-bpm, .track-key {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 60px;
    text-align: center;
    font-weight: 500;
    padding: 0 4px;
}
.track-key {
    color: var(--accent-light);
    font-weight: 600;
}

/* Action Buttons */
.track-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding-left: 4px;
    width: 70px;
    justify-content: center;
}
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    padding: 0;
    min-width: 0;
    box-sizing: border-box;
}
.btn-action:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-action-play {
    background: rgba(108,92,231,0.12);
    color: var(--accent-light);
    border-color: rgba(108,92,231,0.25);
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}
.btn-action-play.loading {
    pointer-events: none;
    position: relative;
}
.btn-action-play.loading i { visibility: hidden; }
.btn-action-play.loading::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    border: 2px solid rgba(108,92,231,0.3);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    animation: btnLoadingSpin .6s linear infinite;
}
@keyframes btnLoadingSpin { to { transform: rotate(360deg); } }
.btn-action-play:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.15);
}
.btn-action-lock {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-action.played {
    background: rgba(0,184,148,0.12) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}
.btn-action.played:hover {
    background: var(--success) !important;
    color: #fff !important;
}

/* Detail Panel */
.track-detail-panel {
    background: linear-gradient(180deg, rgba(108,92,231,0.06) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid rgba(108,92,231,0.15);
    overflow: hidden;
}
.detail-inner {
    display: flex;
    gap: 24px;
    padding: 20px 24px 20px 56px;
}
.detail-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.detail-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.detail-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
}
.detail-value {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 500;
}
.detail-value .artist-link {
    color: var(--accent-light);
}
.detail-value .artist-link:hover {
    color: #fff;
}
.detail-genre-link {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s ease;
}
.detail-genre-link:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-actions-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    justify-content: center;
}
.btn-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-detail:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-detail-dl {
    background: var(--gradient-1);
    border: none;
}
.btn-detail-dl:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.btn-detail.played {
    border-color: var(--success);
    color: var(--success);
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    background: var(--bg-card);
    padding: 18px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 20px;
    margin-bottom: 80px;
}

.pagination-custom {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.pagination-custom .page-item {
    margin: 0;
}

.pagination-custom .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    line-height: 1;
}

.pagination-custom .page-text {
    width: auto !important;
    min-width: 50px;
    padding: 0 12px !important;
    font-size: 0.8rem;
}

.pagination-custom .page-number {
    width: 40px;
    height: 40px;
    padding: 0;
}

.pagination-custom .page-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.pagination-custom .page-item.active .page-link {
    background: var(--gradient-1);
    border-color: var(--accent-light);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
    font-weight: 600;
}

.pagination-custom .page-item.disabled .page-link {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-custom .page-item.disabled .page-link:hover {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

.pagination-info {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
}

/* ===== BUTTONS ===== */
.btn-play {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: var(--accent-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-play:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* ===== GENRE NAV ===== */
.genre-nav {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.genre-nav h4 {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--accent-light) !important;
}

.genre-see-all {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}
.genre-see-all:hover {
    color: #fff;
    transform: translateX(4px);
}

/* Current Genre Chip */
.current-genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(108,92,231,0.18), rgba(162,155,254,0.1));
    border: 1px solid rgba(108,92,231,0.35);
    color: var(--accent-light);
    font-size: 0.82rem;
    font-weight: 600;
}
.current-genre-chip i.bi-funnel-fill {
    font-size: 0.75rem;
    color: var(--accent-light);
}
.current-genre-chip strong {
    color: #fff;
}
.current-genre-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6rem;
    transition: var(--transition);
    margin-left: 4px;
}
.current-genre-clear:hover {
    background: rgba(214,48,49,0.3);
    color: #ff7675;
    transform: scale(1.15);
}

/* Gig Context Chips */
.gig-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gig-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.gig-chip:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-1px);
}
.gig-chip i {
    font-size: 1rem;
}
.gig-chip small {
    opacity: 0.6;
    font-size: 0.72rem;
}
.gig-chip-active {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(162, 155, 254, 0.15));
    border-color: var(--accent);
    color: var(--accent-light);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.2);
}
.gig-chip-clear {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}
.gig-chip-clear:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Sub-genre tag on tracks */
.sub-genre-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(108, 92, 231, 0.12);
    color: var(--accent-light);
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.sub-genre-tag:hover {
    background: rgba(108, 92, 231, 0.25);
    color: var(--accent-light);
}

/* Genre Card Grid */
.genre-card-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.genre-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
    cursor: pointer;
}
.genre-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, var(--gc-from), var(--gc-to));
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 0;
}
.genre-card:hover::before { opacity: .15; }
.genre-card:hover {
    border-color: var(--gc-from);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 20px color-mix(in srgb, var(--gc-from) 30%, transparent);
    text-decoration: none;
    color: #fff;
}
.genre-card-active {
    border-color: var(--gc-from) !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--gc-from) 18%, transparent), color-mix(in srgb, var(--gc-to) 8%, transparent)) !important;
    box-shadow: 0 0 20px color-mix(in srgb, var(--gc-from) 25%, transparent);
}
.genre-card-active .genre-card-name { color: #fff; }

.genre-card-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--gc-from), var(--gc-to));
    color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--gc-from) 40%, transparent);
}
.genre-card-name {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.genre-card-count {
    position: relative;
    z-index: 1;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.current-genre-display {
    margin-top: 10px;
}

.current-genre-display .badge {
    background: var(--gradient-1) !important;
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.current-genre-display .badge a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    margin-left: 8px;
    font-weight: bold;
}

.current-genre-display .badge a:hover {
    opacity: 1;
}

/* ===== SIDEBAR (NEW) ===== */
.sidebar-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.sidebar-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}
.sidebar-card:hover::after {
    transform: scaleX(1);
}
.sidebar-popular::after {
    background: linear-gradient(90deg, var(--warning), #f0932b);
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.sidebar-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.sidebar-icon-recent {
    background: linear-gradient(135deg, rgba(108,92,231,0.2), rgba(162,155,254,0.15));
    color: var(--accent-light);
    border: 1px solid rgba(108,92,231,0.3);
}
.sidebar-icon-fire {
    background: linear-gradient(135deg, rgba(254,202,87,0.2), rgba(240,147,43,0.15));
    color: var(--warning);
    border: 1px solid rgba(254,202,87,0.3);
}
.sidebar-icon-exc {
    background: linear-gradient(135deg, rgba(255,107,129,0.2), rgba(238,82,83,0.15));
    color: #ff6b81;
    border: 1px solid rgba(255,107,129,0.3);
}
.sidebar-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.sidebar-card-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Sidebar Track List */
.sidebar-track-list {
    padding: 8px 0;
}
.sidebar-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    transition: background 0.2s ease, padding-left 0.2s ease;
    position: relative;
    cursor: default;
}
.sidebar-track:hover {
    background: rgba(108,92,231,0.05);
    padding-left: 18px;
}
.sidebar-popular .sidebar-track:hover {
    background: rgba(254,202,87,0.04);
}

.sidebar-rank {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.sidebar-track:hover .sidebar-rank {
    transform: scale(1.15);
}
.sidebar-rank-new {
    background: rgba(108,92,231,0.15);
    color: var(--accent-light);
    border: 1px solid rgba(108,92,231,0.25);
}
.sidebar-rank-top {
    background: linear-gradient(135deg, var(--warning), #f0932b);
    color: #000;
    border: none;
    box-shadow: 0 2px 8px rgba(254,202,87,0.3);
}
.sidebar-rank-pop {
    background: rgba(254,202,87,0.1);
    color: var(--warning);
    border: 1px solid rgba(254,202,87,0.2);
}

.sidebar-track-info {
    flex: 1;
    min-width: 0;
}
.sidebar-track-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-track-meta {
    font-size: 0.62rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
}
.sidebar-date {
    color: var(--text-muted);
    font-size: 0.58rem;
}
.sidebar-dl-count {
    color: var(--accent-light);
    font-weight: 700;
    font-size: 0.58rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.sidebar-dl-count i { font-size: 0.55rem; }

/* Sidebar Action Buttons */
.sidebar-track-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.sidebar-track:hover .sidebar-track-actions {
    opacity: 1;
}
.sidebar-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sidebar-btn-play:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.15);
    box-shadow: 0 3px 10px var(--accent-glow);
}
.sidebar-btn-dl:hover {
    background: rgba(108,92,231,0.15);
    color: var(--accent-light);
    border-color: rgba(108,92,231,0.3);
    transform: scale(1.1);
}
.sidebar-btn-lock {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}
.sidebar-btn.played {
    background: rgba(0,184,148,0.12) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}
.sidebar-btn.played:hover {
    background: var(--success) !important;
    color: #fff !important;
}

/* Sidebar skeleton loading */
@keyframes skeleton-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.sidebar-skeleton {
    pointer-events: none;
}
.sidebar-skeleton .skeleton-rank,
.sidebar-skeleton .skeleton-line,
.sidebar-skeleton .skeleton-btn {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}
.skeleton-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
    flex-shrink: 0;
}
.skeleton-line.skeleton-title {
    width: 75%;
    height: 13px;
    margin-bottom: 6px;
}
.skeleton-line.skeleton-meta {
    width: 50%;
    height: 10px;
}
.skeleton-btn {
    width: 28px;
    height: 28px;
    border-radius: 50% !important;
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 18, 0.97);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}
.loading-overlay.hide-out {
    opacity: 0;
    visibility: hidden;
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Vinyl disc loader */
.rpool-vinyl-loader {
    position: relative;
    width: 90px;
    height: 90px;
}
.vinyl-disc {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #1a1a28, #2d2d4a, #1a1a28, #2d2d4a, #1a1a28);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .25), inset 0 0 0 18px rgba(0,0,0,.5);
    animation: vinylSpin 1.6s linear infinite;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vinyl-label {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #6c5ce7), #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(108, 92, 231, .5);
    z-index: 1;
}
.vinyl-label i {
    font-size: 18px;
    color: #fff;
}
.vinyl-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, .2) 0%, transparent 70%);
    opacity: .6;
}

.loading-text {
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 4px;
    opacity: .9;
}

/* Bouncing dots */
.loading-dots {
    display: flex;
    gap: 6px;
}
.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #6c5ce7);
    animation: dotBounce .6s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes vinylSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes vinylPulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50%      { opacity: .8; transform: scale(1.1); }
}
@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .4; }
    40%           { transform: translateY(-8px); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disabled Download */
.btn-download:disabled,
.btn-download-modern:disabled,
button[onclick*="downloadTrack"]:disabled {
    background: var(--bg-card) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Download in progress */
.download-in-progress {
    position: relative;
    overflow: hidden;
}

.download-in-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: downloadProgress 2s infinite;
}

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

/* Spinning animation for Bootstrap Icons */
.spinning {
    display: inline-block;
    animation: spinIcon 1s linear infinite;
}

@keyframes spinIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

