:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --panel: #151719;
  --panel-2: #1d2024;
  --line: #30343a;
  --text: #f2f0ea;
  --muted: #a9a49a;
  --gold: #d8b45b;
  --green: #77c59a;
  --red: #e5786d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(216, 180, 91, 0.18), transparent 32rem),
    linear-gradient(135deg, #0b0c0e, #171717 55%, #101417);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select {
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 12rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101214;
  color: var(--text);
  padding: 0.8rem;
  line-height: 1.55;
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #22262b;
  color: var(--text);
  padding: 0.72rem 1rem;
  cursor: pointer;
}

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

button.primary {
  border-color: rgba(216, 180, 91, 0.8);
  background: var(--gold);
  color: #111;
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 1rem;
  width: min(1220px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  min-height: 100vh;
}

.studio,
.panel {
  border: 1px solid var(--line);
  background: rgba(21, 23, 25, 0.86);
  backdrop-filter: blur(16px);
}

.studio {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 2rem);
  min-height: calc(100vh - 2rem);
}

.topbar,
.controls,
.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow,
.label {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-size: 0.76rem;
  letter-spacing: 0;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.now {
  display: grid;
  grid-template-columns: minmax(220px, 36%) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
  margin: 3rem 0;
}

.art {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #2d2620, #111417);
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.art span {
  color: var(--gold);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
}

.track h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.track p:last-child,
.dj p:last-child,
.status p,
.setupHelp {
  color: var(--muted);
  line-height: 1.6;
}

.setupHelp {
  border-top: 1px solid var(--line);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  font-size: 0.9rem;
}

.setupHelp code {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
  word-break: break-all;
}

.controls {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.select {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

select {
  min-width: 7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #22262b;
  color: var(--text);
  padding: 0.72rem 0.8rem;
}

.dj {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  min-height: 7rem;
}

.side {
  display: grid;
  grid-template-rows: 0.8fr 1fr 1.2fr auto;
  gap: 1rem;
  min-height: calc(100vh - 2rem);
}

.panel {
  border-radius: 8px;
  padding: 1rem;
  min-height: 0;
  overflow: auto;
}

.panel h3 {
  margin: 0;
  font-size: 1rem;
}

.list,
.queue {
  margin-top: 1rem;
}

.empty {
  color: var(--muted);
}

.playlist,
.queue li {
  width: 100%;
  margin-bottom: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 0.8rem;
  text-align: left;
}

.playlist strong,
.queue strong {
  display: block;
  margin-bottom: 0.2rem;
}

.playlist span,
.queue span {
  color: var(--muted);
  font-size: 0.9rem;
}

.queue a {
  color: var(--gold);
  text-decoration: none;
}

.playlist.active {
  border-color: var(--gold);
}

.queue {
  padding-left: 1.3rem;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .studio,
  .side {
    min-height: auto;
  }

  .now {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
