:root {
  color-scheme: light;
  --ink: #1d2633;
  --muted: #748091;
  --line: #ece6e7;
  --rose: #ff3d5f;
  --paper: #fff7f8;
  --shadow: 0 20px 50px rgba(59, 42, 46, .11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Nunito", "PingFang SC", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 244, 246, .94), rgba(247, 251, 252, .96)),
    #f7fbfc;
}

a { color: inherit; }

.music-hero {
  position: relative;
  min-height: 185px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(40, 35, 46, .58), rgba(255, 61, 95, .18)),
    url("/static/assets/music/banner.svg") center 48% / cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, .72);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1320px, calc(100% - 44px));
  margin: 0 auto;
  padding-top: 18px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .28);
}

.brand {
  font-family: "Fredoka", sans-serif;
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-links a:hover,
.nav-links .is-current {
  transform: translateY(-2px);
  opacity: .84;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 44px));
  margin: 36px auto 0;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .28);
}

.hero-copy h1 {
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 10px 0 0;
  max-width: 880px;
  font-weight: 900;
  line-height: 1.6;
}

.music-root {
  width: min(1320px, calc(100% - 44px));
  margin: 28px auto 0;
  padding-bottom: 32px;
}

.mini-status {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 61, 95, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.mini-status[hidden] { display: none !important; }

.mini-status img {
  width: 54px;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
}

.mini-status div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mini-status span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.mini-status b,
.mini-status em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status em {
  color: #778190;
  font-style: normal;
  font-weight: 800;
}

.mini-status button {
  appearance: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #f0d3d8;
  border-radius: 999px;
  color: #5a2b33;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.mini-status button:hover,
.mini-status button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 61, 95, .42);
  background: #fff7f8;
  outline: none;
}

.playlist-head {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 247, 248, .96), rgba(255, 255, 255, .9));
  box-shadow: var(--shadow);
}

.playlist-head img {
  width: 172px;
  aspect-ratio: 1;
  display: block;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(44, 33, 36, .15);
}

.playlist-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.playlist-head p {
  margin: 12px 0 0;
  max-width: 860px;
  color: #647080;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
}

.track-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 16px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.netease-entry {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 61, 95, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.netease-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff3d5f, #ff6f7d);
  box-shadow: 0 14px 26px rgba(255, 61, 95, .22);
}

.netease-mark span {
  width: 28px;
  height: 28px;
  border: 4px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}

.netease-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.netease-copy b {
  color: #202938;
  font-size: 18px;
  line-height: 1.25;
}

.netease-copy p {
  margin: 0;
  color: #717b89;
  font-weight: 800;
  line-height: 1.55;
}

.netease-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}

.netease-entry a:hover,
.netease-entry a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 61, 95, .24);
  outline: none;
}

.playlist-table {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
}

.playlist-table[hidden],
.player-shell[hidden] { display: none !important; }

.song-table-head,
.song-row {
  display: grid;
  grid-template-columns: 52px 58px minmax(260px, 1.45fr) minmax(180px, .95fr) 112px 82px;
  align-items: center;
  gap: 14px;
}

.song-table-head {
  min-height: 50px;
  padding: 0 22px;
  color: #8b94a2;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.song-table-head span:nth-child(2) { grid-column: 3; }

.song-row {
  appearance: none;
  width: 100%;
  min-height: 72px;
  padding: 0 22px;
  border: 0;
  border-bottom: 1px solid #f0eaeb;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.song-row:hover,
.song-row:focus-visible {
  background: rgba(255, 61, 95, .075);
  outline: none;
}

.song-row img {
  width: 46px;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
}

.song-index,
.song-album,
.song-like,
.song-time {
  color: #8b94a2;
  font-weight: 900;
}

.song-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.song-main b,
.mini-now b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.song-main em,
.mini-now span {
  overflow: hidden;
  color: #778190;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-like { color: var(--rose); }

.player-shell {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, 46%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 116px;
  gap: 0;
  border-radius: 22px;
  color: #24303d;
  background:
    radial-gradient(circle at 26% 34%, rgba(255, 61, 95, .08), transparent 30%),
    linear-gradient(180deg, rgba(255, 247, 248, .98), rgba(255, 255, 255, .96) 68%, #fff);
  box-shadow: 0 28px 72px rgba(59, 42, 46, .14);
}

.window-controls {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.window-controls button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .16);
  transition: transform .18s ease, filter .18s ease;
}

.window-controls button:hover,
.window-controls button:focus-visible {
  transform: scale(1.08);
  filter: saturate(1.12);
  outline: none;
}

.window-close { background: #ff5f57; }
.window-minimize { background: #febc2e; }

.turntable-panel,
.lyric-panel {
  min-width: 0;
  padding-top: 92px;
}

.turntable-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding-left: 46px;
}

.tonearm {
  position: absolute;
  top: 98px;
  left: 50%;
  z-index: 2;
  width: 210px;
  height: 82px;
  border-top: 12px solid #ffffff;
  border-right: 12px solid #ffffff;
  border-radius: 0 48px 0 0;
  transform: translateX(-30%) rotate(16deg);
  transform-origin: left center;
  filter: drop-shadow(0 6px 10px rgba(75, 51, 56, .16));
}

.tonearm::before,
.tonearm::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
}

.tonearm::before {
  left: -28px;
  top: -30px;
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 12px rgba(0, 0, 0, .08);
}

.tonearm::after {
  right: -23px;
  bottom: -26px;
  width: 44px;
  height: 26px;
  border-radius: 6px;
}

.record-wrap {
  width: min(430px, 82%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #202124;
  box-shadow:
    inset 0 0 0 12px #202020,
    inset 0 0 0 18px #101010,
    0 26px 48px rgba(75, 51, 56, .18);
}

.record {
  width: 72%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, #141414 0 2px, #080808 3px 5px);
  box-shadow:
    0 0 0 72px transparent,
    0 0 0 88px rgba(255, 255, 255, .03),
    inset 0 0 0 10px rgba(0, 0, 0, .35);
}

.record.is-playing { animation: spin-record 16s linear infinite; }

.now-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lyric-panel {
  padding-right: 62px;
}

.now-kicker {
  margin: 0 0 16px;
  color: var(--rose);
  font-weight: 900;
}

.now-title {
  margin: 0;
  color: #202938;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.now-artist {
  margin: 14px 0 24px;
  color: #7a8492;
  font-size: 18px;
  font-weight: 900;
}

.tab-strip {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 54px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 61, 95, .08);
}

.tab-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  color: #7a8492;
  font-weight: 900;
}

.tab-strip .is-active {
  color: #fff;
  background: var(--rose);
}

.lyric-list {
  position: relative;
  height: 310px;
  overflow: hidden;
  padding: 80px 0;
  mask-image: linear-gradient(transparent, #000 22%, #000 72%, transparent);
}

.lyric-track {
  transform: translateY(var(--lyric-offset, 0px));
  transition: transform .45s ease;
}

.lyric-line {
  margin: 0 0 26px;
  color: rgba(36, 48, 61, .28);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.35;
  transition: color .25s ease, transform .25s ease, opacity .25s ease;
}

.lyric-line.is-active {
  color: #202938;
  opacity: 1;
  transform: translateX(8px) scale(1.04);
}

.source-link {
  display: inline-flex;
  margin-top: 12px;
  color: #8c6670;
  font-weight: 900;
  text-decoration: none;
}

.source-link:hover { color: var(--rose); }

.dock-player {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(320px, 1.2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 16px 42px;
  border-top: 1px solid rgba(255, 61, 95, .1);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -10px 28px rgba(59, 42, 46, .06);
}

.mini-now {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.mini-now img {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.mini-now div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.transport {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.transport-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.transport button {
  appearance: none;
  border: 0;
  color: #737d8b;
  background: transparent;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}

.transport button:hover,
.transport button:focus-visible {
  color: var(--rose);
  transform: translateY(-1px);
  outline: none;
}

.transport .play-toggle {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--rose);
  font-size: 24px;
}

.progress-line {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  color: #8b94a2;
  font-size: 12px;
  font-weight: 900;
}

.progress-line input {
  width: 100%;
  accent-color: var(--rose);
  cursor: pointer;
}

.dock-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  color: #7f8895;
  font-weight: 900;
}

.poem {
  width: min(1320px, calc(100% - 44px));
  margin: 38px auto 30px;
  text-align: center;
  color: #7a8491;
  font-weight: 900;
}

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

@media (max-width: 980px) {
  .playlist-head { grid-template-columns: 128px minmax(0, 1fr); }
  .playlist-head img { width: 128px; }
  .netease-entry {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .netease-entry a {
    grid-column: 2;
    justify-self: start;
  }
  .mini-status {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .mini-status button {
    width: 100%;
  }
  .song-table-head { display: none; }
  .song-row {
    grid-template-columns: 42px 50px minmax(0, 1fr) 72px;
    gap: 12px;
  }
  .song-album,
  .song-like { display: none; }
  .player-shell {
    min-height: 860px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .turntable-panel {
    padding: 76px 24px 0;
  }
  .lyric-panel {
    padding: 24px;
  }
  .dock-player {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 22px;
  }
  .dock-actions { justify-content: center; }
}

@media (max-width: 680px) {
  .topbar {
    width: min(100% - 28px, 1320px);
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .nav-links { gap: 16px; }
  .hero-copy,
  .music-root { width: min(100% - 28px, 1320px); }
  .playlist-head { grid-template-columns: 1fr; }
  .playlist-head img { width: 100%; max-width: 220px; }
  .netease-entry {
    grid-template-columns: 1fr;
  }
  .netease-entry a {
    grid-column: auto;
    justify-self: stretch;
  }
  .netease-mark { width: 52px; height: 52px; }
  .song-row {
    min-height: 68px;
    padding: 0 14px;
    grid-template-columns: 36px 46px minmax(0, 1fr) 58px;
  }
  .player-shell { border-radius: 18px; }
  .record-wrap { width: min(320px, 86%); }
  .tonearm {
    top: 78px;
    width: 150px;
  }
  .lyric-line { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
