.audio-player {
  width: 100%;
  max-width: 400px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 15px;
  color: #fff;
  font-family: "Raleway", sans-serif;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin: 20px auto;
}

.player-container {
  display: flex;
  flex-direction: column;
}

.player-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.track-info {
  flex: 1;
  overflow: hidden;
  text-align: center;
}

.track-title {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.control-button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.play-button {
  background-color: var(--gold, #f2a900);
  color: #000;
  margin: 0 15px;
}

.play-button:hover {
  background-color: var(--gold, #f2a900);
  opacity: 0.9;
}

.progress-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.current-time,
.duration {
  font-size: 12px;
  min-width: 40px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 10px;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
}

.progress {
  width: 0%;
  height: 100%;
  background-color: var(--gold, #f2a900);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.volume-container {
  display: flex;
  align-items: center;
}

.volume-icon {
  font-size: 14px;
  margin-right: 10px;
  cursor: pointer;
}

.volume-slider {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  border-radius: 2px;
  position: relative;
}

.volume-progress {
  width: 100%;
  height: 100%;
  background-color: var(--gold, #f2a900);
  border-radius: 2px;
}

/* Album Tracks List */
.album-tracks {
  margin-top: 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.album-tracks.active {
  max-height: 500px;
}

.track-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-item {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.track-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.track-number {
  margin-right: 15px;
  font-size: 14px;
  opacity: 0.7;
  min-width: 20px;
}

.track-details {
  flex: 1;
}

.track-name {
  font-size: 14px;
  margin-bottom: 3px;
}

.track-duration {
  font-size: 12px;
  opacity: 0.7;
}

.track-play {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.track-play:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.track-item.active {
  background-color: rgba(242, 169, 0, 0.1);
}

.track-item.active .track-name {
  color: var(--gold, #f2a900);
}

/* Responsive */
@media (max-width: 768px) {
  .audio-player {
    max-width: 100%;
    padding: 12px;
  }

  .player-controls {
    margin-bottom: 12px;
  }

  .control-button {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .play-button {
    margin: 0 10px;
  }

  .current-time,
  .duration {
    font-size: 11px;
    min-width: 35px;
  }

  .progress-bar {
    margin: 0 8px;
  }

  .track-item {
    padding: 8px 12px;
  }

  .track-name {
    font-size: 13px;
  }

  .track-duration {
    font-size: 11px;
  }

  .track-play {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .audio-player {
    padding: 10px;
  }

  .player-header {
    margin-bottom: 12px;
  }

  .track-title {
    font-size: 14px;
  }

  .track-artist {
    font-size: 11px;
  }

  .control-button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .play-button {
    margin: 0 8px;
  }

  .current-time,
  .duration {
    font-size: 10px;
    min-width: 30px;
  }

  .track-number {
    margin-right: 10px;
    font-size: 12px;
  }

  .track-name {
    font-size: 12px;
  }

  .track-duration {
    font-size: 10px;
  }

  .track-play {
    width: 24px;
    height: 24px;
  }

  .volume-container {
    display: none; /* مخفی کردن کنترل صدا در موبایل‌های کوچک برای صرفه‌جویی در فضا */
  }
}
