:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #7c9cff;
  --border: #2a2f3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at top, #1a2030, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

main.narrow {
  max-width: 420px;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.upload-row,
.toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

input[type='file'],
input[type='password'],
input[type='text'] {
  width: 100%;
  background: #0d1016;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.upload-row input[type='file'] {
  flex: 1 1 220px;
}

button,
.button-link {
  background: var(--accent);
  color: #0b1020;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

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

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  min-height: 1.25rem;
  color: var(--muted);
}

.status.error {
  color: #ff8a8a;
}

.status.success {
  color: #8ee6a0;
}

.track {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

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

.track-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.track-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

button.small {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

.track-name {
  font-weight: 600;
  word-break: break-all;
}

.track-meta {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

audio {
  width: 100%;
}

.empty,
.footer-link,
.auth-note {
  color: var(--muted);
}

.footer-link {
  text-align: center;
}

.footer-link a,
.auth-note a {
  color: var(--accent);
}

.hidden {
  display: none !important;
}
