* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --player-height: 90px;
    /* future seekbar height */
}


body {
    background-color: black;
    font-family: "Montserrat", sans-serif;


    width: 100%;
    overflow-x: hidden;

}

.main,
.main-right-part,
.music-section,
.songs {
    width: 100%;
    max-width: 100%;
}


/* scroll for chrome edge brave */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background-color: #444;
    /* same grey */
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}

/* scroll for firefox */
body {
    scrollbar-width: thin;
    /* thin | auto */
    scrollbar-color: #444 transparent;
}



nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 0.75rem;
    width: 100%;
    box-sizing: border-box;
}



.left-half {
    display: flex;
    align-items: center;
    color: white;
    flex: 1;
    min-width: 0;
    /*  overflow fix */
}

.logo {
    font-size: 2.5rem;
    margin: 1rem;
}

.home-icon {
    font-size: 1.7rem;
    background-color: #1f1f1f;
    color: rgb(179, 179, 179);
    padding: 8px;
    border-radius: 50%;
    margin: 0 1rem;
    transition: 0.2s;
}

.home-icon:hover {
    color: white;
    transform: scale(1.05);
}

.mobile-search-icon {
    display: none;
}

.search-bar {
    background-color: #1f1f1f;
    align-items: center;
    display: flex;
    height: 45px;
    flex: 1;
    max-width: 420px;
    min-width: 200px;
    border-radius: 20rem;
}

.search-bar:hover {
    background-color: #2c2c2c;
    border: 1px solid rgb(76, 76, 76);
}

.search-icon {
    font-size: 1.5rem;
    color: rgb(179, 179, 179);
    padding: 0 0.7rem;
}

.search-bar:hover .search-icon {
    color: white;
}

.input-box {
    width: 78%;
    height: 60%;
    background-color: transparent;
    border: none;
    border-right: 1px solid rgb(179, 179, 179);
    color: white;
    font-size: 1.2rem;
}

.browse {
    font-size: 1.3rem;
    margin-left: 0.1rem;
    transition: 0.2s;
}

.browse:hover {
    transform: scale(1.05);
}

.right-half {
    display: flex;
    align-items: center;
    color: white;
    flex-shrink: 0;
    /* right side fixed rahe */
    margin-left: auto;
}



.right-half-p1 {
    display: flex;
    align-items: center;
    height: 1.7rem;
    margin: 0 1rem;
    padding: 0 1rem 0 0;
    border-right: 1px solid rgb(179, 179, 179);
}

.nav-text {
    padding: 0 0.5rem;
    font-weight: 600;
    color: rgb(179, 179, 179);
    transition: 0.2s;

}

.nav-text:hover {
    color: white;
    transform: scale(1.05);
    cursor: pointer;
}

.right-half-p2 {
    display: flex;
    align-items: center;
    white-space: nowrap;
}


.login-btn {
    height: 3rem;
    width: 7rem;
    border-radius: 15rem;
    border: none;
    background-color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem;
    transition: 0.2s;
}

.login-btn:hover {
    transform: scale(1.05);
}



/* main-left-part */
.main {
    background-color: black;
    width: 100%;
    min-width: unset;
    height: calc(100vh - 4rem);
    gap: 0.5rem;
    margin-top: 2vh;
    padding-bottom: var(--player-height);
    display: flex;
    color: white;
    box-sizing: border-box;
}


.main-left-part {
    width: 280px;
    flex-shrink: 0;
    height: 100%;
    background-color: #121212;
    border-radius: 10px;
    overflow-y: auto;
}

.main-left-part.hide {
    transform: translateX(-100%);
}

.library {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 1.5rem;
}

.library p {
    font-weight: 600;
}

.library div {
    font-size: 2rem;
    color: rgb(179, 179, 179);
    background-color: #2f2f2f;
    padding: 8px;
    height: 1.5rem;
    width: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 38rem;
    transition: 0.2s;
}

.library div:hover {
    transform: scale(1.05);
    color: #fff9f9;
}

.box-container {
    margin-top: 1rem;
    height: 100%;
}

.box {
    background-color: #1f1f1f;
    height: 35%;
    width: 98%;
    border-radius: 10px;
    margin: 10px 0;
}

.box h4 {
    font-weight: 600;
    font: 0.9rem;
    padding: 16px 0 0 8px;
}

.box p {
    font-size: 0.8rem;
    padding-left: 8px;
    padding-top: 4px;
}

.box button {
    background-color: white;
    color: black;
    font-weight: 600;
    padding: 8px 4px;
    margin: 16px 0 0 16px;
    border-radius: 18px;
    border: none;
    transition: 0.2s;
}

.box button:hover {
    transform: scale(1.05);
    background-color: #e6e5e5;
}

/* MAIN RIGHT PART */

.main-right-part {
    flex: 1;
    height: 100%;
    /* navbar + player space */
    background-color: #121212;
    border-radius: 10px;
    overflow-y: auto;
    /* y-axis scroll */
    overflow-x: hidden;
    /*  x-axis scroll */

}

.music-card img {
    width: 100%;
    height: 150px;
    /*  FIXED HEIGHT */
    object-fit: cover;
    /* image crop hogi, stretch nahi */
    border-radius: 8px;
    display: block;
}

.music-card {
    width: 10rem;
    padding: 0.7rem;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.music-card:hover {
    background-color: #222;
}

.music-card:hover img {
    transform: scale(1.05);
}


.music-section {
    margin: 1.5rem 0 1.5rem 1.5rem;
}

.main-right-part::-webkit-scrollbar {
    width: 8px;
}

.main-right-part::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.main-right-part::-webkit-scrollbar-track {
    background: transparent;
}

.songs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.75rem;
}

/* scrollbar slim */
.songs::-webkit-scrollbar {
    height: 6px;
}

.songs::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

.songs::-webkit-scrollbar-track {
    background: transparent;
}



.img-title {
    margin: 0.7rem 0;
}

.img-description {
    font-size: 0.8rem;
    color: rgb(199, 199, 199);
}

.music-play-btn {
    position: absolute;
    right: 10px;
    bottom: 70px;
    /* image ke andar hi */
    font-size: 2.6rem;

    background-color: black;
    border-radius: 50%;

    filter: drop-shadow(0 2px 6px rgba(30, 215, 96, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
}


.music-card:hover .music-play-btn {
    opacity: 1;

}

/* Player */

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--player-height);
    background: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;


}

.music-controller {
    display: flex;
    flex-direction: column;
    align-items: center;

}

.player {
    display: flex;
    align-items: center;
}

.player-btns {
    font-size: 1.1rem;
    margin: 0.4rem 1rem;
    color: #eeeded;
    cursor: pointer;
}

.player-btns:hover {
    transform: scale(1.02s);
    color: #fffafa;
}

#play {
    font-size: 2.3rem;
    color: white;
}

/* SEEK BAR FIX  */

#progressBar {
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    width: 35vw;
    max-width: 600px;
    height: 4px;
    background: linear-gradient(to right,
            #1db954 0%,
            #1db954 var(--seek-before-width),
            #444 var(--seek-before-width),
            #444 100%);
    border-radius: 10px;
    cursor: pointer;
}

/* thumb */
#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    margin-top: -4px;
}

#progressBar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    border: none;
}

/* track firefox */
#progressBar::-moz-range-track {
    background: #444;
    height: 4px;
    border-radius: 10px;
}



input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 10px;
}

.now-bar {
    color: white;
    display: flex;
    align-items: center;
}

.player-bar img {
    height: 4rem;
    width: 4rem;
    border-radius: 10px;
    padding: 0.3rem;
}

.nowBar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-title-info {
    color: white;
    font-size: 1rem;
    margin-left: 1rem;
}

.img-des-info {
    font: 0.8rem;
    margin-left: 1rem;
    color: rgb(192, 192, 192);
}

.active {
    color: rgb(133, 245, 133);
}

.active:hover {
    color: rgb(133, 245, 133);
}

/*  HAMBURGER */
#menuBtn {
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    display: none;
}


@media (max-width: 768px) {

    /* hamburger show */
    #menuBtn {
        display: block;
    }

    .mobile-search-icon {
        display: block;
    }

    .home-icon {
        display: none;
    }

    /* sidebar hide by default */
    .main-left-part {
        position: fixed;
        left: 0;
        top: 4rem;
        height: calc(100vh - 4rem);
        z-index: 1001;
    }

    /* search bar hide */
    .search-bar {
        display: none;
    }

    /* nav right items hide */
    .right-half {
        display: none;
    }

    /* cards thodi chhoti */
    .music-card {
        width: 8rem;
    }

    /* player bar height chhoti */
    :root {
        --player-height: 90px;
    }

    .player-bar {
        height: 60px;
        padding: 0 0.5rem;
    }

    /* song image chhoti */
    .player-bar img {
        width: 38px;
        height: 38px;
    }

    /* title text small */
    .img-title-info {
        font-size: 0.8rem;
    }

    .img-des-info {
        font-size: 0.65rem;
    }

    /* buttons compact */
    .player-btns {
        font-size: 0.9rem;
        margin: 0 0.4rem;
    }

    #play {
        font-size: 1.6rem;
    }

    /* seek bar chhoti */
    #progressBar {
        width: 55vw;
        height: 3px;
    }

    /* extra icons hide (optional) */
    #shuffle,
    #repeat {
        display: none;
    }
}

