* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    color: white;
}

.left {
    width: 25vw;
    padding: 10px;
}

.right {
    width: 75vw;
}

.p-1 {
    padding: 10px;
}

.home ul li {
    width: 20px;
    list-style: none;
    display: flex;
    gap: 15px;
    padding-top: 14px;
    font-weight: bold;
}

.heading {
    width: 100%;
    align-items: center;
    display: flex;
    gap: 15px;
    padding-top: 14px;
    font-weight: bold;
    padding: 23px 14px;
    font-size: 10px;
    padding-left: 1px;
}

.heading img {
    width: 19px;
}

.library {
    min-height: 73vh;
    position: relative;
}

.left .close {
    display: none;
}

.footer {
    display: flex;
    font-size: 10px;
    color: grey;
    gap: 13px;
    position: absolute;
    bottom: 0;
}

.footer a {
    color: grey;
}

.right {
    margin: 16px 0;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    background-color: rgb(26, 21, 21);
}

.header>* {
    padding: 10px;

}

.header .nav {
    justify-content: center;
    align-items: center;
    padding-top: 19px;
}

.spotifyplaylist {
    padding: 16px;

    /* font-size: small; */
}

.spotifyplaylist h1 {
    padding-bottom: 10px;
    font-size: 160%;
}

/* .spotifyplaylist .card{
    width: 100px;
} */
.main-container {
    padding-left: 0;
    margin-left: 0;
    padding-right: 0;
    margin-right: 0;
}

.cardcontainer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow-y: auto;
    max-height: 66vh;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a #121212;
    /* justify-content: flex-start;
    margin: 0; 
    padding: 0;  */

}

.cardcontainer h2 {
    font-size: 20px;
    font-weight: 1000;

}

.cardcontainer p {
    font-size: 14px;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif
}

.card {
    width: 146px;
    padding: 10px;
    background-color: #121212;
    border-radius: 8px;
    padding-top: 10px;
    cursor: pointer;
    position: relative;
}

.card img {
    width: 100%;
    border-radius: 8px;
}

.play {
    position: absolute;
    bottom: 58px;
    right: 15px;
    background-color: #1fdf64;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.card:hover .play {
    opacity: 1;
    transform: translateY(0);
}

.buttons>* {
    margin: 0 12px;
    /* top-bottom left-right */
}

.Signupbtn {
    font-weight: bolder;
    background-color: black;
    color: rgb(126, 122, 122);
    border: 0;
    outline: none;
    cursor: pointer;
    font-size: 16px;
}

.Signupbtn:hover {
    font-size: 17px;
    color: white;
}

.Loginbtn {
    background-color: white;
    border-radius: 21px;
    color: black;
    font-weight: bolds;
    cursor: pointer;
    padding: 10px;
    width: 79px;
    font-size: 16px;
}

.Loginbtn:hover {
    background-color: white;
    border-radius: 21px;
    color: black;
    font-weight: bolder;
    cursor: pointer;
    padding: 10px;
    width: 80px;
    font-size: 17px;
}

.playbar {
    position: absolute;
    /* position: fixed; */
    bottom: 0;
    /* background-color: #565856; */
    width: 95%;
    padding: 5px;
    min-height: 35px;

    filter: invert(1);
    background: #cfcbcb;
    border-radius: 30px;
}

.songbuttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.songinfo,
.songbuttons,
.timevol {
    width: 33%;
}

.songlist {
    flex-grow: 1;
    /* height: 340px;
    max-height: 800px; */
    height: calc(100vh - 250px);
    overflow: auto;
    margin-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a #121212;
}

.songlist ul {
    padding: 0 10px;
    /* 20 */
}

.songlist ul li {
    list-style-type: decimal;
    display: flex;
    gap: 10px;
    /* 15 */
    cursor: pointer;
    padding: 12px 5px;
    border: 1px solid white;
    margin: 12px 0;
    /* padding: 13px; */
    border-radius: 5px;
    justify-content: space-between;
}

.playnow {
    display: flex;
    justify-content: center;
    align-items: center;

}

.info {
    display: flex;
    /* justify-content: center; */
    align-items: center;
}

.playnow span {
    font-size: 10px;
    width: 64px;
    padding: 12px;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.info {
    font-size: 12px;
    width: 344px;
}

.info .div {
    word-break: break-all;
}

.seekbar {
    height: 2px;
    width: 98%;
    background: black;
    position: absolute;
    bottom: 3px;
    border-radius: 10px;
    margin: 6px;
    cursor: pointer;
}

.circle {
    width: 11px;
    height: 11px;
    border-radius: 13px;
    background: black;
    position: relative;
    bottom: 5px;
    left: 0%;
    transition: left 0.5s;
}

.songbuttons img {
    cursor: pointer;
}

.timevol {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.songinfo,
.songtime {
    color: black;
    padding: 0 12px;
    /* width: 200px; */
}

.volume {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    /* padding: 0px 10px; */
}

.range input {
    cursor: pointer;
}

.abovebar {
    display: flex;
    justify-content: space-between;
    /* margin: 20px 0; */
}





.modal {
    display: none;
    position: fixed;
    z-index: 10;

    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Black background with opacity */
    backdrop-filter: blur(5px);
}

/* Modal Content Box */
.modal-content {
    background-color: #121212;
    margin: 10% auto;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    position: relative;
    color: white;
}

/* The Close Button (x) */
.close-modal {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: white;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.login-form input {
    padding: 12px;
    background: #121212;
    border: 1px solid #535353;
    border-radius: 4px;
    color: white;
}

.modal-login-btn {
    background-color: #1fdf64;
    color: black;
    padding: 12px;
    border-radius: 25px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.modal-login-btn:hover {
    transform: scale(1.04);
}


.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #1DB954;
    /* Spotify Green */
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-weight: bold;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

#searchInput {
    width: 15vw;
    background-color: #242424;
    /* Darker background */
    color: white;
    /* White text */
    border: 1px solid transparent;
    border-radius: 500px;
    /* Fully rounded pill shape */
    padding: 8px 10px 8px 20px;
    /* Extra padding on left for an icon */
    font-size: 10px;
    margin: 0px;
    display: block;
    outline: none;
    transition: border 0.3s ease;
    height: 5px;
}

/* Add a highlight when clicking inside */
#searchInput:focus {
    border: 1px solid #ffffff;
    background-color: #2a2a2a;
}

/* Style the placeholder text */
#searchInput::placeholder {
    color: #b3b3b3;
}



@media (max-width: 1100px) {
    .spotifyplaylist h1 {
        padding-bottom: 18px;
        font-size: xx-large;
        font-weight: 800;
    }


    .library {
        flex-grow: 1;
        /* This tells the library to take up all remaining space */
        display: flex;
        flex-direction: column;
        position: relative;
        margin-bottom: 0;
        /* Remove margin so it touches the bottom */
        max-height: auto;
        /* Important for scrollable areas inside flex */
    }

    .footer {
        padding: 20px 10px;
        background-color: inherit;
        /* Matches library color */
    }

    .songlist {
        flex-grow: 1;
        overflow-y: auto;
        margin-bottom: 50px;
        /* Leave space for the footer if needed */
    }

    .left .close {
        position: absolute;
        right: 25px;
        top: 20px;
        /* width:20px; */
        display: inline;
    }

    .left .close img {
        width: 15px;
        cursor: pointer;
    }

    .songlist ul {
        padding: 0 0px;
        /* 20 */
    }

    .right {
        width: 100vw;
    }

    .buttons>* {
        margin: 0;
        /* top-bottom left-right */
    }

    .playbar {
        width: 93%;
        /* position: absolute; */
        position: fixed;
        bottom: 0;
        margin-bottom: 15px;
        /* width: calc(100vw - 85px); */
        /* cv */
        align-items: center;
    }


    .seekbar {
        width: 95%;
        /* width: calc(100vw - 120px); */
    }

    .hamburger {
        display: inline;
        height: 25px;
        width: 25px;
        cursor: pointer;
    }

    .cardcontainer {
        justify-content: center;
        margin: 0;
        max-height: 65vh;
        margin-bottom: 20vh;
    }


    .card {
        width: 100vw;
    }

    .abovebar {
        flex-direction: column;
        gap: 23px;
        align-items: center;
        padding: 20px;
    }

    .songinfo,
    .songinfo {
        width: auto;
    }

    .timevol {
        flex-direction: column;
        gap: 18px;
    }

    .left {
        position: fixed;
        top: 0;
        /* Change from 100vw to something slightly less if you want to see the background */
        left: -120%;
        max-height: auto;
        width: 100vw;
        /* Ensures it never exceeds 80% of any phone screen */
        height: 100dvh;
        background-color: #000;
        z-index: 100;
        transition: all 0.3s ease;
        padding: 10px;
        box-sizing: border-box;

    }

    .library {
        height: 80vh;
        /* Give it a defined height so it scrolls */
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
    }

    .songlist {
        flex: 1;
       
        overflow-y: auto;
       
        padding-bottom: 100px;
       
    }

    .modal-content {
        background-color: #121212;
        margin: 15% auto;
        padding: 20px;
        /* Reduced padding for mobile */
        border-radius: 12px;
        width: 90%;
        /* Use percentage instead of fixed px */
        max-width: 400px;
        /* Only be 400px on big screens */
        position: relative;
        color: white;
    }

    #searchInput {
        width: max-content;
        box-sizing: border-box;
    }
}