@media screen and (max-width: 750px) {

    /* Navbar adjustments */
    .logo {
        height: 40px;
        margin: 10px;
    }

    .home {
        height: 22px;
    }

    .two {
        font-size: 12px;
        gap: 6px;
    }

    .bar {
        scale: 1.8;
        margin: 0 6px;
    }

    .nav button {
        font-size: 13px;
        padding: 10px 20px;
        margin: 10px;
    }

    .main {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }

    /* Right section (playlists) comes first */
    .right {
        width: auto;
        height: auto;
        min-height: 200px;
        padding: 15px;
        order: 1;
        position: static;
        margin: 0;
    }

    .heading {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    /* Make playlists horizontally scrollable */
    .playlists {
        max-height: none;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        gap: 15px;
    }

    /* Optimized horizontal scrollbar for playlists */
    .playlists::-webkit-scrollbar {
        height: 6px;
    }

    .playlists::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }

    .playlists::-webkit-scrollbar-thumb {
        background: linear-gradient(to right, rgb(184, 40, 162), rgb(30, 144, 255));
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .playlists::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(to right, rgb(200, 60, 180), rgb(50, 164, 255));
    }

    /* Prevent cards from shrinking */
    .card {
        flex: 0 0 auto;
        min-width: 160px;
    }

    .card img {
        height: 160px;
        width: 160px;
        margin: 10px;
    }

    .card div {
        font-size: 1em;
        padding: 0 10px 10px;
    }

    /* Left section (library) comes second */
    .left {
        width: auto;
        height: 25vh;
        padding: 15px;
        order: 2;
        margin: 0;
    }

    .lib {
        padding-bottom: 15px;
        font-size: 1.1em;
    }

    /* Make song list vertically scrollable */
    .list {
        max-height: calc(25vh - 80px);
        overflow-y: auto;
    }

    .song {
        margin: 8px 0 8px -10px;
    }

    .song img {
        height: 50px;
        padding: 0 8px;
    }

    .song div {
        font-size: 0.85em;
        max-width: calc(100vw - 150px);
        padding-right: 15px;
    }

    /* Hide footer on mobile to save space */
    .footer {
        display: none;
    }

    /* Playbar adjustments */
    .playbar {
        width: 94%;
        position: static;
        margin-top: 15px;
    }

    .controls {
        left: 50%;
        transform: translateX(-50%);
    }

    .playbar-content .name {
        max-width: 25%;
        font-size: 12px;
    }

    .name,
    .time {
        font-size: 12px;
        padding: 10px;
    }

    .prev,
    .play,
    .next {
        height: 35px;
        padding: 10px 0;
    }

    /* Bottom banner adjustments */
    .bottom {
        flex-direction: column;
        text-align: center;
        padding: 8px;
        gap: 5px;
        margin: 0 10px 3px;
    }

    .bottom div div:first-child {
        font-size: 11px;
        padding: 1px 5px;
    }

    .bottom div div:last-child {
        font-size: 10px;
        padding: 2px 5px;
    }

    .bottom button {
        font-size: 12px;
        padding: 8px 20px;
        margin: 3px 0;
    }
}