:root {
  color-scheme: light;
  --bg: #0d0f12;
  --panel: #171a1f;
  --panel-2: #20242b;
  --line: #2d333c;
  --text: #f4f1e8;
  --muted: #9ca6b4;
  --accent: #5ee0b8;
  --accent-2: #f5c84c;
  --danger: #f06d5e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-mood="ember"] {
  --accent: #f06d5e;
  --accent-2: #f5c84c;
  --bg: #100f0d;
  --panel: #1d1715;
  --panel-2: #2a201c;
}

body[data-mood="aurora"] {
  --accent: #88a7ff;
  --accent-2: #5ee0b8;
  --bg: #0d1018;
  --panel: #151926;
  --panel-2: #20263a;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 960px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 30%),
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 28%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 112px;
  min-height: 100vh;
}

.sidebar {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(13, 15, 18, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(94, 224, 184, 0.16);
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
.storage-note span,
.section-head p,
.now-playing span,
.eyebrow {
  color: var(--muted);
}

.import-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid rgba(94, 224, 184, 0.35);
  border-radius: 8px;
  color: #0b1512;
  background: var(--accent);
  font-weight: 700;
}

.import-button input {
  display: none;
}

.import-button span:first-of-type {
  font-size: 24px;
  line-height: 1;
}

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

.nav-item {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.storage-note {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.workspace {
  min-width: 0;
  padding: 28px 32px 136px;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  letter-spacing: 0;
}

h2 {
  font-size: 21px;
  letter-spacing: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 42vw);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.homepage-disclaimer {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 14px;
  line-height: 1.6;
}

.source-note,
.source-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.source-note {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.radio-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 180px;
  margin-top: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 34%, rgba(255, 255, 255, 0.22), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 24px),
    linear-gradient(135deg, #111827, #007aff 56%, #34c759);
  box-shadow: 0 22px 54px rgba(0, 122, 255, 0.18);
}

.radio-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.podcast-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.podcast-panel strong {
  display: block;
  font-size: 30px;
  font-weight: 860;
}

.podcast-panel p {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
}

.podcast-tags,
.podcast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.podcast-tags button,
.podcast-actions button {
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.podcast-tags button {
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
}

.podcast-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.podcast-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}

.podcast-card {
  display: grid;
  gap: 12px;
  min-height: 164px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.podcast-card strong {
  display: block;
  font-size: 18px;
}

.podcast-card span,
.podcast-card p {
  color: var(--muted);
}

.podcast-card p {
  margin: 0;
  line-height: 1.55;
}

.radio-hero strong {
  display: block;
  font-size: 38px;
  font-weight: 860;
}

.radio-hero p {
  max-width: 520px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.radio-hero button,
.radio-dial button {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.radio-hero button {
  min-width: 120px;
  min-height: 44px;
  font-weight: 800;
}

.radio-dial {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.radio-dial button {
  min-height: 42px;
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.72);
}

.radio-dial button.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.search-box input,
.inline-form input,
.lyrics-panel textarea {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.view {
  display: none;
  margin-top: 28px;
}

.active-view {
  display: block;
}

.track-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.track-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.4fr) minmax(120px, 0.8fr) 112px 154px;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.track-row:hover,
.track-row.playing {
  border-color: rgba(94, 224, 184, 0.32);
  background: rgba(94, 224, 184, 0.08);
}

.track-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(94, 224, 184, 0.12);
}

.track-main {
  min-width: 0;
}

.track-main strong,
.track-meta,
.playlist-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-main strong {
  display: block;
}

.track-main span,
.track-meta,
.track-duration {
  color: var(--muted);
  font-size: 13px;
}

.ai-panel {
  display: grid;
  gap: 18px;
  max-width: 920px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.ai-panel strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
}

.ai-panel p {
  color: var(--muted);
}

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

.ai-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

#aiOutput {
  min-height: 180px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
  white-space: pre-wrap;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-button,
.ghost-button,
.inline-form button,
.player button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.ghost-button,
.inline-form button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

.ghost-button:hover,
.inline-form button:hover,
.icon-button:hover,
.player button:hover,
.shuffle-on,
.repeat-on {
  border-color: rgba(94, 224, 184, 0.45);
  color: var(--accent);
}

.inline-form {
  display: flex;
  width: min(360px, 40vw);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.inline-form input {
  padding: 0 12px;
}

.inline-form button {
  border-width: 0 0 0 1px;
  border-radius: 0;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
  margin-top: 18px;
}

.visualizer-card,
.mood-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.visualizer-card {
  min-height: 420px;
}

#visualizer {
  display: block;
  width: 100%;
  height: min(360px, 36vh);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 45%),
    #101216;
}

.visualizer-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.visualizer-caption span {
  color: var(--muted);
  font-size: 13px;
}

.mood-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
}

.mood-card h3 {
  margin: 0;
  font-size: 16px;
}

.mood-buttons {
  display: grid;
  gap: 10px;
}

.mood-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.mood-button span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--swatch);
}

.mood-button.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.stat-grid strong {
  font-size: 21px;
}

.stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.playlist-card {
  display: grid;
  gap: 10px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(94, 224, 184, 0.11), rgba(245, 200, 76, 0.08));
}

.playlist-card span {
  color: var(--muted);
}

.playlist-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.lyrics-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  margin-top: 18px;
}

.lyrics-panel textarea,
.lyrics-display,
.about-panel {
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.lyrics-panel textarea {
  resize: vertical;
  line-height: 1.7;
}

.lyrics-display {
  overflow: auto;
  line-height: 1.9;
  color: var(--muted);
}

.lyric-line.active {
  color: var(--accent-2);
  font-weight: 800;
}

.about-panel {
  max-width: 860px;
  display: grid;
  gap: 16px;
  min-height: auto;
  line-height: 1.75;
}

.about-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.player {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 260px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1fr) minmax(220px, 0.65fr);
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 16px 32px;
  border-top: 1px solid var(--line);
  background: rgba(23, 26, 31, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

body.stage-mode .sidebar,
body.stage-mode .workspace {
  opacity: 0.18;
  filter: blur(1px);
}

body.stage-mode .player {
  left: 50%;
  bottom: 50%;
  width: min(760px, calc(100vw - 48px));
  transform: translate(-50%, 50%);
  grid-template-columns: 1fr;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
}

body.stage-mode .now-playing {
  justify-content: center;
}

body.stage-mode .now-playing img {
  width: 128px;
  height: 128px;
}

body.stage-mode .now-playing strong {
  font-size: 25px;
  text-align: center;
}

.now-playing {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.now-playing img {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.now-playing strong,
.now-playing span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transport {
  display: grid;
  gap: 10px;
}

.player-message {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  text-align: center;
}

.transport-buttons,
.player-tools,
.progress-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.player button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.player .primary-control {
  width: 44px;
  height: 44px;
  border-color: transparent;
  color: #0b1512;
  background: var(--accent);
  font-weight: 900;
}

.progress-row span {
  width: 42px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

input[type="range"] {
  accent-color: var(--accent);
}

#progress {
  width: min(480px, 34vw);
}

#volume {
  width: 110px;
}

@media (max-width: 1040px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-row: auto;
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px;
  }

  .nav-list {
    grid-column: 1 / 3;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .storage-note {
    display: none;
  }

  .workspace {
    padding: 24px 18px 190px;
  }

  .topbar,
  .section-head,
  .lyrics-panel,
  .studio-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .search-box,
  .inline-form {
    width: 100%;
  }

  .track-row {
    grid-template-columns: 38px minmax(0, 1fr) 116px;
  }

  .track-meta,
  .track-duration {
    display: none;
  }

  .player {
    left: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 18px;
  }
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1014;
  --panel: rgba(28, 28, 30, 0.78);
  --panel-2: rgba(38, 38, 41, 0.92);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --accent: #0a84ff;
  --accent-2: #30d158;
  --danger: #ff453a;
  background:
    radial-gradient(circle at 18% 8%, rgba(10, 132, 255, 0.18), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(48, 209, 88, 0.14), transparent 30%),
    linear-gradient(180deg, #1b1b1f 0%, #0f1014 54%, #121215 100%);
}

body[data-theme="dark"] .app-shell {
  background: rgba(12, 12, 14, 0.98);
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .player,
body[data-theme="dark"] .storage-note,
body[data-theme="dark"] .homepage-disclaimer,
body[data-theme="dark"] .source-note,
body[data-theme="dark"] .track-row,
body[data-theme="dark"] .visualizer-card,
body[data-theme="dark"] .mood-card,
body[data-theme="dark"] .playlist-card,
body[data-theme="dark"] .lyrics-panel textarea,
body[data-theme="dark"] .lyrics-display,
body[data-theme="dark"] .about-panel,
body[data-theme="dark"] .inline-form,
body[data-theme="dark"] .search-box,
body[data-theme="dark"] .feature-cover,
body[data-theme="dark"] .recommend-panel,
body[data-theme="dark"] .collection-card,
body[data-theme="dark"] .podcast-panel,
body[data-theme="dark"] .podcast-card,
body[data-theme="dark"] .ai-panel,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .ghost-button,
body[data-theme="dark"] .inline-form button,
body[data-theme="dark"] .player button,
body[data-theme="dark"] .mood-button,
body[data-theme="dark"] .category-cloud button,
body[data-theme="dark"] .podcast-tags button,
body[data-theme="dark"] .podcast-actions button,
body[data-theme="dark"] .ai-actions button {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(28, 28, 30, 0.76);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 42px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] #aiOutput {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .radio-dial button {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(28, 28, 30, 0.76);
}

body[data-theme="dark"] .radio-dial button.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

body[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(12, 12, 14, 0.96), rgba(12, 12, 14, 0.72));
}

body[data-theme="dark"] .nav-item {
  color: #a1a1a6;
}

body[data-theme="dark"] .nav-item:hover,
body[data-theme="dark"] .nav-item.active,
body[data-theme="dark"] .track-row:hover,
body[data-theme="dark"] .track-row.playing,
body[data-theme="dark"] .visualizer-caption,
body[data-theme="dark"] .empty-state {
  background: rgba(44, 44, 46, 0.84);
}

body[data-theme="dark"] .recommend-panel {
  background: rgba(44, 44, 46, 0.82);
}

body[data-theme="dark"] .feature-cover,
body[data-theme="dark"] .collection-card {
  color: #ffffff;
}

body[data-theme="dark"] .mini-card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #77777d;
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

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

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 17px;
  }

  .import-button {
    width: 100%;
  }

  .nav-list {
    grid-column: auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 76px;
    text-align: center;
  }

  .topbar {
    gap: 14px;
  }

  h1 {
    font-size: 28px;
  }

  .workspace {
    padding: 20px 14px 228px;
  }

  .section-head {
    gap: 12px;
  }

  .track-row {
    grid-template-columns: 34px minmax(0, 1fr) 100px;
    gap: 10px;
    padding: 10px;
  }

  .row-actions {
    gap: 6px;
  }

  .icon-button {
    width: 30px;
    height: 30px;
  }

  .visualizer-card {
    min-height: 300px;
  }

  #visualizer {
    height: 230px;
  }

  .visualizer-caption,
  .player-tools {
    flex-wrap: wrap;
  }

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

  .lyrics-panel textarea,
  .lyrics-display {
    min-height: 260px;
  }

  .player {
    min-height: 200px;
  }

  .now-playing {
    justify-content: center;
    text-align: center;
  }

  .progress-row {
    gap: 6px;
  }

  #progress {
    width: min(100%, 260px);
  }
}

/* Clean, Apple-inspired visual pass. Original UI only; no platform assets. */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.9);
  --line: rgba(0, 0, 0, 0.11);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #007aff;
  --accent-2: #34c759;
  --danger: #ff3b30;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI",
    "Microsoft YaHei UI", sans-serif;
}

body[data-mood="ember"] {
  --accent: #ff3b30;
  --accent-2: #ffcc00;
  --bg: #f7f2ef;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.9);
}

body[data-mood="aurora"] {
  --accent: #5856d6;
  --accent-2: #32d7d4;
  --bg: #f4f5fb;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.9);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    radial-gradient(circle at 92% 16%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 30%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 48%, #ffffff 100%);
}

.sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(28px) saturate(180%);
}

.brand-mark,
.now-playing img {
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 122, 255, 0.16);
}

.brand strong {
  font-weight: 800;
  letter-spacing: 0;
}

.import-button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 78%, var(--accent)));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-item {
  color: #5f6368;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  transform: translateY(-1px);
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.storage-note,
.homepage-disclaimer,
.source-note,
.track-row,
.visualizer-card,
.mood-card,
.playlist-card,
.lyrics-panel textarea,
.lyrics-display,
.about-panel,
.inline-form,
.search-box {
  border: 1px solid rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 32px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(22px) saturate(180%);
}

.homepage-disclaimer {
  color: #56565b;
  background: rgba(255, 255, 255, 0.64);
}

h1 {
  font-size: 42px;
  font-weight: 850;
  line-height: 1.05;
}

h2 {
  font-weight: 780;
}

.eyebrow {
  color: #86868b;
  font-weight: 800;
}

.search-box {
  height: 46px;
}

.search-box input,
.inline-form input,
.lyrics-panel textarea {
  color: var(--text);
}

.search-box input::placeholder,
.inline-form input::placeholder,
.lyrics-panel textarea::placeholder {
  color: #9a9aa0;
}

.empty-state {
  border-color: rgba(0, 0, 0, 0.12);
  color: #7b7b80;
  background: rgba(255, 255, 255, 0.55);
}

.track-row {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.track-row:hover,
.track-row.playing {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(0, 0, 0, 0.08));
  background: rgba(255, 255, 255, 0.9);
}

.track-index {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.icon-button,
.ghost-button,
.inline-form button,
.player button,
.mood-button {
  border-color: rgba(0, 0, 0, 0.09);
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.ghost-button:hover,
.inline-form button:hover,
.icon-button:hover,
.player button:hover,
.mood-button:hover,
.shuffle-on,
.repeat-on {
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(0, 0, 0, 0.08));
  color: var(--accent);
  background: #ffffff;
}

#visualizer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(circle at 50% 78%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 46%),
    #121316;
}

.visualizer-caption {
  background: rgba(255, 255, 255, 0.7);
}

.mood-button.active {
  border-color: color-mix(in srgb, var(--accent) 44%, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.stat-grid div {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.68);
}

.playlist-card {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, white), rgba(255, 255, 255, 0.78)),
    #ffffff;
}

.player {
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.11);
  backdrop-filter: blur(30px) saturate(180%);
}

.player .primary-control {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 74%, var(--accent)));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 26%, transparent);
}

input[type="range"] {
  accent-color: var(--accent);
}

body.stage-mode .player {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.2);
}

/* Concept music-app layout inspired by a desktop player window. */
body {
  min-width: 1180px;
  min-height: 100vh;
  display: block;
  padding: 0;
  background: #f5f5f7;
}

.app-shell {
  position: relative;
  grid-template-columns: 96px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.sidebar {
  grid-row: 1 / 3;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
}

.brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
}

.brand strong {
  font-size: 13px;
}

.brand span {
  display: none;
}

.import-button {
  width: 48px;
  min-height: 48px;
  border-radius: 50%;
}

.import-button span:last-of-type {
  display: none;
}

.nav-list {
  width: 100%;
  gap: 12px;
}

.nav-item {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  text-align: center;
}

.nav-item::before {
  content: attr(data-icon);
  font-size: 23px;
  font-weight: 800;
}

.storage-note {
  width: 48px;
  height: 48px;
  margin-top: auto;
  padding: 0;
  place-items: center;
  border-radius: 50%;
}

.storage-note strong {
  display: none;
}

.storage-note span {
  font-size: 0;
}

.storage-note::before {
  content: "↧";
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
}

.workspace {
  overflow-y: auto;
  padding: 40px 40px 168px;
}

.topbar {
  position: sticky;
  top: -40px;
  z-index: 4;
  padding: 0 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: none;
}

h1 {
  font-size: 46px;
}

.search-box {
  width: min(640px, 52vw);
  border-radius: 8px;
}

.homepage-disclaimer {
  margin-top: 0;
}

.concept-home {
  display: grid;
  grid-template-columns: 168px minmax(420px, 1fr) 184px;
  gap: 20px;
  margin-top: 26px;
}

.feature-cover,
.recommend-panel,
.collection-card {
  min-height: 220px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 38px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px) saturate(160%);
}

.feature-cover {
  position: relative;
  display: grid;
  align-content: end;
  gap: 4px;
  overflow: hidden;
  padding: 16px;
  color: #ffffff;
  background:
    linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, 0.64)),
    linear-gradient(135deg, #245cff, #34c759);
}

.feature-cover img {
  position: absolute;
  inset: 18px 18px auto auto;
  width: 96px;
  height: 96px;
  opacity: 0.72;
  transform: rotate(8deg);
}

.feature-cover strong,
.feature-cover span {
  position: relative;
}

.feature-cover strong {
  font-size: 19px;
}

.feature-cover span {
  color: rgba(255, 255, 255, 0.82);
}

.recommend-panel {
  padding: 18px;
  background: rgba(231, 236, 242, 0.86);
}

.recommend-panel h2 {
  margin-bottom: 14px;
}

.recommend-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 150px;
  padding: 14px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
}

.mini-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 42%);
  transform: rotate(24deg);
}

.mini-card strong,
.mini-card span,
.mini-card button {
  position: relative;
}

.mini-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
}

.mini-card button,
.collection-card button {
  justify-self: end;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #14b866;
}

.mini-card.warm {
  background: linear-gradient(135deg, #8e0e00, #ff6a00);
}

.mini-card.violet {
  background: linear-gradient(135deg, #654ea3, #7f53ff);
}

.mini-card.amber {
  background: linear-gradient(135deg, #734b20, #d69b42);
}

.mini-card.rose {
  background: linear-gradient(135deg, #d66d75, #f6b3c8);
}

.collection-card {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 16px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58)),
    linear-gradient(135deg, #3a7bd5, #00d2ff);
}

.category-cloud {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
  width: min(360px, 100%);
  margin: 28px 0 0;
}

.category-cloud button {
  min-height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
}

.section-head {
  margin-top: 28px;
}

.track-list {
  max-width: 660px;
}

.player {
  position: absolute;
  left: 96px;
  min-height: 78px;
  grid-template-columns: minmax(220px, 0.78fr) minmax(320px, 1fr) minmax(220px, 0.6fr);
  padding: 12px 28px;
}

.now-playing img {
  width: 54px;
  height: 54px;
}

.player .primary-control {
  width: 58px;
  height: 48px;
  border-radius: 999px;
}

@media (max-width: 1040px) {
  body {
    display: block;
    min-width: 0;
    padding: 0;
  }

  .app-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .brand {
    justify-items: start;
    grid-template-columns: auto 1fr;
    text-align: left;
  }

  .brand span {
    display: block;
  }

  .nav-item {
    width: auto;
    min-width: 76px;
    border-radius: 8px;
  }

  .concept-home {
    grid-template-columns: 1fr;
  }

  .recommend-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .radio-dial {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player {
    position: fixed;
    left: 0;
    min-height: 180px;
  }
}
