body{
  font-family: "Montserrat", sans-serif;
  margin: 0;
  background-color: black;
  color: #fff;
  overflow: hidden;
}

.main {
    display: flex;
    height: 100vh;
    padding: 0.5rem;
    box-sizing: border-box;
}

.sidebar {
    background-color: #000;
    width: 340px;
    border-radius: 1rem; /*16px*/
    margin-right: 0.5rem;
    display: flex;
    flex-direction: column;
    padding-bottom: 84px; /* FIX: sidebar ka niche ka hissa fixed music-player ke peeche chhup raha tha, isliye bottom space diya */
    box-sizing: border-box;
}
 .main_content {
    background-color: #121212;
    flex: 1;
    border-radius: 1rem; /*16px*/
    overflow: auto;
    padding: 0 1.5rem 90px 1.5rem;
    /* FIX: padding-bottom 90px add kiya, warna last row ke cards fixed music-player ke neeche chhup jaate the */
 }

 /* FIX: custom scrollbar add kiya taaki .main_content scroll karte waqt Spotify jaisa slim dark scrollbar dikhe */
 .main_content::-webkit-scrollbar {
    width: 10px;
 }
 .main_content::-webkit-scrollbar-thumb {
    background-color: #4d4d4d;
    border-radius: 10px;
 }
 .main_content::-webkit-scrollbar-track {
    background-color: transparent;
 }

 .music-player {
    background-color: black;
    border-top: 1px solid #282828; /* FIX: thoda separation line di top pe, warna main_content se merge ho raha tha */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 72px;
    box-sizing: border-box;
}

a{
    text-decoration: none;
    color: #fff;
}
.nav{
    background-color: #121212;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100px;
    padding: 0.5rem 0.75rem;
    box-sizing: border-box;
}

.nav-option{
    line-height: 2.5rem;
    opacity: 0.7; /* FIX: pehle "opacity: o.7;" likha tha (letter 'o' number '0' ki jagah) jo invalid CSS tha aur ignore ho raha tha */
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.nav-option:hover{
    opacity: 1;
}
.nav-option.active{
    opacity: 1; /* FIX: pehle active state sirf inline style="opacity:1" se hoti thi (sirf home hardcoded), ab JS se koi bhi option active ho sakta hai */
}

.nav-option i{
    font-size: 1.25rem;
}
.nav-option a{
    font-size: 1rem;
    margin-left: 1rem;

}
.library{
    background-color: #121212;
    border-radius: 1rem;
    flex: 1;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    box-sizing: border-box;
    overflow-y: auto;
}

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

.lib-option img{
    height: 1.25rem;
    width: 1.25rem;
}
.icons{
    font-size: 1.25rem;
    display: flex;
}
.icons i{
    opacity: 0.7;
    margin-right: 1rem;
    cursor: pointer;
}
.icons i:hover{
    opacity: 1;
}

.box{
    background-color: #232323;
    height: 10rem;
    border-radius: 0.75rem;
    margin: 0.75rem 0 1.75rem 0;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
}

.box-p1{
    font-size: 1rem;
    font-weight: 500;
}

.box-p2{
    font-size: 0.85rem;
    opacity: 0.9;
}

.badge{
    background-color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0.25rem 1rem;
    font-weight: 700;
    margin-top : 0.5rem;
    height: 2rem;
    width: fit-content;
    cursor: pointer; /* FIX: pehle cursor default tha, button pe pointer honi chahiye */
}
.dark-badge{
    background-color: #000;
    color: #fff;
}

.sticky-nav{
    position: sticky;
    top: 0;
    background-color: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 1rem 0;
    z-index: 10;
}

.sticky-nav-icons{
    margin-left: 0.75rem;
}
.sticky-nav-options{
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-item{
    margin-right: 1rem;
}

@media (max-width:1000px){
    .hide{
        display: none;
    }
}
.card{
    background-color: #232323;
    width: 150px;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-left: 1.5rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease; /* FIX: hover pe halka highlight add kiya */
}
.card:hover{
    background-color: #2a2a2a;
}
.cards-container{
    display: flex;
    flex-wrap: wrap;
}

/* FIX: card-img ab ek wrapper (.card-img-wrap) ke andar hai taaki hover pe play button image ke upar overlay ho sake */
.card-img-wrap{
    position: relative;
}

.card-img{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
}

.card-play-btn{
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #1bd760;
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.card:hover .card-play-btn{
    opacity: 1;
    transform: translateY(0);
}

.card-title{
    font-weight: 600;
}
.card-info{
    font-size: 0.85rem;
    opacity: 0.5;
}
.footer{
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.line{
    width: 93%;
    height: 50%;
    border-top: 1px solid white;
    opacity: 0.4;
}

/* ===================== MUSIC PLAYER ===================== */
/* FIX: pehle .album aur .controls poore khaali the, andar kuch nahi tha. Ab teeno section (album/player/controls) me content hai. */
.music-player{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.album{
    width: 25%;
    display: flex;
    align-items: center;
    min-width: 180px;
}
.album-art{
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.25rem;
    object-fit: cover;
    flex-shrink: 0;
}
.song-info{
    margin-left: 0.75rem;
    overflow: hidden;
}
.song-title{
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-artist{
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 0;
}
.like-icon{
    height: 1rem;
    margin-left: 1rem;
    opacity: 0.7;
    cursor: pointer;
}
.like-icon:hover{
    opacity: 1;
}

.player{
    width: 50%;

}
.controls{
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.player-controls {
     display: flex;
    justify-content: center;
    align-items: center;

}

.player-control-icon{
    height: 1rem;
    margin-right: 1.75rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease; /* FIX: transition add ki taaki play/pause click smooth dikhe */
}

.player-control-icon:hover{
    opacity: 1;
}
.playback-bar {
    display: flex;
    justify-content: center;
    align-items: center;
}

.curr-time, .total-time{
    font-size: 0.7rem;
    opacity: 0.7;
    min-width: 2.5rem;
    text-align: center;
}

.progress-bar {
    width: 70%;
    appearance: none;
    background-color: #4d4d4d; /* FIX: pehle transparent tha isliye track hi nahi dikhta tha jab tak thumb style load na ho */
    border-radius: 100px;
    height: 0.2rem;
    cursor: pointer;

}
.progress-bar::-webkit-slider-runnable-track {
    background-color: transparent;
    border-radius: 100px;
    height: 0.2rem;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    height: 1rem;
    width: 1rem;
    background-color: #1bd760;
    border-radius: 50%;
    margin-top: -6px;

}

/* FIX: pehle volume control exist hi nahi karta tha, .controls div bilkul khaali tha */
.control-icon{
    height: 2.5rem;
    opacity: 0.7;
    margin-right: 0.75rem;
    cursor: pointer;
}
.control-icon:hover{
    opacity: 1;
}
.volume-bar{
    width: 6rem;
    appearance: none;
    background-color: #4d4d4d;
    border-radius: 100px;
    height: 0.2rem;
    cursor: pointer;
}
.volume-bar::-webkit-slider-runnable-track{
    background-color: transparent;
    border-radius: 100px;
    height: 0.2rem;
}
.volume-bar::-webkit-slider-thumb{
    appearance: none;
    height: 0.8rem;
    width: 0.8rem;
    background-color: #fff;
    border-radius: 50%;
    margin-top: -4px;
}

/* FIX: chhoti screens ke liye basic responsiveness, pehle bilkul nahi thi */
@media (max-width: 800px){
    .sidebar{
        display: none;
    }
    .card{
        width: 120px;
    }
    .controls{
        display: none;
    }
}

