:root {
  color-scheme: dark;
  --background: #121416;
  --surface: #1d2227;
  --surface-strong: #252b31;
  --text: #f3f5f7;
  --muted: #aeb7c0;
  --accent: #4db6ac;
  --border: #343c44;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

#status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#tokenButton {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
}

.player {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.now-playing {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
}

audio {
  width: 100%;
}

.search {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
}

.track-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.track:active,
.track:focus {
  border-color: var(--accent);
  background: var(--surface-strong);
  outline: none;
}

.track strong,
.track span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track span {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 20px 0;
  color: var(--muted);
  text-align: center;
}
