:root {
  --bg: #0f0a1e;
  --bg-soft: #1a1333;
  --card: #221a3d;
  --card-hover: #2b2150;
  --line: #362a5c;
  --text: #f3eefe;
  --muted: #a99fc9;
  --accent: #c084fc;
  --accent-2: #f0abfc;
  --gold: #f4c95d;
  --green: #34d399;
  --red: #fb7185;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #2a1d52 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); }

.wrap { max-width: 880px; margin: 0 auto; padding: 24px 18px 80px; }
.wrap-narrow { max-width: 560px; }
.wrap-wide { max-width: 1180px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -0.02em; font-size: 20px;
  margin-bottom: 6px;
}
.brand .dot { font-size: 22px; }
.brand small { font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: 0; }

h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.1; letter-spacing: -0.03em; margin: 14px 0 6px; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input, textarea, select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.18);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1a0e2e;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, filter .15s;
  width: 100%;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--card-hover); filter: none; }
.btn.sm { padding: 8px 12px; font-size: 13px; width: auto; }
.btn.green { background: linear-gradient(135deg, #34d399, #6ee7b7); color: #06281d; }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn.danger:hover { background: rgba(251,113,133,.12); filter: none; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120%);
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2); z-index: 100; font-size: 14px;
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--red); }

/* Search results / track rows */
.track {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 12px; border: 1px solid transparent;
}
.track:hover { background: var(--card-hover); }
.track .art {
  width: 48px; height: 48px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #3a2c66, #5a3f8f);
  display: grid; place-items: center; font-size: 20px; overflow: hidden;
}
.track .art img { width: 100%; height: 100%; object-fit: cover; }
.track .meta { min-width: 0; flex: 1; }
.track .meta .t { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .meta .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { text-align: center; color: var(--muted); padding: 32px 12px; font-size: 14px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.pill.pending { color: var(--gold); border-color: rgba(244,201,93,.4); }
.pill.queued { color: var(--accent); border-color: rgba(192,132,252,.4); }
.pill.played { color: var(--green); border-color: rgba(52,211,153,.4); }
.pill.rejected { color: var(--red); border-color: rgba(251,113,133,.4); }

.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
