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

:root {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --color-btn-muted: #646c80;
  --background-btn-muted: #374054;
  --border-btn: #474e60;
  --primary-color: #3cee7f;
}

* {
  margin: 0;
}

body {
  /* background-color: #2c3446; */
  background: linear-gradient(
    to right top,
    rgb(250, 232, 255),
    rgb(168, 85, 247),
    rgb(167, 139, 250)
  );
}

nav {
  padding: 5px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
    rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  z-index: 1;
}
nav .logo {
  display: flex;
  align-items: center;
  font-size: 2rem;
}
nav .logo img {
  height: 25px;
  width: auto;
  margin-right: 10px;
}
nav .logo h1 {
  font-size: 1.1rem;
  background: linear-gradient(to right, #000000 0%, #0341ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  list-style: none;
  display: flex;
}
nav ul li {
  margin-left: 1.5rem;
}
nav ul li a {
  text-decoration: none;
  color: #000;
  font-size: 95%;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 5px;
}

nav ul li a:hover {
  background-color: #f5f5f5;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .line {
  width: 25px;
  height: 1px;
  background-color: #1f1f1f;
  display: block;
  margin: 7px auto;
  transition: all 0.3s ease-in-out;
}
.hamburger-active {
  transition: all 0.3s ease-in-out;
  transition-delay: 0.6s;
  transform: rotate(45deg);
}

.hamburger-active .line:nth-child(2) {
  width: 0px;
}

.hamburger-active .line:nth-child(1),
.hamburger-active .line:nth-child(3) {
  transition-delay: 0.3s;
}

.hamburger-active .line:nth-child(1) {
  transform: translateY(12px);
}

.hamburger-active .line:nth-child(3) {
  transform: translateY(-5px) rotate(90deg);
}

.menubar {
  position: absolute;
  top: 0;
  left: -60%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 60%;
  height: 100vh;
  padding: 20% 0;
  background: linear-gradient(
    to right top,
    rgb(250, 232, 255),
    rgb(168, 85, 247),
    rgb(167, 139, 250)
  );
  transition: all 0.5s ease-in;
  z-index: 2;
}
.active {
  left: 0;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.menubar ul {
  padding: 0;
  list-style: none;
}
.menubar ul li {
  margin-bottom: 32px;
}

.menubar ul li a {
  text-decoration: none;
  color: #ffffff;
  font-size: 95%;
  font-weight: 400;
  padding: 5px 10px;
  border-radius: 5px;
}

.menubar ul li a:hover {
  background-color: #a200ff;
}
@media screen and (max-width: 790px) {
  .hamburger {
    display: block;
  }
  nav ul {
    display: none;
  }
}
/* Navbar CSS END */

.hidden {
  display: none;
}

.container {
  display: flex;
  height: 100svh;
  justify-content: center;
  gap: 10rem;
}

.player {
  margin-top: -5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
}

.progress .bar {
  --progress-length: 0;
  width: 16rem;
  height: 4px;
  display: block;
  background-color: var(--border-btn);
  position: relative;
}

.progress .bar::after {
  content: "";
  position: absolute;
  width: var(--progress-length);
  height: 100%;
  background-color: var(--primary-color);
}

.playlist {
  margin-top: 12rem;
  width: 24rem;
  max-height: 30rem;

  /* background-color: var(--background-btn-muted); */
  background: linear-gradient(
    to right top,
    rgb(100, 116, 139),
    rgb(107, 114, 128),
    rgb(107, 114, 128)
  );
}

.playlist li {
  position: relative;
}

.playlist li.active::before {
  content: "";
  width: 4px;
  height: 100%;
  background-color: crimson;
  position: absolute;
  left: 0;
  top: 0;
}

.playlist ul {
  list-style: none;
  padding: 0;
}

.playlist ul li {
  padding: 1rem;
  border-bottom: 1px solid var(--border-btn);
  color: white;
  cursor: pointer;
}

.album {
  width: 20rem;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 200px;
}

.berputar {
  animation: berputar 5s infinite linear;
}

.pause {
  animation-play-state: paused;
}

@keyframes berputar {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.info {
  color: white;
  text-align: center;
}

.action {
  display: flex;
  gap: 1rem;
}

.action button {
  color: black;
  /* background-color: var(--background-btn-muted); */
  background: linear-gradient(
    to right top,
    rgb(8, 145, 178),
    rgb(255, 255, 255),
    rgb(203, 213, 225)
  );
  width: 4rem;
  aspect-ratio: 1/1;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 200px;
  border: 4px solid var(--border-btn);
  cursor: pointer;
}

.action button:has(> i#play_icon) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.action button:active {
  scale: 0.9;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 2rem;
    margin-top: 270px;
  }
  .playlist {
    width: 100%;
    max-height: 30rem;
    background-color: var(--background-btn-muted);
  }
  .album {
    width: 13rem;
    aspect-ratio: 1/1;
  }
  .progress .bar {
    width: 13rem;
  }
  .action {
    gap: 0.9rem;
  }
  .action button {
    width: 3.2rem;
    font-size: 1.5rem;
  }
  .action button:has(> i#play_icon) {
    border-color: var(--primary-color);
  }
  .action button:active {
    scale: 0.9;
  }
  .info h2 {
    font-size: 1.5rem;
  }
  .info p {
    font-size: 1rem;
  }
  .playlist ul li {
    font-size: 0.8rem;
  }
  .progress .bar::after {
    width: var(--progress-length);
  }
  .progress .bar {
    height: 2px;
  }
}
