:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: #0b0c10;
  color: #f1f5f9;
}

body {
  margin: 0;
  background: #0b0c10;
  color: inherit;
}

header {
  padding: 24px 32px;
  background: linear-gradient(135deg, #1f2937, #111827);
  border-bottom: 1px solid #1f2937;
}

header h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

header p {
  margin: 0;
  color: #94a3b8;
}

main {
  padding: 24px 32px 48px;
  display: grid;
  gap: 24px;
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
}

.card h2 {
  margin-top: 0;
}

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

.card-header h2 {
  margin: 0;
}

.card-header button {
  width: auto;
}

.card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cbd5f5;
  white-space: nowrap;
}

.card-toggle input {
  width: auto;
  margin: 0;
}

.form-section-title {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.player-panel {
  display: grid;
  gap: 12px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.player-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-button {
  width: auto;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 10px;
}

.player-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.player-actions.bottom-left {
  justify-content: flex-start;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-row.compact {
  justify-content: flex-end;
}

.player-row.compact input[type="range"] {
  width: 160px;
  max-width: 160px;
  flex: 0 0 160px;
}

.player-row .notice {
  margin: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.playlist-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr);
}

.track-editor-card {
  grid-column: 2;
  grid-row: 1 / span 2;
}

label {
  display: block;
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 6px;
}

input, textarea, select, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 14px;
}

button {
  cursor: pointer;
  font-weight: 600;
  background: #4f46e5;
  border: none;
}

button.secondary {
  background: #1e293b;
  border: 1px solid #334155;
}

button.ghost {
  background: transparent;
  border: 1px dashed #334155;
}

.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 10px;
}

.list {
  display: grid;
  gap: 8px;
}

.track-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

.chat-feed .list-item {
  align-items: flex-start;
  gap: 8px;
}

.chat-feed .list-item span:nth-child(2) {
  flex: 1;
}

.list-item .actions {
  display: inline-flex;
  gap: 6px;
}

.list-item .actions button {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.list-item .actions button.icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.list-item.disabled {
  opacity: 0.6;
}

.list-item button.inline {
  width: auto;
  padding: 6px 10px;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(420px, 90vw);
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.6);
}

.modal-card h3 {
  margin: 0 0 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}

.modal-actions button {
  width: auto;
}

.track-editor-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.track-editor-tools {
  min-width: 220px;
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.track-editor-tools .notice {
  margin: 0;
  text-align: right;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(79, 70, 229, 0.2);
  color: #c7d2fe;
}

.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tab-link {
  padding: 8px 14px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 13px;
  text-decoration: none;
  color: #e2e8f0;
}

.tab-link.active {
  background: #4f46e5;
  color: #f8fafc;
  border-color: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.notice {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 8px;
}

.footer {
  padding: 24px 32px;
  color: #64748b;
  font-size: 13px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #1f2937, #0b0c10);
}

.login-card {
  width: min(420px, 90vw);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #0f172a;
  border: 1px solid #334155;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}
