/* === BASE STYLES (copied from desktop.css) === */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: rgba(33, 33, 33, 1.0);
}

#container {
    display: flex;
}

/* Sidebar */
#sidebar {
    background-color: #181818;
    width: 160px;
    min-width: 160px;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* start at full screen height */
    height: auto;      /* allow it to grow if content is taller */
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-bottom: 1px solid #333;
    height: 50px;
}
.sidebar-logo {
    height: 125px;
    width: auto;
}
nav a {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    width: 100%;
}
nav a .material-icons {
    font-size: 18px;
    margin-right: 6px;
}
nav a:hover {
    color: white;
    background-color: transparent;
    padding-left: 12px;
}
.divider {
    border: none;
    border-top: 1px solid #fff;
    margin: 6px auto;
    width: 80%;
}

/* Main content */
main {
    flex: 1;
    padding: 20px;
}

/* Video + Spotify layout */
.videos-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    flex: 1;
}
.video-card {
    background: #2b2b2b;
    border-radius: 8px;
    overflow: hidden;
    color: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
}
.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.video-card .video-title {
    padding: 8px;
    font-weight: bold;
}

/* Divider between sections on mobile */
.mobile-divider {
    display: none;
    height: 2px;
    background-color: purple;
    margin: 15px 0;
}

/* Hide mobile embed by default */
.spotify-mobile {
    display: none;
}

.spotify-embed {
    display: none !important;
}

/* Lightbox overlay */
.lightbox {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Close button */
.lightbox .close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    color: white;
    cursor: pointer;
}

/* Navigation arrows */
.lightbox .prev, .lightbox .next {
    position: absolute;
    top: 50%;
    font-size: 48px;
    color: white;
    cursor: pointer;
    padding: 10px;
    transform: translateY(-50%);
    user-select: none;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }


/* === MOBILE OVERRIDES === */
@media only screen and (max-width: 768px) {
    /* Sidebar shrink */
    #sidebar {
        width: 60px !important;
        min-width: 60px !important;
        align-items: center !important;
    }
    nav a {
        justify-content: center !important;
        padding: 12px 0 !important;
        font-size: 0 !important;
    }
    nav a span.material-icons { 
        margin-right: 0 !important; 
    }
    .divider { 
        width: 40% !important; 
    }
    .sidebar-logo {
        height: 50px !important;
        width: 50px !important;
    }

    /* Column layout for videos + embed */
    .videos-layout { 
        flex-direction: column !important; 
    }

    /* 2×2 video grid */
    .videos-grid { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Keep video ratio but make smaller */
    .video-card img {
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }

    /* Show purple divider */
    .mobile-divider { 
        display: block !important; 
    }

    /* Hide only the Spotify iframe (keep thumbnails) */
    .spotify-embed iframe {
        display: none !important;
    }

    /* Ensure music-grid stays visible */
    .music-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(100px, 1fr));
        gap: 8px;
    }

    /* Smaller music cards */
    .audio-card {
        transform: scale(0.9) !important;
        transform-origin: top left !important;
    }

    /* === NEW RULES FROM YOUR SNIPPET === */
    .home-top-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .music-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        object-fit: cover;
    }
    
    .music-card h3 {
        font-size: 13px;
        margin: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .music-card p {
        font-size: 11px;
        margin: 0 6px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .audio-list {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .audio-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 6px !important;
        font-size: 11px !important;
        height: auto !important;
    }

    .audio-icon {
        font-size: 18px !important;
        margin: 0 0 4px 0 !important;
    }

    .audio-info {
        flex: unset !important;
        width: 100%;
    }

    .audio-title {
        font-size: 11px !important;
        font-weight: bold !important;
        margin: 2px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .audio-meta {
        font-size: 9px !important;
        margin: 0;
    }

    .play-btn {
        font-size: 18px !important;
        margin-top: 4px;
    }
}