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

/*mordern scrollbar*/
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Modern Range Input Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

/* Progress Slider */
.progress-slider {
  width: 100%;
  height: 6px;
  margin: 10px 0;
}

.progress-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: #ffffff;
  border-radius: 50%;
  margin-top: -4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.progress-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.progress-slider::-moz-range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.progress-slider::-moz-range-thumb {
  height: 14px;
  width: 14px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

/* Volume Slider */
.volume-slider {
  height: 4px;
  width: 80px;
  margin: 0 10px;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 12px;
  width: 12px;
  background: #ffffff;
  border-radius: 50%;
  margin-top: -4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.volume-slider::-moz-range-thumb {
  height: 12px;
  width: 12px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

/* Progress Bar Container */
.progress-bar {
  position: relative;
  width: 100%;
  margin: 20px 0;
  padding: 0 10px;
}

.progress-bar .current-time,
.progress-bar .total-time {
  font-size: 12px;
  color: #ffffff;
  position: absolute;
  bottom: -18px;
}

.progress-bar .current-time {
  left: 10px;
}

.progress-bar .total-time {
  right: 10px;
}

/* Volume Bar Container */
.volume-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}

.volume-bar i {
  color: rgb(255, 255, 255);
  font-size: 14px;
}

/* Focus styles */
input[type="range"]:focus {
  outline: none;
}

/* Custom track fill effect (can be implemented with JS) */
.progress-slider.playing::-webkit-slider-runnable-track,
.progress-slider.playing::-moz-range-track {
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff var(--progress-percent, 0%),
    rgba(255, 255, 255, 0.3) var(--progress-percent, 0%)
  );
}

.volume-slider::-webkit-slider-runnable-track,
.volume-slider::-moz-range-track {
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff var(--volume-percent, 50%),
    rgba(255, 255, 255, 0.3) var(--volume-percent, 50%)
  );
}

body {
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.phone-container {
  position: relative;
  width: 375px;
  height: 812px;
  background-color: #000;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 0 0 3px #333;
  transition: background 0.8s ease-in-out;
}

.time {
  position: absolute;
  top: 15px;
  left: 50px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  z-index: 1000;
}

.status {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
}

.notch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background-color: #000;
  border-radius: 20px;
  z-index: 1000;
}

.player-container {
  position: relative;
  height: 100%;
  padding: 40px 20px;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.5),
    rgba(0, 0, 0, 0.7)
  );
  color: #fff;
}

/* Add an overlay to ensure text is readable over any background color */
.player-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
  pointer-events: none;
  z-index: -1;
}

.header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  margin-top: 8px;
  padding: 0 10px;
}

.share-btn,
.more-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s ease-out;
}

.share-btn:active,
.more-btn:active {
  transform: scale(0.8);
}

.album-art {
  width: 300px;
  height: 300px;
  margin: 0 auto 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px 3px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.4);
}

.album-art.small {
  transform: scale(0.7);
  transform-origin: center center;
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-info {
  text-align: center;
  margin-bottom: 10px;
}

.song-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.artist-name {
  font-size: 16px;
  color: #999;
}

.progress-bar {
  position: relative;
  margin: 10px 0;
  padding: 10px 0;
}

.progress-slider {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  cursor: pointer;
}

.volume-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 35px;
  align-items: center;
}

#volumeSlider {
  height: 5px;
  width: 100%;
}

.volume-bar i {
  transition: 0.3s ease;
}

@keyframes iconScale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.current-time,
.total-time {
  position: absolute;
  top: 35px;
  font-size: 12px;
  font-weight: 500;
  color: #999;
}

.current-time {
  left: 0;
}

.total-time {
  right: 0;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0;
}

.control-btn {
  background: none;
  padding: 8px 9px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.4s, transform 0.2s ease;
}

.control-btn:active {
  transform: scale(0.9);
  background-color: #ffffff44;
}

.control-btn.active {
  background-color: #ffffff44;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.playlistAndLyrics {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.playlist-btn,
.lyrics-btn {
  width: 160px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.3s ease-out;
}

.playlist-btn:active,
.lyrics-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.9);
}

.home-btn {
  position: relative;
  width: 120px;
  height: 5px;
  top: 23px;
  margin: auto;
  background: rgba(255, 255, 255, 0.738);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease-out;
  z-index: 999;
}

.home-btn:active {
  background: rgba(255, 255, 255, 0.979);
  transform: scale(0.9);
}

.playlist-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: #000000ee;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.lyric-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: #000000ee;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.lyric-content {
  height: calc(100% - 70px);
  overflow-y: auto;
  padding: 10px 20px;
}

.lyric-text {
  padding: 20px 0;
}

.lyric-line {
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  transition: all 0.3s ease;
}

.lyric-line.active {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.no-lyrics {
  text-align: center;
  color: #888;
  margin-top: 40px;
  font-style: italic;
}

.playlist-panel.active,
.lyric-panel.active {
  transform: translateY(0);
}

.playlist-header,
.lyric-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-playlist,
.close-lyrics {
  background: none;
  padding: 8px 12px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.4s, transform 0.2s ease;
}

.close-playlist:active,
.close-lyrics:active {
  transform: scale(0.9);
  background-color: #ffffff44;
}

.song-list {
  height: fit-content;
  overflow-y: scroll;
  list-style: none;
  padding: 20px 20px 10px 20px;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 10px;
  cursor: pointer;
}

.song-item.active {
  background-color: rgba(255, 255, 255, 0.271);
  border-radius: 8px;
}

.song-item img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
}

.song-info {
  display: flex;
  flex-direction: column;
}

.song-name {
  font-size: 16px;
  color: #fff;
}

.song-artist {
  font-size: 14px;
  color: #999;
}

.credit-container {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(10px) brightness(0.8);
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
  padding: 10px 20px;
  text-align: center;
  color: #fff;
  text-wrap: nowrap;
  transition: 0.3s ease-out;
}

.credit-container.active {
  opacity: 1;
  visibility: visible;
}

.credit-container h1 {
  font-weight: 500;
  margin-bottom: 5px;
}

.credit-container a {
  color: #0babe0;
  text-decoration: none;
}

@media screen and (max-width: 380px) {
  .phone-container {
    width: 360px;
    height: 100%;
  }

  .album-art {
    width: 280px;
    height: 280px;
  }

  .notch {
    width: 100px;
  }
}
