* {
  padding: 0;
  margin: 0;
}

body {
  background-color: lightgreen;
  transition: background-color 0.5s;
  display: flex;
  flex: 1;
  gap: 20px;
  padding: 1.5rem;
  height: calc(100vh - 48px);
}

/* Using flex with the column direction to
     align items in a vertical direction */
.player {
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  border-radius: 16px;
  background: white;
}

.details {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.track-art {
  margin: 25px;
  height: 250px;
  width: 250px;
  background-image: URL('https://source.unsplash.com/Qrspubmx6kE/640x360');
  background-size: cover;
  background-position: center;
  border-radius: 15%;
}

/* Changing the font sizes to suitable ones */
.now-playing {
  font-size: 1.5rem;
  font-family: 'Cookie', cursive;
}

.track-name {
  font-size: 2.5rem;
  font-family: 'Rock Salt', cursive;
}

.track-artist {
  font-size: 1.5rem;
  font-family: 'Nothing You Could Do', cursive;
}

/* Using flex with the row direction to
     align items in a horizontal direction */
.buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.playpause-track,
.prev-track,
.next-track {
  padding: 25px;
  opacity: 0.8;

  /* Smoothly transition the opacity */
  transition: opacity 0.2s;
}

/* Change the opacity when mouse is hovered */
.playpause-track:hover,
.prev-track:hover,
.next-track:hover {
  opacity: 1;
}

/* Define the slider width so that it scales properly */
.slider_container {
  width: 75%;
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.volume_slider_container {
  width: 75%;
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', sans-serif;
  margin-top: 1rem;
}

/* Modify the appearance of the slider */
.seek_slider,
.volume_slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 5px;
  background: black;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}

/* Modify the appearance of the slider thumb */
.seek_slider::-webkit-slider-thumb,
.volume_slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: white;
  cursor: pointer;
  border-radius: 50%;
}

/* Change the opacity when mouse is hovered */
.seek_slider:hover,
.volume_slider:hover {
  opacity: 1;
}

.seek_slider {
  width: 60%;
  height: 26px;
  padding: 4px 10px;
  border-radius: 100px;
  background: white;
  border: 5px solid black;
}

.seek_slider::-webkit-slider-thumb {
  background-color: black;
}

.volume_slider {
  width: 30%;
  height: 26px;
  padding: 4px 10px;
  border-radius: 100px;
  background: white;
  border: 5px solid black;
}

.volume_slider::-webkit-slider-thumb {
  background-color: black;
}

.current-time,
.total-duration {
  padding: 10px;
}

i.fa-volume-down,
i.fa-volume-up {
  padding: 10px;
}

/* Change the mouse cursor to a pointer
     when hovered over */
i.fa-play-circle,
i.fa-pause-circle,
i.fa-step-forward,
i.fa-step-backward {
  cursor: pointer;
}

.playlist_container {
  flex: 1;
  padding: 16px;
  border-radius: 16px;
  background: white;
}

.playlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.playlist-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  transition: background-color 0.3s;
}

.playlist-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.playlist-art {
  width: 50px;
  height: 50px;
  margin-right: 10px;
  object-fit: cover;
  border-radius: 5px;
}

.playlist-details {
  flex-grow: 1;
}

.playlist-name {
  font-family: 'Rock Salt', cursive;
}

.playlist-artist {
  font-family: 'Cookie', cursive;
}

.search-container {
  margin-bottom: 20px;
  display: flex;
  flex: 1;
}

#searchInput {
  padding: 10px;
  display: flex;
  flex: 1;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
}

/* Mobile (portrait) styles */
@media only screen and (max-width: 600px) {
  body {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    height: auto;
  }

  .player,
  .playlist_container {
    flex: none;
    padding: 3rem 1rem;
  }

  .slider_container,
  .volume_slider_container {
    width: 90%;
  }

  .track-art {
    height: 150px;
    width: 150px;
  }

  .track-name {
    font-size: 2rem;
  }

  .track-artist,
  .now-playing {
    font-size: 1rem;
  }

  .buttons {
    gap: 15px;
  }

  .playpause-track,
  .prev-track,
  .next-track {
    padding: 15px;
  }

  .seek_slider,
  .volume_slider {
    width: 90%;
  }
}

/* Tablet (portrait and landscape) styles */
@media only screen and (min-width: 600px) and (max-width: 900px) {
  body {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    height: auto;
  }

  .player,
  .playlist_container {
    flex: none;
    padding: 3rem 1rem;
  }

  .slider_container,
  .volume_slider_container {
    width: 90%;
  }

  .track-art {
    height: 200px;
    width: 200px;
  }

  .track-name {
    font-size: 2.5rem;
  }

  .track-artist,
  .now-playing {
    font-size: 1.2rem;
  }

  .buttons {
    gap: 20px;
  }

  .playpause-track,
  .prev-track,
  .next-track {
    padding: 20px;
  }

  .seek_slider,
  .volume_slider {
    width: 90%;
  }
}
