:root {
  --bg: #0b0c0f;
  --surface: #15171c;
  --surface-hover: #1e2128;
  --text: #f2f3f5;
  --text-dim: #8b8f98;
  --accent: #6ee7b7;
  --accent-dim: #2d4a3e;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  padding: 24px 16px 60px;
}

.app {
  width: 100%;
  max-width: 420px;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.cover {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.cover img.loaded { display: block; }

.cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-dim);
}

.meta h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
}

.meta p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

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

.progress-row span {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 36px;
}

#seek {
  flex: 1;
  accent-color: var(--accent);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.15s;
}

.icon-btn:hover { background: var(--surface-hover); }
.icon-btn.active { color: var(--accent); }

.play-btn {
  font-size: 26px;
  background: var(--surface);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#timerSelect {
  margin-left: 8px;
  background: var(--surface);
  color: var(--text-dim);
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.timer-banner {
  text-align: center;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
}

.timer-banner.hidden { display: none; }

.library { margin-top: 28px; }

.library h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 12px;
}

#trackCount { font-weight: 400; }

#trackList {
  list-style: none;
  margin: 0;
  padding: 0;
}

#trackList li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

#trackList li:hover { background: var(--surface); }
#trackList li.playing { background: var(--accent-dim); }

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

.track-row-artist {
  font-size: 12px;
  color: var(--text-dim);
}

.loading, .empty, .error {
  color: var(--text-dim);
  font-size: 13px;
  padding: 12px;
}

.error { color: #f87171; }
