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

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

html {
  font-family: "Roboto", sans-serif;
}

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

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

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

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

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

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

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

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

/* cd thumb */
.cd {
  width: 200px;
  display: flex;
  margin: 16px auto;
}

.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: 16px;
}

.btn {
  padding: 8px;
  margin: 0 16px;
  font-size: 20px;
  color: #8481AB;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.8;
}

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

.btn-toggle-play {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white-color);
}

.btn-toggle-play .icon-pause {
  display: none;
}

#progress {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

/* #progress::-webkit-slider-runnable-track {
  background: #ddd; 
  height: 8px;
  border-radius: 5px;
} */

#progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  /* margin-top: -4px; */
}

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

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

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

.song:active {
  opacity: 0.8;
}

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

.song.active .singer,
.song.active .option i {
  color: var(--white-color);
}

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

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

.title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.option {
  width: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.option i {
  font-size: 24px;
  color: #8481AB;
}

/* mobile */
@media (max-width: 739px) {
  .player {
    width: 100%;
    height: 100%;
  }
  
  .dashboard {
    width: 100%;
  }

  .playlist {
    width: 100%;
    height: 100%;
  }
}

/* cherry blossoms fall */
.cherry-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.cherry-blossom {
  position: absolute;
  width: 30px;
  height: 30px;
  background-image: url(../img/cherry-blossom.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(130vh, 70vw) rotate(360deg);
  }
}