/* ============================================================
   源码智库 SourceVault · iOS 液态玻璃主题层（v6）
   ------------------------------------------------------------
   这一层在 app.css 之后加载，只做「覆盖 + 新增」，不改原文件：
     · 高斯模糊 / 液态玻璃卡片、顶栏、抽屉、底栏
     · 微信式底部导航（固定，不跟内容滚动）
     · 未读红圈（顶栏 / 抽屉 / 底栏）
     · 悬浮音乐播放器（毛玻璃 + 紫色渐变）
     · 聊天室
     · 首页轮播
     · B 站风格免费源码区
     · 金额红色
   ============================================================ */

/* ---------- 液态玻璃变量 ---------- */
:root {
  --glass-blur: 22px;
  --glass-alpha: 58;
  --glass-bg: rgba(255, 255, 255, calc(var(--glass-alpha) / 100));
  --glass-bg-strong: rgba(255, 255, 255, .82);
  --glass-brd: rgba(255, 255, 255, .55);
  --glass-line: rgba(20, 24, 31, .07);
  --glass-shadow: 0 10px 34px rgba(18, 24, 38, .12), 0 2px 8px rgba(18, 24, 38, .06);
  --glass-shadow-lg: 0 22px 60px rgba(18, 24, 38, .18), 0 4px 14px rgba(18, 24, 38, .08);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .75);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --wave-a: color-mix(in srgb, var(--brand) 22%, transparent);
  --wave-b: color-mix(in srgb, var(--brand-2) 26%, transparent);
  --bnav-h: 60px;
}

[data-theme="dark"] {
  --glass-bg: rgba(22, 26, 33, calc(var(--glass-alpha) / 100));
  --glass-bg-strong: rgba(22, 26, 33, .86);
  --glass-brd: rgba(255, 255, 255, .1);
  --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .34);
  --glass-shadow-lg: 0 22px 60px rgba(0, 0, 0, .62), 0 4px 14px rgba(0, 0, 0, .4);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* 关掉玻璃时的兜底（后台可以关） */
[data-glass="0"] {
  --glass-bg: var(--surface);
  --glass-bg-strong: var(--surface);
  --glass-brd: var(--line);
  --glass-line: var(--line);
}

/* ---------- 全站背景：一层很淡的液态光晕，让玻璃有东西可透 ---------- */
body.sv-body::before,
body.ad-body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 12% 8%, var(--wave-a), transparent 62%),
    radial-gradient(42% 34% at 88% 4%, var(--wave-b), transparent 60%),
    radial-gradient(40% 40% at 70% 92%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 64%),
    radial-gradient(36% 30% at 24% 86%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 62%);
  filter: blur(30px) saturate(130%);
  opacity: .75;
}

/* ============================================================
   一、玻璃化：顶栏 / 抽屉 / 卡片 / 面板 / 按钮
   ============================================================ */

.sv-topbar,
.ad-topbar {
  background: var(--glass-bg-strong) !important;
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-line) !important;
  box-shadow: var(--glass-inner), 0 4px 22px rgba(18, 24, 38, .06);
}

.sv-sidebar {
  background: var(--glass-bg-strong) !important;
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-right: 1px solid var(--glass-line) !important;
  box-shadow: var(--glass-shadow-lg);
}

.sv-glass,
.detail-card,
.side-card,
.ad-panel,
.member-head,
.form-panel,
.buy-box {
  background: var(--glass-bg) !important;
  -webkit-backdrop-filter: saturate(170%) blur(var(--glass-blur));
  backdrop-filter: saturate(170%) blur(var(--glass-blur));
  border: 1px solid var(--glass-brd) !important;
  box-shadow: var(--glass-inner), var(--glass-shadow) !important;
  border-radius: 20px !important;
}

/* 悬浮感：hover 时轻轻抬一下 */
.sv-glass:hover,
.detail-card:hover,
.pdd-card:hover {
  transform: translateY(-2px);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s;
  box-shadow: var(--glass-inner), var(--glass-shadow-lg) !important;
}

.btn {
  border-radius: 13px !important;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  /* 两层保险：
     1) background-color 不依赖任何变量，浏览器再老也有底色；
     2) 渐变用 var() 兜底，且 color-mix 不被支持时整条声明失效，自动落回第 1 层。
     这样「主色被清空 → 所有主按钮白底白字消失」这个坑就堵死了。 */
  background-color: #2563eb !important;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--brand, #2563eb) 92%, #fff), var(--brand, #2563eb)) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28) !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand, #2563eb) 34%, transparent), inset 0 1px 0 rgba(255,255,255,.35) !important;
  border: 0 !important;
}
.btn-glass, .btn-ghost {
  background: var(--glass-bg) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-brd) !important;
}

/* 输入框也走玻璃 */
input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], select, textarea {
  background: var(--glass-bg) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 12px !important;
}

/* 分区切换：iOS 分段控件 */
.zone-tabs {
  background: var(--glass-bg) !important;
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid var(--glass-brd) !important;
  border-radius: 16px !important;
  padding: 5px !important;
  gap: 5px !important;
  box-shadow: var(--glass-inner), var(--glass-shadow);
}
.zone-tab {
  border: 0 !important;
  border-radius: 12px !important;
  transition: background .22s, color .22s, box-shadow .22s;
}
.zone-tab.active {
  background: var(--glass-bg-strong) !important;
  box-shadow: 0 2px 10px rgba(18, 24, 38, .12), var(--glass-inner) !important;
}

/* 标题栏给一点点彩色 */
.sv-sec-head h2 { letter-spacing: -0.02em; }

/* ============================================================
   二、未读红圈
   ============================================================ */

.sv-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  font-style: normal;
  box-shadow: 0 2px 8px rgba(255, 59, 48, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
  animation: svDotPop .3s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes svDotPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sv-dot { animation: none; } }

/* 图标按钮上的红点：贴右上角 */
.sv-iconbtn { position: relative; }
.sv-iconbtn .sv-dot { position: absolute; top: 2px; right: 0; margin: 0; }

/* 抽屉里的红圈推到最右边 */
.sv-side-link { display: flex; align-items: center; gap: 10px; }
.sv-side-link .sv-dot { margin-left: auto; }

/* 底栏图标上的红点 */
.sv-bnav-item .ic { position: relative; display: inline-flex; }
.sv-bnav-item .sv-dot { position: absolute; top: -6px; right: -12px; margin: 0; }

/* ============================================================
   三、微信式底部导航（固定最下面，不随内容走）
   ============================================================ */

.sv-bnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  height: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid var(--glass-line);
  box-shadow: 0 -6px 26px rgba(18, 24, 38, .1);
}
.sv-bnav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  transition: color .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.sv-bnav-item .ic { font-size: 21px; line-height: 1; display: inline-flex; }
.sv-bnav-item em { font-style: normal; letter-spacing: .01em; }
.sv-bnav-item:active { transform: scale(.94); }
.sv-bnav-item.active { color: var(--brand); font-weight: 600; }
.sv-bnav-item.active .ic { transform: translateY(-1px); }

/* 有底栏时，主内容和页脚往下让一截，别被挡住 */
body.has-bottom-nav .sv-main { padding-bottom: 26px; }
body.has-bottom-nav .sv-footer { margin-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px)); }
body.has-bottom-nav { padding-bottom: 0; }

@media (min-width: 900px) {
  /* PC 上也保留底栏（要「两个导航栏共存」），只是窄一点居中，不铺满 */
  .sv-bnav {
    max-width: var(--max);
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    border-left: 1px solid var(--glass-line);
    border-right: 1px solid var(--glass-line);
  }
}

/* ============================================================
   四、悬浮音乐播放器
   ============================================================ */

.sv-mp {
  position: fixed;
  bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.sv-mp-right { right: 14px; }
.sv-mp-left  { left: 14px; flex-direction: row-reverse; }

/* 收起态：屏幕边上一个白色小凸起 */
.sv-mp-tab {
  width: 30px;
  height: 56px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(18, 24, 38, .2), inset 0 1px 0 rgba(255, 255, 255, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  animation: svMpBreath 3.2s ease-in-out infinite;
}
[data-theme="dark"] .sv-mp-tab { background: rgba(240, 242, 246, .88); }
.sv-mp-tab i {
  width: 4px; height: 20px; border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand-2) 70%, transparent);
}
@keyframes svMpBreath {
  0%, 100% { box-shadow: 0 8px 24px rgba(18,24,38,.2), 0 0 0 0 color-mix(in srgb, var(--brand-2) 40%, transparent); }
  50%      { box-shadow: 0 8px 24px rgba(18,24,38,.24), 0 0 0 7px color-mix(in srgb, var(--brand-2) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .sv-mp-tab { animation: none; } }

/* 展开态卡片：毛玻璃 + 紫色渐变 */
.sv-mp-card {
  width: 300px;
  max-width: calc(100vw - 74px);
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brand-2) 24%, transparent), transparent 60%),
    rgba(24, 20, 42, .62);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
  backdrop-filter: saturate(180%) blur(26px);
  border: 1px solid rgba(168, 140, 255, .4);
  box-shadow: 0 26px 66px rgba(30, 16, 60, .48), 0 0 0 1px rgba(255, 255, 255, .07) inset;
  color: #fff;
  transform-origin: bottom right;
  transition: opacity .26s ease, transform .28s cubic-bezier(.2, .9, .2, 1), visibility .26s;
}
.sv-mp-left .sv-mp-card { transform-origin: bottom left; }

.sv-mp[data-state="collapsed"] .sv-mp-card {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  pointer-events: none;
}
.sv-mp[data-state="open"] .sv-mp-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.sv-mp[data-state="open"] .sv-mp-tab { animation: none; }

.sv-mp-min {
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.sv-mp-min:hover { background: rgba(255, 255, 255, .26); }

.sv-mp-top { display: flex; align-items: center; gap: 11px; padding-right: 24px; }
.sv-mp-cover {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .34);
  animation: svMpSpin 14s linear infinite;
  animation-play-state: paused;
}
.sv-mp.is-playing .sv-mp-cover { animation-play-state: running; }
@keyframes svMpSpin { to { transform: rotate(360deg); } }
.sv-mp-cover img { width: 100%; height: 100%; object-fit: cover; }
.sv-mp-cover .ph { font-size: 22px; color: #fff; }
.sv-mp-meta { min-width: 0; }
.sv-mp-meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-mp-meta em { display: block; font-style: normal; font-size: 12px; opacity: .72;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sv-mp-status { min-height: 15px; margin: 6px 0 2px; font-size: 11px; opacity: .8; }
.sv-mp-status.err { color: #ffb4b4; }

.sv-mp-bar { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.sv-mp-time { font-size: 11px; opacity: .74; font-variant-numeric: tabular-nums; }
.sv-mp-track {
  flex: 1; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  position: relative;
}
.sv-mp-track:hover { background: rgba(255, 255, 255, .32); }
.sv-mp-track i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b79bff, #ffffff);
  box-shadow: 0 0 10px rgba(183, 155, 255, .8);
}

.sv-mp-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 6px; }
.sv-mp-ctrl button {
  border: 0; background: none; color: #fff;
  font-size: 19px; cursor: pointer; padding: 4px;
  opacity: .86; transition: transform .16s, opacity .16s;
}
.sv-mp-ctrl button:hover { opacity: 1; transform: scale(1.08); }
.sv-mp-ctrl button.play {
  font-size: 34px;
  background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,.1));
  border-radius: 50%;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
}
.sv-mp-ctrl button.on { opacity: 1; color: #d9c8ff; }

.sv-mp-lyric {
  height: 84px;
  overflow: hidden;
  margin-top: 4px;
  padding: 4px 2px;
  font-size: 12.5px;
  line-height: 2.1;
  text-align: center;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.sv-mp-lyric p { margin: 0; opacity: .5; transition: opacity .3s, transform .3s; }
.sv-mp-lyric p.on { opacity: 1; color: #fff; font-weight: 600; transform: scale(1.04);
  text-shadow: 0 0 12px rgba(183, 155, 255, .8); }
.sv-mp-lyric p.ph { opacity: .5; padding-top: 26px; }

/* ============================================================
   五、聊天室
   ============================================================ */

.chat-wrap {
  display: grid;
  grid-template-columns: 1fr 232px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 820px) { .chat-wrap { grid-template-columns: 1fr; } }

.chat-box {
  display: flex;
  flex-direction: column;
  height: min(70vh, 620px);
  border-radius: 20px;
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--glass-line);
  font-weight: 600;
}
.chat-head .live {
  margin-left: auto; font-size: 12px; color: var(--ok);
  display: inline-flex; align-items: center; gap: 5px;
}
.chat-head .live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .6);
  animation: chatPulse 1.8s infinite;
}
@keyframes chatPulse {
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: 9px; align-items: flex-start; }
.chat-msg .sv-avatar { flex: 0 0 auto; }
.chat-msg-body { min-width: 0; max-width: 78%; }
.chat-msg-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 3px;
}
.chat-msg-head strong { color: var(--text-2); font-size: 12.5px; }
.chat-msg-bubble {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 4px 14px 14px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  word-break: break-word;
  white-space: pre-wrap;
  font-size: 14px;
}
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg.mine .chat-msg-body { text-align: right; }
.chat-msg.mine .chat-msg-head { justify-content: flex-end; }
.chat-msg.mine .chat-msg-bubble {
  border-radius: 14px 4px 14px 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand));
  color: #fff;
  border-color: transparent;
}
.chat-msg.is-admin .chat-msg-head strong::after {
  content: "站长";
  margin-left: 6px; padding: 1px 6px; font-size: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bad) 16%, transparent);
  color: var(--bad);
}
.chat-msg.recalled .chat-msg-bubble {
  background: none; border: 1px dashed var(--line); color: var(--muted); font-size: 12px;
}
.chat-msg-bubble img { border-radius: 10px; max-width: 220px; cursor: zoom-in; }
.chat-msg-act { margin-top: 2px; }
.chat-msg-act button {
  border: 0; background: none; color: var(--muted); font-size: 11px;
  cursor: pointer; padding: 0 4px;
}
.chat-msg-act button:hover { color: var(--bad); }

.chat-input {
  border-top: 1px solid var(--glass-line);
  padding: 10px;
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--glass-bg);
}
.chat-input textarea { min-height: 44px; max-height: 120px; }
.chat-side { padding: 14px; }
.chat-online { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.chat-online-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chat-online-user em { font-style: normal; color: var(--ok); font-size: 11px; margin-left: auto; }

/* ============================================================
   六、首页轮播
   ============================================================ */

.sv-carousel {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 0 var(--gap);
  box-shadow: var(--glass-inner), var(--glass-shadow-lg);
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
}
.sv-carousel-track {
  display: flex;
  transition: transform .58s cubic-bezier(.22, .8, .24, 1);
  will-change: transform;
}
.sv-carousel-slide { flex: 0 0 100%; position: relative; }
.sv-carousel-slide img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  display: block;
}
.sv-carousel-slide .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 20, .74));
  color: #fff;
  font-size: 15px; font-weight: 600;
}
.sv-carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; gap: 7px;
}
.sv-carousel-dots button {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .24s, background .24s;
}
.sv-carousel-dots button.on { width: 22px; background: #fff; }
.sv-carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: rgba(12, 16, 26, .34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sv-carousel-nav.prev { left: 12px; }
.sv-carousel-nav.next { right: 12px; }
@media (max-width: 640px) {
  .sv-carousel-slide img { aspect-ratio: 16 / 10; }
  .sv-carousel-nav { display: none; }
}

/* ============================================================
   七、B 站风格免费源码区
   ============================================================ */

.bili-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 16px 14px;
}
.bili-card {
  display: flex; flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-inner), var(--glass-shadow);
  transition: transform .26s cubic-bezier(.2, .85, .2, 1), box-shadow .26s;
}
.bili-card:hover { transform: translateY(-3px); box-shadow: var(--glass-inner), var(--glass-shadow-lg); }
.bili-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.bili-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bili-card:hover .bili-thumb img { transform: scale(1.05); }
.bili-dur {
  position: absolute; right: 6px; bottom: 6px;
  padding: 1px 6px;
  font-size: 11px; color: #fff;
  background: rgba(8, 12, 20, .72);
  border-radius: 6px;
}
.bili-play {
  position: absolute; left: 6px; bottom: 6px;
  font-size: 11px; color: #fff;
  background: rgba(8, 12, 20, .72);
  border-radius: 6px; padding: 1px 6px;
  display: inline-flex; align-items: center; gap: 3px;
}
.bili-body { padding: 9px 11px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bili-title {
  font-size: 14px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bili-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.bili-meta span { display: inline-flex; align-items: center; gap: 3px; }
.bili-author { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.bili-author .sv-avatar { width: 20px; height: 20px; font-size: 10px; }
.bili-tagline {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted);
  background: var(--surface-2); border-radius: 6px; padding: 1px 6px;
  align-self: flex-start;
}

/* ============================================================
   八、金额一律红色
   ============================================================ */

.sv-price, .pdd-price, .oi-price, .buy-price strong, .buy-price em,
.goods-price, .vip-price, .money, .coin-price, .netdisk-price {
  color: #e5342b !important;
}
[data-theme="dark"] .sv-price, [data-theme="dark"] .pdd-price, [data-theme="dark"] .oi-price,
[data-theme="dark"] .buy-price strong, [data-theme="dark"] .goods-price, [data-theme="dark"] .vip-price {
  color: #ff6b5e !important;
}
/* 免费区卡片：既不出金额、也不出「免费」两个字 */
.bili-card .pdd-price,
.free-zone .pdd-price,
.free-zone .pdd-free,
.free-zone .sv-price { display: none !important; }

/* ============================================================
   九、评分 / 收藏 / 勋章 / 等级 / 签到
   ============================================================ */

.sv-stars { display: inline-flex; align-items: center; gap: 2px; color: #f5a623; }
.sv-stars i { display: inline-flex; font-size: 15px; opacity: .28; }
.sv-stars i.on { opacity: 1; }
.sv-stars em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 6px; }

.rate-pick { display: inline-flex; gap: 4px; cursor: pointer; color: #f5a623; font-size: 24px; }
.rate-pick i { display: inline-flex; opacity: .3; transition: transform .16s, opacity .16s; }
.rate-pick i.on, .rate-pick i.hover { opacity: 1; transform: scale(1.08); }

.sv-flair-lv {
  font-style: normal; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  background: linear-gradient(150deg, var(--brand), var(--brand-2));
  color: #fff;
}
.sv-flair-badge {
  display: inline-flex; font-size: 12px; color: #f5a623;
  background: rgba(245, 166, 35, .14);
  border-radius: 999px; padding: 1px 5px;
}

.badge-wall { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  min-width: 158px;
}
.badge-item .ic { font-size: 20px; color: #f5a623; }
.badge-item.locked { opacity: .44; }
.badge-item strong { display: block; font-size: 13px; }
.badge-item em { font-style: normal; font-size: 11px; color: var(--muted); }

.lv-bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lv-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

.signin-card { text-align: center; padding: 22px 16px; }
.signin-num { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.signin-card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* 积分流水 */
.pt-list { display: flex; flex-direction: column; }
.pt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--glass-line);
}
.pt-item:last-child { border-bottom: 0; }
.pt-item .pt-main { flex: 1; min-width: 0; }
.pt-item .pt-main strong { display: block; font-size: 13.5px; font-weight: 600; }
.pt-item .pt-main em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pt-item .pt-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-item .pt-num.plus { color: var(--ok); }
.pt-item .pt-num.minus { color: var(--bad); }

/* ============================================================
   十、站内信
   ============================================================ */

.nf-list { display: flex; flex-direction: column; }
.nf-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 12px;
  border-bottom: 1px solid var(--glass-line);
  position: relative;
  transition: background .2s;
}
.nf-item:last-child { border-bottom: 0; }
.nf-item:hover { background: var(--glass-bg); }
.nf-item.unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.nf-item.unread::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 3px; background: var(--brand);
}
.nf-ic {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand); font-size: 17px;
}
.nf-main { flex: 1; min-width: 0; }
.nf-main strong { display: block; font-size: 14px; }
.nf-main p { color: var(--text-2); font-size: 13px; margin: 3px 0 0; }
.nf-main em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.nf-act { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }

.nf-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* ============================================================
   十一、视觉冲击（付费页专属，克制的那种）
   ============================================================ */

.vip-aura {
  position: relative;
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .18), transparent 46%),
    linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 54px color-mix(in srgb, var(--brand) 36%, transparent);
}
.vip-aura h2, .vip-aura h3 { color: #fff; }
.vip-aura .shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, .34) 50%, transparent 66%);
  transform: translateX(-100%);
  animation: svShine 4.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes svShine { 0%, 62% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .vip-aura .shine { animation: none; } }

.sv-glow-text {
  background: linear-gradient(96deg, var(--brand), var(--brand-2), var(--brand));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: svGlow 6s linear infinite;
}
@keyframes svGlow { to { background-position: 220% center; } }

/* ============================================================
   十二、三端适配收口
   ============================================================ */

/* 平板 */
@media (max-width: 1024px) {
  :root { --gap: 18px; }
  .sv-mp-card { width: 282px; }
}

/* 手机 */
@media (max-width: 720px) {
  .bili-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 10px; }
  .bili-title { font-size: 13px; }
  .sv-topsearch { display: none; }
  .sv-footer-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
  .member-head { flex-direction: column; align-items: flex-start; }
  .detail-wrap { grid-template-columns: 1fr; }
  .sv-mp { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .sv-mp-card { width: calc(100vw - 74px); }
}

@media (max-width: 420px) {
  .bili-grid { grid-template-columns: 1fr 1fr; gap: 10px 8px; }
  .sv-username { display: none; }
}

/* 打印 / 无玻璃支持的老浏览器：退回纯色，别糊成一团 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sv-topbar, .ad-topbar, .sv-sidebar, .sv-glass, .sv-bnav, .sv-mp-card, .bili-card, .sv-carousel {
    background: var(--surface) !important;
  }
}

/* ============================================================
   十三、首页新版横幅（轮播 + 玻璃文案卡）
   ============================================================ */

.sv-hero6 { padding: var(--gap) 0; }
.sv-hero6 .hero-grid { align-items: stretch; }
.sv-hero6 .hero-copy {
  padding: 24px 22px;
  border-radius: 22px;
}
.sv-hero6 .hero-copy h1 { margin-bottom: 10px; }
.sv-hero6 .hero-side {
  display: flex; flex-direction: column; justify-content: center;
  padding: 20px;
  border-radius: 22px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-inner), var(--glass-shadow);
}
@media (max-width: 860px) {
  .sv-hero6 .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .sv-hero6 .hero-copy, .sv-hero6 .hero-side { padding: 18px 16px; }
}

/* 原来的灰底图遮罩：now 不再使用，留一条兜底防止别处引用时又被压暗 */
.sv-hero-bg img { opacity: .3 !important; }
.sv-hero::after { background: linear-gradient(90deg, var(--bg) 30%, transparent 100%) !important; }

/* ============================================================
   十四、详情页操作条 / 头像编辑 / 会员中心栅格
   ============================================================ */

.sv-actbar { display: flex; gap: 9px; flex-wrap: wrap; margin: 4px 0 14px; }
.sv-actbar .btn.on, .sv-actbar .btn[data-fav].on {
  border-color: color-mix(in srgb, var(--brand) 46%, transparent) !important;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent) !important;
}

.avatar-edit { display: flex; align-items: center; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.avatar-edit .sv-avatar.xl { width: 76px; height: 76px; font-size: 30px; }

.member-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 780px) { .member-grid { grid-template-columns: 1fr; } }

.member-tabs { flex-wrap: wrap; }

/* 头像出图版 */
.sv-avatar.has-img { padding: 0; overflow: hidden; background: none; }
.sv-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 站标出图版 */
.sv-brand-mark.has-img { padding: 0; overflow: hidden; background: none; box-shadow: none; }
.sv-brand-mark.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* 分享卡：有封面 / 没封面两种形态 */
.share-card .share-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 14px 14px 0 0;
}
.share-card .share-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-card .share-noimg {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--muted); font-size: 28px;
  background: linear-gradient(140deg, var(--surface-2), var(--glass-bg));
}

/* 聊天室发图按钮 */
.chat-imgbtn {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  color: var(--muted);
}
.chat-imgbtn:hover { color: var(--brand); }

/* 免费源码区标题区块的分隔感 */
.free-zone { padding-top: 2px; }

/* ============================================================
   十五、点按反馈：去掉手机浏览器默认那层蓝色高亮
   （左上角三条杠按钮最明显，点一下会闪一块蓝底）
   ============================================================ */

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
label,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

/* 聚焦不用默认蓝框，改用主色描边，键盘操作仍然看得见 */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 三条杠：任何状态下都不带底色，只保留描边变化 */
.sv-burger,
.sv-burger:active,
.sv-burger:focus,
.sv-burger:hover {
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.sv-burger:active {
  border-color: var(--brand) !important;
  transform: scale(.96);
}
.sv-burger:active span { background: var(--brand); }

/* 底部导航、抽屉项同理 */
.sv-bnav-item,
.sv-side-link,
.sv-iconbtn,
.sv-theme-btn,
.sv-carousel-dots button,
.sv-carousel-nav,
.sv-mp-ctrl button,
.sv-mp-tab {
  -webkit-tap-highlight-color: transparent;
  background-color: transparent;
}
.sv-bnav-item:focus,
.sv-side-link:focus,
.sv-iconbtn:focus {
  background-color: transparent;
}

/* ============================================================
   v6.1 补丁区
   ------------------------------------------------------------
   1) 聊天室：图片入口铺满按钮、选中先出预览、发送按钮常驻
   2) 每日签到：弹窗 + 日历（签过的日子打绿勾）
   3) 账号设置：头像上传
   4) 订单状态：待审核配色
   5) 付费源码：积分支付按钮
   6) 主按钮兜底：任何情况下都看得见
   ============================================================ */

/* ---------- 1) 聊天室输入区 ---------- */
.chat-imgbtn { position: relative; overflow: hidden; cursor: pointer; }
.chat-imgbtn input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: none;
}
.chat-input-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-input-main textarea { width: 100%; }
.chat-img-preview {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--glass-brd);
  border-radius: 11px;
  background: var(--glass-bg);
  max-width: 100%;
}
.chat-img-preview img {
  max-height: 56px; max-width: 88px;
  border-radius: 8px; display: block;
}
.chat-img-preview em {
  font-style: normal; font-size: 12px; color: var(--muted);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-img-del {
  flex: 0 0 auto;
  width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--bad); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
/* 发送按钮在任何屏幕下都看得见、点得着 */
.chat-input .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- 2) 每日签到：弹窗 ---------- */
.sv-ck-modal { position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sv-ck-modal[hidden] { display: none !important; }
.sv-ck-mask { position: absolute; inset: 0; background: rgba(10, 12, 16, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sv-ck-card {
  position: relative;
  width: 100%; max-width: 400px;
  max-height: 88vh; overflow-y: auto;
  padding: 22px;
  border-radius: 22px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow-lg);
}
.sv-ck-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sv-ck-head h3 { font-size: 19px; }
.sv-ck-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.sv-ck-foot { display: flex; gap: 10px; margin-top: 16px; }
.sv-ck-foot .btn { flex: 1; }
.sv-ck-foot .btn-ghost { flex: 0 0 auto; }

/* 签到日历 */
.ck-cal { border: 1px solid var(--glass-line); border-radius: 16px; padding: 12px; background: var(--glass-bg); }
.ck-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ck-cal-head strong { font-size: 15px; }
.ck-cal-head span { color: var(--muted); font-size: 12.5px; }
.ck-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ck-grid .ck-w { text-align: center; font-size: 11.5px; color: var(--muted); padding: 2px 0; }
.ck-day {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid transparent;
}
.ck-day.empty { background: none; }
.ck-day.done {
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .38);
  color: var(--ok);
  font-weight: 700;
}
.ck-day.done::after {
  content: "\2713";
  position: absolute;
  right: 2px; top: 0;
  font-size: 10px;
  color: var(--ok);
}
.ck-day.today { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.ck-day.today.done { border-color: var(--ok); color: var(--ok); }
.ck-legend { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ck-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; }
.ck-legend .g { background: rgba(22, 163, 74, .2); border: 1px solid rgba(22, 163, 74, .45); }
.ck-legend .t { background: none; border: 1px solid var(--brand); }
.ck-stat { display: flex; gap: 10px; margin-top: 14px; }
.ck-stat > div {
  flex: 1; text-align: center; padding: 10px 6px;
  border: 1px solid var(--glass-line); border-radius: 13px; background: var(--glass-bg);
}
.ck-stat strong { display: block; font-size: 20px; color: var(--brand); line-height: 1.2; }
.ck-stat span { font-size: 11.5px; color: var(--muted); }
.ck-progress { margin-top: 12px; }
.ck-progress .bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ck-progress .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.ck-progress p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* ---------- 3) 头像上传 ---------- */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-edit > div { min-width: 0; }
.avatar-pick {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer;
}
.avatar-pick input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; border: 0; background: none;
}
.avatar-preview { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.avatar-preview img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--glass-brd); display: block;
}
.avatar-preview em { font-style: normal; font-size: 12px; color: var(--muted); word-break: break-all; }

/* ---------- 4) 订单状态：待审核 ---------- */
.oi-status.pending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.oi-status.is-reviewing { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.oi-status.paid { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }

/* ---------- 5) 付费源码：积分支付 ---------- */
.buy-points {
  margin-top: 10px; padding: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.buy-points .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.buy-points .row span { font-size: 13px; color: var(--text-2); }
.buy-points .row b { color: var(--brand); font-size: 16px; }
.buy-points .btn { width: 100%; }
.buy-points .hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.buy-points .hint.bad { color: var(--bad); }
.buy-points .hint b { color: var(--brand); }

/* ---------- 6) 主按钮兜底（放最后，确保压得住前面所有规则） ---------- */
.btn.btn-primary {
  background-color: #2563eb;
  background-color: var(--brand, #2563eb);
  color: #fff;
}
.glass-on .btn.btn-primary,
body.sv-body .btn.btn-primary {
  background-color: var(--brand, #2563eb);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--brand, #2563eb) 92%, #fff), var(--brand, #2563eb));
  color: #fff;
}
