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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #0a0a0f;
  color: #e0e0e8;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: #b0b0c0;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
  margin-right: 0.5rem;
  vertical-align: middle;
  transition: background 0.3s;
}

.status-dot.live {
  background: #4ade80;
  box-shadow: 0 0 8px #4ade8066;
}

/* Player */
.player {
  background: #12121a;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.now-playing-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.now-playing-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  max-width: 70%;
}

.now-playing {
  font-size: 0.85rem;
  color: #c0c0d0;
  min-height: 1.2em;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-metadata {
  font-size: 0.7rem;
  color: #666;
  text-transform: lowercase;
}

.time-display {
  font-family: monospace;
  font-size: 0.8rem;
  color: #666;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-controls button {
  background: #1e1e2e;
  border: 1px solid #2a2a3a;
  color: #e0e0e8;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.player-controls button:hover {
  background: #2a2a3a;
}

.player-controls button:active {
  background: #333348;
}

.player-controls button.muted {
  color: #f87171;
  border-color: #5a2a2a;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.volume-control label {
  font-size: 0.8rem;
  color: #888;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #1e1e2e;
  height: 4px;
  border-radius: 2px;
  outline: none;
}

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

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #12121a;
  border: 1px solid #1e1e2e;
  border-radius: 10px;
  padding: 1rem;
}

.stat-card .label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.stat-card .value {
  font-size: 1.3rem;
  font-weight: 300;
  color: #c0c0d0;
}

.btn {
  background: #1e1e2e;
  border: 1px solid #2a2a3a;
  color: #e0e0e8;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn:hover {
  background: #2a2a3a;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Track List */
.track-list {
  background: #12121a;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.track-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.track-list h2 {
  font-size: 0.9rem;
  font-weight: 400;
  color: #888;
  margin-bottom: 0;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

.filter-controls {
  display: flex;
  gap: 0.4rem;
}

.filter-controls select {
  background: #1a1a24;
  border: 1px solid #2a2a3a;
  color: #e0e0e8;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
}

.tracks {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #1a1a24;
  transition: background 0.3s;
}

.track-item.playing {
  background: #1e1e3a;
  border-left: 3px solid #7c7caa;
}

.track-item.playing .track-name {
  color: #e0e0f8;
  font-weight: 500;
}

.track-item:last-child {
  border-bottom: none;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.track-name {
  font-size: 0.85rem;
  color: #c0c0d0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  font-size: 0.7rem;
  color: #555;
}

.crossfade-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.crossfade-control label {
  font-size: 0.8rem;
  color: #888;
}

.crossfade-control .value-display {
  font-size: 0.8rem;
  color: #666;
  min-width: 2em;
}

.mpd-error {
  color: #f87171;
  font-size: 0.8rem;
  padding: 0.5rem;
  text-align: center;
}
