:root {
    --bg-main: #06050c; /* Deeper midnight black with a violet cast */
    --bg-sidebar: #030206; /* Darker sidebar */
    --bg-card: rgba(18, 14, 36, 0.45); /* Richer glassmorphic cards */
    --bg-card-hover: rgba(30, 24, 58, 0.65);
    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-glow: rgba(236, 72, 153, 0.25); /* Hot Pink Glow */
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --accent: #ec4899; /* Cyberpunk Pink */
    --accent-glow: rgba(236, 72, 153, 0.4);
    --accent-hover: #db2777;
    
    --accent-green: #10b981;
    --accent-cyan: #06b6d4; /* Neon Cyan */
    --accent-cyan-glow: rgba(6, 182, 212, 0.4);
    --accent-purple: #8b5cf6; /* Cyberpunk Purple */
    --accent-purple-glow: rgba(139, 92, 246, 0.4);
    --accent-gold: #fde047; /* Challenge gold */
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 280px;
    --player-height: 190px;
    
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Alternate Theme: Emerald / Gold / Orange Cyber Theme */
body.theme-alt {
    --bg-main: #020806; /* Dark forest/emerald cast */
    --bg-sidebar: #010403;
    --bg-card: rgba(6, 25, 18, 0.45);
    --bg-card-hover: rgba(12, 45, 34, 0.65);
    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-glow: rgba(16, 185, 129, 0.25); /* Emerald Glow */
    
    --accent: #10b981; /* Emerald Green */
    --accent-glow: rgba(16, 185, 129, 0.4);
    --accent-hover: #059669;
    
    --accent-cyan: #eab308; /* Bright Gold */
    --accent-cyan-glow: rgba(234, 179, 8, 0.4);
    --accent-purple: #f97316; /* Neon Orange */
    --accent-purple-glow: rgba(249, 115, 22, 0.4);
    --accent-gold: #f43f5e; /* Rose Red Challenge */
}

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

body {
    font-family: var(--font-family);
    background-color: #040209;
    background-image: 
        radial-gradient(circle at 0% 0%, var(--accent-cyan-glow) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, var(--accent-glow) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, var(--accent-purple-glow) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* App Container Layout */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr var(--player-height);
    height: 100vh;
    width: 100vw;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Sidebar Styling
   ========================================================================== */
.sidebar {
    background-color: rgba(3, 2, 6, 0.75);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

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

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
    transform: scale(1.05);
}

.theme-toggle-btn i {
    width: 18px;
    height: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--accent-purple-glow));
}

.logo-icon {
    color: var(--accent);
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 8px var(--accent-glow)) drop-shadow(0 0 2px var(--accent-cyan));
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

#clear-search {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#clear-search:hover {
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* Navigation Tree (Accordion-style folders) */
.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-shuffle-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(236, 72, 153, 0.08) 100%);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.06);
    transition: var(--transition-fast);
}

.btn-shuffle-all:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22) 0%, rgba(236, 72, 153, 0.15) 100%);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.15);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-shuffle-all i {
    width: 16px;
    height: 16px;
}

.btn-shuffle-all.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(6, 182, 212, 0.06);
    animation: shuffle-pulse 2s ease-in-out infinite;
}

@keyframes shuffle-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(6, 182, 212, 0.06); }
    50% { box-shadow: 0 0 28px rgba(6, 182, 212, 0.35), inset 0 0 15px rgba(6, 182, 212, 0.1); }
}

.library-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.year-node {
    margin-bottom: 8px;
}

.year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.year-header:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.year-header i {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.year-header.open i {
    transform: rotate(90deg);
}

.month-list {
    margin-top: 4px;
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.year-node.open .month-list {
    max-height: 400px; /* Large enough to hold months */
    overflow-y: visible;
}

.month-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.month-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.month-item.active {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(236, 72, 153, 0.02) 100%);
    border-left: 3px solid var(--accent-cyan);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.1);
    padding-left: 9px; /* Adjust padding to compensate for 3px border */
}

.month-item i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Main Display Content
   ========================================================================== */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 32px;
    overflow-y: auto;
    background: transparent;
}

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

.header-info .subtitle {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 6px;
    display: inline-block;
}

.header-info h1 {
    font-size: 42px; /* Made slightly larger for prominence */
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.25)) drop-shadow(0 0 2px rgba(236, 72, 153, 0.15));
    display: inline-block;
}

.header-info .meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:not(:disabled):hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:not(:disabled):hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-stream {
    background-color: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.08);
}

.btn-stream:hover {
    background-color: rgba(255, 0, 0, 0.22);
    border-color: rgba(255, 0, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.2);
    color: #ff6666;
}

/* Grid Layout */
.view-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    flex-grow: 1;
    min-height: 0; /* Important for flex-scroll child behavior */
}

/* Panel Design */
.panel {
    background-color: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(24px) saturate(180%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.panel:hover {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), 0 0 15px rgba(6, 182, 212, 0.05);
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.count-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* Tracklist Table */
.tracklist-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px;
}

.tracklist-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.tracklist-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tracklist-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
    transition: var(--transition-fast);
}

.tracklist-row {
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tracklist-row:hover {
    background-color: var(--bg-card-hover);
}

.tracklist-row.active {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(236, 72, 153, 0.01) 100%);
    border-left: 2px solid var(--accent-cyan);
}

.tracklist-row.active td {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.tracklist-row.active .col-num {
    color: var(--accent-cyan);
    font-weight: 700;
}

.col-num {
    width: 50px;
    color: var(--text-muted);
    text-align: center;
}

.col-title {
    font-weight: 600;
}

.col-artist {
    color: var(--text-secondary);
}

.col-action {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

.row-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
    vertical-align: middle;
    margin-right: 14px;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.05);
}

.row-link-btn:hover {
    background-color: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
    transform: translateY(-1px);
    color: #ffffff;
}

.row-link-btn i, .row-link-btn svg {
    width: 16px;
    height: 16px;
}

.row-play-btn {
    background: none;
    border: none;
    color: var(--accent-cyan);
    opacity: 0;
    cursor: pointer;
    transition: var(--transition-fast);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tracklist-row:hover .row-play-btn {
    opacity: 1;
}

.row-play-btn:hover {
    transform: scale(1.2);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    stroke-width: 1.5px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Visualization Panel */
.visualizer-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(5, 7, 14, 0.6);
    overflow: hidden;
}

#visualizer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.select-mode {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.select-mode:focus {
    border-color: var(--accent);
}

/* Fallback Card when no visualizer active */
.visualizer-fallback-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    padding: 32px;
    transition: opacity 0.5s ease;
}

.vinyl-disc {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #222 20%, #111 21%, #111 25%, #222 26%, #0c0c0c 70%, #000 100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255,255,255,0.1) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: rotate 12s linear infinite;
    animation-play-state: paused;
}

.vinyl-disc.playing {
    animation-play-state: running;
    box-shadow: 0 0 35px var(--border-color-glow), 0 0 1px 1px rgba(255,255,255,0.1) inset;
}

.vinyl-label {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-label::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--bg-main);
    border-radius: 50%;
}

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

.fallback-track-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.fallback-track-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Player Control Bar (Footer)
   ========================================================================== */
.player-bar {
    background-color: rgba(3, 2, 6, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    align-items: center;
    padding: 0 40px;
    z-index: 10;
    height: var(--player-height);
    grid-column: 1 / -1;
}

.player-bar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.player-bar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.player-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Now Playing Info */
.now-playing-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.now-playing-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.now-playing-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-disc-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.center-track-info {
    text-align: center;
    max-width: 600px;
}

.now-playing-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: var(--transition-fast);
}

.now-playing-title.has-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--accent);
}

.now-playing-title.has-link:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.now-playing-artist {
    font-size: 16px;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Controls */
.control-buttons-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.ctrl-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.ctrl-btn i {
    width: 22px;
    height: 22px;
}

.ctrl-btn-main {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent) 100%);
    color: white;
    width: 52px;
    height: 52px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.45), 0 0 4px rgba(236, 72, 153, 0.45);
    border: none;
}

.ctrl-btn-main:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.7), 0 0 8px rgba(236, 72, 153, 0.7);
    color: white;
}

.ctrl-btn-main i {
    width: 22px;
    height: 22px;
}

.ctrl-btn.active {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.5));
}

/* Progress Slider */
.progress-bar-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px;
    gap: 16px;
}

.time-label {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    min-width: 35px;
}

.progress-slider {
    flex-grow: 1;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    position: relative;
    transition: height var(--transition-fast);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent) 100%);
    border-radius: 6px;
    width: 0%;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.progress-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: opacity var(--transition-fast);
}

.progress-slider:hover .progress-handle {
    opacity: 1;
}

.progress-slider:hover .progress-track {
    height: 14px;
}

/* Volume Slider */
.player-settings {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.volume-slider {
    width: 100px;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.volume-track {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
}

.volume-fill {
    height: 100%;
    background-color: var(--text-primary);
    border-radius: 2px;
}

.volume-slider:hover .volume-track {
    height: 6px;
}

.volume-slider:hover .volume-fill {
    background-color: var(--accent-cyan);
}

/* Standard progress bar time label overrides */
.progress-bar-container .time-label {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}

/* Metadata Dashboard Card */
.metadata-card {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 2.3fr;
    gap: 24px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 28px;
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(139, 92, 246, 0.1) inset;
    transition: var(--transition-normal);
}

.metadata-card:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(236, 72, 153, 0.1) inset;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent); /* Pink label */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

.meta-label i {
    width: 14px;
    height: 14px;
    color: var(--accent-cyan);
}

.meta-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

.challenge-item .meta-val {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

/* View Toggles */
.view-toggles {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.nav-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.nav-tab.active {
    color: #ffffff;
    background: var(--btn-gradient);
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-tab i {
    width: 14px;
    height: 14px;
}

/* UMAP Panel */
.umap-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
}

.umap-layout-wrapper {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex: 1;
    min-height: 450px;
    overflow: hidden;
}

.umap-plot-wrapper {
    flex: 3;
    min-height: 450px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

#umap-plot-div {
    width: 100%;
    height: 100%;
}

/* Sidebar styles */
.umap-sidebar {
    flex: 1;
    max-width: 300px;
    background: rgba(18, 18, 24, 0.45);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    height: 100%;
}

.sidebar-search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-search-box input:focus {
    border-color: var(--primary-color);
}

.artist-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.artist-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.artist-legend-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.artist-legend-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-weight: 500;
}

.artist-legend-left {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-color-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    flex-shrink: 0;
}

.artist-track-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

.clear-btn {
    width: 100%;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.clear-btn.hidden {
    display: none;
}

.umap-plot-wrapper {
    position: relative;
}

.umap-pulse-ring {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px var(--accent), inset 0 0 10px var(--accent);
    animation: umap-glow-pulse 1.8s infinite ease-in-out;
    z-index: 10;
}

.umap-pulse-ring.hidden {
    display: none;
}

@keyframes umap-glow-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.2;
        box-shadow: 0 0 4px var(--accent);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.9;
        box-shadow: 0 0 16px var(--accent), inset 0 0 8px var(--accent);
    }
    100% {
        transform: translate(-50%, -50%) scale(2.0);
        opacity: 0;
        box-shadow: 0 0 24px var(--accent);
    }
}

.footer-credit {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.03em;
    transition: var(--transition-fast);
    white-space: nowrap;
    opacity: 0.7;
}

.footer-credit:hover {
    color: var(--accent);
    opacity: 1.0;
}

/* Password Protection Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0e0a24 0%, #040308 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.password-card {
    background: rgba(18, 14, 36, 0.7);
    border: 1px solid var(--border-color-glow);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(236, 72, 153, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.password-card .lock-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 8px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.password-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin: 0;
}

.password-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.password-card form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 8px;
}

.password-card input[type="password"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    text-align: center;
    transition: var(--transition-fast);
}

.password-card input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

.btn-login {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-login:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.password-error {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 100%;
}

