
        /* Modern Typography */
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');
        
        :root {
            --gradient-1: #7c3aed;
            --gradient-2: #1e40af;
            --gradient-3: #db2777;
            --gradient-4: #06b6d4;
            --accent: #a855f7;
            --accent-2: #ec4899;
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.18);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        /* Animated Gradient Background */
        body {
            font-family: 'Inter', 'Poppins', system-ui, sans-serif;
            background: #0a0a0a;
            color: #e5e5e5;
            position: relative;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(125deg, var(--gradient-1) 0%, var(--gradient-2) 25%, var(--gradient-3) 50%, var(--gradient-4) 75%, var(--gradient-1) 100%);
            background-size: 400% 400%;
            animation: gradientShift 90s ease infinite;
            opacity: 0.15;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            top: -50%; left: -50%;
            width: 200%; height: 200%;
            background: radial-gradient(circle at 20% 50%, var(--accent) 0%, transparent 50%),
                        radial-gradient(circle at 80% 80%, var(--accent-2) 0%, transparent 50%),
                        radial-gradient(circle at 40% 20%, var(--gradient-4) 0%, transparent 50%);
            animation: floatOrbs 120s ease-in-out infinite;
            opacity: 0.05;
            z-index: 0;
            pointer-events: none;
        }

        @keyframes gradientShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        @keyframes floatOrbs {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            33% { transform: translate(30px, -30px) rotate(120deg); }
            66% { transform: translate(-20px, 20px) rotate(240deg); }
        }

        /* Glassmorphism */
        .glass {
            background: var(--glass-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--glass-border);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
        }

        .sidebar {
            position: relative;
            z-index: 10;
            background: rgba(10, 10, 10, 0.5);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-right: 1px solid var(--glass-border);
            animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .main-content {
            position: relative;
            z-index: 10;
            background: transparent;
        }

        .player {
            background: rgba(10, 10, 10, 0.8) !important;
            backdrop-filter: blur(30px) !important;
            -webkit-backdrop-filter: blur(30px) !important;
            border-top: 1px solid var(--glass-border) !important;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
            animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .player.clickable { cursor: pointer; }

        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 12px; height: 12px; }
        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 6px;
        }
        ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            border-radius: 6px;
            border: 2px solid rgba(10, 10, 10, 0.8);
        }
        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, var(--accent-2), var(--accent));
        }

        /* Enhanced Card Hover - Frameless Design */
        .card-hover {
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: none;
            border-radius: 16px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .card-hover:hover {
            transform: translateY(-8px) scale(1.02);
            background: rgba(255, 255, 255, 0.05);
            box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3),
                        0 10px 30px rgba(0, 0, 0, 0.2);
        }
        
        /* Frameless Card Style */
        .frameless-card {
            background: transparent;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: none;
            outline: none;
            border-radius: 16px;
            padding: 16px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        .frameless-card:hover {
            transform: translateY(-6px);
            background: rgba(255, 255, 255, 0.03);
            box-shadow: 0 12px 32px rgba(168, 85, 247, 0.25),
                        0 8px 20px rgba(0, 0, 0, 0.2);
        }

        .card-hover:hover .play-button {
            opacity: 1;
            transform: translateY(0) scale(1.1) rotate(-5deg);
        }

        .play-button {
            opacity: 0;
            transform: translateY(10px) scale(0.9);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
            box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
        }

        #progressBar::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            border-radius: 50%;
            cursor: pointer;
            margin-top: -5px;
            box-shadow: 0 2px 10px rgba(168, 85, 247, 0.5);
            transition: all 0.2s ease;
        }

        #progressBar::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 3px 15px rgba(168, 85, 247, 0.7);
        }
        /* Enhanced Loader with Gradient */
        .loader { display: inline-flex; gap: 6px; align-items: flex-end; height: 50px; }
        .loader span { 
            width: 8px; 
            background: linear-gradient(to top, var(--accent), var(--accent-2));
            border-radius: 4px; 
            animation: eq 0.8s ease-in-out infinite;
            box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
        }
        .loader span:nth-child(2) { animation-delay: 80ms; }
        .loader span:nth-child(3) { animation-delay: 160ms; }
        .loader span:nth-child(4) { animation-delay: 240ms; }
        .loader span:nth-child(5) { animation-delay: 320ms; }
        @keyframes eq { 
            0%, 100% { height: 10px; opacity: 0.5; transform: scaleY(1); }
            50% { height: 40px; opacity: 1; transform: scaleY(1.2); }
        }
        /* Enhanced Fullscreen Player */
        .fs-overlay {
            position: fixed;
            inset: 0;
            background: radial-gradient(1200px 800px at 50% -20%, rgba(168, 85, 247, 0.2), transparent 60%), 
                        rgba(10, 10, 10, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            display: none;
            z-index: 50;
            color: #f5f5f5;
        }
        .fs-overlay.active { 
            display: flex;
            animation: fadeIn 0.3s ease;
        }
        .fs-content {
            margin: auto;
            width: min(100%, 1100px);
            padding: 24px;
            display: grid;
            grid-template-columns: 1fr;
            gap: 24px;
            animation: fs-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Fullscreen blurred background container (behind fs-content) */
        .fs-bg {
            position: absolute;
            inset: 0;
            z-index: 1;
            overflow: hidden;
            pointer-events: none;
        }
        .fs-bg-image {
            position: absolute;
            left: -10%;
            top: -10%;
            width: 120%;
            height: 120%;
            background-size: cover;
            background-position: center;
            filter: blur(28px) saturate(1.05);
            transform: scale(1);
            opacity: 0;
            transition: opacity 420ms ease, filter 300ms ease;
            will-change: transform, opacity;
            animation: fs-slow-zoom 30s linear infinite;
        }
        .fs-bg::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(0,0,0,0.30), rgba(0,0,0,0.55));
            z-index: 2;
            pointer-events: none;
        }
        /* ensure the visual content sits above the blurred background */
        .fs-content { position: relative; z-index: 3; }

        @keyframes fs-slow-zoom {
            0% { transform: scale(1); }
            100% { transform: scale(1.06); }
        }

        /* Respect users who prefer reduced motion */
        @media (prefers-reduced-motion: reduce) {
            .fs-bg-image { animation: none; transition: opacity 220ms linear; }
        }

        /* Mobile performance: reduce blur & disable heavy animation */
        @media (max-width: 768px) {
            .fs-bg-image { filter: blur(14px) saturate(1); animation: none; }
        }
        @keyframes fs-fade-in { 
            from { 
                opacity: 0; 
                transform: translateY(20px) scale(0.95);
            } 
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1);
            }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .fs-art {
            width: min(85vw, 520px);
            height: min(85vw, 520px);
            margin: 0 auto;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 30px 80px rgba(168, 85, 247, 0.3),
                        0 0 0 1px var(--glass-border);
            transform: translateZ(0);
            transition: transform 0.3s ease;
        }
        .fs-art:hover {
            transform: scale(1.02);
        }
        .fs-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .fs-title { font-size: clamp(20px, 4vw, 36px); font-weight: 700; }
    .fs-sub { color: #bdbdbd; margin-top: 4px; font-size: clamp(12px, 2.5vw, 14px); }

        /* Truncation: single-line title, two-line artist with ellipsis */
        #fsTitle {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: left;
        }
        #fsArtist {
            display: -webkit-box;
            -webkit-line-clamp: 2; /* limit to 2 lines */
            line-clamp: 2; /* standard property for better compatibility */
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: left;
        }
        .fs-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
        .fs-transport { display: flex; justify-content: center; gap: 16px; }
        .btn-round { 
            width: 56px;
            height: 56px;
            border-radius: 9999px;
            display: grid;
            place-items: center;
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .btn-round:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
        }
        .btn-round:active {
            transform: translateY(0) scale(0.98);
        }
        
        /* Progress bar and volume slider styles */
        .fs-slider { 
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 4px;
            margin: 0 12px;
            border-radius: 9999px;
            background: linear-gradient(90deg, #FACC15 var(--val,0%), #3a3a3a var(--val,0%));
            outline: none;
            transition: background 0.1s ease;
        }
        .fs-slider::-webkit-slider-runnable-track { 
            height: 4px;
            border-radius: 9999px;
        }
        .fs-slider::-webkit-slider-thumb { 
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 0 0 4px rgba(250,204,21,0.12);
            cursor: pointer;
            margin-top: -4px;
            transition: box-shadow 0.2s ease;
        }
        .fs-slider::-moz-range-track { 
            height: 4px;
            border-radius: 9999px;
            background: #3a3a3a;
        }
        .fs-slider::-moz-range-progress { 
            height: 4px;
            border-radius: 9999px;
            background: #FACC15;
        }
        .fs-slider::-moz-range-thumb { 
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            border: none;
            box-shadow: 0 0 0 4px rgba(250,204,21,0.12);
            cursor: pointer;
            transition: box-shadow 0.2s ease;
        }
        .fs-slider:hover::-webkit-slider-thumb {
            box-shadow: 0 0 0 6px rgba(250,204,21,0.2);
        }
        .fs-slider:hover::-moz-range-thumb {
            box-shadow: 0 0 0 6px rgba(250,204,21,0.2);
        }

        /* PATCH: Make header layout resilient and left-aligned */
        .fs-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .fs-header > div:first-child {
            flex: 1;          /* take available space */
            min-width: 0;     /* IMPORTANT: allows ellipsis to work */
            overflow: hidden; /* prevents pushing buttons */
            text-align: left;
        }
        .fs-close { background: transparent; color: #e0e0e0; border: 1px solid #3a3a3a; padding: 8px 12px; border-radius: 9999px; }
        
        @media (min-width: 768px) {
            .fs-content { grid-template-columns: 1fr 1.2fr; align-items: center; }
            .fs-art { width: min(40vw, 520px); height: min(40vw, 520px); }
        }
        /* Mobile responsiveness for fs-header: stack text above and keep buttons visible on the right */
        @media (max-width: 768px) {
            .fs-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .fs-header > div:last-child {
                align-self: flex-end; /* keep buttons to the right */
            }
            /* Allow title to wrap on very narrow screens while keeping buttons visible */
            #fsTitle { white-space: normal; }
        }

        /* General text handling inside flex items to prevent layout breaks */
        .flex-text-safe {
            flex: 1;
            min-width: 0; /* critical inside flex */
            overflow: hidden;
        }

        /* Song title: single-line ellipsis */
        .song-title {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Volume control styling */
        input[type="range"]#volumeControl,
        input[type="range"]#fsVolume {
            -webkit-appearance: none;
            appearance: none;
            height: 4px;
            border-radius: 9999px;
            background: linear-gradient(90deg, #FACC15 var(--vol,100%), #3a3a3a var(--vol,100%));
            outline: none;
            transition: background 0.1s ease;
        }
        
        input[type="range"]#volumeControl::-webkit-slider-thumb,
        input[type="range"]#fsVolume::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            cursor: pointer;
            box-shadow: 0 0 0 4px rgba(250,204,21,0.12);
            transition: box-shadow 0.2s ease;
        }
        
        input[type="range"]#volumeControl::-moz-range-track,
        input[type="range"]#fsVolume::-moz-range-track {
            height: 4px;
            border-radius: 9999px;
            background: #3a3a3a;
        }
        
        input[type="range"]#volumeControl::-moz-range-progress,
        input[type="range"]#fsVolume::-moz-range-progress {
            height: 4px;
            border-radius: 9999px;
            background: #FACC15;
        }
        
        input[type="range"]#volumeControl::-moz-range-thumb,
        input[type="range"]#fsVolume::-moz-range-thumb {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #fff;
            border: none;
            cursor: pointer;
            box-shadow: 0 0 0 4px rgba(250,204,21,0.12);
            transition: box-shadow 0.2s ease;
        }

        input[type="range"]#volumeControl:hover::-webkit-slider-thumb,
        input[type="range"]#fsVolume:hover::-webkit-slider-thumb {
            box-shadow: 0 0 0 6px rgba(250,204,21,0.2);
        }

        input[type="range"]#volumeControl:hover::-moz-range-thumb,
        input[type="range"]#fsVolume:hover::-moz-range-thumb {
            box-shadow: 0 0 0 6px rgba(250,204,21,0.2);
        }

        /* Song details / artists: max 2 lines with ellipsis */
        .song-details {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Search / list row layout */
        .search-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(5px);
            border: 1px solid transparent;
            border-radius: 12px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .search-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
            transition: left 0.5s ease;
        }
        
        .search-item:hover::before {
            left: 100%;
        }
        
        .search-item:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--glass-border);
            transform: translateX(4px);
        }
        .search-thumbnail {
            flex: none;
            width: 40px;
            height: 40px;
        }
        .search-text {
            flex: 1;
            min-width: 0; /* ensures text doesn’t overflow */
            overflow: hidden;
        }
        .search-duration {
            flex: none;
            width: 50px;
            text-align: right;
        }

        /* Bottom progress bar: sleek thin track with visible filled portion and larger thumb for touch */
        input#progressBar {
            /* thinner track */
            height: 5px; /* 4-6px desired */
            --progress: 0%; /* will be updated by JS */
            appearance: none;
            -webkit-appearance: none;
            background: linear-gradient(90deg, #ff007f var(--progress), #444 var(--progress));
            border-radius: 9999px;
            outline: none;
            cursor: pointer;
        }

        /* WebKit / Blink track & thumb */
        input#progressBar::-webkit-slider-runnable-track {
            height: 5px;
            background: transparent; /* use parent's background via the input itself */
            border-radius: 9999px;
        }
        input#progressBar::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px; /* slightly larger for touch */
            height: 18px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.35);
            margin-top: -6.5px; /* vertically center thumb on 5px track (half thumb minus half track) */
            transition: transform 120ms ease;
        }
        input#progressBar::-webkit-slider-thumb:active { transform: scale(0.98); }

        /* Firefox track / thumb */
        input#progressBar::-moz-range-track {
            height: 5px;
            background: linear-gradient(90deg, #ff007f var(--progress), #444 var(--progress));
            border-radius: 9999px;
        }
        input#progressBar::-moz-range-progress {
            background: transparent; /* handled by track background using --progress */
        }
        input#progressBar::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.35);
            border: none;
        }

        /* Focus state */
        input#progressBar:focus { box-shadow: 0 0 0 6px rgba(255,0,127,0.06); }

        /* Modern Accent Colors */
        .btn-primary { 
            background: linear-gradient(135deg, var(--accent), var(--accent-2)); 
            color: #fff;
            border: none;
            box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
            transition: all 0.3s ease;
        }
        .btn-primary:hover { 
            background: linear-gradient(135deg, var(--accent-2), var(--accent));
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
        }
        .spinner { 
            border-top-color: var(--accent);
            filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
        }
        .tab-button.active { 
            border-bottom-color: var(--accent);
            color: #fff;
        }

        /* PATCH: Collapse button (top-left) styling */
        #fsCollapseBtn {
            position: absolute;
            left: 12px;
            top: 12px;
            z-index: 20;
            background: none;
            border: none;
            box-shadow: none;
            color: rgba(255, 255, 255, 0.9);
            padding: 10px;
            cursor: pointer;
            border-radius: 9999px;
            transition: background .2s ease;
        }
        #fsCollapseBtn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* Video play button logo animation (single, amber-themed) */
        .video-logo {
            display:inline-block;
            width:18px;
            height:18px;
            margin-right:6px;
            background: radial-gradient(circle at 30% 30%, #FACC15 0%, #F6C84D 60%);
            border-radius:4px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.6) inset;
            position:relative;
            vertical-align:middle;
            transform-origin:center;
        }
        .video-logo::after {
            content:'';
            position:absolute;
            left:6px; top:3px;
            width:0; height:0; border-left:7px solid #000; border-top:5px solid transparent; border-bottom:5px solid transparent;
        }
        .video-logo.spin { animation: spin 900ms linear infinite; }

        /* Slide-to-close helpers */
        .fs-content { will-change: transform; transition: transform 180ms ease; }
        .fs-overlay.closing .fs-content { transform: translateY(100vh); transition: transform 240ms ease; }

        /* Seek toast */
        .fs-seek-toast {
            position: absolute;
            left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9);
            background: rgba(0,0,0,0.6); color: #fff; padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity 220ms ease, transform 220ms ease;
        }
        .fs-seek-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

        /* PATCH: Thumbnail slide animations */
        .fs-art-viewport { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; transform: translateZ(0); }
        .fs-art-frame { position: absolute; inset: 0; transition: transform 300ms ease-out; }
        .fs-art-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .to-left { transform: translateX(-100%); }
        .to-right { transform: translateX(100%); }
        .at-center { transform: translateX(0); }

        /* Mobile-optimized playlist add item */
        .playlist-add-item {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .item-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        @media (max-width: 768px) {
            .search-item {
                align-items: flex-start;
            }
            .search-text {
                display: flex;
                flex-direction: column;
            }
            .playlist-add-item {
                flex-wrap: wrap;
                align-items: flex-start;
            }
            .item-actions {
                width: 100%;
                margin-top: 8px;
                justify-content: flex-end;
                padding-right: 4px;
            }
        }

        .mobile-menu {
            display: none;
        }
        @media (max-width: 768px) {
            .sidebar {
                display: none;
            }
            .mobile-menu {
                display: flex;
            }
            .player {
                padding: 10px;
            }
            .player > div {
                width: 100% !important;
                margin-bottom: 5px;
            }
            .player-controls {
                order: 2;
                width: 100%;
            }
            /* Hide the transport buttons and progress bar in the bottom player on small screens only */
            .player-controls { display: block; }
            .player-controls .flex.items-center:first-child { display: none; } /* transport buttons row */
            .player-controls .flex.items-center.w-full.max-w-lg { display: none; } /* progress row */
            /* Keep the player-info (art/title) visible on mobile per request */
            .player-info {
                order: 1;
                width: 100%;
            }
            .player-actions {
                order: 3;
                width: 100%;
                justify-content: center;
            }
            /* hide only the volume control in the bottom player on mobile */
            .player-actions input#volumeControl { display: none; }
            .safe-area-bottom { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
        }
        /* Enhanced Dropdown with Glassmorphism */
        .dropdown {
            position: relative;
            display: inline-block;
        }
        .dropdown-content {
            display: none;
            position: absolute;
            background: rgba(20, 20, 20, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            min-width: 200px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            z-index: 40;
            border-radius: 12px;
            overflow: hidden;
            right: 0;
            top: auto;
            bottom: 100%;
            transform: translateY(-8px);
            animation: dropdownFade 0.3s ease;
        }
        @keyframes dropdownFade {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(-8px);
            }
        }
        .dropdown-content a {
            color: #e0e0e0;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
            font-size: 14px;
            transition: all 0.2s ease;
        }
        .dropdown-content a:hover {
            background: rgba(168, 85, 247, 0.2);
            padding-left: 20px;
        }
        .dropdown:hover .dropdown-content {
            display: block;
        }
        /* Enhanced Tab Buttons */
        .tab-button {
            padding: 12px 24px;
            background: transparent;
            border: none;
            color: #a3a3a3;
            font-family: 'Poppins', sans-serif;
            font-weight: 500;
            border-bottom: 2px solid transparent;
            cursor: pointer;
            position: relative;
            transition: all 0.3s ease;
        }
        .tab-button::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            transform: translateX(-50%);
            transition: width 0.3s ease;
        }
        .tab-button:hover {
            color: #e5e5e5;
        }
        .tab-button.active {
            color: white;
        }
        .tab-button.active::after {
            width: 100%;
        }
        /* Enhanced Song Items */
        .song-item {
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(5px);
            border: 1px solid transparent;
            transition: all 0.3s ease;
            border-radius: 12px;
            position: relative;
            overflow: hidden;
        }
        .song-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
            transition: left 0.5s ease;
        }
        .song-item:hover::before {
            left: 100%;
        }
        .song-item:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--glass-border);
            transform: translateX(4px);
        }
        /* Play/Pause pulse animation */
        .pulse-once { animation: pulse-scale 180ms ease-out; }
        @keyframes pulse-scale { from { transform: scale(0.95);} to { transform: scale(1);} }
        
        /* Enhanced Search Type Selector */
        .search-type-selector {
            display: flex;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 4px;
            margin-left: 12px;
        }

        /* Hidden by default; will be revealed when search input focused or has text */
        .search-type-selector {
            transition: opacity 200ms ease, transform 200ms ease, max-height 220ms ease;
            opacity: 0;
            transform: translateY(-6px);
            max-height: 0;
            overflow: hidden;
        }
        .search-type-selector.visible {
            opacity: 1;
            transform: translateY(0);
            max-height: 64px;
        }

        /* Make the search input expand comfortably across available header space */
        .search-area { max-width: 900px; margin: 0 auto; }
        .search-input { width: 100% !important; }
        .search-type-btn {
            padding: 6px 12px;
            border-radius: 16px;
            background: transparent;
            color: #b3b3b3;
            border: none;
            cursor: pointer;
            font-size: 12px;
            font-family: 'Inter', sans-serif;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .search-type-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: var(--accent);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.3s, height 0.3s;
        }
        .search-type-btn:hover {
            color: white;
        }
        .search-type-btn.active {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #fff;
            font-weight: 600;
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
        }
        
        /* Spinner for download */
        .spinner {
            width: 16px;
            height: 16px;
            border: 2px solid #3a3a3a;
            border-top: 2px solid #FACC15;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* "Another video?" prompt */
        .yt-another-prompt {
            position: absolute;
            right: 12px;
            top: 48px;
            z-index: 6;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #fff;
            border: none;
            padding: 8px 12px;
            border-radius: 9999px;
            font-weight: 700;
            font-family: 'Inter', sans-serif;
            box-shadow: 0 10px 30px rgba(168,85,247,0.35);
            cursor: pointer;
            animation: ytPulse 1.2s ease-in-out infinite;
        }
        @keyframes ytPulse {
            0%, 100% { transform: translateY(0); box-shadow: 0 10px 30px rgba(168,85,247,0.35); }
            50% { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(168,85,247,0.5); }
        }
        /* Enhanced Modal with Glassmorphism */
        .modal-backdrop {
            position: fixed; 
            inset: 0; 
            background: rgba(10, 10, 10, 0.8); 
            backdrop-filter: blur(10px);
            display: none; 
            z-index: 60; 
            align-items: center; 
            justify-content: center;
        }
        .modal-backdrop.active { 
            display: flex;
            animation: fadeIn 0.3s ease;
        }
        .modal-card { 
            background: rgba(20, 20, 20, 0.95); 
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid var(--glass-border); 
            padding: 24px; 
            border-radius: 16px; 
            width: min(700px, 95%); 
            color: #e6e6e6; 
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-20px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        .modal-card h3 { margin-bottom: 8px; font-size: 1.25rem; }
        .modal-row { display:flex; gap:8px; align-items:center; }
        .modal-input { 
            width: 100%; 
            padding: 12px 16px; 
            border-radius: 10px; 
            background: rgba(255, 255, 255, 0.05); 
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border); 
            color: #e6e6e6;
            font-family: 'Inter', sans-serif;
            transition: all 0.3s ease;
        }
        .modal-input:focus {
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
            outline: none;
        }
        .modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }
        .btn-ghost { background: transparent; border: 1px solid #333; color:#e6e6e6; padding:8px 12px; border-radius:8px; }
        .btn-primary-small { background: #FACC15; color: #000; padding:8px 12px; border-radius:8px; border: none; }
        /* Music Visualizer Animation */
        .music-visualizer {
            display: none;
            position: absolute;
            bottom: 10px;
            right: 10px;
            height: 30px;
            gap: 3px;
            align-items: flex-end;
        }
        .music-visualizer.active {
            display: flex;
        }
        .music-bar {
            width: 4px;
            background: linear-gradient(to top, var(--accent), var(--accent-2));
            border-radius: 2px;
            animation: musicWave 1s ease-in-out infinite;
        }
        .music-bar:nth-child(1) { animation-delay: 0s; height: 10px; }
        .music-bar:nth-child(2) { animation-delay: 0.1s; height: 20px; }
        .music-bar:nth-child(3) { animation-delay: 0.2s; height: 15px; }
        .music-bar:nth-child(4) { animation-delay: 0.3s; height: 25px; }
        .music-bar:nth-child(5) { animation-delay: 0.4s; height: 18px; }
        @keyframes musicWave {
            0%, 100% { height: 10px; opacity: 0.5; }
            50% { height: 30px; opacity: 1; }
        }

        /* Enhanced Typography */
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Poppins', sans-serif;
            font-weight: 700;
            line-height: 1.2;
            letter-spacing: -0.02em;
        }
        h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
        h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
        h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }

        /* Enhanced Sidebar Navigation */
        .sidebar nav a {
            position: relative;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border-radius: 12px;
            padding: 12px 16px;
            margin: 4px 0;
            overflow: hidden;
        }
        .sidebar nav a::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            opacity: 0.1;
            transition: width 0.3s ease;
            z-index: -1;
        }
        .sidebar nav a:hover::before {
            width: 100%;
        }
        .sidebar nav a:hover {
            transform: translateX(4px);
            color: var(--accent);
        }

        /* Header Enhancement */
        header {
            background: rgba(10, 10, 10, 0.3) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border-bottom: 1px solid var(--glass-border);
            animation: slideInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Enhanced Search Input */
        input[type="text"], .search-input {
            background: rgba(255, 255, 255, 0.05) !important;
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            transition: all 0.3s ease;
            font-family: 'Inter', sans-serif;
        }
        input[type="text"]:focus, .search-input:focus {
            background: rgba(255, 255, 255, 0.08) !important;
            box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2),
                        0 0 20px rgba(168, 85, 247, 0.1);
            transform: translateY(-1px);
            outline: none !important;
        }

        /* Mobile Menu Enhancement */
        .mobile-menu {
            background: rgba(10, 10, 10, 0.95) !important;
            backdrop-filter: blur(30px) !important;
            -webkit-backdrop-filter: blur(30px) !important;
            border-top: 1px solid var(--glass-border);
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        }
        .mobile-menu button {
            transition: all 0.3s ease;
            border-radius: 12px;
            padding: 8px;
        }
        .mobile-menu button:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: translateY(-2px);
        }

        /* Micro-interactions */
        button, a {
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        button:not(:disabled):hover {
            transform: translateY(-2px);
        }
        button:not(:disabled):active {
            transform: translateY(0) scale(0.98);
        }

        /* Ripple Effect */
        .ripple {
            position: relative;
            overflow: hidden;
        }
        .ripple::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            transform: translate(-50%, -50%);
            pointer-events: none;
        }
        .ripple:active::after {
            animation: rippleEffect 0.6s ease-out;
        }
        @keyframes rippleEffect {
            to {
                width: 300px;
                height: 300px;
                opacity: 0;
            }
        }

        /* Performance Optimizations */
        .hardware-accelerate {
            transform: translateZ(0);
            will-change: transform;
        }

        /* Stagger animations for lists */
        .stagger-animation > * {
            animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        .stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
        .stagger-animation > *:nth-child(2) { animation-delay: 0.15s; }
        .stagger-animation > *:nth-child(3) { animation-delay: 0.2s; }
        .stagger-animation > *:nth-child(4) { animation-delay: 0.25s; }
        .stagger-animation > *:nth-child(5) { animation-delay: 0.3s; }
        .stagger-animation > *:nth-child(6) { animation-delay: 0.35s; }
        .stagger-animation > *:nth-child(7) { animation-delay: 0.4s; }
        .stagger-animation > *:nth-child(8) { animation-delay: 0.45s; }
        .stagger-animation > *:nth-child(9) { animation-delay: 0.5s; }
        .stagger-animation > *:nth-child(10) { animation-delay: 0.55s; }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .glass, .glass-heavy {
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
            }
            body::before, body::after {
                animation-duration: 120s;
            }
            .card-hover:hover {
                transform: none;
            }
        }

        /* Accessibility Focus States */
        *:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        /* Smooth Scroll */
        html {
            scroll-behavior: smooth;
        }

        /* Final Polish */
        ::selection {
            background: var(--accent);
            color: white;
        }
        /* Playlist badge on video thumbnails */
        .playlist-badge {
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border-radius: 6px;
            padding: 4px 8px;
            font-size: 12px;
            font-weight: 600;
            color: rgba(255,255,255,0.92);
            background: rgba(255,255,255,0.08);
        }
