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

body {
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.app {
    display: grid;
    grid-template-areas:
        "sidebar main"
        "player player";
    grid-template-columns: 240px 1fr;
    grid-template-rows: 1fr 90px;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background-color: #000;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    padding: 0 12px;
}

.logo i {
    color: #1db954;
    font-size: 32px;
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-menu li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #b3b3b3;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu li:hover,
.nav-menu li.active {
    color: #fff;
}

.nav-menu li i {
    width: 24px;
    font-size: 24px;
}

.playlists {
    flex: 1;
    overflow-y: auto;
}

.playlist-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    color: #b3b3b3;
    cursor: pointer;
    transition: color 0.2s;
}

.playlist-header:hover {
    color: #fff;
}

#sidebar-playlists {
    list-style: none;
    margin-top: 16px;
}

#sidebar-playlists li {
    padding: 8px 12px;
    color: #b3b3b3;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s;
}

#sidebar-playlists li:hover {
    color: #fff;
}

/* Main Content */
.main-content {
    grid-area: main;
    background: linear-gradient(180deg, #1f1f1f 0%, #121212 100%);
    overflow-y: auto;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-buttons {
    display: flex;
    gap: 16px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 500px;
    padding: 12px 16px;
    gap: 12px;
    max-width: 364px;
    flex: 1;
    margin: 0 16px;
}

.search-bar i {
    color: #121212;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    color: #121212;
    flex: 1;
    font-size: 14px;
}

.user-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 500px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: #535353;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.user-btn i {
    font-size: 12px;
    opacity: 0.7;
}

.content-area {
    padding: 24px 32px;
}

.section-header h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 24px;
}

.track-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.track-list-header {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 60px 40px;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #b3b3b3;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}



.track-actions {
    opacity: 1;
    transition: opacity 0.2s;
}

.track-actions .action-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.track-actions .action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}



#track-list-content .track-item {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 60px 40px;
    gap: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    align-items: center;
}

#track-list-content .track-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

#track-list-content .track-item:hover .track-actions {
    opacity: 1;
}

#track-list-content .track-item.playing {
    background: rgba(29, 185, 84, 0.2);
}

.track-number {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b3b3b3;
}

.track-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-title .title {
    color: #fff;
    font-weight: 500;
}

.track-title .artist {
    color: #b3b3b3;
    font-size: 14px;
}

.track-album {
    display: flex;
    align-items: center;
    color: #b3b3b3;
    font-size: 14px;
}

.track-duration {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b3b3b3;
    font-size: 14px;
}

/* Bottom Player */
.bottom-player {
    grid-area: player;
    background: #181818;
    border-top: 1px solid #282828;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 12px 16px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.track-cover img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
}

.track-info {
    display: flex;
    flex-direction: column;
}

#current-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

#current-artist {
    color: #b3b3b3;
    font-size: 12px;
}

.like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
}

.like-btn:hover {
    color: #fff;
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-controls button {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.player-controls button:hover {
    color: #fff;
}

#play-btn {
    background: #fff;
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding-left: 2px;
    /* Offset for play icon visual centering */
}

#play-btn:hover {
    transform: scale(1.06);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.progress-bar-container span {
    color: #b3b3b3;
    font-size: 11px;
    min-width: 40px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 4px;
    position: relative;
    cursor: pointer;
}

.progress-bg {
    width: 100%;
    height: 4px;
    background: #5e5e5e;
    border-radius: 2px;
    position: relative;
}

#progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

#progress-handle {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover #progress-handle {
    opacity: 1;
}

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

.volume-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 16px;
}

.volume-btn:hover {
    color: #fff;
}

.volume-bar {
    width: 93px;
    height: 4px;
    position: relative;
    cursor: pointer;
}

.volume-bg {
    width: 100%;
    height: 4px;
    background: #5e5e5e;
    border-radius: 2px;
    position: relative;
}

#volume-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 50%;
}

#volume-handle {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.volume-bar:hover #volume-handle {
    opacity: 1;
}



/* Mobile Spotify App Layout - Base Styles */
.mobile-app {
    display: none;
    flex-direction: column;
    height: 100vh;
    background: #000;
    color: #fff;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.mobile-header-title {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #b3b3b3;
    line-height: 1.2;
}

.mobile-header-title {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #b3b3b3;
    line-height: 1.2;
}

    .mobile-header-subtitle {
        font-size: 14px;
        font-weight: 700;
        text-transform: none;
        color: #fff;
        margin-top: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }



    .mobile-header-right {
        width: 36px;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
    }

    /* Mobile Cover Section */
    .mobile-cover-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 32px 20px;
    }

    .mobile-album-cover {
        width: 320px;
        height: 320px;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        margin-bottom: 32px;
        background: #1db954;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 80px;
        color: #fff;
    }

    /* Mobile Track Info */
    .mobile-track-info {
        width: 100%;
        text-align: left;
        margin-bottom: 24px;
    }

    .mobile-track-title {
        font-size: 24px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .mobile-track-artist {
        font-size: 16px;
        color: #b3b3b3;
        font-weight: 400;
    }

    /* Mobile Progress Section */
    .mobile-progress-section {
        width: 100%;
        margin-bottom: 32px;
    }

    .mobile-progress-bar {
        width: 100%;
        height: 4px;
        background: #5e5e5e;
        border-radius: 2px;
        margin-bottom: 8px;
        position: relative;
        cursor: pointer;
    }

    .mobile-progress-fill {
        height: 100%;
        background: #fff;
        border-radius: 2px;
        width: 0%;
        position: relative;
    }

    .mobile-progress-thumb {
        position: absolute;
        right: -6px;
        top: 50%;
        transform: translateY(-50%);
        width: 12px;
        height: 12px;
        background: #fff;
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.2s;
        cursor: grab;
    }

    .mobile-progress-bar:hover .mobile-progress-thumb,
    .mobile-progress-bar.dragging .mobile-progress-thumb {
        opacity: 1;
    }

    .mobile-progress-bar.dragging .mobile-progress-thumb {
        cursor: grabbing;
    }

    .mobile-progress-times {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #b3b3b3;
    }

    /* Mobile Controls */
    .mobile-controls-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 32px;
    }



    .mobile-shuffle-btn,
    .mobile-repeat-btn {
        background: none;
        border: none;
        color: #b3b3b3;
        font-size: 20px;
        cursor: pointer;
        padding: 8px;
    }

    .mobile-shuffle-btn.active,
    .mobile-repeat-btn.active {
        color: #1db954;
    }

    .mobile-main-controls {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .mobile-prev-btn,
    .mobile-next-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 28px;
        cursor: pointer;
    }

    .mobile-play-btn {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background: #fff;
        border: none;
        color: #000;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.1s;
    }

    .mobile-play-btn:active {
        transform: scale(0.95);
    }

    /* Mobile Footer */
    .mobile-footer {
        padding: 20px 32px 32px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-device-info {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #1db954;
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-device-icon {
        width: 20px;
        height: 20px;
        background: #1db954;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: #000;
    }

    .mobile-actions {
        display: flex;
        gap: 24px;
    }

    .mobile-action-btn {
        background: none;
        border: none;
        color: #b3b3b3;
        font-size: 20px;
        cursor: pointer;
    }

    .mobile-action-btn:active {
        color: #fff;
    }