:root {
    --primary-color: #f6d365;
    --primary-gradient: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-dark: #0f0f13;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animation */
.background-animate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    opacity: 0.3;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glass Container */
.glass-container {
    width: 95%;
    height: 90%;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    border-right: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.nav-btn i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    padding-bottom: 120px;
    /* Space for player */
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.track-card {
    background: var(--glass-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.track-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.track-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 1;
}

.track-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.track-card:hover .track-image {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: var(--primary-color);
}

.download-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2;
}

.track-card:hover .download-btn {
    opacity: 1;
    transform: translateY(0);
}

.download-btn:hover {
    background: var(--primary-color);
    color: #000;
}

.track-info h3 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.track-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player */
.music-player-glass {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: rgba(30, 30, 35, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 2rem;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 25%;
}

.player-left img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.player-left .track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* Container needs this */
}

#playerTrackName {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 15rem;
    /* Adjust as needed */
}

#playerArtistName {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 15rem;
}

.spin-art.playing {
    animation: spin 4s linear infinite;
}

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

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.action-btn.active {
    color: var(--primary-color);
}

.player-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    color: var(--primary-color);
}

.main-play {
    width: 45px;
    height: 45px;
    background: var(--text-primary);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.main-play:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: #fff;
}

.progress-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-bar-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
    width: 0%;
}

.seek-slider {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.player-right {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

#volumeSlider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    /* Anchor close button to modal box */
    background: rgba(30, 30, 35, 0.95);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 1rem;
}

.quality-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quality-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.quality-card.active {
    background: rgba(var(--primary-rgb), 0.2);
    /* Assuming primary-color usually hex, fallback */
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 5px 15px rgba(var(--primary-color), 0.4);
}

/* Fix text color for active card inside glass */
.quality-card.active h3,
.quality-card.active p,
.quality-card.active i {
    color: var(--bg-dark);
    /* Contrast */
}

/* Default Icon Color */
.quality-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.quality-card h3 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.quality-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Loading Spinner */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-bg);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .glass-container {
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        overflow: hidden;
        /* Prevent scrolling body */
    }

    /* Sidebar Fix - Top Nav */
    .sidebar {
        position: fixed;
        top: 0;
        bottom: auto !important;
        /* Override explicit bottom */
        left: 0;
        width: 100%;
        height: 60px;
        padding: 0 1rem;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        border-top: none;
        background: rgba(30, 30, 35, 0.95);
        backdrop-filter: blur(20px);
        z-index: 200000 !important;
        /* Top of the world */
        pointer-events: auto !important;
        margin: 0;
    }

    /* Sidebar Fix - Force Hide Logo */
    .sidebar h2 {
        display: none !important;
    }

    .nav-links {
        width: 100%;
        flex-direction: row;
        justify-content: space-evenly;
        gap: 0;
        padding: 0;
    }

    .nav-btn {
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        font-size: 0.7rem;
        border-radius: 8px;
        width: auto;
        min-width: 45px;
        height: auto;
        justify-content: center;
        background: transparent;
    }

    .nav-btn.active {
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }

    .nav-btn i {
        font-size: 1.2rem;
    }

    .nav-btn span {
        display: none !important;
    }

    /* Main Content Area */
    .main-content {
        padding: 85px 1rem 120px 1rem;
        /* Top(Nav+Pad) ... Bottom(Player+Pad) */
    }

    /* Floating Compact Player */
    /* Floating Compact Player */
    .music-player-glass {
        position: fixed;
        bottom: 10px;
        left: 2.5%;
        width: 95%;
        padding: 10px;
        height: auto;
        min-height: 85px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 12px;
        transform: none;
        z-index: 999;
        background: rgba(40, 40, 45, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
        overflow: visible;
    }

    /* Top Row: Image | Info | Add */
    .player-left {
        width: 100%;
        display: flex;
        align-items: center;
        padding: 0;
        margin-bottom: 5px;
        position: relative;
    }

    #playerImage {
        width: 45px;
        height: 45px;
        border-radius: 6px;
        margin-right: 10px;
    }

    .track-info {
        flex: 1;
        margin-right: 40px;
        overflow: hidden;
    }

    .track-info div:first-child {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .track-info div:last-child {
        font-size: 0.8rem;
    }

    #playerAddBtn {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
        margin: 0;
        z-index: 100;
        /* Ensure it's on top */
    }

    #playerLikeBtn {
        display: flex;
        /* Show it on mobile */
        position: absolute;
        right: 40px;
        /* To the left of Add Btn */
        top: 50%;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
        margin: 0;
        z-index: 100;
    }

    /* Middle Row: Progress */
    .player-center {
        width: 100%;
        padding: 0;
        flex: none;
        margin-bottom: 5px;
    }

    .progress-wrapper {
        width: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .progress-container {
        position: relative;
        width: 100%;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        margin: 5px 0;
        align-self: center;
        display: none;
        /* Hide in mini player on mobile */
    }

    .progress-bar {
        height: 100%;
        background: var(--primary-color);
    }

    .seek-slider {
        position: absolute;
        width: 100%;
        height: 20px;
        top: -8px;
        opacity: 0;
        cursor: pointer;
        z-index: 100;
        display: block !important;
    }

    .progress-wrapper span {
        display: none;
    }

    /* Hide numbers */

    .player-controls {
        width: 100%;
        justify-content: center;
        gap: 20px;
        position: static;
        margin-top: 5px;
        display: flex;
    }

    .player-controls .control-btn.shuffle-btn,
    .player-controls .control-btn.repeat-btn {
        display: none;
    }

    .player-controls .control-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        width: 40px;
        height: 40px;
    }

    .player-controls .control-btn.main-play {
        width: 45px;
        height: 45px;
        background: var(--primary-color);
        color: var(--bg-dark);
        border-radius: 50%;
        font-size: 1.2rem;
        margin: 0;
    }

    .player-right {
        display: none;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .track-card {
        padding: 0.8rem;
    }

    .quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- EXPANDED PLAYER STYLES --- */
    .music-player-glass.expanded {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100vw;
        /* Prevent horizontal overflow */
        height: 100%;
        box-sizing: border-box;
        /* Include padding in width */
        border-radius: 0;
        padding: 40px 20px;
        overflow-y: auto;
        /* Allow scrolling if screen is too short */
        justify-content: center;
        background: rgba(20, 20, 25, 0.98);
        /* Darker, almost solid */
        z-index: 10000;
        gap: 30px;
        transition: all 0.3s ease-out;
    }

    .music-player-glass.expanded .player-left {
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
        gap: 20px;
    }

    .music-player-glass.expanded #playerImage {
        width: 250px;
        height: 250px;
        margin-right: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .music-player-glass.expanded .track-info {
        grid-area: info;
        text-align: center;
        margin-right: 0;
        width: 100%;
        max-width: 300px;
        /* Limit width */
    }

    .music-player-glass.expanded .track-info div:first-child {
        font-size: 1.4rem;
        white-space: normal !important;
        line-height: 1.3;
        overflow: visible;
        text-overflow: clip;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* Limit to 2 lines */
        -webkit-box-orient: vertical;
    }

    .music-player-glass.expanded .track-info div:last-child {
        font-size: 1.1rem;
        color: var(--text-secondary);
    }

    .music-player-glass.expanded #playerAddBtn {
        grid-area: add;
        justify-self: start;
        margin-left: 10px;
        position: static;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        margin: 0;
        transform: none !important;
        /* Fix overlap caused by inherited transform */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Show Like Button */
    .music-player-glass.expanded #playerLikeBtn {
        grid-area: like;
        display: flex !important;
        justify-self: end;
        margin-right: 10px;
        position: static;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    /* Buttons Row */
    .music-player-glass.expanded .player-left {
        display: grid;
        grid-template-areas:
            "image image"
            "info info"
            "like add";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        width: 100%;
        margin-bottom: 40px;
        /* Increased from 20px */
        gap: 25px;
        /* Increased from 15px */
        row-gap: 30px;
        /* Extra spacing between rows */
    }

    .music-player-glass.expanded #playerImage {
        grid-area: image;
        width: 250px;
        height: 250px;
        margin-right: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        /* Circular Art */
        animation: spin 10s linear infinite;
        /* Optional: Restore spin if desired for record look */
    }

    /* Ensure Queue/List images are circular */
    .track-image {
        border-radius: 50% !important;
    }

    /* Settings Modal must be above expanded player (z-index 10000) */
    .modal {
        z-index: 20001 !important;
    }

    /* Buttons Row */

    .music-player-glass.expanded .player-center {
        position: static;
        width: 100%;
        margin-top: 30px;
        /* Push seek bar down from buttons */
        margin-bottom: 20px;
    }

    .music-player-glass.expanded .progress-container {
        display: block;
        /* Show in expanded player */
        height: 6px;
        background: rgba(255, 255, 255, 0.2);
        margin: 10px 0;
    }

    /* Make slider visible */
    .music-player-glass.expanded .seek-slider {
        opacity: 1 !important;
        -webkit-appearance: none;
        appearance: none;
        background: rgba(255, 255, 255, 0.2);
        /* Visible track */
        height: 6px;
        border-radius: 3px;
        top: 0;
        position: relative;
    }

    .music-player-glass.expanded .seek-slider::-webkit-slider-runnable-track {
        height: 6px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    .music-player-glass.expanded .seek-slider::-moz-range-track {
        height: 6px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    .music-player-glass.expanded .seek-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 14px;
        width: 14px;
        border-radius: 50%;
        background: var(--primary-color);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
        cursor: pointer;
        margin-top: -4px;
        /* Center 14px thumb on 6px track */
    }

    .music-player-glass.expanded .seek-slider::-moz-range-thumb {
        height: 14px;
        width: 14px;
        border-radius: 50%;
        background: var(--primary-color);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
        cursor: pointer;
        border: none;
        margin-top: -4px;
        /* Center 14px thumb on 6px track */
    }

    .music-player-glass.expanded .progress-wrapper span {
        display: block;
        /* Show time */
        font-size: 0.9rem;
        color: var(--text-primary);
    }

    .music-player-glass.expanded .progress-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .music-player-glass.expanded .progress-bar-container {
        width: 100%;
        order: 0;
        /* Middle */
    }

    .music-player-glass.expanded #currentTime {
        order: -1;
    }

    .music-player-glass.expanded #duration {
        order: 1;
    }

    .music-player-glass.expanded .player-controls {
        position: static;
        width: 100%;
        margin-top: 10px;
        gap: 30px;
    }

    .music-player-glass.expanded .player-controls .control-btn {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .music-player-glass.expanded .player-controls .control-btn.main-play {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    /* Show Shuffle/Repeat in expanded */
    .music-player-glass.expanded .player-controls .control-btn.shuffle-btn,
    .music-player-glass.expanded .player-controls .control-btn.repeat-btn {
        display: flex;
        font-size: 1.5rem;
        color: var(--text-secondary);
        width: 40px;
        height: 40px;
    }

    /* Close Button */
    .close-expand-btn {
        position: absolute;
        top: 20px;
        left: 20px;
        background: transparent;
        border: none;
        color: white;
        font-size: 1.5rem;
        z-index: 10001;
        padding: 10px;
    }
}

/* Primary Action Button (Download All) */
.primary-action-btn {
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.primary-action-btn:active {
    transform: translateY(-1px);
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* --- Playlist Modal List Styling --- */
#playlistList {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    max-height: 300px;
    overflow-y: auto;
}

#playlistList li {
    padding: 14px 18px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

#playlistList li:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

#playlistList li i {
    font-size: 1.2rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#playlistList li span {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-primary);
}

#playlistList li small {
    font-size: 0.85rem;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

/* --- Create Playlist UI Refinement --- */
.create-new-playlist-container {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    align-items: center;
}

.create-new-playlist-container input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.create-new-playlist-container input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.create-new-playlist-container button {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 0 20px;
    height: 42px;
    /* Match input height roughly */
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-new-playlist-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color), 0.4);
    filter: brightness(1.1);
}

.create-new-playlist-container button:active {
    transform: translateY(0);
}