/* SociaMus WebApp · 桌面网页版 */
:root {
  --bg: #06050d; --bg-2: #0b0916; --side: #0a0814; --panel: rgba(255,255,255,.05);
  --panel-2: rgba(255,255,255,.085); --line: rgba(255,255,255,.09);
  --text: #f2f0ff; --muted: #9c97bd; --violet: #7c5cff; --pink: #ff4d9d; --cyan: #22d3ee;
  --grad: linear-gradient(100deg,#7c5cff,#ff4d9d 55%,#22d3ee);
  --side-w: 224px; --bar-h: 84px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14.5px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* minmax(0,1fr) 必须显式声明：否则网格隐式行会被内容撑高，侧栏与底部播放条会随整页滚动 */
.layout { display: grid; grid-template-columns: var(--side-w) 1fr; grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--bar-h)); }
.side, .main { min-height: 0; }

/* 侧栏 */
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 800; font-size: 17px; letter-spacing: .3px; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button, .nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-size: 14px; text-align: left; width: 100%;
}
.nav button:hover, .nav a:hover { background: var(--panel); color: var(--text); }
.nav button.on { background: var(--grad); color: #fff; font-weight: 600; }
.nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: 0 0 18px; }
.side .grp { color: #6a6590; font-size: 11.5px; letter-spacing: 1px; padding: 16px 12px 6px; }
.side .pls { display: flex; flex-direction: column; gap: 2px; }
.side .pls button { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; text-align: left; }
.side .pls button:hover { background: var(--panel); color: var(--text); }
.side .pls .sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.side .foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); color: #6a6590; font-size: 12px; }
.side .foot a { display: block; margin: 6px 0; }

/* 主区 */
.main { display: flex; flex-direction: column; min-width: 0; }
.top {
  height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(8,7,18,.7); backdrop-filter: blur(12px);
}
.search { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px; width: 340px; }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: #6a6590; }
.top .sp { flex: 1; }
.me { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: #fff; flex: 0 0 30px; }

#view { flex: 1; overflow-y: auto; padding: 22px 24px 26px; }
.view-in { max-width: 1180px; }

h2.sec { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.sec-t { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.sec-t h2 { margin: 0; font-size: 17px; font-weight: 700; }
.sec-t a, .sec-t button { color: var(--muted); font-size: 12.5px; }

.hero {
  border-radius: 18px; padding: 26px 28px; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 6px;
}
.hero b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.hero p { margin: 8px 0 0; font-size: 14px; opacity: .92; max-width: 560px; }
.hero .tag { background: rgba(255,255,255,.22); padding: 5px 12px; border-radius: 999px; font-size: 12px; white-space: nowrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chip { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }

/* 歌曲表 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.045); font-size: 14px; }
.tbl tr:hover td { background: var(--panel); }
.tbl .idx { color: var(--muted); width: 46px; font-size: 13px; }
.tbl .cover { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.tbl .ti { display: flex; align-items: center; gap: 11px; }
.tbl .ti b { font-weight: 600; font-size: 14px; }
.tbl .ti span { color: var(--muted); font-size: 12px; display: block; }
.tbl .ctr { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.tbl .ctr button:hover { color: #fff; }
.heart.on { color: var(--pink); }
.playing b { color: var(--cyan); }

/* 歌单卡片 */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.pcard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); transition: .2s; cursor: pointer; }
.pcard:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.2); }
.pcard .thumb { height: 132px; position: relative; display: flex; align-items: flex-end; padding: 10px; font-size: 11.5px; color: #fff; }
.pcard .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.5)); }
.pcard .thumb span { position: relative; z-index: 1; background: rgba(0,0,0,.36); padding: 2px 8px; border-radius: 999px; }
.pcard .bd { padding: 11px 12px 13px; }
.pcard .bd b { display: block; font-size: 13.5px; }
.pcard .bd p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; height: 30px; overflow: hidden; }

/* 社区 */
.feed { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.post { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--panel); margin-bottom: 14px; }
.post-hd { display: flex; align-items: center; gap: 10px; }
.post-hd .n { font-size: 13.5px; font-weight: 600; }
.post-hd .m { color: var(--muted); font-size: 11.5px; }
.post p.txt { margin: 11px 0 0; font-size: 14.5px; color: #ddd9f2; }
.post .song { display: flex; align-items: center; gap: 10px; margin-top: 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.03); cursor: pointer; }
.post .song .cover { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.post .song .t { font-size: 12.5px; }
.post .song .t span { color: var(--muted); display: block; font-size: 11px; }
.post-ft { display: flex; align-items: center; gap: 20px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.post-ft button:hover { color: #fff; }
.post-ft .on { color: var(--pink); }
.cmt { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.cmt div { font-size: 12.5px; color: var(--muted); margin: 5px 0; }
.cmt div b { color: #cdc8ea; }
.sidebox { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--panel); position: sticky; top: 0; }
.sidebox h4 { margin: 0 0 12px; font-size: 14px; }
.sidebox .btn { margin-bottom: 9px; }

/* 私信 */
.im { display: grid; grid-template-columns: 280px 1fr; gap: 18px; height: calc(100vh - var(--bar-h) - 64px - 48px); }
.iml { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow-y: auto; }
.iml button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.iml button:hover { background: var(--panel-2); }
.iml button.on { background: var(--panel-2); border-left: 3px solid var(--violet); }
.iml .avatar { width: 40px; height: 40px; flex: 0 0 40px; font-size: 15px; }
.iml .n { font-size: 14px; font-weight: 600; }
.iml .p { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.doton { width: 7px; height: 7px; border-radius: 50%; background: #2fd07a; display: inline-block; margin-left: 5px; }
.imr { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); display: flex; flex-direction: column; overflow: hidden; }
.imr .h { display: flex; align-items: center; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.imr .b { flex: 1; overflow-y: auto; padding: 16px; }
.imr .f { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.imr .f input { flex: 1; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); outline: none; font-size: 14px; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 12px; }
.msg.them { background: var(--panel-2); border-top-left-radius: 4px; }
.msg.me { background: var(--grad); color: #fff; margin-left: auto; border-top-right-radius: 4px; }
.msg .tm { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }

/* 我的 */
.profile { display: flex; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; background: var(--panel); }
.profile .avatar { width: 78px; height: 78px; flex: 0 0 78px; font-size: 28px; }
.profile b { font-size: 21px; }
.profile p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.nums { display: flex; gap: 34px; margin-left: auto; }
.nums div { text-align: center; }
.nums b { display: block; font-size: 18px; }
.nums span { color: var(--muted); font-size: 12px; }

/* 底部播放条 */
.barwrap { height: var(--bar-h); border-top: 1px solid var(--line); background: rgba(9,8,19,.96); backdrop-filter: blur(16px); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.now { display: flex; align-items: center; gap: 13px; width: 260px; min-width: 200px; }
.now .cover { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.now .t { min-width: 0; }
.now .t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .t span { color: var(--muted); font-size: 12px; }
.bctrl { display: flex; align-items: center; gap: 18px; font-size: 19px; color: #d8d3f5; }
.bctrl .play { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.bmid { flex: 1; display: flex; align-items: center; gap: 13px; min-width: 0; }
.ptrack { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; cursor: pointer; }
.ptrack i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad); }
.tt { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bright { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; }
.bright button:hover { color: #fff; }
.bright .on { color: var(--pink); }

/* 歌词抽屉 */
.drawer {
  position: fixed; top: 0; right: 0; bottom: var(--bar-h); width: 380px; z-index: 40;
  background: linear-gradient(180deg,#1a1338,#080713); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 22px;
}
.drawer.show { transform: none; }
.drawer .dh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer .dh b { font-size: 15px; }
.lyric { flex: 1; overflow-y: auto; text-align: center; scrollbar-width: none; }
.lyric::-webkit-scrollbar { display: none; }
.lyric p { margin: 14px 0; color: #655f8c; font-size: 14.5px; transition: .25s; }
.lyric p.on { color: #fff; font-size: 16.5px; font-weight: 700; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal .mask { position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.modal .box { position: relative; width: 460px; max-width: calc(100vw - 40px); background: #14112a; border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-height: 82vh; overflow-y: auto; }
.modal h3 { margin: 0 0 16px; font-size: 16.5px; }
.field { margin-bottom: 13px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text); outline: none; font-size: 14px; }
.field textarea { min-height: 86px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; }
.btn:hover { border-color: rgba(255,255,255,.26); }
.btn.primary { background: var(--grad); border: 0; font-weight: 700; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.row-btns { display: flex; gap: 10px; margin-top: 6px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 22px); transform: translate(-50%,8px); z-index: 90; background: rgba(30,24,58,.97); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; font-size: 13px; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.empty { color: var(--muted); font-size: 13.5px; padding: 46px 0; text-align: center; }
.demo-bar { margin-top: 14px; padding: 10px 14px; border-radius: 11px; font-size: 12px; color: #ffd9a8; background: rgba(245,182,66,.1); border: 1px solid rgba(245,182,66,.28); }

@media (max-width: 1080px) {
  .feed { grid-template-columns: 1fr; }
  .im { grid-template-columns: 220px 1fr; }
  .search { width: 220px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 68px 1fr; }
  .brand span, .nav button span, .nav a span, .side .grp, .side .pls, .side .foot { display: none; }
  .nav button, .nav a { justify-content: center; }
  .im { grid-template-columns: 1fr; }
}
