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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden; /* Prevent body scroll when sidebar or full player is open */
}

.app {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: #000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #282828;
    transition: transform 0.3s ease-in-out;
    z-index: 1001; /* Above main content, below full player */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #282828;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #1db954;
}

.main-nav {
    margin-bottom: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.nav-item:hover {
    background-color: #1a1a1a;
}

.nav-item.active {
    background-color: #1db954;
    color: #000;
    font-weight: 600;
}

.nav-item i {
    font-size: 20px;
}

.categories {
    margin-bottom: 32px;
}

.categories h3 {
    font-size: 14px;
    font-weight: 600;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #282828;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    color: #b3b3b3;
}

.category-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.category-item.active {
    background-color: #1db954;
    color: #000;
    font-weight: 600;
}

.category-item i {
    font-size: 16px;
}

.playlists {
    flex: 1;
}

.playlist-header {
    display: flex;
    justify-content: space-between; /* Changed from 'between' to 'space-between' */
    align-items: center;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #282828;
}

.playlist-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.playlist-header i {
    color: #b3b3b3;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    color: #b3b3b3;
}

.playlist-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.playlist-item i {
    color: #1db954;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    position: relative; /* For sidebar overlay */
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    position: sticky; /* Keeps top-bar visible */
    top: 0;
    z-index: 999;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default, shown on mobile */
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    margin-right: 16px;
}

.search-container {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #b3b3b3;
    font-size: 16px;
}

.search-container input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background-color: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #1db954;
    background-color: #1a1a1a;
}

.search-container input::placeholder {
    color: #b3b3b3;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background-color: #535353;
    border-radius: 50%;
    margin-left: 16px; /* Added margin for spacing */
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 120px;
}

/* Category Header */
.category-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.3) 0%, rgba(18, 18, 18, 0.8) 100%);
}

.category-header img {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.category-info {
    flex: 1;
    padding-bottom: 24px;
}

.category-type {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #fff;
}

.category-info h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.1;
}

.category-info p {
    font-size: 16px;
    color: #b3b3b3;
    margin-bottom: 16px;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #b3b3b3;
}

.category-meta span:first-child {
    font-weight: 600;
    color: #fff;
}

.play-all-btn {
    width: 56px;
    height: 56px;
    background-color: #1db954;
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-all-btn:hover {
    background-color: #1ed760;
    transform: scale(1.05);
}

/* Search Results */
.search-results {
    padding: 0 32px 24px;
}

.search-results h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Track List */
.track-list-container {
    padding: 0 32px;
}

.track-list-header {
    display: grid;
    grid-template-columns: 50px 1fr 300px 100px;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #282828;
    font-size: 12px;
    font-weight: 600;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-list {
    padding: 8px 0;
}

.track-item {
    display: grid;
    grid-template-columns: 50px 1fr 300px 100px;
    gap: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
}

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

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

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

.track-item:hover .track-number-text {
    display: none;
}

.track-item:hover .play-icon,
.track-item.playing .play-icon {
    display: block;
}

.play-icon {
    display: none;
    font-size: 16px;
    color: #fff;
}

.track-item.playing .play-icon {
    color: #1db954;
}

.track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.track-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.track-details {
    min-width: 0;
    flex: 1;
}

.track-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item.playing .track-title {
    color: #1db954;
}

.track-artist {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-album {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.track-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.track-actions i {
    font-size: 16px;
    color: #b3b3b3;
    cursor: pointer;
    transition: color 0.2s ease;
}

.track-actions i:hover {
    color: #1db954;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 64px 32px;
    color: #b3b3b3;
    font-size: 18px;
}

.hidden {
    display: none !important;
}

/* Music Player (Mini) */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background-color: #181818;
    border-top: 1px solid #282828;
    display: flex;
    align-items: center;
    padding: 16px 24px;
    z-index: 1000;
    cursor: pointer; /* Make the mini-player clickable */
}

.player-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.current-track-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.current-track-info {
    min-width: 0;
    flex: 1;
}

.current-track-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-track-info p {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.like-btn {
    font-size: 16px;
    color: #b3b3b3;
    cursor: pointer;
    transition: color 0.2s ease;
}

.like-btn:hover {
    color: #1db954;
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 2;
    max-width: 600px;
}

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

.player-controls i {
    font-size: 16px;
    color: #b3b3b3;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.play-pause-btn {
    width: 32px;
    height: 32px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-btn:hover {
    transform: scale(1.05);
}

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

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

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #4f4f4f;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background-color: #1db954;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

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

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

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

.player-right i {
    font-size: 16px;
    color: #b3b3b3;
}

.volume-container {
    width: 100px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: #4f4f4f;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

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

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #1db954;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1ed760;
}

/* Full-screen Music Player Overlay */
.full-screen-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1A1A1A 0%, #000000 100%);
    z-index: 2000; /* Above everything else */
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    transform: translateY(100%); /* Hidden by default (slides up) */
    opacity: 0;
    visibility: hidden;
}

.full-screen-player-overlay.visible {
    transform: translateY(0); /* Shown when active */
    opacity: 1;
    visibility: visible;
}

.full-screen-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #b3b3b3;
    font-size: 16px;
    margin-bottom: 20px;
}

.close-full-player-btn {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
}

.full-screen-track-info {
    text-align: center;
    flex-grow: 1;
}

.full-screen-track-info h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: #b3b3b3;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.full-screen-track-info p {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.full-screen-player-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 20px;
}

.full-track-image {
    width: 70vw; /* Responsive image size */
    max-width: 300px; /* Max size for larger screens */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
}

.full-track-details {
    text-align: center;
    margin-bottom: 40px;
}

.full-track-details h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.full-track-details p {
    font-size: 18px;
    color: #b3b3b3;
}

.full-player-progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 90%; /* Responsive width */
    max-width: 500px; /* Max width for consistency */
    margin-bottom: 40px;
}

.full-player-progress-container span {
    font-size: 14px;
    color: #b3b3b3;
    min-width: 45px;
    text-align: center;
}

.full-progress-bar {
    flex: 1;
    height: 5px;
    background-color: #4f4f4f;
    border-radius: 2.5px;
    position: relative;
    cursor: pointer;
}

.full-progress-fill {
    height: 100%;
    background-color: #1db954;
    border-radius: 2.5px;
    width: 0%;
}

.full-progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: #fff;
    border-radius: 50%;
    /* opacity: 0; */ /* Always visible for better mobile UX */
    transition: opacity 0.2s ease;
    left: 0%;
}

.full-player-controls {
    display: flex;
    align-items: center;
    gap: 40px; /* Increased gap for better touch targets */
    margin-bottom: 40px;
}

.full-player-controls i {
    font-size: 24px; /* Larger icons */
    color: #b3b3b3;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.full-play-pause-btn {
    width: 60px; /* Larger button */
    height: 60px;
    background-color: #1db954;
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 28px; /* Larger icon inside */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-play-pause-btn:hover {
    transform: scale(1.05);
}

.full-player-volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 80%;
    max-width: 300px;
}

.full-player-volume-container i {
    font-size: 20px;
    color: #b3b3b3;
}

.full-volume-slider {
    flex: 1;
    height: 5px;
    background: #4f4f4f;
    border-radius: 2.5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.full-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #1db954;
    border-radius: 50%;
    cursor: pointer;
}

.full-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #1db954;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}


/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px; /* Full width of the sidebar on mobile when open */
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%); /* Hidden by default */
        background-color: #000; /* Ensure it's black to match original */
        padding-top: 80px; /* Space for top bar */
    }

    .app.sidebar-open .sidebar {
        transform: translateX(0); /* Show sidebar */
    }
    
    .hamburger-menu {
        display: block; /* Show hamburger menu */
    }

    .top-bar {
        padding: 16px 24px; /* Adjust padding for mobile */
        justify-content: flex-start; /* Align items to start for hamburger */
    }

    .top-bar .search-container {
        margin-left: 16px; /* Space between hamburger and search */
    }

    .category-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 24px; /* Adjust padding */
    }
    
    .category-header img {
        width: 120px; /* Smaller image */
        height: 120px;
        border-radius: 8px; /* Smaller border-radius */
    }
    
    .category-info h1 {
        font-size: 28px; /* Smaller font size */
    }

    .category-info p, .category-meta {
        font-size: 13px; /* Smaller font size */
    }

    .play-all-btn {
        width: 48px; /* Smaller play all button */
        height: 48px;
        font-size: 18px;
    }
    
    .track-list-header,
    .track-item {
        grid-template-columns: 40px 1fr 80px; /* Adjust grid columns for mobile */
        padding: 12px 16px; /* Adjust padding */
    }
    
    .track-album {
        display: none; /* Hide album column on smaller screens */
    }

    .track-details .track-title {
        font-size: 15px; /* Adjust font size */
    }

    .track-details .track-artist {
        font-size: 13px; /* Adjust font size */
    }

    .music-player {
        padding: 12px 16px; /* Adjust padding */
        height: 70px; /* Smaller height for mini player */
    }

    .current-track-image {
        width: 48px;
        height: 48px;
    }

    .current-track-info h4 {
        font-size: 13px;
    }

    .current-track-info p {
        font-size: 11px;
    }

    .player-center {
        display: none; /* Hide controls in mini player on mobile */
    }

    .player-right {
        display: none; /* Hide volume in mini player on mobile */
    }

    .player-left {
        flex-grow: 1; /* Allow left part to take full space */
    }
}

@media (max-width: 480px) {
    /* Adjustments for even smaller screens (e.g., 320px width) */
    .app.sidebar-open .sidebar {
        width: 100%; /* Sidebar takes full width when open */
    }

    .top-bar {
        padding: 10px 15px;
    }

    .search-container input {
        padding: 10px 15px 10px 40px; /* Adjust search input padding */
        font-size: 13px;
    }

    .search-container i {
        left: 12px;
        font-size: 14px;
    }

    .profile-avatar {
        width: 28px;
        height: 28px;
    }

    .category-header {
        padding: 20px;
    }

    .category-info h1 {
        font-size: 24px;
    }

    .category-info p {
        font-size: 16px;
    }

    .track-list-header,
    .track-item {
        grid-template-columns: 30px 1fr 60px; /* Even smaller columns */
        padding: 10px 12px;
    }

    .track-info {
        gap: 8px; /* Smaller gap */
    }

    .track-cover {
        width: 36px;
        height: 36px;
    }

    .track-details .track-title {
        font-size: 14px;
    }

    .track-details .track-artist {
        font-size: 12px;
    }

    .track-number, .track-duration {
        font-size: 12px;
    }

    .music-player {
        height: 60px; /* Even smaller mini player */
        padding: 10px 12px;
    }

    .current-track-image {
        width: 40px;
        height: 40px;
    }

    .full-track-image {
        width: 85vw; /* Make image larger on smaller full screen */
    }

    .full-track-details h2 {
        font-size: 24px;
    }

    .full-track-details p {
        font-size: 16px;
    }

    .full-player-controls {
        gap: 30px; /* Adjust control gap */
    }

    .full-player-controls i {
        font-size: 20px;
    }

    .full-play-pause-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Overlay for sidebar when open on mobile (to prevent interaction with main content) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.app.sidebar-open .sidebar-overlay {
    display: block;
}

