:root{
  --a:0;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  background-color: rgb(0, 0, 0);
  color: white;
}

.main-container {
  border: 2px solid rgb(0, 0, 0);
}

.nav {
  background-color: rgb(0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 32px;
  width: 100%;
  position: fixed;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-wrapper {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.icon-svg {
  fill: white;
  width: 40px;
  height: 30px;
}

.home-icon{
  background-color: #242424;
  border-radius: 50%;
}

.home-svg{
  width: 30px;
  height: 23px;
}

input {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 530;
  color: rgb(250, 248, 248);
}

input[type="text"]:hover{
  transition: 0.2s ease-in;
  border: 0.1px solid rgb(120, 120, 120);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: rgb(179, 179, 179);
  cursor: pointer;
}

.nav-right ul:hover{
  transform: scale(1.08);
  color: #fff;

}

.btn {
  padding: 15px 30px;
  border: none;
  background-color: #fff;
  color: #000;
  border-radius: 23px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: sans-serif;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper input {
  padding: 6px 40px;
  padding-right: 36px;
  border-radius: 29px;
  border: none;
  outline: none;
  font-size: 14px;
  height: 48px;
  width: 474px;
  background-color: #242424;
  color: #ffffff;
}

.search-wrapper input::placeholder {
  color: #b1b1b1;
  opacity: 1;
  font-size: 16px;
}

.search-icon {
  position: absolute;
  left: 8px;
  width: 27px;
  height: 26px;
  pointer-events: none;
  filter: brightness(5) invert(1);
}

.browse-icon {
  position: absolute;
  right: 18px;
  width: 27px;
  height: 26px;
  cursor: pointer;
  filter: brightness(5) invert(1);
}

.container-flex{
   margin-top: 60px;
  justify-content: center;
  display: flex;
  gap: 7px;
  padding: 4px 12px 0 12px;
}

.box-left {
  /* border: 2px solid rgb(242, 54, 54); */
  width: 28vw;
  height: 42vw;
  padding-top: 20px;
  padding-left: 15px;
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 600;
  background-color: #161616;
  border-radius: 8px;
  justify-content: space-between;
  flex-direction: column;
  gap: 10px;
}

.library-header{
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  
}

.library-header h3{
  padding-left: 15px;
  padding-right: 210px;
}

.lib{
  width: 23px;
  margin-left: 12px;
}
.plus{
  font-weight: 100;
  font-size: 23px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  cursor: pointer;
  padding-left: 0;
  
}

.plus:hover{
  background-color: #242424;
}

.box-right {
  /* border: 2px solid rgb(33, 247, 26); */
  width: 72vw;
  border-radius: 8px;
  
  font-family: sans-serif;
  font-size: 16px;
  font-weight: 500;
  background: linear-gradient(180deg, #2e2d2d 0%, #1a1919 96.86%);
  position: relative;
}

.trend{
  padding: 35px 0 0 35px;
}
.create-playlist{
  /* border: 2px solid yellow; */
  background-color: #2e2e2ea4;
  padding: 10px;
  border-radius: 8px;
  margin-top: 33px;
  width: 386px;
  height: 145px;
  
}

.word1{
  margin: 0 5px;
  font-family: merriweather;
  font-size: 16px;
  font-weight: 600;
}

.word2{
  margin: 0 5px;
  font-size: 13px;
  font-weight: 500;
}

.create-playlist .btn{
  margin-top: 10px;
}

.btn:hover{
  transform: scale(1.08);

}

.btn2:hover{
  transform: scale(1.08);
}

footer{
    color: white;
    margin: auto;
    max-width: 70vw;
}
.footer a{
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.footer{
  margin-top:70px ;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    color: white;
}
.footer-item{
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 18px;
    font-family: Arial, Helvetica, sans-serif;
}

.word3{
  font-size: 13px;
  font-weight: 500;

}
.btn2 {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  background-color: #fff;
  color: #000;
  border-radius: 23px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: sans-serif;
}

.btn3{
  background-color: #161616;
  padding: 6px 12px;
  border-radius: 23px;
  color: white;
  border: 1px solid white;
  text-align: center;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}
.globe{
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.btn3:hover{
  transform: scale(1.08);

}

.spotifyplaylist{
  padding: 16px;
}

.spotifyplaylist .card{
  width: 187px;
  height: 300px;
  padding: 10px;
  border-radius: 5px;
  position: relative;
  word-wrap: break-word;
  white-space: normal;
  background-color: #1c1b1b;
  transition: all 0.5s;
}

.card > *{
  padding-top: 10px;
}

.card:hover{
  background-color: #000000;
  cursor: pointer;
  --a: 1;
}

.card img{
  width: 100%;
  object-fit: contain;
}
.cardContainer{
  display: flex;
  padding: 0 30px;
  margin: 23px 0;
  gap: 10px;
  flex-wrap: wrap;
  overflow-y: auto;
  max-height: 60vh;
}

.play1{
  position: absolute;
  top: 145px;
  right: 17px;
  opacity: var(--a);
  transition: all 0.3s ease-out;
}

.play {
    width: 26px;
    cursor: pointer;
}

.playbar {
    position: fixed;
    bottom: 20px;
    background-color: rgb(0, 0, 0);
    width: 70vw;
    padding: 12px;
    border-radius: 5px;
    min-height: 85px;
}

.songbtn {
    display: flex;
    position: absolute;
    transform: translate(-50%);
    left: 50%;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    filter: invert(1);
}

.seekbar {
    height: 3px;
    width: 98%;
    background: rgb(255, 255, 255);
    position: absolute;
    border-radius: 20px;
    bottom: 5px;
    margin: 6px;
    cursor: pointer;
}

.abovebar {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    overflow: hidden;
}

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

.songinfo {
    width: 250px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    font-weight: bold;
}

.nav {
    padding: 7px 12px;
}

.volume input[type="range"] {
  width: 120px;
}

.songlist ul{
  padding: 0 0;
  
}

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

.songlist ul li:hover{
  background-color: #2e2e2e;
  transition: all 0.2s ease-in;

}

.invert-only{
  filter: invert(1);
}

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

.playnow span{
  font-size: 15px;
  width: 96px;
  padding: 12px;
}

.songlist{
  height: 360px;
  overflow: auto;
  margin: 15px 0;
}
.songlist .info{
  font-size: 13px;
  width: 140px;
  padding-top: 6px;
}

/* Scrollbar for the whole website */
::-webkit-scrollbar {
  width: 12px;
}

/* Track (background of the scrollbar) */
::-webkit-scrollbar-track {
  background: #1e1e1e; /* dark gray */
  border-radius: 10px;
}

/* Handle (the draggable part) */
::-webkit-scrollbar-thumb {
  background: #000; /* black */
  border-radius: 10px;
  border: 2px solid #333; /* border for contrast */
}

/* On hover */
::-webkit-scrollbar-thumb:hover {
  background: #444; /* slightly lighter black */
}

.circle{
  width: 13px;
  height: 13px;
  border-radius: 13px;
  background-color: #ffffff;
  position: absolute;
  bottom: -5px;
  left: 0%;
  transition: left 0.5s;
}

.songtime{
  width: 125px;
  white-space: nowrap;
    font-family: monospace;
    padding: 0 12px;
    
}

.volume{
  display: flex;
  padding-left: 22px;
  /* flex-direction: column; */
  justify-content: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;

}

.volume input[type="range"] {
  width: 100px;
  height: 4px;
  -webkit-appearance: none;
  background: #000000;
  border-radius: 2px;
  outline: none;
  margin-left: 8px;
  cursor: pointer;
}

.volume input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #1DB954;
  border-radius: 2px;
}

.volume input[type="range"]::-moz-range-track {
  height: 4px;
  background: #1DB954;
  border-radius: 2px;
}

.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 12px;
  width: 12px;
  background: #ffffff;
  border-radius: 50%;
  margin-top: -4px;
  border: 1px solid #1DB954;
  cursor: pointer;
}

.volume input[type="range"]::-moz-range-thumb {
  height: 12px;
  width: 12px;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid #1DB954;
  cursor: pointer;
}


.range input{
  cursor: pointer;
}

.range input{
    width: 146px;

}

.search-icon-mobile {
    display: none;
}

.song-library-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: #121212;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.3s ease-in-out;
    z-index: 100;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
}

.song-library-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-sidebar {
    font-size: 24px;
    cursor: pointer;
}

.sidebar-songlist {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-songlist li {
    padding: 10px 0;
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.sidebar-songlist li:hover {
    background-color: #1a1a1a;
}

@media (max-width: 1200px) {
    .container-flex {
        flex-direction: column;
    }

    .box-left {
        display: none;
    }

    .box-right {
        width: 100%;
        margin-bottom: 250px; /* Increase margin for taller playbar */
    }

    .nav-right {
        display: none;
    }

    .search-wrapper {
        display: none;
    }

    .home-icon {
        display: flex;
    }

    .search-icon-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-icon-mobile .search-icon {
        position: static;
        filter: invert(1);
    }

    .playbar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        padding: 20px;
        background-color: #000;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .abovebar {
        display: block;
        position: static;
        width: 100%;
        padding: 0;
        margin: 0;
        order: 1;
    }

    .songinfo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .songbtn {
        position: static;
        transform: none;
        width: 100%;
        margin-bottom: 15px;
    }

    .timevol {
        width: 100%;
        margin-bottom: 15px;
        justify-content: center;
    }

    .seekbar {
        position: relative;
        width: 100%;
        bottom: auto;
        height: 4px;
        background-color: #444;
        border-radius: 10px;
        cursor: pointer;
        margin: 0;
        padding: 0;
        order: 2;
    }

    .nav {
        padding: 7px 12px;
    }

    .library-header h3 {
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .cardContainer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0;
        padding: 0 10px;
    }
    
    .spotifyplaylist .card {
        width: auto;
        padding: 8px;
    }

    .card h2 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
    }

    .songinfo {
        width: 80%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .songtime {
        display: none;
    }

    .timevol {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .volume {
        justify-content: center;
        gap: 10px;
    }

    .volume input[type="range"] {
        width: 120px;
    }
}