@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}

:root {
  --primary: #ff74a4;
  --secondary: #9f6ea3;
  --text-main: #ffffff;
  --text-muted: #e0e0e0;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: rgba(0, 0, 0, 0.2);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  user-select: none;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.wrapper {
  width: 380px;
  padding: 25px 30px;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 35px var(--glass-shadow);
}

.wrapper i {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.wrapper i:hover {
  transform: scale(1.1);
}

.top-bar,
.progress-bar .song-timer,
.controls,
.music-list .header,
.music-list ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar i {
  font-size: 30px;
  color: var(--text-main);
}

.top-bar span {
  font-size: 18px;
  color: var(--text-main);
  font-weight: 500;
}

.img-area {
  width: 100%;
  height: 256px;
  overflow: hidden;
  margin-top: 25px;
  border-radius: 20px;
  box-shadow: 0 10px 20px var(--glass-shadow);
  position: relative;
}

.img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.wrapper.playing .img-area img {
  transform: scale(1.05);
}

.song-details {
  text-align: center;
  margin: 30px 0;
}

.song-details .name {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.song-details .artist {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 300;
}

.progress-area {
  height: 6px;
  width: 100%;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  position: relative;
}

.progress-area .progress-bar {
  height: inherit;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff, #f0f0f0);
  position: relative;
}

.progress-bar::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  top: 50%;
  right: -7px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.progress-area:hover .progress-bar::before {
  opacity: 1;
  transform: translateY(-50%) scale(1.2);
}

.progress-area .song-timer {
  margin-top: 8px;
}

.song-timer span {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 400;
}

.controls {
  margin: 40px 0 15px 0;
}

.controls i {
  font-size: 28px;
  user-select: none;
  color: var(--text-main);
}

.controls i:nth-child(2),
.controls i:nth-child(4) {
  font-size: 40px;
}

.controls .play-pause {
  height: 60px;
  width: 60px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.controls .play-pause:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.play-pause i {
  font-size: 36px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Music List */
.music-list {
  position: absolute;
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  left: 0;
  bottom: -60%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0px -5px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-list.show {
  bottom: 0;
  opacity: 1;
  pointer-events: auto;
}

.header .row {
  display: flex;
  align-items: center;
  font-size: 19px;
  color: var(--text-main);
  font-weight: 500;
}

.header .row span {
  margin-left: 10px;
}

.header #close {
  font-size: 24px;
  color: var(--text-main);
  transition: transform 0.3s ease;
}

.header #close:hover {
  transform: rotate(90deg);
}

.music-list ul {
  margin: 15px 0 0 0;
  max-height: 260px;
  overflow: auto;
}

.music-list ul::-webkit-scrollbar {
  width: 5px;
}

.music-list ul::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.music-list ul li {
  list-style: none;
  display: flex;
  cursor: pointer;
  padding: 10px 15px;
  margin-bottom: 8px;
  color: var(--text-main);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.music-list ul li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.music-list ul li .row span {
  font-size: 16px;
  font-weight: 500;
}

.music-list ul li .row p {
  opacity: 0.8;
  font-size: 13px;
  margin-top: 2px;
}

ul li .audio-duration {
  font-size: 14px;
  font-weight: 500;
}

ul li.playing {
  background: rgba(255, 255, 255, 0.2);
  border-left: 4px solid var(--primary);
  pointer-events: none;
}

ul li.playing .row span,
ul li.playing .audio-duration {
  color: var(--primary);
}
