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

html {
  font-size: 62.5%;
}

body {
  background-color: #121212;
  font-family: "Poppins", sans-serif;
}

.container {
  width: 95%;
  max-width: 120rem;
  margin: 0 auto;
}

header {
  position: sticky;
  top: 1.5rem;
  z-index: 999;
}

/* ==== NAVBAR SECTION ==== */
.navigation {
  max-width: 120rem;
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 2rem;
  padding: 2rem 3rem;
  margin: 1.5rem auto;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.siteLogo {
  font-size: 2.4rem;
  font-weight: 600;
  color: #a06bff;
  text-shadow: 0 2px 12px rgba(132, 71, 255, 0.5);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navLogo {
  font-size: 2.8rem;
}

.search {
  display: flex;
  gap: 2rem;
  width: 500px;
  position: relative;
}

.inputMusic {
  padding: 1.2rem 4rem;
  background-color: #fff;
  outline: none;
  border: none;
  border-radius: 10px;
  width: 70%;
}

.searchBtn {
  background: linear-gradient(135deg, #8447ff, #b388ff);
  border: none;
  color: #fff;
  padding: 1.2rem 4rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.searchBtn:hover {
  transform: translateY(-1.3px);
  background: linear-gradient(135deg, #9b63ff, #c2a0ff);
}

.toggleBtn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.toggleBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

/* ==== MUSIC CONTAINER ==== */
.musicPlayerContainer {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2.6rem;
  margin: 3.8rem auto;
}

/* ==== SIDEBAR ==== */
.sideBar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2rem 1.5rem;
  border-radius: 2rem;
  height: 100%;
}

.sidebarNav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebarLink {
  display: flex;
  align-items: center;
  gap: 2rem;
  text-decoration: none;
  color: #f1f1f1;
  font-size: 1.6rem;
  padding: 2rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.activeClick {
  background-color: #8447ff;
}

.sidebarLink:hover {
  background: rgba(132, 71, 255, 0.3);
  color: #fff;
}

.genres {
  margin-top: 3rem;
  align-items: end;
}

.genresTitle {
  font-size: 1.8rem;
  color: #ddd;
  margin-bottom: 1rem;
}

.genreLists {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.genreList {
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  background-color: #121212;
  transition: all 0.3s ease;
}

.genreList:hover {
  background: rgba(132, 71, 255, 0.3);
}

.songContainer {
  width: 10rem;
  height: auto;
  cursor: pointer;
}

.imagePoster {
  width: 100%;
  border-radius: 4px;
}

/* ==== MUSIC COLLECTION SECTION ==== */
.musicCollectionTopBox {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(135deg, #8447ff, #5a2d9f);
  padding: 4rem 3rem;
  border-radius: 2rem;
  margin-bottom: 1.8rem;
}

.musicCollectionHeaderText {
  font-size: 4rem;
  color: #f7f4ff;
  margin-bottom: 1.2rem;
}

.musicCollectionHeaderSubText {
  font-size: 1.4rem;
  color: #c8bfff;
}

.headerIcon {
  font-size: 6.4rem;
  color: #fff;
}

.trendingCollection,
.streetCollection,
.artistsCollection,
.chillCollection,
.freshCollection {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5rem;
}

.freshCollection {
  margin-bottom: 0;
}

h3 {
  font-size: 2.4rem;
  color: #f7f4ff;
  margin-bottom: 1.2rem;
}

.songName {
  color: #ddd;
  font-size: 1.4rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.artistName {
  color: #999;
  font-size: 1.2rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.errormessage {
  color: #999;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  justify-self: center;
  padding: 4rem;
}

/* === MUSIC PLAYER === */
.playerContainer {
  background: rgba(45, 52, 54, 0.95);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  bottom: 0;
  z-index: 1000;
}

.nowPlaying {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex: 0 1 30rem;
}

.nowPlaying img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.trackDetails h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8rem;
}

.trackDetails p {
  font-size: 0.85rem;
  color: #f7f4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8rem;
}

.playerControls {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 50rem;
}

.controlButtons {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 1rem;
  margin: 0.5rem 2rem;
}

.controlBtn {
  background: transparent;
  border: none;
  color: #f7f4ff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 1rem 0.85rem;
}

.controlBtn:hover {
  color: #999;
}

.playPause {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  transition: all 0.3s ease;
}

.playPause:hover {
  transform: scale(1.05);
}

.progressContainer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.time {
  font-size: 1rem;
  color: #f7f4ff;
}

.progressBar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #6a30d9, #a066ff);
  border-radius: 10px;
  width: 25%;
  transition: all 0.1s linear;
}

.volumeControls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 0 1 20rem;
  justify-content: flex-end;
}

.volumeBar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  max-width: 100px;
}

.volumeLevel {
  height: 100%;
  background: linear-gradient(90deg, #6a30d9, #a066ff);
  border-radius: 10px;
  width: 50%;
}

/* === DROPDOWN SECTION === */
.dropDownBox {
  position: absolute;
  height: 30rem;
  width: 70%;
  top: 45px;
}

.dropDown {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* fix iOS scroll */
  opacity: 0.01; /* iOS needs minimal opacity */
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1001;
}

.closeDropIcon {
  position: absolute;
  right: 17rem;
  top: 180%;
  font-size: 1.4rem;
  color: #f1f1f1;
  cursor: pointer;
  opacity: 0;
  z-index: 1002;
}
.closeDropIcon.show {
  opacity: 1;
}

.dropDown.show {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.dropDown .songContainer {
  opacity: 0;
  transform: translateX(-10px);
  animation: itemSlide 0.35s ease forwards;
}

@keyframes itemSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dropDown .songContainer:nth-child(1) {
  animation-delay: 0.05s;
}
.dropDown .songContainer:nth-child(2) {
  animation-delay: 0.1s;
}
.dropDown .songContainer:nth-child(3) {
  animation-delay: 0.15s;
}
.dropDown .songContainer:nth-child(4) {
  animation-delay: 0.2s;
}
.dropDown .songContainer:nth-child(5) {
  animation-delay: 0.25s;
}
.dropDown .songContainer:nth-child(6) {
  animation-delay: 0.3s;
}

.dropDown::-webkit-scrollbar {
  display: none;
}

.dropDown img {
  width: 5rem;
  cursor: pointer;
}

.dropDown h4 {
  font-size: 1.2rem;
}

.dropDown p {
  font-size: 0.85rem;
}

.dropDown .songContainer {
  display: flex;
  gap: 0.85rem;
  width: auto;
}

.songDetails {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
}

/* === FAVORITE SECTION === */
.activeLike {
  color: #fe0b0f;
  transition: color 0.4s ease;
}

.favoriteList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 0 0 1rem;
}

.favDivContainer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  animation: itemSlide 0.35s ease forwards;
}

.favDivImage {
  width: 40px;
  height: 40px;
}

.faveSongDetails {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.faveTitle {
  font-size: 1.4rem;
  color: #f7f4ff;
}

.faveArtist {
  font-size: 1.2rem;
  color: #ddd;
}

.activeControl {
  color: #1db954;
  transform: scale(1.1);
  transition: 0.2s ease;
}

.currentPlaying {
  background: rgba(138, 43, 226, 0.15);
  border-left: 3px solid #8a2be2;
  border-radius: 4px;
  box-shadow: inset 0 0 0 0px rgba(0, 200, 255, 0.25);
}
