:root {
  color-scheme: light dark;
  --fg: #1a1a1a;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --border: #ddd;
  --accent: #2f6fed;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #eaeaea;
    --bg: #111214;
    --card-bg: #1a1b1e;
    --border: #333;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
  padding: 24px;
  line-height: 1.5;
}

.card {
  max-width: 480px;
  margin: 40px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

h1 {
  margin-top: 0;
  font-size: 1.4rem;
}

p {
  color: inherit;
  opacity: 0.85;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

input,
textarea,
select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}

button {
  font: inherit;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

main {
  max-width: 720px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#requests {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
}

.note {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 4px;
}

.meta {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 4px;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.library {
  max-width: 720px;
}

.collection-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.collection-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
}

.collection-card:hover {
  border-color: var(--accent);
}

#items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.track-row:hover,
.track-row.playing {
  background: var(--card-bg);
}

.track-title {
  font-weight: 500;
}

#player-bar {
  position: sticky;
  bottom: 0;
  margin-top: 20px;
  padding: 12px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

#player {
  width: 100%;
}
