:root {
  color-scheme: dark;
  --bg: #07080b;
  --text: #f3f5f9;
  --muted: rgba(243, 245, 249, .52);
  --faint: rgba(243, 245, 249, .16);
  --line: rgba(255, 255, 255, .1);
  --c1: #5b6bff;
  --c2: #b26bff;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 专辑渐变背景 ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-img {
  position: absolute;
  inset: -25%;
  background-position: center;
  background-size: cover;
  filter: blur(140px) saturate(1.4);
  opacity: .5;
  transition: opacity .9s ease;
}

.ambient-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 60% at 18% 8%, color-mix(in srgb, var(--c1) 55%, transparent), transparent 62%),
    radial-gradient(65% 55% at 92% 92%, color-mix(in srgb, var(--c2) 42%, transparent), transparent 66%),
    linear-gradient(180deg, rgba(7, 8, 11, .25) 0%, rgba(7, 8, 11, .78) 70%, rgba(7, 8, 11, .94) 100%);
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 20%, transparent 40%, rgba(7, 8, 11, .55) 100%);
}

/* ---------- 布局 ---------- */

.app {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 44px 90px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 52px;
}

.brand {
  display: flex;
  flex-direction: column;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  margin-top: 7px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .46em;
  text-transform: uppercase;
  color: var(--muted);
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(400px, 100%);
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(14px);
  transition: border-color .2s, background .2s;
}

.search:focus-within {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .08);
}

.search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 17px;
}

.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }

/* ---------- 状态提示 ---------- */

.status {
  margin: -30px 0 26px;
  font-size: 13px;
  color: var(--muted);
}

.status.error { color: #ff8f86; }
.status[hidden] { display: none; }

/* ---------- 搜索结果列表 ---------- */

.result-list { margin: 0 0 44px; }

.result-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.result-head h2 { font-size: 24px; }
.result-head span { font-size: 12.5px; color: var(--muted); }

.songs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.song-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .18s;
}

.song-row:hover { background: rgba(255, 255, 255, .035); }
.song-row.playing .song-name-t { color: var(--accent); }

.song-cover {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .9);
}

.song-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-name-t {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist-t {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-time {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.song-action {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--muted);
}

.song-row:hover .song-action { color: var(--accent); }

.song-empty {
  padding: 26px 8px;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pager[hidden] { display: none; }

.pager button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

.pager button:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(255, 255, 255, .28);
}

.pager button:disabled { opacity: .3; cursor: default; }

.pager span {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ---------- 正在播放 ---------- */

.now {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
  padding: 8px 0 84px;
}

.cover-wrap { position: relative; }

.cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 30px;
  box-shadow:
    0 50px 90px -34px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(255, 255, 255, .08) inset;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s;
}

.cover.swap { opacity: 0; transform: scale(.985); }

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: .32em;
  color: var(--muted);
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.02em;
}

.artist {
  margin: 16px 0 38px;
  font-size: 22px;
  color: var(--muted);
}

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

.btn {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s, background .2s, border-color .2s;
}

.btn svg { width: 22px; height: 22px; fill: currentColor; }

.btn.ghost { width: 54px; height: 54px; }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); }

.btn.play {
  width: 80px;
  height: 80px;
  border: none;
  background: var(--text);
  color: #0a0b0e;
  box-shadow: 0 18px 40px -16px rgba(255, 255, 255, .35);
}

.btn.play svg { width: 30px; height: 30px; }

#iconPause { display: none; }
.btn.play.playing #iconPlay { display: none; }
.btn.play.playing #iconPause { display: block; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.96); }

/* ---------- 进度条 ---------- */

.progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 30px;
}

.time {
  min-width: 38px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.track {
  flex: 1;
  display: flex;
  align-items: center;
  height: 26px;
  cursor: pointer;
  outline: none;
}

.bar {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}

.fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c2), #fff);
  transition: width .18s linear;
}

.track:hover .bar { height: 7px; }

/* ---------- 歌词 ---------- */

.lyrics {
  height: 224px;
  padding-block: 76px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}

.lyrics::-webkit-scrollbar { display: none; }

.lyric-line {
  margin: 0;
  padding: 9px 0;
  font-size: 20px;
  line-height: 1.55;
  color: rgba(243, 245, 249, .32);
  cursor: pointer;
  transition: color .3s, font-size .3s;
}

.lyric-line:hover { color: rgba(243, 245, 249, .6); }

.lyric-line.active {
  font-size: 27px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- 推荐 ---------- */

.reco-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 26px;
}

h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.reco-head span {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: 24px;
  overflow: hidden;
  background: #14151a;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 26px 46px -30px rgba(0, 0, 0, .95);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 36px 60px -28px rgba(0, 0, 0, .95);
}

.card-art {
  position: absolute;
  inset: 0;
}

.card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.card:hover .card-art img { transform: scale(1.05); }

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(18px, 6%, 30px);
  background: linear-gradient(180deg, transparent 38%, var(--card-scrim, rgba(0, 0, 0, .55)) 100%);
  pointer-events: none;
}

.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--card-ink, #fff);
  text-shadow: 0 1px 2px var(--card-halo, rgba(0, 0, 0, .45)), 0 12px 30px var(--card-halo, rgba(0, 0, 0, .45));
}

.card-singer {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--card-ink, #fff);
  opacity: .72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card.playing::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: inherit;
  pointer-events: none;
}

.empty {
  padding: 40px 0;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .app { padding: 26px 20px 64px; }

  .top {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding-bottom: 34px;
  }

  .now {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 56px;
  }

  .cover-wrap { max-width: 76vw; margin: 0 auto; width: 100%; }

  h1 { font-size: 38px; }
  .artist { font-size: 19px; margin-bottom: 28px; }

  .btn.play { width: 72px; height: 72px; }
  .btn.ghost { width: 50px; height: 50px; }

  .lyrics { height: 170px; padding-block: 54px; }
  .lyric-line { font-size: 18px; }
  .lyric-line.active { font-size: 23px; }

  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .card-title { font-size: clamp(19px, 6vw, 26px); }
  h2 { font-size: 24px; }
}
