* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif, Arial, Helvetica, sans-serif;
}

body {
    display: grid;
    height: 100vh;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: 50px auto;
    background-color: black;
    padding: 10px;
    gap: 8px;
    color: white;
}

nav {
    grid-area: 1/1/2/span 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

nav .menu {
    display: none;
}


nav .left {
    display: flex;
    width: 40%;
    justify-content: space-between;
    align-items: center;
}

nav .left input {
    font-size: 15px;
    padding: 10px 20px;
    background-color: rgb(29, 29, 29);
    border: none;
    outline: none;
    border-radius: 20px;
    width: 500px;
    font-weight: 600;
}

nav .right {
    display: flex;
    width: 40%;
    justify-content: space-between;
    color: gray;
    align-items: center;
}

nav .right .bold-words {
    display: flex;
    gap: 10px;
    color: gray;
    font-weight: 800;
}

nav .right .install,
.sign-up {
    font-weight: bold;
    font-size: 14px;
}

nav .right .log-in {
    background-color: white;
    color: black;
    padding: 10px 20px;
    /* font-size: 20px;/ */
    font-weight: bold;
    /* padding: 8px 15px; */
    border-radius: 20px;
}

.sidebar {
    background-color: #121212;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 20px;
}

.sidebar .title {
    display: flex;
    font-size: 18px;
    font-weight: bolder;
    justify-content: space-between;
}

.sidebar .songs-list {
    height: 60vh;
    overflow: auto;
    gap: 20px;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    cursor: pointer;
}

.sidebar .sidebar-song {
    /* background-color: red; */
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.sidebar .sidebar-song div:hover {
    background-color: gray;
}

.sidebar :last-child {
    cursor: pointer;
}

.sidebar-song img:first-child {
    border-radius: 5px;
}

.sidebar-song div {
    width: 60%;
}


.sidebar-song div :first-child {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-song div :last-child {
    font-size: 12px;
    color: gray;
}

.sidebar .policies {
    font-size: 12px;
    color: rgb(173, 171, 171);
    display: flex;
    /* grid-template-columns: repeat(3,1fr); */
    flex-wrap: wrap;
    gap: 20px;
}

.sidebar>div:last-child {
    font-size: 12px;
    color: rgb(218, 216, 216);
    width: fit-content;
    padding: 10px 20px;
    font-weight: bolder;
    border-radius: 100px;
    border: 1px solid rgb(215, 215, 215);

}

main {
    background-image: linear-gradient(rgb(30, 30, 30), black);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 90vh;
    position: relative;
}

main p {
    font-size: 20px;
    font-weight: 900;

}

main .cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr 1fr 1fr;
    overflow: auto;
    height: 70vh;
    gap: 20px 0;
    /* height: 80%; */
}

main .card {
    width: 180px;
    display: flex;
    flex-direction: column;
    /* background-color: blue; */
    gap: 10px;
    position: relative;
    cursor: pointer;
    padding: 10px;
}

main .card:hover {
    background-color: rgba(166, 166, 168, 0.16);
}

main .card img {
    width: 100%;
    height: 80%;
    border-radius: 10px;
}

main .card .song-info {
    font-weight: bold;
}

main .card .song-name {
    font-size: 14px;
    color: rgb(218, 216, 216);
}

main .card .play-btn {
    position: absolute;
    right: 18px;
    bottom: 75px;
    /* font-size: 30px; */
    background-color: rgb(1, 190, 23);
    color: black;
    width: 30px;
    height: 30px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px 0px 0px 2px;
}

main .player {
    box-sizing: border-box;
    position: absolute;
    /* color: wheat; */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c2b2b;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;

}

main .controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

main .controls .name {
    width: max-content;
    font-weight: bold;
}

/* main .controls .time{
    width: px;
} */

main .control-btns {
    display: flex;
    gap: 20px;
    cursor: pointer;
}

main .scroll {
    height: 10px;
    width: 100%;
    border: 2px solid rgb(89, 88, 88);
    border-radius: 20px;
    /* padding: 0 5px; */
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

main .scroll .circle {
    width: 8px;
    height: 8px;
    background-color: #b0b0b0;
    border-radius: 20px;
    position: absolute;
    left: 0;
    transition: left 0.5s;
}

main .sound {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.sound input {
    cursor: pointer;
}

/* Tablet & Mobile Layout */
@media(max-width:1400px) {
    nav .menu {
        display: block;
        cursor: pointer;
    }

    nav .left {
        display: none;
    }

    nav .right .bold-words,
    .left,
    .line,
    .install {
        display: none;
    }

    nav .right {
        justify-content: space-around;
        width: 20%;
    }

    .sidebar {
        position: absolute;
        transform: translateX(-600px);
        top: 65px;
        transition: all 1s ease-in-out;
        z-index: 10;
        /* opacity: 0.8; */
        background-color: rgba(0, 0, 0, 0.499);
        backdrop-filter: blur(20px);
    }

    body {
        grid-template-columns: 1fr;
        grid-template-rows: 50px auto;
    }

    main {
        padding: 30px 10px;
    }

    main .cards {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-rows: repeat(3, 1fr);
    }

    main .card {
        width: 100%;
    }

    .player {
        font-size: 14px;
        z-index: 1;
    }

    .control-btns img {
        width: 20px;
    }

    .sound {
        gap: 0px;
    }

    .sound img {
        width: 15px;
    }
}

/* Mobile Card Adjustment */
@media (max-width:1000px) {
    nav .right {
        width: 50%;
    }

    main {
        padding: 10px;
    }

    main .player {
        /* position: fixed; */
        width: 100%;
        margin: 10px;
        /* border-radius: 0px; */
        padding: 10px 5px;
        left: 10px;
        width: 90%;
    }

    main .cards {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(9, 1fr);
    }

    .controls {
        flex-direction: column;
        /* flex-wrap: wrap; */
        gap: 15px;
    }

    .controls .name {
        width: 800px;
    }

    .controls input {
        height: 2px;
        width: 60px;
    }

}

@media (max-width:500px) {
    nav .right{
        width: 60%;
    }
    main .player {
        bottom: 20px;
    }

    main {
        align-items: center;
        padding: 15px 0px;
        width: 100%;
    }

    main .cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(13, 1fr);
    }

    main .card {
        width: 100%;
    }

    .sidebar {
        width: 80%;
    }

    .sidebar .policies,
    .lang {
        display: none;
    }

    .sidebar .sidebar-song {
        height: 10%;
    }
}