/* ===================================================
   音乐馆 Musikhalle — 沉浸流光主题
   =================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0a10;
  --bg-soft: #12111a;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --stroke: rgba(255, 255, 255, .1);
  --stroke-2: rgba(255, 255, 255, .18);
  --ink: #f5f2fa;
  --mute: #a49eb6;
  --mute-2: #6f6980;
  --accent: #a78bfa;
  --accent-2: #f0abfc;
  --mint: #6ee7b7;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 104px;
}

::selection { background: rgba(167, 139, 250, .35); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); background-clip: content-box; }

/* ---------- 动态背景 ---------- */
#backdrop {
  position: fixed; inset: -14%; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(96px) saturate(1.8) brightness(.5);
  opacity: .8;
  transition: background-image .9s ease, opacity .6s;
  will-change: background-image;
}
#veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(167,139,250,.16), transparent 60%),
    linear-gradient(180deg, rgba(11,10,16,.5) 0%, rgba(11,10,16,.86) 42%, var(--bg) 76%);
}

/* ---------- 骨架 ---------- */
.shell { position: relative; z-index: 2; display: grid; grid-template-columns: 80px 1fr; }

/* 左侧导航 */
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 0; border-right: 1px solid var(--stroke);
  background: rgba(11,10,16,.35); backdrop-filter: blur(12px);
}
.logo {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; margin-bottom: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #17111f; font-weight: 800; font-size: 16px; letter-spacing: -.02em;
  box-shadow: 0 10px 28px -8px rgba(167,139,250,.65);
}
.ri {
  width: 46px; height: 46px; border-radius: 13px; border: 1px solid transparent;
  display: grid; place-items: center; color: var(--mute); cursor: pointer;
  background: none; transition: .2s;
}
.ri:hover { color: var(--ink); background: var(--glass); }
.ri.on { color: var(--ink); background: rgba(167,139,250,.15); border-color: rgba(167,139,250,.32); }
.rail .grow { flex: 1; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6ee7b7, #a78bfa);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}

/* 主区域 */
.page { min-width: 0; }
main { padding: 0 46px 40px; max-width: 1320px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 26px;
  padding: 18px 46px; max-width: 1320px;
  background: linear-gradient(180deg, rgba(11,10,16,.92), rgba(11,10,16,.55) 70%, transparent);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand h1 { font-size: 15.5px; font-weight: 650; letter-spacing: .02em; }
.brand p { font-size: 9.5px; letter-spacing: .26em; color: var(--mute-2); margin-top: 3px; }

.search {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--stroke);
  transition: .22s;
}
.search:focus-within { border-color: rgba(167,139,250,.55); background: rgba(167,139,250,.08); box-shadow: 0 0 0 3px rgba(167,139,250,.12); }
.search svg { color: var(--mute); flex: 0 0 auto; }
.search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--ink); font-size: 13px; font-family: inherit;
}
.search input::placeholder { color: var(--mute-2); }
.search kbd {
  font-family: inherit; font-size: 10.5px; color: var(--mute-2);
  border: 1px solid var(--stroke); border-radius: 5px; padding: 2px 6px;
  background: rgba(255,255,255,.03);
}
.topacts { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.tbtn {
  height: 38px; padding: 0 16px; border-radius: 10px; font-size: 12px;
  font-family: inherit; color: var(--mute); cursor: pointer;
  background: var(--glass); border: 1px solid var(--stroke); transition: .2s;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.tbtn:hover { color: var(--ink); border-color: var(--stroke-2); background: var(--glass-2); }
.tbtn.on { color: #17111f; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 44px;
  align-items: center; padding: 18px 0 46px;
}
.hero .art {
  position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 46px 90px -34px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1);
}
.hero .art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(255,255,255,.18), transparent 46%);
}
.hero .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .art .glow {
  position: absolute; inset: -30%; z-index: -1;
  background: inherit; filter: blur(55px); opacity: .55;
}
.eyebrow {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 15px; display: flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .7; }
.hero h2 {
  font-size: clamp(28px, 3.5vw, 46px); line-height: 1.1;
  letter-spacing: -.03em; font-weight: 700; margin-bottom: 13px;
}
.hero .sub { font-size: 13.5px; color: var(--mute); line-height: 1.6; }
.hero .sub b { font-weight: 500; color: #d6d1e2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; }
.chip {
  font-size: 11px; color: var(--mute); padding: 5px 11px; border-radius: 8px;
  background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(6px);
  white-space: nowrap;
}
.hero .cta { display: flex; align-items: center; gap: 11px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 26px;
  border: none; border-radius: 99px; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 650; color: #17111f;
  background: linear-gradient(135deg, #fff, #e9e2ff);
  box-shadow: 0 16px 38px -16px rgba(255,255,255,.55);
  transition: .22s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -16px rgba(255,255,255,.65); }
.btn-primary:active { transform: translateY(0); }
.btn-round {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(8px); transition: .2s;
}
.btn-round:hover { background: var(--glass-2); border-color: var(--stroke-2); }
.btn-round.on { color: #ff8fab; border-color: rgba(255,143,171,.4); background: rgba(255,143,171,.12); }
.btn-round.on svg { fill: currentColor; }

/* ---------- 区块标题 ---------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; margin: 0 0 18px; flex-wrap: wrap;
}
.sec-head h3 { font-size: 17.5px; font-weight: 650; letter-spacing: -.01em; }
.sec-head h3 em { font-style: normal; font-size: 12px; color: var(--mute-2); margin-left: 9px; font-weight: 400; letter-spacing: .04em; }
.sec-head .hint { font-size: 11.5px; color: var(--mute-2); }

/* ---------- 横向精选 ---------- */
.rail-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 16px;
  scroll-snap-type: x proximity; margin-bottom: 30px;
}
.rail-scroll::-webkit-scrollbar { height: 6px; }

/* ---------- 卡片 ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 20px 16px;
}
.card {
  position: relative; border-radius: var(--r); cursor: pointer;
  transition: transform .26s cubic-bezier(.2,.7,.3,1);
  min-width: 0;
}
.card:hover { transform: translateY(-4px); }
.rail-scroll .card { flex: 0 0 158px; scroll-snap-align: start; }
.card .thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden;
  background: #1b1924; box-shadow: 0 16px 32px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .thumb img { transform: scale(1.06); }
.card .shade {
  position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
  background: linear-gradient(180deg, rgba(10,9,14,.05) 30%, rgba(10,9,14,.72));
}
.card:hover .shade, .card.playing .shade { opacity: 1; }
.card .playbtn {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px;
  border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #17111f;
  opacity: 0; transform: translateY(6px) scale(.9); transition: .25s;
  box-shadow: 0 10px 22px -8px rgba(0,0,0,.8);
  z-index: 3;
}
.card:hover .playbtn, .card.playing .playbtn { opacity: 1; transform: none; }
.card .badge-full {
  position: absolute; left: 9px; top: 9px; z-index: 3;
  font-size: 8px; font-weight: 700; letter-spacing: .12em;
  padding: 3px 6px; border-radius: 5px; color: #0d1a15;
  background: var(--mint); box-shadow: 0 4px 12px -4px rgba(110,231,183,.6);
}
.card .badge-time {
  position: absolute; right: 9px; top: 9px; z-index: 3;
  font-size: 9.5px; padding: 3px 6px; border-radius: 5px;
  color: #e9e5f2; background: rgba(10,9,14,.62); backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
}
.card.playing .thumb { box-shadow: 0 0 0 2px var(--accent), 0 18px 36px -18px rgba(167,139,250,.6); }
.card .meta { padding: 10px 2px 0; }
.card .tt {
  font-size: 13px; font-weight: 550; line-height: 1.4; letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.playing .tt { color: var(--accent); }
.card .aa {
  font-size: 11.5px; color: var(--mute); margin-top: 5px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .heart {
  position: absolute; left: 10px; bottom: 10px; width: 32px; height: 32px; z-index: 4;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.16); cursor: pointer;
  background: rgba(10,9,14,.55); backdrop-filter: blur(8px); color: #e9e5f2;
  display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: .22s;
}
.card:hover .heart { opacity: 1; transform: none; }
.card .heart:hover { background: rgba(255,143,171,.22); border-color: rgba(255,143,171,.5); color: #ffb3c8; }
.card .heart svg { fill: none; stroke: currentColor; stroke-width: 1.9; }
.card .heart.on { opacity: 1; transform: none; color: #ff8fab; }
.card .heart.on svg { fill: currentColor; }

.card .eq {
  display: none; position: absolute; left: 10px; bottom: 12px; gap: 2.5px; align-items: flex-end; height: 13px;
}
.card.playing .eq { display: flex; }
.card.playing .playbtn { bottom: 10px; }
.eq i { width: 3px; background: var(--accent-2); border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.45s; }
.eq i:nth-child(3) { height: 65%; animation-delay: -.1s; }
@keyframes eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* ---------- 曲库工具条 ---------- */
.lib-head { display: flex; flex-direction: column; gap: 14px; margin: 34px 0 20px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.filters::-webkit-scrollbar { height: 0; }
.fbtn {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 99px; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--mute);
  background: var(--glass); border: 1px solid var(--stroke); transition: .2s; white-space: nowrap;
}
.fbtn:hover { color: var(--ink); border-color: var(--stroke-2); }
.fbtn.on { color: #17111f; background: var(--ink); border-color: var(--ink); font-weight: 600; }

.empty { padding: 60px 0; text-align: center; color: var(--mute-2); font-size: 13px; }
.empty b { display: block; font-size: 15px; color: var(--mute); margin-bottom: 8px; font-weight: 500; }

.more-wrap { display: flex; justify-content: center; padding: 38px 0 10px; }
.more {
  height: 42px; padding: 0 28px; border-radius: 99px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; color: var(--ink);
  background: var(--glass); border: 1px solid var(--stroke); transition: .2s;
}
.more:hover { background: var(--glass-2); border-color: var(--stroke-2); }

footer.site {
  margin-top: 46px; padding: 26px 46px 8px; max-width: 1320px;
  border-top: 1px solid var(--stroke); font-size: 11px; color: var(--mute-2);
  line-height: 1.9;
}
footer.site b { color: var(--mute); font-weight: 500; }

/* ---------- 播放器 ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 0 18px 14px; }
.pcard {
  max-width: 1240px; margin: 0 auto; border-radius: 18px;
  background: rgba(22,20,31,.78); border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(32px) saturate(1.6);
  box-shadow: 0 26px 60px -22px rgba(0,0,0,.95);
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1.25fr);
  align-items: center; gap: 20px; padding: 11px 18px;
}
.p-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.p-cover {
  width: 48px; height: 48px; border-radius: 11px; overflow: hidden; flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(167,139,250,.35), rgba(240,171,252,.2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.09);
}
.p-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-cover img:not([src]), .p-cover img[src=""] { display: none; }
.p-meta { min-width: 0; }
.p-meta .a { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta .b { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.p-mid { display: flex; align-items: center; gap: 6px; }
.pbtn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: none; color: var(--mute); display: grid; place-items: center; transition: .18s;
}
.pbtn:hover { color: var(--ink); background: var(--glass); }
.pbtn.main {
  width: 44px; height: 44px; color: #17111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -10px rgba(167,139,250,.85);
}
.pbtn.main:hover { transform: scale(1.06); background: linear-gradient(135deg, #b9a2ff, #f6c2ff); }
.p-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar {
  flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.14);
  position: relative; cursor: pointer; min-width: 60px;
}
.bar:hover { height: 5px; }
.bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.bar i::after {
  content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 11px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity .2s; box-shadow: 0 0 10px rgba(0,0,0,.5);
}
.bar:hover i::after { opacity: 1; }
.tm { font-size: 10.5px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; letter-spacing: .02em; }
.vol { display: flex; align-items: center; gap: 7px; color: var(--mute); }
.vol input {
  -webkit-appearance: none; appearance: none; width: 74px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.16); outline: none; cursor: pointer;
}
.vol input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.vol input::-moz-range-thumb { width: 11px; height: 11px; border: none; border-radius: 50%; background: #fff; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 108px; transform: translate(-50%, 12px);
  z-index: 90; padding: 10px 18px; border-radius: 10px; font-size: 12px;
  background: rgba(24,22,33,.94); border: 1px solid var(--stroke-2);
  color: var(--ink); opacity: 0; pointer-events: none; transition: .3s;
  backdrop-filter: blur(14px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  main, .topbar, footer.site { padding-left: 28px; padding-right: 28px; }
  .hero { grid-template-columns: 200px minmax(0,1fr); gap: 30px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 6px; }
  .hero .art { max-width: 180px; }
  .hero h2 { font-size: 26px; }
  .search kbd { display: none; }
  .pcard { grid-template-columns: minmax(0,1fr) auto; row-gap: 10px; padding: 10px 14px; }
  .p-right { grid-column: 1 / -1; }
  .vol { display: none; }
  .tm { min-width: 70px; }
  body { padding-bottom: 134px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 16px 12px; }
}
@media (max-width: 560px) {
  main, .topbar, footer.site { padding-left: 16px; padding-right: 16px; }
  .brand p { display: none; }
  .topacts .tbtn span { display: none; }
  .topacts .tbtn { padding: 0 12px; }
}
