:root {
    --player-width: 400px;
    --player-height: 600px;
    --white-color: #fff;
    --pink-color: #EF2663;
}


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

html {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
    height: 100vh;
    background-image: url("../image/nier-jungle.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player {
    width: var(--player-width);
    height: var(--player-height);
    background-color: #e5e4e4;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px;
}

.player .icon-pause {
    display: none;
}

.player.playing .icon-pause {
    display: inline-block;
}

.player.playing .icon-play {
    display: none;
}

/* Dashboard */
.dashboard {
    padding: 16px;
    background-color: var(--white-color);
    position: fixed;
    width: var(--player-width);
    border-radius: 10px;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header .header-text {
    color: var(--pink-color);
}

header .current-song {
    max-width: 100%;
    line-height: 28px;
    height: 28px;
    font-size: 22px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cd {
    display: flex;
    margin: 10px auto;
    width: 200px
}

.cd-thumb {
    width: 100%;
    padding-top: 100%;
    border-radius: 50%;
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Control */
.control {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.control .btn {
    color: #666;
    padding: 18px;
    margin: 0 8px;
    font-size: 18px;
    cursor: pointer;
}

.control .btn.active {
    color: var(--pink-color);
}

.control .btn-toggle-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--pink-color);
}

.progress {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        var(--pink-color) 0%,
        var(--pink-color) 0%,
        #ddd 0%,
        #ddd 100%
    );
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    overflow: visible;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--pink-color);
    cursor: pointer;
}

/* Playlist */
.playlist {
    padding: 400px 16px 8px;
    height: var(--player-height);
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.song {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 8px;
    background-color: var(--white-color);
    justify-content: space-between;
    cursor: pointer
}

.song.active {
    background-color: var(--pink-color);
}

.song:active {
    opacity: 0.8;
}

.song.active .title,
.song.active .author,
.song.active .option {
    color: var(--white-color);
}

.song .thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
}

.song .body {
    display: flex;
    flex-direction: column;
    width: calc(100% - 90px);
}

.song .title {
    font-size: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.song .author {
    font-size: 14px;
    color: #777;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.song .option {
    color: #777;
}

@media (max-width: 768px) {
  body {
    background: none;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
  }

  .player {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .dashboard {
    position: relative;  /* không còn fixed */
    width: 100%;
    border-radius: 0;
  }

  .playlist {
    padding: 16px;                 /* bỏ padding-top 400px */
    height: auto;                  /* cho playlist cao theo nội dung */
    max-height: 70vh;              /* giới hạn chiều cao */
    overflow-y: auto;              /* vẫn cho cuộn */
  }
}