:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --card: #171b26;
  --border: #232a3a;
  --text: #e8eaf2;
  --text-dim: #9aa3b8;
  --accent: #6ea8ff;
  --accent2: #7ef0c8;
  --grad: linear-gradient(120deg, #6ea8ff, #7ef0c8);
  --radius: 14px;
  --maxw: 880px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 背景光晕装饰 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% -5%, rgba(110, 168, 255, .12), transparent 60%),
    radial-gradient(700px 350px at 90% 10%, rgba(126, 240, 200, .08), transparent 60%);
}

/* 导航 */
header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 13, 18, .75);
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 8px; height: 58px;
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: .5px; margin-right: auto; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav a.navlink {
  color: var(--text-dim); padding: 6px 14px; border-radius: 8px; font-size: 14px;
  transition: all .15s;
}
nav a.navlink:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
nav a.navlink.active { color: var(--text); background: var(--card); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 80px; }

/* Hero */
.hero { padding: 72px 0 22px; }
.avatar-row { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.avatar {
  width: 92px; height: 92px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(145deg, #ffffff, #dfe4ee);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}
.avatar img { width: 88%; height: 88%; object-fit: contain; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: rgba(126, 240, 200, .15); color: var(--accent2);
  padding: 1px 8px; border-radius: 99px; vertical-align: 2px; margin-left: 4px;
}
.qq-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(110, 168, 255, .1); border: 1px solid rgba(110, 168, 255, .3);
  color: var(--accent); font-size: 13px; font-weight: 600;
  padding: 5px 14px; border-radius: 99px; margin-top: 14px;
}

/* 联系方式图标 */
#contact { margin-top: 10px; }
.social-row { display: flex; gap: 14px; align-items: center; }
.social {
  position: relative; width: 48px; height: 48px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); cursor: pointer;
  transition: all .15s;
}
.social svg { width: 22px; height: 22px; fill: currentColor; }
.social:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.mail-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: #1b2130; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 13px; font-size: 12.5px; line-height: 1.7; color: var(--text);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  font-weight: 400;
}
.mail-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1b2130;
}
.mail-wrap:hover .mail-tip { opacity: 1; }
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; }
.hero .tagline { font-size: 17px; color: var(--accent2); margin-bottom: 18px; }
.hero .intro { color: var(--text-dim); max-width: 640px; font-size: 15px; }

/* 通用区块 */
section { margin-top: 56px; }
section h2 {
  font-size: 20px; font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
section h2::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: var(--grad); display: inline-block;
}

/* 卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { font-size: 15px; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--text-dim); }
.card .meta { font-size: 12px; color: var(--text-dim); opacity: .8; margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }

/* 普通正文段落块 */
.text-block { color: var(--text-dim); font-size: 14.5px; max-width: 680px; }
.text-block ul { padding-left: 22px; margin-top: 8px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #0b0d12 !important;
  font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 9px; border: none; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .88; text-decoration: none; transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* 留言板 */
.msg-form {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg-form .row { display: flex; gap: 12px; }
.msg-form input, .msg-form textarea, .invite-box input {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 14px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.msg-form input:focus, .msg-form textarea:focus, .invite-box input:focus { border-color: var(--accent); }
.msg-form input { flex: 1; }
.msg-form textarea { resize: vertical; min-height: 90px; }
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
}
.msg .head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.msg .head b { font-size: 14px; }
.msg .head time { font-size: 12px; color: var(--text-dim); opacity: .7; }
.msg .body { font-size: 14px; color: var(--text-dim); word-break: break-word; }
.reply {
  margin-top: 10px; padding: 10px 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--border);
  border-radius: 0 10px 10px 0;
}
.reply.admin-reply {
  background: rgba(126, 240, 200, .06);
  border-left-color: var(--accent2);
}
.reply-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--text-dim); background: var(--border);
  padding: 1px 8px; border-radius: 99px; margin-bottom: 4px;
}
.reply.admin-reply .reply-tag { color: #0b0d12; background: var(--accent2); }
.reply-body { font-size: 13.5px; color: var(--text); word-break: break-word; }
.msg-actions { margin-top: 8px; text-align: right; }
.reply-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 12px; padding: 2px 8px; border-radius: 6px;
}
.reply-btn:hover { color: var(--accent); background: var(--bg-soft); }
.reply-form {
  margin-top: 10px; padding: 10px; gap: 8px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.reply-form input {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 10px; font-size: 13px; font-family: inherit; outline: none; flex: 1; min-width: 140px;
}
.reply-form input:focus { border-color: var(--accent); }
.reply-form .rpw { max-width: 150px; flex: 0 1 150px; }
.msg .admin { font-size: 11px; color: #0b0d12; background: var(--grad); padding: 1px 7px; border-radius: 99px; }
.hint { font-size: 13px; color: var(--text-dim); }
.err { color: #ff9d9d; font-size: 13.5px; }
.ok { color: var(--accent2); font-size: 13.5px; }
.empty { color: var(--text-dim); font-size: 14px; padding: 20px 4px; }

/* 下载工具箱 */
.dl-section { margin-top: 44px; }
.dl-section > .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.card.dl-card { display: flex; flex-direction: column; gap: 10px; }
.card.dl-card .file-icon {
  width: 42px; height: 42px; border-radius: 10px; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(110, 168, 255, .12);
}
.card.dl-card .dl-meta { font-size: 12px; color: var(--text-dim); display: flex; gap: 12px; flex-wrap: wrap; }
.card.dl-card .btn { align-self: flex-start; margin-top: auto; }

/* 邀请码解锁区 */
.vault-locked {
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 26px; text-align: center;
}
.vault-locked h3 { margin-bottom: 6px; }
.vault-locked p { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.invite-box { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.invite-box input { width: 240px; text-align: center; letter-spacing: 1px; }

footer {
  border-top: 1px solid var(--border);
  padding: 26px 20px 40px; text-align: center;
  color: var(--text-dim); font-size: 13px;
}
.contact-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 8px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  .msg-form .row { flex-direction: column; }
}

/* ===== 粒子背景 canvas ===== */
#bg-particles {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; display: block;
}

/* ===== 气泡光标（扁平圆环版） ===== */
html.custom-cursor, html.custom-cursor * { cursor: none !important; }
.cursor-bubble {
  position: fixed; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  pointer-events: none; z-index: 99999; opacity: 0;
  border: 1.5px solid rgba(126, 240, 200, .85);
  background: rgba(126, 240, 200, .10);
  transition: width .16s ease, height .16s ease, opacity .25s ease,
              background .16s ease, border-color .16s ease;
  will-change: transform;
}
html.cursor-on .cursor-bubble { opacity: 1; }
.cursor-bubble.grow { width: 36px; height: 36px; background: rgba(126, 240, 200, .16); }
.cursor-bubble.squeeze { width: 14px; height: 14px; background: rgba(126, 240, 200, .30); }
.cursor-halo { display: none; }

/* ===== BGM 播放器 ===== */
.player-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 210;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--border); cursor: pointer;
  background: rgba(23, 27, 38, .9); color: var(--accent2);
  font-size: 20px; line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  transition: transform .15s, box-shadow .15s;
}
.player-toggle:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 26px rgba(110, 168, 255, .35); }
.player-panel.playing + .player-toggle,
.player-toggle.on { color: #0b0d12; background: var(--grad); }

.player-panel {
  position: fixed; right: 18px; bottom: 78px; z-index: 210;
  width: 320px; max-width: 88vw;
  background: rgba(20, 24, 34, .93);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 14px 16px 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
  backdrop-filter: blur(16px);
  transform: translateY(14px) scale(.96); opacity: 0; pointer-events: none;
  visibility: hidden;                       /* 收起时不参与模糊计算, 省性能 */
  transition: transform .22s ease, opacity .22s ease, visibility .22s;
}
.player-panel.open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
.pp-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-dim);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.pp-close:hover { color: var(--text); }
.pp-now { padding-right: 22px; }
.pp-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.pp-artist { font-size: 12px; color: var(--text-dim); }
.lyric-box {
  height: 116px; margin: 10px 0 6px; overflow-y: auto;
  text-align: center; font-size: 13px; line-height: 1.9;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.lyric-box::-webkit-scrollbar { display: none; }
.lyric-line { color: var(--text-dim); opacity: .5; transition: opacity .2s, color .2s; }
.lyric-line.active { color: var(--accent2); opacity: 1; font-weight: 600; }
.lyric-line.dim { font-size: 12px; }
.pp-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-dim); }
.pp-progress input[type=range] { flex: 1; accent-color: #6ea8ff; height: 3px; }
.pp-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pp-controls button {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 17px;
  padding: 5px 9px; border-radius: 9px;
  transition: color .15s, background .15s;
}
.pp-controls button:hover { color: var(--text); background: var(--bg-soft); }
.pp-controls button.on { color: var(--accent2); background: rgba(126, 240, 200, .12); }
#btnPlay { font-size: 20px; color: var(--text); }
.playlist {
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
  border-top: 0 solid var(--border);
}
.player-panel.show-list .playlist {
  max-height: 190px; overflow-y: auto; margin-top: 10px;
  border-top: 1px solid var(--border); padding-top: 8px;
}
.pl-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.pl-item:hover { background: var(--bg-soft); }
.pl-item.active { color: var(--accent2); background: rgba(126, 240, 200, .08); }
.pl-artist { color: var(--text-dim); font-size: 11.5px; }
.pl-empty { color: var(--text-dim); font-size: 12.5px; padding: 6px; }

@media (max-width: 600px) {
  .player-panel { right: 10px; left: 10px; width: auto; bottom: 74px; }
  .player-toggle { right: 12px; bottom: 12px; }
}

/* ===== 液态玻璃质感 (留言板 + 标签/徽标/图标卡) ===== */
.msg-form, .msg, .reply, .qq-badge, .social, .badge, .pl-item.active {
  background: rgba(255, 255, 255, .095);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16),
              inset 0 -1px 0 rgba(255, 255, 255, .04),
              0 10px 30px rgba(0, 0, 0, .32);
}
.msg:hover, .social:hover { background: rgba(255, 255, 255, .13); }
.social:hover { border-color: rgba(110, 168, 255, .55); }

/* 玻璃输入框 */
.msg-form input, .msg-form textarea, .reply-form input {
  background: rgba(255, 255, 255, .085);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .05);
}
.msg-form input:focus, .msg-form textarea:focus, .reply-form input:focus {
  border-color: rgba(126, 240, 200, .55);
  background: rgba(255, 255, 255, .09);
}
/* 留言里的气泡小按钮也玻璃化 */
.reply-btn:hover { background: rgba(255, 255, 255, .08); }

/* ===== 随机来首歌按钮 ===== */
.shuffle-btn {
  margin-left: auto; align-self: center;
  background: rgba(255, 255, 255, .095);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text); font-family: inherit;
  font-size: 14px; font-weight: 600;
  padding: 9px 18px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .28);
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.shuffle-btn:hover {
  background: rgba(126, 240, 200, .16);
  border-color: rgba(126, 240, 200, .5);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 26px rgba(110, 168, 255, .3);
}
.shuffle-btn:active { transform: translateY(0) scale(.97); }

/* ===== 播放时音乐图标旋转 ===== */
@keyframes pt-spin { to { transform: rotate(360deg); } }
.player-toggle .pt-icon { display: inline-block; line-height: 1; }
.player-toggle.playing .pt-icon { animation: pt-spin 2.4s linear infinite; }

/* ===== 右侧竖向悬浮歌词（一次只显示三行） ===== */
.side-lyric {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  width: 170px;
  display: flex; flex-direction: column; gap: 9px;
  text-align: right; pointer-events: none; z-index: 150;
  opacity: 0; transition: opacity .35s ease;
}
.side-lyric.show { opacity: 1; }
.sl-line {
  font-size: 12.5px; line-height: 1.45; min-height: 1.45em;
  color: rgba(232, 234, 242, .34);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .75);
  transition: color .3s, font-size .3s, opacity .3s;
}
.sl-line.mid {
  font-size: 15px; font-weight: 700;
  color: var(--accent2);
  text-shadow: 0 0 12px rgba(126, 240, 200, .55), 0 2px 10px rgba(0, 0, 0, .8);
}
.sl-line.empty { opacity: 0; }

@media (max-width: 700px) {
  .shuffle-btn { margin-left: 0; font-size: 13px; padding: 8px 14px; }
  .avatar-row { flex-wrap: wrap; }
  .side-lyric { width: 124px; right: 6px; }
  .sl-line { font-size: 11px; }
  .sl-line.mid { font-size: 13px; }
}

/* ===== 邀请码区分板块 ===== */
.vault-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-radius: 14px; margin-bottom: 16px;
  background: rgba(255, 255, 255, .095);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .3);
}
.vault-status { font-size: 14px; color: var(--text-dim); }
.vault-status b { color: var(--accent2); }
.vault-cats { display: flex; flex-direction: column; gap: 16px; }
.vault-cat {
  padding: 16px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 10px 30px rgba(0, 0, 0, .28);
}
.vault-cat.unlocked { border-color: rgba(126, 240, 200, .35); }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-icon { font-size: 19px; }
.cat-name { font-size: 15px; font-weight: 700; margin-right: auto; }
.cat-state { font-size: 12px; color: var(--text-dim); }
.vault-cat.unlocked .cat-state { color: var(--accent2); font-weight: 600; }
.cat-locked { font-size: 13.5px; color: var(--text-dim); opacity: .75; padding: 6px 0 2px; }
