/* Desktop Sidebar - SHOW ON DESKTOP */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(26, 255, 140, 0.1);
    overflow-y: auto;
    z-index: 999;
    padding-top: 20px;
    display: none; /* Hidden by default, shown on desktop */
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(26, 255, 140, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 255, 140, 0.3);
}

.sidebar-nav {
    padding: 0 15px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #b8b8b8;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(26, 255, 140, 0.1);
    color: #1aff8c;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(26, 255, 140, 0.15);
    color: #1aff8c;
    font-weight: 600;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

.playlists-section {
    padding: 0;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #888;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 2px;
    cursor: pointer;
}

.playlist-item:hover {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
    text-decoration: none;
}

.playlist-item svg {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    opacity: 0.7;
}

.create-playlist {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #1aff8c;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
    cursor: pointer;
    border: 1px dashed rgba(26, 255, 140, 0.3);
}

.create-playlist:hover {
    background: rgba(26, 255, 140, 0.1);
    text-decoration: none;
    border-color: #1aff8c;
}

.create-playlist svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

/* Main content adjustment for desktop sidebar */
@media (min-width: 1024px) {
    .sidebar {
        display: block !important; /* Show sidebar on desktop */
    }

    .app-header,
    .categories-scroll,
    .main-content,
    #audio-player {
        margin-left: 250px; /* Make room for sidebar */
    }

    .mobile-nav {
        display: none !important; /* Hide mobile nav on desktop */
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Left Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(26, 255, 140, 0.1);
    padding: 20px;
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(26, 255, 140, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 255, 140, 0.3);
}

/* Sidebar Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

.nav-item.active {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.nav-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Sidebar Section Titles */
.sidebar-section-title {
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 24px 16px 12px;
    letter-spacing: 1px;
}

/* Playlist Section */
.playlist-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-size: 13px;
}

.playlist-item:hover {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

.playlist-item.active {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

/* Logo Section */
.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 24px;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

/* Mobile Navigation Styles */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(26, 255, 140, 0.1);
    padding: 8px 8px 8px;
    z-index: 1000;
    display: none;
}

.mobile-nav-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin: 0 auto;
}

.mobile-nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 6px 4px;
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.mobile-nav-button.active {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

.mobile-nav-button:hover {
    color: #1aff8c;
    text-decoration: none;
}

.mobile-nav-button svg {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    flex-shrink: 0;
}

.mobile-nav-button span {
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
    body {
        padding-bottom: 70px; /* Make room for mobile nav */
    }
    
    .mobile-nav {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
}

/* Scrollable Header Categories */
.categories-scroll {
    overflow-x: auto;
    white-space: nowrap;
    padding: 15px 20px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 255, 140, 0.1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: block; /* Changed from none to block */
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    margin-right: 12px;
    background: rgba(26, 255, 140, 0.1);
    border: 1px solid rgba(26, 255, 140, 0.2);
    border-radius: 20px;
    color: #1aff8c;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-chip:hover,
.category-chip.active {
    background: rgba(26, 255, 140, 0.2);
    transform: translateY(-2px);
}

.category-chip svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* Quick Access Playlists (Mobile) */
.quick-access-playlists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 15px 20px;
    margin-bottom: 20px;
}

.quick-playlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(26, 255, 140, 0.08);
    border: 1px solid rgba(26, 255, 140, 0.2);
    border-radius: 12px;
    color: #1aff8c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-playlist-btn:hover,
.quick-playlist-btn:active {
    background: rgba(26, 255, 140, 0.15);
    border-color: rgba(26, 255, 140, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 255, 140, 0.2);
}

.quick-playlist-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.quick-playlist-btn span {
    font-size: 13px;
    font-weight: 500;
}

/* Hide quick access on desktop (already have sidebar) */
@media (min-width: 1024px) {
    .quick-access-playlists {
        display: none;
    }
}

/* Mobile Profile Section */
.mobile-user-profile-card {
    background: linear-gradient(135deg, rgba(26, 255, 140, 0.1), rgba(26, 255, 140, 0.05));
    border: 1px solid rgba(26, 255, 140, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin: 0 15px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-user-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.mobile-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1aff8c, #00d4aa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 24px;
    border: 3px solid rgba(26, 255, 140, 0.3);
    box-shadow: 0 4px 12px rgba(26, 255, 140, 0.3);
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-user-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #1aff8c;
    border: 3px solid #121212;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(26, 255, 140, 0.5);
}

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-email {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile User Actions */
.mobile-user-actions {
    padding: 0 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-action-card {
    background: rgba(26, 255, 140, 0.05) !important;
    border: 1px solid rgba(26, 255, 140, 0.15) !important;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    outline: none;
    box-shadow: none;
}

.mobile-action-card:hover,
.mobile-action-card:active {
    background: rgba(26, 255, 140, 0.1) !important;
    border-color: rgba(26, 255, 140, 0.3) !important;
    transform: translateX(4px);
}

.mobile-action-card.logout-card {
    border-color: rgba(255, 77, 77, 0.3) !important;
    background: rgba(255, 77, 77, 0.05) !important;
}

.mobile-action-card.logout-card:hover {
    background: rgba(255, 77, 77, 0.1) !important;
    border-color: rgba(255, 77, 77, 0.5) !important;
}

.mobile-action-card.logout-card .mobile-action-icon {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.mobile-action-card.admin-card {
    border-color: rgba(255, 215, 0, 0.3) !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

.mobile-action-card.admin-card:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    border-color: rgba(255, 215, 0, 0.5) !important;
}

.mobile-action-card.admin-card .mobile-action-icon {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.mobile-action-icon {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(26, 255, 140, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1aff8c;
    flex-shrink: 0;
}

.mobile-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4d4d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.5);
}

.mobile-action-content {
    flex: 1;
    text-align: left;
}

.mobile-action-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.mobile-action-subtitle {
    font-size: 12px;
    color: #888;
}

/* Profile Content Section Background */
#profile-content {
    background: #000 !important;
    min-height: 100vh;
    padding-top: 20px;
}

#profile-content .section-title {
    color: #1aff8c;
    font-size: 24px;
    font-weight: 700;
    margin: 0 15px 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(26, 255, 140, 0.2);
}

/* Hide mobile profile section on desktop */
@media (min-width: 1024px) {
    #profile-content {
        display: none !important;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .mobile-nav,
    .categories-scroll {
        display: block;
    }

    body {
        padding-bottom: 70px !important;
    }

    .app-header {
        padding-top: 10px;
    }

    #audio-player {
        bottom: 70px !important;
    }

    .float-button {
        bottom: 80px !important;
    }
}

/* Mobile Music Preferences Card */
.mobile-preferences-card {
    background: linear-gradient(135deg, rgba(26, 255, 140, 0.08), rgba(26, 255, 140, 0.03)) !important;
    border: 1px solid rgba(26, 255, 140, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 15px;
}

.preference-category {
    margin-bottom: 15px;
}

.preference-label {
    color: #1aff8c;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.preference-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preference-tag {
    background: rgba(26, 255, 140, 0.15) !important;
    border: 1px solid rgba(26, 255, 140, 0.3);
    color: #1aff8c;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.preference-score {
    background: rgba(26, 255, 140, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.preference-empty {
    color: #666;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Extra compact for very small screens */
@media (max-width: 380px) {
    .mobile-nav {
        padding: 6px 4px 6px;
    }

    .mobile-nav-button {
        padding: 5px 2px;
    }

    .mobile-nav-button svg {
        width: 18px;
        height: 18px;
        margin-bottom: 2px;
    }

    .mobile-nav-button span {
        font-size: 8px;
    }

    body {
        padding-bottom: 65px !important;
    }

    #audio-player {
        bottom: 65px !important;
    }

    .float-button {
        bottom: 80px !important;
    }
}