:root {
    --cyan-neon: #00f2ff;
    --pink-neon: #ff00e5;
    --anim-speed: 20s;
}

/* Background Animation */
.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(-45deg, #020617, #1e1b4b, #312e81, #000000);
    background-size: 400% 400%;
    animation: gradientMove var(--anim-speed) ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Premium Glass with Deep Shadows and Inner Glow */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    /* Deep outer shadow + Soft inner highlight for padding depth */
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Spotify Control Icons */
.spotify-ctrl {
    color: #b3b3b3;
    transition: color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}

.spotify-ctrl:hover {
    color: #ffffff;
    transform: scale(1.05);
}

.spotify-ctrl:active {
    transform: scale(0.95);
}

/* Central Play Circle */
.play-circle {
    background-color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.play-circle:hover {
    transform: scale(1.1);
    background-color: var(--cyan-neon);
}

.hidden {
    display: none;
}

/* Dynamic Local Song Cards */
.local-song {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.local-song:hover {
    background: rgba(0, 242, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--cyan-neon);
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2);
}

.song-title {
    color: white;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fixed Album Art Size & Glow */
.album-art {
    width: 56px;
    height: 56px;
    min-width: 56px; /* Prevents shrinking */
    object-fit: cover;
    border-radius: 8px;
    background: #282828;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3); /* Controlled glow */
}

/* Page Visibility */
.page {
    display: none; /* Hide all pages by default */
}

.page.active {
    display: block; /* Show only the active page */
}

/* Sidebar Active State */
.nav-links li.active-link {
    color: var(--cyan-neon);
    font-weight: bold;
}

/* === NEON PROGRESS BAR === */
#progress-slider {
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    accent-color: var(--cyan-neon);           /* filled part */
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
    transition: box-shadow 0.2s ease;
}

#progress-slider:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.7);
}

/* Chrome / Edge / Safari thumb */
#progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid var(--cyan-neon);
    border-radius: 50%;
    box-shadow: 
        0 0 15px var(--cyan-neon),
        0 0 30px var(--pink-neon);
    cursor: pointer;
    transition: all 0.15s ease;
}

#progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 
        0 0 20px var(--cyan-neon),
        0 0 40px var(--pink-neon);
}

/* Firefox thumb */
#progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid var(--cyan-neon);
    border-radius: 50%;
    box-shadow: 
        0 0 15px var(--cyan-neon),
        0 0 30px var(--pink-neon);
    cursor: pointer;
}

/* ================== VOLUME SLIDER = EXACTLY LIKE TIMELINE (CYAN FILLED + NO GLOW) ================== */
#volume-slider {
    height: 6px !important;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    accent-color: var(--cyan-neon) !important;   /* ← This is the cyan filled progress */
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border: 2px solid var(--cyan-neon) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: transform 0.15s ease !important;
}

/* Thumb (same as timeline) */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border: 2px solid #00f2ff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: none !important;
}    

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25) !important;
}

#volume-slider::-moz-range-thumb {
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border: 2px solid #00f2ff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

/* New Playlist Modal */
#new-playlist-modal {
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#modal-thumbnail {
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
}

/* Improved Sidebar Playlists Styling */
#playlists-list li {
    padding-left: 12px !important;
    padding-right: 12px !important;
    border-radius: 12px;
    transition: all 0.2s ease;
}

#playlists-list li:hover {
    background: rgba(255, 255, 255, 0.08);
}

#playlists-list li span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Animated Neon Music Note */
@keyframes pulse-slow {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.12); 
        filter: brightness(1.3);
    }
}

@keyframes glow-pulse {
    0%, 100% { 
        opacity: 0.2; 
        box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
    }
    50% { 
        opacity: 0.5; 
        box-shadow: 0 0 60px rgba(0, 242, 255, 0.9);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

#thumbnail-menu {
    box-shadow: 0 10px 30px -10px rgba(0, 242, 255, 0.4);
}

    /* ===================== YT MUSIC MOBILE-FIRST SEARCH ===================== */
#search-results-container {
    padding: 16px;
}

    /* Tabs - Mobile style chips */
#search-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}
#search-tabs::-webkit-scrollbar { display: none; }
#search-tabs button {
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}
#search-tabs button.active {
    background: white;
    color: black;
}

    /* HERO CARD - Mobile First (Exact YT Music Mobile) */
#top-result .hero-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    overflow: hidden;
}
#top-result img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
#top-result .hero-content {
    padding: 24px 20px;
    text-align: center;
}
#top-result .hero-content .top-label {
    color: var(--cyan-neon);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}
#top-result .hero-content h3 {
    font-size: 1.8rem;
    line-height: 1.1;
    font-weight: 700;
    margin: 10px 0 6px;
}
#top-result .hero-content p {
    font-size: 1.15rem;
    color: #aaa;
}
#top-result button {
    width: 100%;
    margin: 24px auto 0;
    padding: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 9999px;
    background: white;
    color: black;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.3);
}
    /* Song List - Mobile Style */
.search-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
    border-radius: 16px;
    transition: background 0.2s;
}
.search-list-item:hover {
    background: rgba(255,255,255,0.08);
}
.search-list-item .thumbnail-container {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.search-list-item img {
    width: 100%; height: 100%; object-fit: cover;
}
.search-list-item .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.search-list-item:hover .play-overlay { opacity: 1; }

.search-list-item .song-info { flex: 1; min-width: 0; }
.search-list-item .song-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
}
.search-list-item .song-artist {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 2px;
}
.search-list-item .actions {
    display: flex;
    gap: 20px;
    align-items: center;
}
    /* Desktop Improvements */
@media (min-width: 768px) {
    #search-results-container { padding: 24px 32px; }

    #top-result .hero-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 32px;
        padding: 24px;
    }
    #top-result img {
        width: 220px;
        height: 220px;
        aspect-ratio: auto;
        border-radius: 20px;
    }
    #top-result .hero-content {
        text-align: left;
        padding: 0;
        flex: 1;
    }
    #top-result .hero-content h3 { font-size: 2.4rem; }
    #top-result button {
        width: auto;
        margin: 0;
        padding: 16px 40px;
    }
    .search-list-item .thumbnail-container {
        width: 64px;
        height: 64px;
    }
}
    .nav-links {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    .nav-links::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
}
    /* Neon Skeleton Loading Animation */
@keyframes skeleton-glow {
    0% { opacity: 0.3; background-color: rgba(255, 255, 255, 0.05); }
    50% { opacity: 0.7; background-color: rgba(0, 242, 255, 0.1); box-shadow: 0 0 15px rgba(0, 242, 255, 0.2); }
    100% { opacity: 0.3; background-color: rgba(255, 255, 255, 0.05); }
}

.skeleton {
    animation: skeleton-glow 1.5s infinite ease-in-out;
}
    /* Unselectable static text for dropdown footer */
.unselectable {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    pointer-events: none;
}
    /* Circular Cropper Mask for Profile Pictures */
.cropper-view-box, .cropper-face {
    border-radius: 50%;
}
/* ================== HIDE MAIN CONTENT SCROLLBAR ================== */
.content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge, and Opera */
}