@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(0deg, #aa4040 24%, #363434 92%);
  font-family: 'Lato', sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  margin-bottom: 100px;
}

.music-container {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 20px 20px rgba(252, 169, 169, 0.6);
  display: flex;
  align-items: center;
  padding: 20px 30px;
  position: relative;
}

.img-container {
  width: 110px;
  position: relative;
}

.img-container img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  bottom: 45px;
  left: -235px;
  animation: rotate 3s linear infinite;
  animation-play-state: paused;
}

.music-container.play .img-container img {
  animation-play-state: running;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-info {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px 15px 0 0;
  position: absolute;
  top: 0;
  left: 20px;
  width: calc(100% - 40px);
  padding: 10px 10px 10px 150px;
  opacity: 0;
  transform: translateY(0%);
  transition: transform 0.3s ease-in, opacity 0.3s ease-in;
  z-index: 0;
}

.music-container.play .music-info {
  opacity: 1;
  transform: translateY(-100%);
}

.progress-container {
  background: #fff;
  height: 4px;
  width: 100%;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.progress {
  background: #fe8daa;
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 0.1s linear;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}

.navigation {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.action-btn {
  background: none;
  border: none;
  color: #aa4040; 
  font-size: 20px;
  padding: 10px;
  margin: 0 20px;
  cursor: pointer;
  transition: color 0.3s;
}

.action-btn:hover {
  color: #fe8daa;
}

.action-btn-big {
  font-size: 30px;
  color: #aa4040;
}

.player-wrapper {
  display: flex;
  align-items: stretch; 
  gap: 40px; 
}

#playlist-container {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 20px 20px rgba(252, 169, 169, 0.6);
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
}

#playlist {
  margin: 0;
  padding: 0;
  flex: 1;
}

#playlist li {
  list-style: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s;
}

#playlist li:hover {
  background: rgba(254, 141, 170, 0.2);
}

#playlist li.active {
  background: rgba(254, 141, 170, 0.4);
  font-weight: bold;
}

#song-search {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}