/* ============================================
   VIBESPOT DARK THEME - PART 1/5
   Base Styles, Variables, Layout, Background
   Lines: 1-500
   ============================================ */

:root {
    /* Minimal Dark Color Palette */
    --primary: #ffffff;
    --primary-dim: #e5e5e5;
    --accent: #737373;
    --bg-deep: #000000;
    --bg-dark: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-elevated: #171717;
    --text: #ffffff;
    --text-dim: #737373;
    --text-muted: #525252;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --glow: rgba(255, 255, 255, 0.05);
    --shadow: rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(ellipse at top, #0f0f1a 0%, #000000 50%, #000000 100%);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ============================================
   STARRY BACKGROUND - Outer Space Theme
   ============================================ */

/* Deep space background with stars */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(1px 1px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent),
        radial-gradient(1px 1px at 45% 20%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 75% 45%, rgba(255,255,255,0.5), transparent);
    background-size: 400% 400%;
    animation: starfield 120s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

@keyframes starfield {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Subtle vignette effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   APP CONTAINER & LAYOUT
   ============================================ */

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ============================================
   LEFT SIDEBAR
   ============================================ */

.sidebar {
    width: 280px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    }
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    padding: 0 10px;
    font-weight: 700;
}

.sidebar-item {
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid transparent;
    background: transparent;
}

.sidebar-item:hover {
    background: var(--bg-elevated);
    color: var(--primary);
    transform: translateX(4px);
    border-color: var(--border-hover);
}

.sidebar-item.active {
    background: var(--bg-elevated);
    color: var(--primary);
    font-weight: 600;
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-item i {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

/* ============================================
   SIDEBAR PLAYLISTS GRID
   ============================================ */

.sidebar-playlists-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    padding: 5px;
}

.sidebar-playlist-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 11px;
    padding: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.sidebar-playlist-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.sidebar-playlist-card.active {
    border-color: var(--primary-dim);
    background: var(--bg-elevated);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.sidebar-playlist-card i {
    font-size: 1.7rem;
    color: var(--primary);
    margin-bottom: 4px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.sidebar-playlist-card h4 {
    font-size: 0.83rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    color: var(--primary);
}

.sidebar-playlist-card p {
    font-size: 0.73rem;
    color: var(--text-dim);
    margin: 0;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

/* ============================================
   SEARCH HEADER
   ============================================ */

.search-header {
    padding: 40px 40px 30px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.8);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.search-box {
    max-width: 100%;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-box:focus-within {
    border-color: var(--primary-dim);
    background: var(--bg-elevated);
    box-shadow: 0 4px 30px rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.search-box i {
    color: var(--text-dim);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-box:focus-within i {
    color: var(--primary);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1.1rem;
    padding: 6px 0;
    font-weight: 400;
}

.search-box input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.search-box button {
    background: var(--primary);
    color: var(--bg-deep);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    font-weight: bold;
    font-size: 1.05rem;
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.search-box button:active {
    transform: scale(1.05);
}

/* ============================================
   GENRE TABS
   ============================================ */

.genre-tabs {
    display: flex;
    gap: 12px;
    padding: 18px 40px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(10, 10, 10, 0.8);
    flex-shrink: 0;
}

.genre-tabs::-webkit-scrollbar {
    display: none;
}

.genre-tab {
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.genre-tab:hover {
    background: var(--bg-elevated);
    color: var(--primary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.genre-tab.active {
    background: var(--primary);
    color: var(--bg-deep);
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.genre-tab i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.genre-tab:hover i {
    transform: scale(1.1);
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 40px 50px;
}

/* ============================================
   CONTENT HEADER
   ============================================ */

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.content-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.content-header small {
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--bg-elevated);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.now-playing-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track,
.now-playing-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb,
.now-playing-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover,
.now-playing-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* END OF PART 1 */
/* ============================================
   VIBESPOT DARK THEME - PART 2/5
   Music Cards, Grid, Buttons, Empty States
   Lines: 501-1000
   ============================================ */

/* ============================================
   GRID LAYOUT
   ============================================ */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 22px;
    padding-bottom: 30px;
}

/* ============================================
   MUSIC CARDS
   ============================================ */

.music-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--border);
    overflow: hidden;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.music-card:hover::before {
    opacity: 1;
}

.music-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(255, 255, 255, 0.05);
}

.music-card img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.music-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
}

.music-card h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    color: var(--primary);
}

.music-card p {
    font-size: 0.82rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   ADD TO PLAYLIST BUTTON
   ============================================ */

.add-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid var(--border-hover);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7) rotate(-90deg);
}

.music-card:hover .add-btn {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.add-btn:hover {
    background: var(--primary);
    color: var(--bg-deep);
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border-color: var(--primary);
}

.add-btn i {
    font-size: 1rem;
}

/* ============================================
   WELCOME / EMPTY STATES
   ============================================ */

.welcome-msg {
    text-align: center;
    padding: 80px 30px;
    color: var(--text-dim);
}

.welcome-msg i {
    font-size: 4.5rem;
    margin-bottom: 22px;
    opacity: 0.2;
    color: var(--text-dim);
}

.welcome-msg i.fa-spinner {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 22px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    opacity: 1;
}

.welcome-msg h2 {
    font-size: 1.9rem;
    margin-bottom: 10px;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.welcome-msg p {
    font-size: 1rem;
    color: var(--text-dim);
}

/* ============================================
   PLAYLIST CARDS (Main Page)
   ============================================ */

.playlist-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid var(--border);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.playlist-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(255, 255, 255, 0.05);
}

.playlist-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary);
}

.playlist-card p {
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.playlist-actions {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-card:hover .playlist-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid var(--border-hover);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--primary);
    color: var(--bg-deep);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ============================================
   BUTTONS - Create, Save, Back, etc.
   ============================================ */

.create-btn {
    background: var(--primary);
    color: var(--bg-deep);
    border: none;
    padding: 13px 26px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.save-btn {
    background: var(--primary);
    color: var(--bg-deep);
    border: none;
    padding: 13px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.back-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
    padding: 11px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
    color: var(--primary);
}

.play-all-btn {
    background: var(--primary);
    color: var(--bg-deep);
    border: none;
    padding: 11px 26px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.play-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.shuffle-btn, .repeat-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-hover);
    padding: 11px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: all 0.3s ease;
}

.shuffle-btn:hover, .repeat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.shuffle-btn.active, .repeat-btn.active {
    background: var(--primary);
    color: var(--bg-deep);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.delete-playlist-btn {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 11px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: all 0.3s ease;
}

.delete-playlist-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ============================================
   PLAYLIST PAGE HEADER
   ============================================ */

.playlist-header {
    padding: 30px 40px 22px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: rgba(10, 10, 10, 0.8);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

/* ============================================
   EMPTY PLAYLIST STATE
   ============================================ */

.empty-playlist {
    text-align: center;
    padding: 70px 30px;
    color: var(--text-dim);
}

.empty-playlist i {
    font-size: 4.5rem;
    margin-bottom: 22px;
    opacity: 0.15;
}

.empty-playlist h3 {
    font-size: 1.45rem;
    margin-bottom: 11px;
    color: var(--primary);
}

.empty-playlist p {
    color: var(--text-dim);
}

.empty-playlist a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.03rem;
    transition: all 0.3s ease;
}

.empty-playlist a:hover {
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* REMOVED - No float animation on hover */

/* ============================================
   GLOW EFFECTS
   ============================================ */

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
}

.sidebar-item.active,
.genre-tab.active {
    animation: subtleGlow 3s ease-in-out infinite;
}

/* ============================================
   FOCUS STATES
   ============================================ */

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-dim);
    outline-offset: 2px;
}

/* ============================================
   SELECTION COLOR
   ============================================ */

::selection {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   LOADING SHIMMER EFFECT
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.03) 0%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 100%);
    background-size: 1000px 100%;
}

/* END OF PART 2 */
/* ============================================
   VIBESPOT DARK THEME - PART 3/5
   Now Playing Sidebar, Mini Player, Controls
   Lines: 1001-1500
   ============================================ */

/* ============================================
   RIGHT SIDEBAR - NOW PLAYING
   ============================================ */

.now-playing-sidebar {
    width: 340px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px 25px;
    flex-shrink: 0;
    overflow-y: auto;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
}

.now-playing-header h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: 700;
}

/* ============================================
   CURRENT TRACK DISPLAY
   ============================================ */

.current-track-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
}

.current-track-display img {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.current-track-display img:hover {
    transform: scale(1.02);
}

.current-track-info h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}

.current-track-info p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* ============================================
   AUDIO PLAYER WRAPPER
   ============================================ */

.audio-player-wrapper {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

audio {
    width: 100%;
    height: 45px;
    border-radius: 16px;
    outline: none;
}

/* ============================================
   CUSTOM MINI PLAYER
   ============================================ */

.custom-player {
    width: 100%;
    margin-top: 18px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.custom-player-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 18px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.custom-player-progress:hover {
    height: 6px;
}

.custom-player-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.mini-progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
    transition: left 0.1s linear;
    opacity: 0;
    pointer-events: none;
}

.custom-player-progress:hover .mini-progress-handle {
    opacity: 1;
}

/* ============================================
   MINI PLAYER CONTROLS
   ============================================ */

.custom-player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.mini-control-btn {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mini-control-btn:hover {
    background: var(--bg-elevated);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.mini-play-pause {
    background: var(--primary);
    color: var(--bg-deep);
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
    border: none;
}

.mini-play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.mini-shuffle.active,
.mini-repeat.active {
    color: var(--primary);
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* ============================================
   PLAYER TIME DISPLAY
   ============================================ */

.player-time {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    border: 1px solid var(--border-hover);
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 255, 255, 0.05);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.close-btn {
    background: transparent;
    color: var(--text-dim);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--bg-elevated);
    color: var(--primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================
   PLAYLIST INPUT
   ============================================ */

.playlist-input {
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    padding: 15px 18px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.playlist-input:focus {
    border-color: var(--primary-dim);
    background: var(--bg-card);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* ============================================
   PLAYLIST LIST ITEM
   ============================================ */

.playlist-list-item {
    background: var(--bg-elevated);
    padding: 16px 18px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid transparent;
}

.playlist-list-item:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.playlist-list-item i {
    font-size: 1.15rem;
    color: var(--primary);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--primary);
    color: var(--bg-deep);
    padding: 17px 26px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
    font-weight: 600;
    font-size: 0.98rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast i {
    font-size: 1.25rem;
}

.toast.error {
    background: #ef4444;
    color: white;
}

/* ============================================
   PLAYLIST DETAIL VIEW
   ============================================ */

.playlist-detail-view {
    padding: 0;
}

.playlist-banner {
    background: linear-gradient(135deg, #0a0a0a 0%, #171717 100%);
    padding: 45px 40px;
    display: flex;
    align-items: center;
    gap: 32px;
    border-bottom: 1px solid var(--border);
}

.playlist-image {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: var(--primary);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.playlist-info h1 {
    font-size: 2.3rem;
    margin-bottom: 13px;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.playlist-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-dim);
    font-size: 0.93rem;
    margin-bottom: 22px;
}

.playlist-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.playlist-actions-bar {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
}

/* ============================================
   PLAYLIST SONGS SECTION
   ============================================ */

.playlist-songs-section {
    padding: 32px 40px;
}

.songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.songs-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   SONG LIST
   ============================================ */

.song-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.song-item {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.song-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.song-item img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.song-item-info {
    flex: 1;
    min-width: 0;
}

.song-item-info h4 {
    font-size: 0.98rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: var(--primary);
}

.song-item-info p {
    font-size: 0.86rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item-duration {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-right: 13px;
}

.song-remove-btn {
    background: transparent;
    color: var(--text-dim);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.song-item:hover .song-remove-btn {
    opacity: 1;
}

.song-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* END OF PART 3 */
/* ============================================
   VIBESPOT DARK THEME - PART 4/5
   Full Screen Now Playing Page & Controls
   Lines: 1501-2000
   ============================================ */

/* ============================================
   NOW PLAYING FULL SCREEN PAGE
   ============================================ */

.nowplaying-body {
    background: var(--bg-deep);
    overflow: hidden;
}

.nowplaying-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================
   BLURRED BACKGROUND
   ============================================ */

.nowplaying-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(100px) brightness(0.2);
    transform: scale(1.2);
    z-index: 0;
}

/* ============================================
   NOW PLAYING CONTENT
   ============================================ */

.nowplaying-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 23px;
}

/* ============================================
   NOW PLAYING HEADER
   ============================================ */

.nowplaying-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-icon-btn, .more-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-hover);
    width: 43px;
    height: 43px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.3s ease;
}

.back-icon-btn:hover, .more-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.nowplaying-title {
    color: white;
    font-size: 0.98rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   ALBUM ART CONTAINER
   ============================================ */

.album-art-container {
    display: flex;
    justify-content: center;
    margin: 13px 0;
}

.album-art-container img {
    width: 100%;
    max-width: 330px;
    aspect-ratio: 1;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 255, 255, 0.08);
    object-fit: cover;
    border: 1px solid var(--border-hover);
    transition: transform 0.3s ease;
}

.album-art-container img:hover {
    transform: scale(1.02);
}

/* ============================================
   SONG INFO SECTION
   ============================================ */

.song-info-section {
    text-align: center;
    margin: 9px 0;
}

.song-info-section h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: white;
    margin-bottom: 7px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.song-info-section p {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   PROGRESS SECTION
   ============================================ */

.progress-section {
    margin: 13px 0;
}

.progress-bar-container {
    width: 100%;
    padding: 9px 0;
    cursor: pointer;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: visible;
    transition: height 0.2s ease;
}

.progress-bar-container:hover .progress-bar {
    height: 8px;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.1s linear;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    transition: left 0.1s linear;
}

.time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.83rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* ============================================
   PLAYER CONTROLS SECTION
   ============================================ */

.player-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 13px;
    margin-top: 13px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-hover);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.play-pause-btn {
    width: 63px;
    height: 63px;
    background: white;
    color: var(--bg-deep);
    font-size: 1.55rem;
    border: none;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
}

.shuffle-control.active,
.repeat-control.active {
    background: white;
    color: var(--bg-deep);
    border: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.prev-btn, .next-btn {
    font-size: 1.18rem;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */

.mobile-menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu-btn:hover {
    background: rgba(10, 10, 10, 1);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn .bar {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.4s ease;
}

.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu-btn.active {
    background: white;
    border-color: white;
    transform: scale(1.1);
}

.mobile-menu-btn.active .bar {
    background: var(--bg-deep);
}

/* ============================================
   SIDEBAR OVERLAY
   ============================================ */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   BACKDROP BLUR ENHANCEMENT
   ============================================ */

@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
    .sidebar,
    .now-playing-sidebar,
    .search-box,
    .modal-content {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

/* ============================================
   BLUR BACKGROUND FOR MAIN CONTENT
   ============================================ */

.main-content.blur-bg {
    filter: blur(3px);
    pointer-events: none;
}

/* ============================================
   GLOW ANIMATIONS
   ============================================ */

@keyframes gentleGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

.play-pause-btn {
    animation: gentleGlow 2s ease-in-out infinite;
}

/* ============================================
   PULSE ANIMATION FOR ACTIVE ELEMENTS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.shuffle-control.active,
.repeat-control.active {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
    transition: color 0.3s ease, 
                background-color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Override for specific elements that need different transitions */
.progress-fill,
.custom-player-progress-fill,
.mini-progress-handle,
.progress-handle {
    transition: none;
}

/* ============================================
   CARD PARTICLE EFFECT
   ============================================ */

.music-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.music-card:hover::after {
    opacity: 1;
}

/* ============================================
   SHOOTING STAR EFFECT (Subtle)
   ============================================ */

@keyframes shootingStar {
    0% {
        transform: translateX(-100vw) translateY(-100vh) rotate(45deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(100vh) rotate(45deg);
        opacity: 0;
    }
}

.app-container::before {
    content: '';
    position: fixed;
    top: -5px;
    left: -5px;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    animation: shootingStar 8s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* ============================================
   FADE IN ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.music-card,
.playlist-card,
.song-item {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   TEXT SHADOW FOR READABILITY
   ============================================ */

h1, h2, h3, h4 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */

html {
    scroll-behavior: smooth;
}

.content-area,
.sidebar,
.now-playing-sidebar {
    scroll-behavior: smooth;
}

/* END OF PART 4 */
/* ============================================
   VIBESPOT DARK THEME - PART 5/5 (FINAL)
   Responsive Design & Mobile Optimization
   Lines: 2001-2500
   ============================================ */

/* ============================================
   TABLET & MEDIUM SCREENS (769px - 1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    .now-playing-sidebar {
        width: 300px;
    }
    
    .nowplaying-content {
        max-width: 430px;
    }
    
    .album-art-container img {
        max-width: 310px;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 18px;
    }
}

/* ============================================
   MOBILE DEVICES (MAX 768px)
   ============================================ */

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* Sidebar mobile behavior - MAXIMUM SPECIFICITY */
    body .app-container .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -300px !important;
        right: auto !important;
        height: 100vh !important;
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
        z-index: 999 !important;
        padding: 80px 20px 25px !important;
        box-shadow: none !important;
        transform: translateX(0) !important;
        transition: none !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    body.menu-open .app-container .sidebar.mobile-open {
        left: 0 !important;
        transform: translateX(0) !important;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.8) !important;
    }
    
    /* Extra specificity for stubborn browsers */
    body.menu-open .sidebar.mobile-open {
        left: 0 !important;
    }
    
    html body .sidebar.mobile-open {
        left: 0 !important;
    }
    
    /* Search header adjustments */
    .search-header {
        padding: 80px 20px 20px;
    }
    
    .search-box {
        padding: 12px 20px;
    }
    
    .search-box input {
        font-size: 1rem;
    }
    
    .search-box button {
        width: 42px;
        height: 42px;
    }
    
    /* Genre tabs */
    .genre-tabs {
        padding: 16px 18px 13px;
    }
    
    .genre-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
    
    /* Content area */
    .content-area {
        padding: 22px 18px 120px;
    }
    
    /* Grid adjustments */
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    /* Content header */
    .content-header h2 {
        font-size: 1.5rem;
    }
    
    .content-header small {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
    
    /* Music cards */
    .music-card {
        padding: 12px;
    }
    
    .music-card h3 {
        font-size: 0.88rem;
    }
    
    .music-card p {
        font-size: 0.78rem;
    }
    
    /* Add button always visible on mobile */
    .add-btn {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    /* Right sidebar - Now Playing (Bottom bar) */
    .now-playing-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 15px;
        z-index: 900;
        background: rgba(10, 10, 10, 0.98);
    }
    
    .now-playing-header {
        display: none;
    }
    
    /* Current track display horizontal */
    .current-track-display {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        text-align: left;
    }
    
    .current-track-display img {
        max-width: 55px;
        border-radius: 8px;
    }
    
    .current-track-info {
        flex: 1;
        min-width: 0;
    }
    
    .current-track-info h2 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .current-track-info p {
        font-size: 0.8rem;
    }
    
    /* Audio player wrapper */
    .audio-player-wrapper {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .custom-player {
        margin-top: 0;
    }
    
    .custom-player-progress {
        margin-bottom: 8px;
        height: 3px;
    }
    
    .custom-player-controls {
        gap: 8px;
        justify-content: space-around;
    }
    
    .mini-control-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .mini-play-pause {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
    
    .player-time {
        font-size: 0.7rem;
        margin-top: 6px;
    }
    
    /* Playlist banner */
    .playlist-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 18px;
    }
    
    .playlist-image {
        width: 140px;
        height: 140px;
        font-size: 3.3rem;
    }
    
    .playlist-info h1 {
        font-size: 1.7rem;
    }
    
    .playlist-meta {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        font-size: 0.85rem;
    }
    
    .playlist-actions-bar {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .back-btn,
    .play-all-btn,
    .shuffle-btn,
    .repeat-btn,
    .delete-playlist-btn {
        padding: 10px 18px;
        font-size: 0.88rem;
        flex: 1;
        min-width: 120px;
    }
    
    /* Playlist songs section */
    .playlist-songs-section {
        padding: 20px 18px 120px;
    }
    
    /* Song items */
    .song-item {
        padding: 12px 14px;
    }
    
    .song-item img {
        width: 48px;
        height: 48px;
    }
    
    .song-item-info h4 {
        font-size: 0.88rem;
    }
    
    .song-item-info p {
        font-size: 0.78rem;
    }
    
    .song-item-duration {
        font-size: 0.8rem;
    }
    
    .song-remove-btn {
        opacity: 1;
        width: 34px;
        height: 34px;
    }
    
    /* Now playing full screen */
    .nowplaying-content {
        padding: 18px;
        gap: 18px;
        max-width: 100%;
    }
    
    .album-art-container {
        margin: 8px 0;
    }
    
    .album-art-container img {
        max-width: 280px;
    }
    
    .song-info-section {
        margin: 6px 0;
    }
    
    .song-info-section h1 {
        font-size: 1.35rem;
    }
    
    .song-info-section p {
        font-size: 0.9rem;
    }
    
    .control-btn {
        width: 43px;
        height: 43px;
        font-size: 0.98rem;
    }
    
    .play-pause-btn {
        width: 58px;
        height: 58px;
        font-size: 1.35rem;
    }
    
    .prev-btn, .next-btn {
        font-size: 1.05rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        padding: 22px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .playlist-input {
        font-size: 0.95rem;
        padding: 13px 16px;
    }
    
    .save-btn {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
    
    .playlist-list-item {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    /* Toast notification */
    .toast {
        bottom: 100px;
        right: 15px;
        left: 15px;
        padding: 14px 20px;
        font-size: 0.9rem;
    }
    
    /* Welcome message */
    .welcome-msg {
        padding: 60px 20px;
    }
    
    .welcome-msg i {
        font-size: 3.5rem;
    }
    
    .welcome-msg h2 {
        font-size: 1.5rem;
    }
    
    .welcome-msg p {
        font-size: 0.95rem;
    }
    
    /* Playlist header */
    .playlist-header {
        padding: 80px 20px 18px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-content h1 {
        font-size: 1.7rem;
    }
    
    .create-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Sidebar playlists grid */
    .sidebar-playlists-grid {
        max-height: calc(100vh - 350px);
    }
}

/* ============================================
   SMALL MOBILE DEVICES (MAX 480px)
   ============================================ */

@media (max-width: 480px) {
    .search-header {
        padding: 75px 15px 15px;
    }
    
    .search-box {
        padding: 10px 16px;
    }
    
    .search-box input {
        font-size: 0.95rem;
    }
    
    .search-box button {
        width: 38px;
        height: 38px;
    }
    
    .content-area {
        padding: 18px 12px 120px;
    }
    
    .grid-container {
        gap: 12px;
    }
    
    .content-header h2 {
        font-size: 1.3rem;
    }
    
    .genre-tab {
        padding: 7px 12px;
        font-size: 0.78rem;
    }
    
    .album-art-container img {
        max-width: 240px;
    }
    
    .playlist-banner {
        padding: 22px 15px;
    }
    
    .playlist-info h1 {
        font-size: 1.5rem;
    }
    
    .song-info-section h1 {
        font-size: 1.2rem;
    }
}

/* ============================================
   ACCESSIBILITY & FINAL POLISH
   ============================================ */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: rgba(255, 255, 255, 0.3);
        --border-hover: rgba(255, 255, 255, 0.5);
    }
    
    .music-card,
    .playlist-card,
    .song-item {
        border-width: 2px;
    }
}

/* Dark mode preference (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
    body {
        background: var(--bg-deep);
        color: var(--text);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .now-playing-sidebar,
    .mobile-menu-btn,
    .search-header,
    .genre-tabs {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .music-card,
    .playlist-card {
        break-inside: avoid;
    }
}

/* ============================================
   LANDSCAPE MODE (MOBILE)
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .nowplaying-content {
        flex-direction: row;
        max-width: 100%;
        gap: 20px;
    }
    
    .album-art-container {
        margin: 0;
        flex-shrink: 0;
    }
    
    .album-art-container img {
        max-width: 220px;
    }
    
    .song-info-section,
    .progress-section,
    .player-controls-section {
        flex: 1;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .sidebar-item,
    .genre-tab,
    .mini-control-btn,
    .control-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .music-card:hover,
    .playlist-card:hover,
    .song-item:hover {
        transform: none;
    }
    
    /* Show all interactive elements on touch */
    .add-btn,
    .song-remove-btn {
        opacity: 1;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* ============================================
   SAFE AREA INSETS (for notched devices)
   ============================================ */

@supports (padding: max(0px)) {
    .sidebar,
    .now-playing-sidebar {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .now-playing-sidebar {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   FINAL TOUCHES
   ============================================ */

/* Smooth font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Prevent text selection on UI elements */
button,
.sidebar-item,
.genre-tab,
.music-card,
.playlist-card {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Allow text selection on content */
.song-info-section,
.playlist-info,
.current-track-info {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
}

/* Hardware acceleration for animations */
.music-card,
.playlist-card,
.sidebar,
.now-playing-sidebar {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* END OF PART 5 - DARK THEME COMPLETE! */  
/* ============================================
   MOBILE CSS FIXES - Add to end of your CSS
   ============================================ */

@media (max-width: 768px) {
    /* ✅ FIX: Make sidebar overlay clickable */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(8px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.4s ease;
        cursor: pointer; /* ← Make it obvious it's clickable */
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* ✅ FIX: Sidebar visibility and z-index */
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        z-index: 999;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        padding: 80px 20px 25px;
        box-shadow: none;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.9);
    }
    
    /* ✅ FIX: Sidebar playlist cards clickable */
    .sidebar-playlist-card {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
    }
    
    .sidebar-playlist-card:active {
        transform: scale(0.98);
        background: var(--bg-elevated);
    }
    
    /* ✅ FIX: Sidebar items clickable */
    .sidebar-item {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .sidebar-item:active {
        transform: translateX(2px);
        background: var(--bg-elevated);
    }
    
    /* ✅ FIX: Mobile menu button always visible */
    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* ✅ FIX: Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* ✅ FIX: Main content blur */
    .main-content.blur-bg {
        filter: blur(3px);
        pointer-events: none;
    }
    
    /* ✅ FIX: Now playing sidebar stays at bottom */
    .now-playing-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 15px;
        z-index: 900;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
    }
    
    /* ✅ FIX: Proper z-index layering */
    .mobile-menu-btn { z-index: 1001; }
    .sidebar.mobile-open { z-index: 999; }
    .sidebar-overlay.active { z-index: 998; }
    .now-playing-sidebar { z-index: 900; }
    .main-content { z-index: 1; }
    
    /* ✅ FIX: Content area padding for bottom player */
    .content-area {
        padding: 22px 18px 120px;
    }
    
    /* ✅ FIX: Playlist banner mobile friendly */
    .playlist-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 18px;
    }
    
    .playlist-image {
        width: 140px;
        height: 140px;
        font-size: 3.3rem;
    }
    
    .playlist-info h1 {
        font-size: 1.7rem;
    }
    
    .playlist-actions-bar {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }
    
    .playlist-actions-bar button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .sidebar-item,
    .sidebar-playlist-card,
    .genre-tab,
    .mini-control-btn,
    .control-btn,
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch */
    .music-card:hover,
    .playlist-card:hover {
        transform: none;
    }
    
    /* Show interactive elements always */
    .add-btn,
    .song-remove-btn {
        opacity: 1;
    }
    
    /* Better tap feedback */
    .sidebar-item:active,
    .sidebar-playlist-card:active,
    button:active {
        opacity: 0.8;
    }
}
/* ============================================
   MOBILE FIXES - FINAL VERSION
   Replace ALL mobile CSS with this
   ============================================ */

@media (max-width: 768px) {
    /* ===== MOBILE MENU BUTTON ===== */
    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-hover);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        cursor: pointer;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    .mobile-menu-btn .bar {
        width: 24px;
        height: 3px;
        background: white;
        border-radius: 3px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-menu-btn.active {
        background: white;
        border-color: white;
    }
    
    .mobile-menu-btn.active .bar {
        background: var(--bg-deep);
    }
    
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* ===== SIDEBAR POSITIONING ===== */
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        bottom: 0;
        height: 100vh;
        width: 280px;
        z-index: 999;
        padding: 80px 20px 25px;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.9);
    }
    
    /* ===== OVERLAY ===== */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(8px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.4s ease;
        cursor: pointer;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* ===== BODY LOCK ===== */
    body.menu-open {
        overflow: hidden;
    }
    
    /* ===== MAIN CONTENT BLUR ===== */
    .main-content.blur-bg {
        filter: blur(3px);
        pointer-events: none;
    }
    
    /* ===== SEARCH HEADER ===== */
    .search-header {
        padding: 80px 20px 20px;
    }
    
    /* ===== CONTENT AREA ===== */
    .content-area {
        padding: 22px 18px 120px;
    }
    
    /* ===== GRID ===== */
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    /* ===== NOW PLAYING SIDEBAR (BOTTOM) ===== */
    .now-playing-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 15px;
        z-index: 900;
    }
    
    .now-playing-header {
        display: none;
    }
    
    .current-track-display {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        text-align: left;
    }
    
    .current-track-display img {
        max-width: 55px;
        border-radius: 8px;
    }
    
    .current-track-info h2 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* ===== CUSTOM PLAYER ===== */
    .audio-player-wrapper {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .custom-player-progress {
        height: 3px;
        margin-bottom: 8px;
    }
    
    .custom-player-controls {
        gap: 8px;
    }
    
    .mini-control-btn {
        width: 34px;
        height: 34px;
    }
    
    .mini-play-pause {
        width: 40px;
        height: 40px;
    }
    
    /* ===== PLAYLIST BANNER ===== */
    .playlist-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 18px;
    }
    
    .playlist-image {
        width: 140px;
        height: 140px;
    }
    
    .playlist-actions-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .playlist-actions-bar button {
        flex: 1;
        min-width: 120px;
    }
    
    /* ===== SONG ITEMS ===== */
    .song-item {
        padding: 12px 14px;
    }
    
    .song-item img {
        width: 48px;
        height: 48px;
    }
    
    .song-remove-btn {
        opacity: 1;
    }
    
    /* ===== ADD BUTTON ===== */
    .add-btn {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
    
    /* ===== TOAST ===== */
    .toast {
        bottom: 100px;
        right: 15px;
        left: 15px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .search-header {
        padding: 75px 15px 15px;
    }
    
    .content-area {
        padding: 18px 12px 120px;
    }
    
    .grid-container {
        gap: 12px;
    }
}