* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}
:root {
  --primary-color: #3d365c;
  --secondary-color: #7c4585;
  --third-color: #fccaff;
  --basic-color: #ffffff;
  --text-color: #333;
  --linear-gradiant: linear-gradient(#7c4585, #3d365c);
}
body {
  width: 100%;
  min-height: 100vh;
  background: var(--primary-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
/* @media (max-width: 480px) {
.toast {
width: 250px;
}
} */
.flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.flex-col {
  flex-direction: column;
}
.flex-c {
  justify-content: center;
}
.flex-sb {
  justify-content: space-between;
}
.flex-end {
  justify-content: flex-end;
}
.container {
  width: 85%;
  height: 100vh;
  gap: 10px;
  margin: auto;
  padding: 10px;
  flex-wrap: wrap;
  flex-direction: column;
  background: var(--primary-color);
}
.top-bar {
  margin-top: 10px;
  width: 80%;
  overflow: hidden;
  padding: 0 0 20px 0;
  border-bottom: 1px solid var(--basic-color);
  gap: 10px;
}
.heading {
  width: 33%;
  font-size: 30px;
  color: var(--basic-color);
  font-weight: 500;
}
.search-box {
  flex: 1;
  padding: 0 10px;
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
  text-align: center;
  background: var(--basic-color);
}
.search-box i {
  font-size: 20px;
  padding: 10px;
}
.search-box input {
  flex: 1;
  font-size: 16px;
  color: var(--primary-color);
  padding: 10px;
  outline: 0;
  border: 0;
}
.main {
  flex: 1;
  flex-direction: column;
  width: 80%;
  /* height: 100%; */
  overflow: hidden;
}
.music-list {
  width: 30%;
  padding: 10px 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.song-item {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 5px;
  border-radius: 5px;
  color: var(--basic-color);
  font-weight: 300;
  transition: all 0.3s ease;
}
.song-item:hover {
  background: var(--secondary-color);
}
.song-item img {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  object-fit: cover;
}
.song-img {
  margin-top: 20px;
  width: 220px;
  object-fit: cover;
  border: 6px solid var(--basic-color);
  box-shadow: 0 5px 10px rgba(88, 0, 108, 0.3);
}
.active-song {
  background-color: var(--secondary-color);
  border-left: 4px solid var(--third-color);
}
/* ============================ */
/* Scrollbar Styles for .main */
.music-list::-webkit-scrollbar,
.music-player::-webkit-scrollbar {
  width: 15px;
}

.music-list::-webkit-scrollbar-track,
.music-player::-webkit-scrollbar-track {
  background: var(--text-color); /* Light pink background */
  border-radius: 10px;
}

.music-list::-webkit-scrollbar-thumb,
.music-player::-webkit-scrollbar-thumb {
  background: var(--secondary-color); /* Purple thumb */
  border-radius: 10px;
  text-align: center;
  border: 4px solid var(--text-color); /* Matches track */
}

.music-list::-webkit-scrollbar-thumb:hover,
.music-player::-webkit-scrollbar-thumb:hover {
  background: var(--third-color); /* Darker purple on hover */
}
/* ============================ */

.music-player {
  background: var(--third-color);
  width: 60%;
  /* height: 100%; */
  padding: 25px 35px 60px;
  text-align: center;
  border-radius: 3px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.music-player h1 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-color);
  margin-top: 10px;
}
.music-player p {
  font-size: 14px;
  color: var(--text-color);
}
.controls-1 {
  gap: 5px;
}
.controls-1 div {
  gap: 3px;
}
.controls-1 i {
  font-size: 20px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  color: var(--secondary-color);
  transition: all 0.5s ease;
}
#downloadSong:hover {
  cursor: pointer;
  color: var(--basic-color);
  background: var(--secondary-color);
}

.controls-1 div i:hover {
  color: var(--primary-color);
  background: var(--third-color);
}
.controls-1 input:in-range {
  -webkit-appearance: none;
  width: 100px;
  height: 5px;
  border-radius: 3px;
  background: var(--secondary-color);
}
.controls-1 input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: var(--secondary-color);
  border-radius: 50%;
  border: 3px solid var(--basic-color);
  box-shadow: 0 5px 10px rgba(88, 0, 108, 0.3);
}
#progress {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--secondary-color);
  border-radius: 4px;
  cursor: pointer;
  margin: 25px 0 0;
}
#progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  background: var(--secondary-color);
  border-radius: 50%;
  border: 8px solid var(--basic-color);
  box-shadow: 0 5px 10px rgba(88, 0, 108, 0.3);
}
.time {
  margin: 10px 0 20px;
}
.controls {
  width: 100%;
  margin-top: 10px;
  flex-wrap: wrap;
}
.controls i {
  width: 50px;
  height: 50px;
  background: var(--basic-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--secondary-color);
  box-shadow: 0 5px 10px rgba(88, 0, 108, 0.3);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
/* .controls i.active {
color: var(--basic-color);
background: var(--secondary-color);
} */
.controls i:nth-child(3) {
  transform: scale(1.25);
  color: var(--basic-color);
  background: var(--secondary-color);
}
/* .controls i:hover {
  color: var(--basic-color);
  background: var(--secondary-color);
}
.controls i:nth-child(3):hover {
  color: var(--secondary-color);
  background: var(--basic-color);
} */
.controls i:active {
  color: var(--basic-color);
  background: var(--secondary-color);
}
.controls i:nth-child(3):active {
  color: var(--secondary-color);
  background: var(--basic-color);
}
/* Back Button */
.back-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  cursor: pointer;
  font-size: 18px;
  display: none;
}
.back-btn i {
  padding: 10px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--basic-color);
  background: var(--secondary-color);
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
}
.back-btn i:hover {
  color: var(--primary-color);
  background: var(--third-color);
}

.footer {
  /* position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 0); */
  width: 90%;
  font-size: 12px;
  margin: auto;
  text-align: center;
  font-weight: 400;
  color: var(--third-color);
}
@media (max-width: 1000px) {
  .container {
    width: 95%;
  }
}
@media (max-width: 870px) {
  .main {
    width: 90%;
  }
  .top-bar {
    width: 90%;
  }
}
@media (max-width: 768px) {
  .heading {
    font-size: 25px;
  }
  .music-list {
    width: 40%;
  }
  .music-player {
    width: 60%;
    /* padding: 20px 30px; */
  }
  .controls i {
    width: 40px;
    height: 40px;
  }
  .song-img {
    width: 200px;
    height: 200px;
  }
  #progress {
    height: 5px;
  }
}

@media (max-width: 600px) {
  .main {
    width: 95%;
    height: auto;
  }
  .top-bar {
    width: 95%;
  }
  .music-player {
    /* width: 350px; */
    padding: 15px 20px;
  }
  .song-img {
    width: 180px;
  }
  .music-player img {
    margin-top: 25px;
  }
  .music-player h1 {
    font-size: 16px;
    margin-top: 8px;
  }
  .music-player p {
    font-size: 12px;
  }
  #progress {
    height: 5px;
  }
  #progress::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    border: 5px solid var(--basic-color);
  }
  .song-item {
    font-size: 14px;
    /* font-weight: 400; */
  }
  .controls-1 i {
    font-size: 16px;
  }
  .controls-1 #volumeControl {
    width: 80px;
  }
  .controls i {
    font-size: 16px;
    width: 45px;
    height: 45px;
  }
}
@media (max-width: 550px) {
  .heading {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .controls-1 #volumeControl {
    width: 80px;
  }
  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .container {
    width: 95%;
  }
  .main {
    width: 100%;
    position: relative;
    /* filter: blur(10px); */
  }
  .music-player {
    width: 95%;
    height: 100%;
    display: none;
    position: absolute;
    top: 0;
    left: 3%;
  }
  .music-player.show {
    display: block;
  }
  .back-btn {
    display: block;
  }
  .controls i {
    margin-top: -15px;
    font-size: 14px;
    width: 40px;
    height: 40px;
  }
  .music-list {
    width: 90%;
  }
}
