/* SociaMus H5 · 移动端网页版 */
:root {
  --bg: #07060e; --bg-2: #0e0c1b; --panel: rgba(255,255,255,.055); --panel-2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.1); --text: #f2f0ff; --muted: #9c97bd;
  --violet: #7c5cff; --pink: #ff4d9d; --cyan: #22d3ee;
  --grad: linear-gradient(100deg,#7c5cff,#ff4d9d 55%,#22d3ee);
  --tab-h: 56px; --mini-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: #05040a; color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* 手机外框（桌面访问时居中显示为手机宽度） */
#app {
  position: relative; margin: 0 auto; max-width: 460px; min-height: 100vh;
  background: var(--bg); overflow: hidden; box-shadow: 0 0 80px rgba(0,0,0,.7);
}
.orb { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
.orb.a { width: 260px; height: 260px; background: rgba(124,92,255,.35); top: -90px; left: -70px; }
.orb.b { width: 240px; height: 240px; background: rgba(255,77,157,.22); top: 32%; right: -100px; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 20; padding: 14px 16px 8px;
  background: linear-gradient(180deg, rgba(7,6,14,.96) 60%, rgba(7,6,14,0));
  backdrop-filter: blur(14px);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.top .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.search {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: #7a7599; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel); flex: 0 0 36px;
}

/* 内容 */
#view { position: relative; z-index: 1; padding: 4px 16px calc(var(--tab-h) + var(--mini-h) + 26px); }
.sec-t { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.sec-t h2 { margin: 0; font-size: 16.5px; font-weight: 700; }
.sec-t a { color: var(--muted); font-size: 12.5px; }

/* 分类 chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.chip.on { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }

/* Banner */
.banner {
  border-radius: 16px; padding: 18px; background: var(--grad); color: #fff; margin-top: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.banner b { display: block; font-size: 16px; }
.banner span { font-size: 12.5px; opacity: .9; }
.banner .tag { background: rgba(255,255,255,.22); padding: 4px 10px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }

/* 歌曲行 */
.row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.row:active { opacity: .72; }
.cover {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 11px; position: relative;
  display: flex; align-items: center; justify-content: center; font-size: 17px; color: rgba(255,255,255,.85);
}
.cover.lg { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 14px; font-size: 22px; }
.row .t { min-width: 0; flex: 1; }
.row .t .n { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t .s { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .act { display: flex; align-items: center; gap: 8px; }
.heart { color: #6f6a91; font-size: 17px; }
.heart.on { color: var(--pink); }
.playing .n { color: var(--cyan); }

/* 歌单网格 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.pcard .thumb { height: 96px; position: relative; display: flex; align-items: flex-end; padding: 9px; font-size: 11.5px; color: #fff; }
.pcard .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.5)); }
.pcard .thumb span { position: relative; z-index: 1; background: rgba(0,0,0,.34); padding: 2px 7px; border-radius: 999px; }
.pcard .bd { padding: 10px 11px 12px; }
.pcard .bd b { display: block; font-size: 13.5px; }
.pcard .bd p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 动态 */
.post { border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--panel); margin-bottom: 12px; }
.post-hd { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; }
.post-hd .n { font-size: 13.5px; font-weight: 600; }
.post-hd .m { color: var(--muted); font-size: 11.5px; }
.post p.txt { margin: 10px 0 0; font-size: 14px; color: #ddd9f2; }
.post .song {
  display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.03);
}
.post .song .cover { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; 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: 18px; margin-top: 11px; color: var(--muted); font-size: 12.5px; }
.post-ft button { display: flex; align-items: center; gap: 5px; color: inherit; }
.post-ft .on { color: var(--pink); }
.cmt { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cmt div { font-size: 12.5px; color: var(--muted); margin: 4px 0; }
.cmt div b { color: #cdc8ea; font-weight: 600; }

/* 私信 */
.chat-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.chat-item .avatar { width: 44px; height: 44px; flex: 0 0 44px; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2fd07a; margin-left: 4px; }

/* 我的 */
.profile { display: flex; align-items: center; gap: 14px; padding: 6px 0 4px; }
.profile .avatar { width: 62px; height: 62px; flex: 0 0 62px; font-size: 22px; }
.profile b { font-size: 17px; }
.profile p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.nums { display: flex; gap: 24px; margin: 14px 0 4px; }
.nums div { text-align: center; }
.nums b { display: block; font-size: 16px; }
.nums span { color: var(--muted); font-size: 11.5px; }
.menu { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.menu a, .menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 15px; font-size: 14px; border-bottom: 1px solid var(--line); text-align: left;
}
.menu > *:last-child { border-bottom: 0; }
.menu .r { color: var(--muted); font-size: 12.5px; }

/* 底部 Tab */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; margin: 0 auto; max-width: 460px;
  height: var(--tab-h); display: flex; background: rgba(10,8,20,.96); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #6f6a91; font-size: 10.5px; }
.tabbar button.on { color: #fff; }
.tabbar svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tabbar button.on svg { stroke: var(--pink); }

/* 迷你播放条 */
.mini {
  position: fixed; bottom: var(--tab-h); left: 0; right: 0; z-index: 29; margin: 0 auto; max-width: 460px;
  height: var(--mini-h); display: none; align-items: center; gap: 11px; padding: 0 14px;
  background: rgba(20,16,38,.94); backdrop-filter: blur(18px); border-top: 1px solid var(--line);
}
.mini.show { display: flex; }
.mini .cover { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; font-size: 14px; }
.mini .t { flex: 1; min-width: 0; }
.mini .t .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .t .s { color: var(--muted); font-size: 11px; }
.mini .btns { display: flex; align-items: center; gap: 14px; font-size: 17px; color: #cfc9ec; }
.mini .bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.1); }
.mini .bar i { display: block; height: 100%; width: 0; background: var(--grad); }

/* 全屏播放器 */
.player {
  position: fixed; inset: 0; z-index: 50; margin: 0 auto; max-width: 460px;
  background: linear-gradient(180deg, #1a1338, #07060e 62%);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;                 /* 超矮视口（横屏/桌面小窗）可滚动，避免内容被压扁 */
}
.player.show { transform: translateY(0); }
.player .ph { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.player .ph button { font-size: 20px; color: var(--muted); }
.big {
  width: 100%; aspect-ratio: 1/1; border-radius: 22px; margin: 18px 0 20px; position: relative;
  display: flex; align-items: flex-end; padding: 18px; font-weight: 700; color: #fff; overflow: hidden;
  box-shadow: 0 26px 60px rgba(0,0,0,.5);
}
.big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.45)); }
.big span { position: relative; z-index: 1; font-size: 15px; }
.player .ti { font-size: 21px; font-weight: 800; }
.player .ar { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.pbar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.16); margin: 20px 0 8px; position: relative; }
.pbar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad); }
.ptime { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.pctrl { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 22px 0 6px; font-size: 24px; color: #e6e2ff; }
.pctrl .play { width: 60px; height: 60px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; }
.pacts { display: flex; align-items: center; justify-content: space-around; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pacts button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: inherit; }
.pacts .on { color: var(--pink); }
.lyric { flex: 1; overflow-y: auto; margin: 14px 0 4px; text-align: center; scrollbar-width: none; }
.lyric::-webkit-scrollbar { display: none; }
.lyric p { margin: 12px 0; color: #6a6590; font-size: 14px; transition: .25s; }
.lyric p.on { color: #fff; font-size: 16px; font-weight: 700; }
.lyric-wrap { display: none; flex: 1; overflow: hidden; flex-direction: column; min-height: 150px; }
.lyric-wrap.show { display: flex; }
.big.hide { display: none; }

/* 弹层 */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.show { display: block; }
.sheet .mask { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.sheet .box {
  position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 460px;
  background: #14112a; border-radius: 20px 20px 0 0; padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
  max-height: 78vh; overflow-y: auto; animation: up .25s ease;
}
@keyframes up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 14px; font-size: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); outline: none; font-size: 14px;
}
.field textarea { resize: vertical; min-height: 76px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font-size: 14px;
}
.btn.primary { background: var(--grad); border: 0; font-weight: 700; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.row-btns { display: flex; gap: 10px; margin-top: 6px; }

/* 聊天页 */
.chatpage { position: fixed; inset: 0; z-index: 55; margin: 0 auto; max-width: 460px; background: var(--bg); display: none; flex-direction: column; }
.chatpage.show { display: flex; }
.chatpage .chd { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(10,8,20,.96); }
.chatpage .cbody { flex: 1; overflow-y: auto; padding: 16px; }
.msg { max-width: 76%; padding: 10px 13px; border-radius: 14px; font-size: 14px; margin-bottom: 12px; line-height: 1.6; }
.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; }
.chatpage .cft { display: flex; gap: 9px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(10,8,20,.96); }
.chatpage .cft input { flex: 1; padding: 11px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); outline: none; font-size: 14px; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 140px; transform: translate(-50%, 10px); z-index: 90;
  background: rgba(30,24,58,.96); border: 1px solid var(--line); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; opacity: 0; transition: .22s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
.demo-bar {
  margin: 10px 0 0; padding: 9px 12px; border-radius: 11px; font-size: 11.5px; color: #ffd9a8;
  background: rgba(245,182,66,.12); border: 1px solid rgba(245,182,66,.3);
}

/* 超矮视口（手机横屏 / 桌面小窗）：缩小封面与控件，保证歌词区可用 */
@media (max-height: 620px) {
  .big { width: 132px; height: 132px; margin: 8px auto 12px; border-radius: 16px; font-size: 12px; flex: 0 0 auto; }
  .player .ti { font-size: 17px; }
  .player .ar { font-size: 12.5px; }
  .pbar { margin: 12px 0 6px; }
  .pctrl { margin: 12px 0 4px; gap: 22px; font-size: 20px; }
  .pctrl .play { width: 50px; height: 50px; font-size: 18px; }
  .pacts { margin-top: 8px; }
  .demo-bar { display: none; }
}
