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

body {
  font-family: system-ui, sans-serif;
  background: #111;
  color: #eee;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.player {
  width: 100%;
  max-width: 480px;
  background: #1e1e1e;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.track-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.track-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-index {
  font-size: 0.75rem;
  color: #888;
  flex-shrink: 0;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #888;
}

.progress-wrap input[type=range] { flex: 1; }

.controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.controls button {
  background: none;
  border: none;
  color: #eee;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s;
}

.controls button:hover { color: #fff; }

#btnPlay {
  font-size: 1.8rem;
  color: #1db954;
}

#btnPlay:hover { color: #1ed760; }

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.volume-wrap input[type=range] { flex: 1; }

/* shared range style */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1db954;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1db954;
  border: none;
  cursor: pointer;
}

/* playlist */
.playlist {
  width: 100%;
  max-width: 480px;
  list-style: none;
  margin-top: 1rem;
}

.playlist li {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #222;
  cursor: pointer;
  font-size: 0.9rem;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.playlist li:hover { background: #1e1e1e; color: #fff; }

.playlist li.active { color: #1db954; font-weight: 600; }
