@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@1,700&display=swap');

* {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  height: 100vh;
  overflow-x: hidden;
}

.container {
  display: flex;
  gap: 3px;
  height: 100vh;
}

.left {
  width: 25%;
  padding: 5px;
  border-radius: 10px;
}

.right {
  width: 75%;
  background-color: #121212;
  position: relative;
  overflow-y: auto;
  margin: 5px;
  border-radius: 10px;
  color: white;
}

.home {
  background-color: #121212;
  border-radius: 7px;
  padding: 10px;
}

.home ul li {
  display: flex;
  gap: 15px;
  list-style-type: none;
  width: 15px;
  color: white;
  padding-top: 14px;
}

.library {
  background-color: #121212;
  border-radius: 7px;
  height: 78vh;
  position: relative;
}

.heading {
  color: white;
  margin-top: 5px;
  display: flex;
  width: 200px;
  padding: 23px 14px;
  align-items: center;
  font-size: small;
}

.heading img {
  margin-right: 5px;
  width: 24px;
}

.fotter {
  gap: 10px;
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  font-size: 10px;
  position: absolute;
  bottom: 5px;
  background-color: #121212;
}

.fotter a {
  text-decoration: none;
  color: grey;
}

.header {
  width: 100%;
  background-color: #151515;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header > * {
  padding: 20px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrows {
  display: flex;
  gap: 8px;
}

.arrows svg {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.arrows svg:hover {
  opacity: 0.8;
}

.buttons {
  display: flex;
  gap: 12px;
}

.buttons button {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.buttons button:hover {
  background: white;
  color: black;
}

.spotify-playlist {
  padding: 20px;
  padding-bottom: 100px;
}

.cardcontainer {
  margin: 30px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow-y: scroll;
  max-height: 60vh;
}

.card {
  width: 180px;
  padding: 10px;
  border-radius: 5px;
  background-color: #252525;
  position: relative;
  overflow: hidden;
}

.card > * {
  padding-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card img {
  width: 100%;
  object-fit: contain;
}

.text-section p {
  color: #a4a4a4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-section h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play {
  position: absolute;
  top: 177px;
  right: 15px;
  cursor: pointer;
  opacity: 0;
}

.card:hover .play {
  opacity: 1;
  top: 127px;
  transition: 0.75s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.card:hover {
  background-color: #474747;
  transition: 0.5s ease-in;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 10px;
  border: 2px solid #1e1e1e;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

::-webkit-scrollbar-horizontal {
  height: 8px;
}

.playbar {
  position: absolute;
  
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 12px;
  background-color: #2a2a2a;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 1070px;
}

.songbuttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.songbuttons img {
  cursor: pointer;
}

.songlist {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0px 14px;
  margin-bottom: 10px;
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.ham {
  display: none;
}

.songlist ul {
  text-align: center;
  justify-content: center;
  padding: 0px 12px;
  color: white;
  margin: 0;
  width: 300px;
}

.songlist .info {
  font-size: 12px;
}

.songlist ul li {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 12px 5px;
  cursor: pointer;
  border: 1px solid white;
  border-radius: 7px;
  margin: 10px 0;
  background-color: #1e1e1e;
}

.playnow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}

.songartist {
  display: flex;
  justify-content: flex-start;
}

.seekbar {
  width: 100%;
  height: 5px;
  background-color: #6a6a6a;
  border-radius: 5px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.circle {
  width: 13px;
  height: 13px;
  border-radius: 13px;
  background-color: #ffffff;
  position: absolute;
  bottom: -3.3px;
  transition: left 0.3s ease;
}

.songtime {
  position: absolute;
  right: 5px;
  bottom: 10px;
  font-size: 10px;
}

.current-song-name {
  position: absolute;
  left: 10px;
  bottom: 12px;
  font-size: 15px;
  color: white;
}

.close {
  display: none;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  position: absolute;
  right: 90px;
  bottom: 10px; /* ✅ was bottom, now top above buttons */
}

#volumeSlider {
  width: 100px;
  height: 4px;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  appearance: none;
  accent-color: white;
}

.volume-control img {
  width: 20px;
}

#volumeSlider::-webkit-slider-thumb {
  appearance: none;
  height: 12px;
  width: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
  height: 12px;
  width: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

/* ✅ Media Queries */

@media screen and (max-width: 1400px) {
  .left {
    position: absolute;
    left: -130%;
    top: 0;
    height: 100%;
    width: 60%;
    background-color: black;
    overflow: hidden;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .close {
    display: flex;
    position: absolute;
    top: 20px;
    right: 10px;
    z-index: 1001;
  }

  .right {
    width: 100%;
    position: relative;
    height: 99vh;
  }

  .playbar {
    z-index: 1;
  }

  .ham {
    display: block;
  }

  .arrows {
    display: none;
  }

  .cardcontainer {
    display: flex;
  
    align-items: center;
    justify-content: center;
  }

  .library {
    height: 85.5vh;
  }
}

@media (max-width: 650px) {
  .left {
    width: 100vw;
  }

  .songlist ul {
    width: 100%;
  }

  .songlist ul li .info {
    display: flex;
    flex-direction: column;
    font-size: 12px;
  }

  .songlist ul li .songname,
  .songlist ul li .songartist {
    display: block;
    line-height: 1.4;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .songlist ul li .playnow {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .songlist ul li .playnow img {
    width: 16px;
    height: 16px;
  }

  .heading {
    width: 200px;
  }

  .spotify-playlist {
    padding: 10px;
  }

  /* ✅ Mobile Playbar layout */
  .playbar {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    height: auto;
  }

  .songbuttons {
    order: 2;
  }

  .current-song-name {
    position: static;
    order: 1;
    font-size: 14px;
    text-align: center;
  }

  .songtime {
    position: static;
    font-size: 12px;
    order: 3;
  }

  .volume-control {
    position: static;
    order: 4;
    margin: 0 auto;
  }
}
