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

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

*::before,
*::after {
  padding: 0;
  margin: 0;
}

:root {
  --pink: #f5ae33;
  --violet: #fabc11;
  --lightblack: #fff;
  --white: #48404842;
  --darkwhite: #1fafed;
  --pinkshadow: #451fed;
  --lightbshadow: rgba(0, 0, 0, 0.15);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(var(--pink) 0%, var(--violet) 50%),
    url('https://images.pexels.com/photos/4840134/pexels-photo-4840134.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
  overflow: hidden;
  backdrop-filter: blur(25px);
}


/* Base styles for .wrapper */
.wrapper {
  width: 380px;
  padding: 25px 30px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.8); /* Slight transparency */
  box-shadow: 0px 6px 15px var(--lightbshadow);
  border-radius: 15px;
  height: auto; /* Dynamic height */
  max-width: 100%; /* Ensure it doesn't exceed screen width */
  margin: 0 auto; /* Center content horizontally */
}

  body {
    padding: 0; /* Remove body padding if any */
  }
}



a {
  text-decoration: none !important;
}

.wrapper i {
  cursor: pointer;
}

.top-bar,
.progress-area .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(--black);
}

.top-bar i:first-child {
  margin-left: -7px;
}

.top-bar span {
  font-size: 18px;
  margin-left: -3px;
  color: var(--black);
}

.img-area {
  width: 40%;
  height: 40%;
  overflow: hidden;
  margin-top: 20px;
  margin-left: 90px;
  margin-right: 40px;
  border-radius: 15px;
  box-shadow: 0px 6px 12px var(--lightbshadow);
}

.img-area img {
  width: 100%;
  height: 40%;
  object-fit: cover;
}

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

.song-details p {
  color: var(--black);
}

.song-details .name {
  font-size: 12px;
}

.song-details .artist {
  font-size: 12px;
  opacity: 0.9;
  line-height: 35px;
}

.progress-area {
  height: 6px;
  width: 100%;
  border-radius: 50px;
  background: #f0f0f0;
  cursor: pointer;
}

.progress-area .progress-bar {
  height: inherit;
  width: 0%;
  position: relative;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink) 0%, var(--violet) 100%);
}

.progress-bar::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  top: 50%;
  right: -5px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  background: inherit;
  transition: opacity 0.2s ease;
}

.progress-area:hover .progress-bar::before {
  opacity: 1;
  pointer-events: auto;
}

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

.song-timer span {
  font-size: 13px;
  color: var(--black);
}

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

.controls i {
  font-size: 28px;
  user-select: none;
  background: linear-gradient(var(--pink) 0%, var(--violet) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.controls #prev {
  margin-right: -13px;
}

.controls #next {
  margin-left: -13px;
}

.controls .play-pause {
  height: 54px;
  width: 54px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(var(--white) 0%, var(--darkwhite) 100%);
  box-shadow: 0px 0px 5px var(--pink);
}

.play-pause::before {
  position: absolute;
  content: "";
  height: 43px;
  width: 43px;
  border-radius: inherit;
  background: linear-gradient(var(--pink) 0%, var(--violet) 100%);
}

.play-pause i {
  height: 43px;
  width: 43px;
  line-height: 43px;
  text-align: center;
  background: inherit;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: absolute;
}

.music-list {
  position: absolute;
  background: var(--white);
  width: 100%;
  max-height: 100%;
  height: 100%;
  left: 0;
  bottom: -55%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  padding: 15px 30px;
  border-radius: 15px;
  box-shadow: 0px -5px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease-out;
  backdrop-filter: blur(80px);
}

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

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

.header .row i {
  cursor: default;
}

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

.header #close {
  font-size: 22px;
  color: var(--lightblack);
}

.music-list ul {
  margin: 10px 0;
  max-height: 100%;
  overflow: auto;
}

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

.music-list ul li {
  list-style: none;
  display: flex;
  cursor: pointer;
  padding-bottom: 10px;
  margin-bottom: 5px;
  color: var(--lightblack);
  border-bottom: 1px solid #E5E5E5;
}

.music-list ul li:last-child {
  border-bottom: 0px;
}

.music-list ul li .row span {
  font-size: 17px;
}

.music-list ul li .row p {
  opacity: 0.9;
}

ul li .audio-duration {
  font-size: 16px;
}

ul li.playing {
  pointer-events: none;
  color: var(--violet);
}

*:focus {
  outline: none;
}

.search {
  text-align: center;
  padding: 4px;
  margin: 4px;
  scale: 1.3;
}

.search input {
  border: 0;
  border-bottom: 2px;
  padding: 2px;
  margin: 2px;
}

.search button {
  background: transparent;
  border: 0;
}

/* Responsive Design */

/* For small devices (phones, less than 768px) */
@media screen and (max-width: 768px) {
  /* Page Loader Styling */
    #loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: radial-gradient(circle, #e91e63, #673ab7, #03a9f4, #4caf50);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    #loader .spinner {
      width: 80px;
      height: 80px;
      border: 8px solid rgba(255, 255, 255, 0.3);
      border-top: 8px solid #fff;
      border-radius: 50%;
      animation: spin 1.5s linear infinite;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }

    /* Hide the loader after the page loads */
    body.loaded #loader {
      display: none;
    }

    /* Styles for the header container */
    .header {
      display: flex;
      align-items: center;
      padding: 10px;
    }

    /* Style for the search input field */
    #searchInput {
      flex-grow: 1;
      margin-right: 5px;
      margin-left: 5px;
      padding: 5px;
      border: none;
      border-radius: 5px;
      font-size: 12px;
      background: #e3dee03d;
      color: white;
    }

    /* Style for the search button */
    #searchButton {
      margin-right: 5px;
    }

    /* Footer Styling */
    .footer {
      text-align: center;
      padding: 7px 0;
      background: transparent;
      color: black;
      font-size: 10px;
    }

    .footer a {
      color: #000000;
      text-decoration: underline;
    }

    .footer a:hover {
      color: #ffcc00;
    }

  .wrapper {
    width: 100%;
    height: 98%;
    padding: 25px;
    position: absolute;
    top: 0px;
    background: transparent;
    color: var(--lightblack);
  }

  .img-area {
    height: 50%;
  }

  .controls i {
    font-size: 24px;
  }

  .controls .play-pause {
    height: 50px;
    width: 50px;
  }

  .song-details .name {
    font-size: 18px;
  }

  .song-details .artist {
    font-size: 16px;
  }

  .music-list ul {
  margin: 10px 0;
  max-height: 100%;
  overflow: auto;
  backdrop-filter: blur(5px);
}

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

.music-list ul li {
  list-style: none;
  display: flex;
  cursor: pointer;
  padding-bottom: 10px;
  margin-bottom: 5px;
  color: var(--lightblack);
  border-bottom: 2px solid #E5E5E5;
}

.music-list ul li:last-child {
  border-bottom: 1px;
}

.music-list ul li .row span {
  font-size: 17px;
}

.music-list ul li .row p {
  opacity: 0.9;
}

ul li .audio-duration {
  font-size: 16px;
}

ul li.playing {
  pointer-events: none;
  color: var(--violet);
}

*:focus {
  outline: auto;
}

.search {
  text-align: center;
  padding: 4px;
  margin: 4px;
  scale: 1.3;
  color: var(--lightblack);
}

.search input {
  border: 0;
  border-bottom: 2px;
  padding: 2px;
  margin: 2px;
}

.search button {
    border: 0;
}
}

/* For medium devices (tablets, less than 1024px) */
@media screen and (max-width: 1024px) {
  .wrapper {
    width: 90%;
  }
}
