:root {
  --bg: #07100f;
  --panel: rgba(16, 29, 28, 0.78);
  --panel-strong: #10221f;
  --ink: #f5fbf8;
  --muted: #9eb0aa;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #7cf7cb;
  --accent-2: #f3d36b;
  --danger: #ff7b8a;
  --shadow: rgba(0, 0, 0, 0.32);
  --cover-image: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 12%, rgba(124, 247, 203, 0.15), transparent 32rem),
    linear-gradient(135deg, #07100f 0%, #12211e 48%, #211923 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

body.warm-theme {
  --accent: #ffd166;
  --accent-2: #7cf7cb;
  background:
    radial-gradient(circle at 80% 14%, rgba(255, 209, 102, 0.18), transparent 31rem),
    linear-gradient(135deg, #120f0a 0%, #251c18 46%, #10221f 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 30px 24px;
  border-right: 1px solid var(--line);
  background: rgba(3, 11, 10, 0.62);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #06100e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(124, 247, 203, 0.22);
}

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

.side-nav a {
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.side-nav a.active,
.side-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.quality-box {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.quality-box span,
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quality-box strong {
  display: block;
  margin: 10px 0;
  font-size: 18px;
}

.quality-box p,
.import-section p,
.track-meta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.main-area {
  display: grid;
  gap: 28px;
  align-content: start;
  padding: clamp(22px, 4vw, 54px);
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
}

.eyebrow {
  margin: 0 0 10px;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3.5vw, 44px);
  line-height: 1.1;
}

.ghost-button,
.import-form button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.player-stage {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(22px, 5vw, 52px);
  align-items: center;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: 0 30px 80px var(--shadow);
}

.album-art {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 16, 15, 0.22), rgba(7, 16, 15, 0.62)),
    var(--cover-image) center / cover,
    linear-gradient(140deg, rgba(124, 247, 203, 0.28), rgba(243, 211, 107, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 20px);
}

.disc {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle, #07100f 0 11%, var(--accent) 12% 14%, transparent 15%),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #12211e, #060b0a);
  box-shadow: inset 0 0 34px rgba(255, 255, 255, 0.05), 0 24px 58px rgba(0, 0, 0, 0.4);
}

.disc span {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.is-playing .disc {
  animation: spin 7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.track-panel {
  display: grid;
  gap: 28px;
}

.pill,
.track-badge,
.track-mood {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #06100e;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.track-meta h2 {
  margin: 14px 0 8px;
  font-size: clamp(32px, 5vw, 64px);
}

.source-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 38px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid rgba(124, 247, 203, 0.42);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.source-link[hidden] {
  display: none;
}

.progress-wrap {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.controls button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-size: 26px;
}

.controls .play {
  width: 64px;
  height: 64px;
  color: #06100e;
  background: var(--accent);
  border-color: var(--accent);
  font-size: 24px;
  font-weight: 900;
}

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

.volume-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-grid,
.import-section {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.section-title {
  margin-bottom: 18px;
}

.section-title p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.playlist-filter {
  display: grid;
  max-width: 460px;
  gap: 8px;
  margin-top: 18px;
}

.playlist-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.playlist-filter select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

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

.track-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.track-row.active,
.track-row:hover {
  border-color: rgba(124, 247, 203, 0.42);
  background: rgba(124, 247, 203, 0.1);
}

.track-number {
  color: var(--muted);
  font-weight: 900;
}

.track-row strong,
.track-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row small {
  margin-top: 4px;
  color: var(--muted);
}

.track-mood {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.track-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(124, 247, 203, 0.34);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.import-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: end;
}

.import-form {
  display: grid;
  gap: 10px;
}

.import-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-row input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.input-row input:focus {
  border-color: var(--accent);
}

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

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .quality-box {
    margin-top: 0;
    width: 100%;
  }

  .player-stage,
  .import-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-area {
    padding: 18px;
  }

  .topbar,
  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

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

  .track-badge,
  .track-mood,
  .track-source {
    grid-column: 2;
    width: max-content;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .import-form button {
    width: 100%;
  }
}
