/* ============================================================
   v2.7.58 安卓 APP 质感增强 + 主页滑动渐变（增量样式，叠加在 style.css 之上）
   设计原则：只做"加法"，不覆盖科技蓝渐变底与既有毛玻璃；老车机 WebView
   （Chrome 84~86）兼容：-webkit-backdrop-filter 前缀、禁用 inset/:is()/:has()。
   ============================================================ */

/* 1) 去掉网页感：消除点按高亮、桌面端隐藏滚动条（横向 chip 条保留细滚动条） */
* { -webkit-tap-highlight-color: transparent; }
html, body { scrollbar-width: none; -ms-overflow-style: none; }

/* 0.5) v2.7.68 「白底浅字」根治
   style.css:71 只写了 `button, input, textarea, select { font: inherit; color: inherit }`，
   裸 textarea（没被 .field / #launcherView 包的，例如「开机语音播报」的播报文本框）
   既没背景也没独立文字色 → 背景走浏览器默认的**纯白**，文字继承黑天模式的浅色
   → 实测浅灰字压在白底上完全看不清（用户截图里的那个框）。
   这里给裸 textarea 补上主题色。注意：.field textarea(0,1,1) 与 #launcherView textarea(1,0,1)
   权重都高于本条(0,0,1)，且 app-ui.css 加载在后，不会破坏既有输入框样式。 */
textarea {
  background: var(--panel-2, rgba(30, 44, 88, .55));
  color: var(--text, #e8eeff);
  border: 1px solid var(--line, rgba(96, 137, 255, .22));
  border-radius: 12px;
  outline: none;
}
/* 让浏览器原生控件（复选框/下拉/滚动条）跟随主题，别在深色界面里冒白底。
   Chrome 81+ / WebView 84~86 均支持 color-scheme。 */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
::-webkit-scrollbar { width: 0 !important; height: 0 !important; background: transparent !important; }
input, textarea, select { -webkit-tap-highlight-color: rgba(61,139,255,.18); }

/* 2) 顶栏更像安卓应用栏：渐变玻璃 + 底部辉光阴影（不破坏 sticky） */
.topbar {
  background: linear-gradient(180deg, rgba(18,32,58,.9), rgba(18,32,58,.46)) !important;
  box-shadow: 0 8px 26px rgba(2,8,24,.5), 0 1px 0 rgba(122,163,255,.18) inset !important;
}

/* 3) 主页大图标悬浮反馈：抬升 + 放大 + 科技蓝辉光（覆盖既有 hover，更明显） */
.lg-item {
  background: linear-gradient(135deg, rgba(61,139,255,.18), rgba(41,213,255,.06)) !important;
  border: 1px solid rgba(122,163,255,.22) !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease !important;
}
.lg-item:hover {
  transform: translateY(-6px) scale(1.07) !important;
  box-shadow: 0 16px 38px rgba(61,139,255,.55), 0 0 24px rgba(41,213,255,.4) !important;
  background: linear-gradient(135deg, rgba(61,139,255,.34), rgba(41,213,255,.14)) !important;
  border-color: rgba(122,163,255,.6) !important;
}
.lg-item:active { transform: translateY(-1px) scale(.95) !important; }
.lg-item .lg-ico { transition: transform .18s ease; }
.lg-item:hover .lg-ico { transform: scale(1.1); }

/* 4) 资源卡片轻量悬浮抬升（非主页大图标），强化"可点"的 APP 手感 */
.card { transition: transform .15s ease, box-shadow .15s ease; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(2,8,24,.6), 0 0 18px rgba(61,139,255,.3) !important;
}

/* v2.7.73：屏外卡片跳过布局/绘制，降低长列表滚动掉帧（老 WebView 不支持则自动忽略，无副作用）。
   动态壁纸卡片排除——其自动播放依赖视口可见性，不能交给 content-visibility 托管。 */
@supports (content-visibility: auto) {
  .card:not(.dynwall) { content-visibility: auto; contain-intrinsic-size: 1px 320px; }
}

/* 5) 主页滑动渐变遮罩：下滑时顶部渐显，遮住顶栏与内容接缝，营造顺滑过渡 */
.home-scroll-grad {
  position: fixed; top: 0; left: 0; right: 0; height: 150px; z-index: 18;
  pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(8,16,34,.95) 0%, rgba(8,16,34,.55) 45%, transparent 100%);
  transition: opacity .25s ease;
}

/* 6) 主按钮悬浮辉光，点击下压——安卓风格的交互反馈 */
.btn-primary { transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(61,139,255,.5), 0 6px 18px rgba(61,139,255,.42) !important;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(1px) scale(.98); }

/* 7) 后台数据表格也加一层极淡毛玻璃，整体更统一（不覆盖斑马纹/边框逻辑） */
.tbl { background: rgba(255,255,255,.03); border-radius: var(--radius); overflow: hidden; }

/* 8) 让侧栏导航当前项更"安卓"：左侧亮条 + 轻微辉光（不覆盖既有 active 底色） */
.sidebar button.active { box-shadow: -3px 0 0 0 var(--accent), 0 0 16px rgba(61,139,255,.18) inset; }

/* 9) 动态壁纸预览：静态封面秒显 + 滑入视口自动播放（v2.7.66 去掉居中▶按钮） */
.dynwall { position: relative; overflow: hidden; cursor: pointer; background: #0b1020; }
.dynwall .dw-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* v2.7.66：卡片上不再显示「▶ 播放按钮」。自动播放由 IntersectionObserver + 兜底矩形扫描驱动，
   用户无需点击。只保留右下角一个很小的暂停/续播角标：播放前 opacity:0 + pointer-events:none
   （点击直接落到卡片上 → 打开详情，不会被拦住），播放中或播放失败回滚后才淡入可点。 */
.dynwall .dw-ctl {
  position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-size: 10px; line-height: 1; color: #fff; background: rgba(10,18,38,.46);
  border: 1px solid rgba(122,163,255,.42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.dynwall.playing .dw-ctl { opacity: .82; pointer-events: auto; }
.dynwall.playing:hover .dw-ctl { opacity: 1; }
/* v2.7.63：自动播放 —— 视频真正出帧（.live）后才淡出封面/占位，缓冲期间封面继续显示 */
.dynwall .dw-cover { transition: opacity .25s; }
.dynwall.live .dw-cover, .dynwall.live .dw-ph { opacity: 0; }

/* v2.7.63：动态壁纸无封面占位（居中 🎬，底色由内联渐变提供） */
.dynwall .dw-ph {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; opacity: .9;
  text-shadow: 0 4px 14px rgba(2,8,24,.6);
}

/* 10) 渐变透明毛玻璃增强：在既有模糊之上叠加蓝→青渐变 tint，透明度更高，质感更"玻璃" */
.card, .panel, .menu-form, .menu-edit, .fw-modal, .res-card, .vin-card, .ota-card, .auth-card, .login-card {
  background: linear-gradient(135deg, rgba(61,139,255,.14), rgba(41,213,255,.06));
  border: 1px solid rgba(122,163,255,.22);
}
.modal, .drawer {
  background: linear-gradient(160deg, rgba(22,36,64,.82), rgba(12,20,40,.68));
  border: 1px solid rgba(122,163,255,.2);
}
.sidebar {
  background: linear-gradient(180deg, rgba(18,32,58,.78), rgba(12,20,40,.6));
}

/* 11) 自适应容器：超宽屏内容限宽居中，窄屏收紧内边距（栅格已用 auto-fill，天然流式） */
@media (min-width: 1400px) {
  .main { max-width: 1280px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .main { padding: 12px 12px 36px; }
}

/* =========================================================================
   12) v2.7.66 首页外观设置：黑天/白天模式 · 背景色 · 自定义背景（图片/视频）
   ========================================================================= */

/* 12.1 让 html 底色与 body::before 渐变都跟随变量 —— 用户选背景色才能真正生效
   （style.css 里这两处是硬编码 #0a1428，且 body::before 的渐变是浅色面板的透出层，
    必须一起变量化，否则改色只变了 html、被渐变盖住看不见） */
html { background: var(--bg, #0a1428); }
/* ★必须带 !important：style.css 的 v2.7.37 主题块里 body::before 的背景是带 !important 的
   （radial-gradient(...) , linear-gradient(168deg,#0a1130,#070c1e,#0a0f26) !important）。
   不加 !important 本条整体被压掉，后果有两个：
     ① 自定义背景色只改了 html 底色，被那层写死的深色渐变盖住 → 看不出变化；
     ② #homeBg（z-index:-2）被这层不透明渐变盖死 → 自定义背景图/视频永远看不见。
   两条规则同权重时后加载的 app-ui.css 胜出，故这里加 !important 即可稳定覆盖。 */
body::before {
  background:
    radial-gradient(1100px 760px at 12% -8%, var(--bg-glow-1, rgba(61, 139, 255, .30)), transparent 60%),
    radial-gradient(900px 680px at 100% 0%, var(--bg-glow-2, rgba(41, 213, 255, .16)), transparent 55%),
    radial-gradient(960px 760px at 50% 118%, var(--bg-glow-3, rgba(120, 96, 255, .20)), transparent 60%),
    linear-gradient(160deg, var(--bg, #0a1428) 0%, var(--bg-mid, #0b1830) 45%, var(--bg, #0a1428) 100%) !important;
}

/* 12.2 白天模式：只覆盖变量，全部毛玻璃/渐变组件自动跟随，无需逐个改样式 */
html[data-theme="light"] {
  --bg: #eef3fb;
  --bg-mid: #e3ecfa;
  --panel: rgba(255, 255, 255, .74);
  --panel-solid: #ffffff;
  --panel-2: rgba(238, 244, 255, .9);
  --line: rgba(41, 86, 170, .18);
  --line-strong: rgba(41, 86, 170, .34);
  --text: #14213a;
  --muted: #56698c;
  --accent: #2b7bef;
  --accent-2: #17b6d8;
  --accent-press: #1f66cc;
  --shadow: 0 8px 32px rgba(20, 44, 90, .16);
  --glow: 0 0 18px rgba(61, 139, 255, .32);
  --bg-glow-1: rgba(61, 139, 255, .20);
  --bg-glow-2: rgba(41, 213, 255, .16);
  --bg-glow-3: rgba(120, 96, 255, .14);
  /* style.css 里 html 底色写死 #070c1e（深夜蓝），白天模式下 body::before 虽然会盖住它，
     但橡皮筋回弹 / 地址栏伸缩时那一瞬会露出深色边。这里一并改掉。 */
  background: #eef3fb;
}
/* 白天模式下 12.1 的自定义变量会盖住 style.css，这里只需补 10) 里写死的深色渐变面 */
html[data-theme="light"] .modal,
html[data-theme="light"] .drawer {
  background: linear-gradient(160deg, rgba(255, 255, 255, .94), rgba(240, 245, 255, .9));
  border: 1px solid rgba(41, 86, 170, .18);
}
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(238, 244, 255, .68));
}
html[data-theme="light"] .card,
html[data-theme="light"] .panel,
html[data-theme="light"] .menu-form,
html[data-theme="light"] .menu-edit,
html[data-theme="light"] .fw-modal,
html[data-theme="light"] .res-card,
html[data-theme="light"] .vin-card,
html[data-theme="light"] .ota-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .login-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(240, 246, 255, .66));
  border: 1px solid rgba(41, 86, 170, .14);
}

/* --------------------------------------------------------------------------
   12.2b v2.7.68 白天模式「看不清」根治补丁
   病根：style.css 第 10) 段 v2.7.37 那批美化规则**带 !important**（
     style.css:1854 .modal/.fw-modal/.drawer、:1860 .auth-card、:2346 .fw-menu、
     :1775 .topbar、:2344 .cv-update-bar-in / .cv-batch-bar、.lg-quicknav、
     .sp-viewer / .mind-viewer、.toast、.tb-expand），
   而 12.2 上面的覆盖**没带 !important** → 同权重时被 style.css 反杀。
   结果：弹窗/抽屉壳还是深夜蓝，正文颜色却已按白天模式切成 #14213a，
   实测对比度只有 1.31（深底 + 深字 = 完全看不见）。
   治法：凡 style.css 里带 !important 的深色「面」，这里一律同权重 !important 反转。
   注意：app-ui.css 在 index.html 里排 style.css 之后加载 → 同权重必胜。
   -------------------------------------------------------------------------- */
html[data-theme="light"] .modal,
html[data-theme="light"] .drawer,
html[data-theme="light"] .fw-modal {
  background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(240, 246, 255, .94)) !important;
  border: 1px solid rgba(41, 86, 170, .2) !important;
  box-shadow: 0 18px 46px rgba(20, 44, 90, .18) !important;
}
html[data-theme="light"] .auth-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .98), rgba(240, 246, 255, .95)) !important;
  border: 1px solid rgba(41, 86, 170, .22) !important;
  box-shadow: 0 22px 54px rgba(20, 44, 90, .2) !important;
}
html[data-theme="light"] .fw-menu {
  background: rgba(255, 255, 255, .97) !important;
  border-color: rgba(41, 86, 170, .22) !important;
  box-shadow: 0 14px 34px rgba(20, 44, 90, .22) !important;
}
/* ★必须带 !important：本条对面是**本文件第 14 行** `.topbar{background:…!important}`
   （v2.7.58 安卓质感增强把顶栏写成了深色渐变玻璃）。不加就压不掉，
   实测顶栏会停在 rgb(88,100,120)（深灰蓝）+ 深色标题字 = 对比度 2.67，看不清。 */
html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(247, 251, 255, .8)) !important;
  border-bottom: 1px solid rgba(41, 86, 170, .16);
  box-shadow: 0 8px 26px rgba(20, 44, 90, .12) !important;
}
/* 主页下滑时顶部的接缝遮罩（第 5 段）也是深色渐变，白天模式同样要反转 */
html[data-theme="light"] .home-scroll-grad {
  background: linear-gradient(180deg, rgba(244, 249, 255, .96) 0%, rgba(244, 249, 255, .6) 45%, transparent 100%);
}
html[data-theme="light"] .cv-update-bar-in { background: rgba(255, 255, 255, .9); }
html[data-theme="light"] .cv-batch-bar {
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 12px 30px rgba(20, 44, 90, .18);
}
html[data-theme="light"] .lg-quicknav {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(244, 249, 255, .8));
}
html[data-theme="light"] .sp-viewer,
html[data-theme="light"] .mind-viewer { background: rgba(255, 255, 255, .95); }
html[data-theme="light"] .sp-viewer-bar,
html[data-theme="light"] .mind-viewer-bar { background: rgba(246, 250, 255, .9); }
html[data-theme="light"] .toast { background: rgba(255, 255, 255, .96); color: #14213a; }
html[data-theme="light"] .tb-expand { background: rgba(255, 255, 255, .96); }
/* 自定义背景色/图片的色块本身是深色，勾选标记固定白字（不随主题变） */
.bg-swatch { color: #fff; }
html[data-theme="light"] .bg-thumb { background-color: #e8eefb; }

/* 12.3 进入具体资源类型（应用软件/高清壁纸/动态壁纸/小姐姐）时收起主页大图标菜单。
   body.view-list 由 app.js 的 applyViewMode() 维护；这里不碰 #launcher 的 hidden 属性，
   回到「全部」时 initLauncher() 自己维护的显示状态原样恢复。
   选择器需带 id 才能盖过 style.css 里的 `[hidden]{display:none!important}` 同级权重。 */
body.view-list #launcher { display: none !important; }

/* 12.4 自定义背景层（图片 / 视频）：固定在 body::before 之下，由 ::before 充当压暗蒙层保证文字可读 */
#homeBg {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -2;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  overflow: hidden;
}
#homeBg > video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* 有自定义背景时，body::before 从「渐变底」变成「半透明蒙层」——
   蒙层只是压暗保证文字可读，太厚会把用户的图/视频压得看不见，所以取 0.42~0.6。
   同样必须 !important（理由见上）。 */
body.cv-has-bg::before {
  background: linear-gradient(180deg, rgba(6, 12, 26, .42) 0%, rgba(6, 12, 26, .60) 100%) !important;
}
html[data-theme="light"] body.cv-has-bg::before {
  background: linear-gradient(180deg, rgba(250, 252, 255, .52) 0%, rgba(244, 248, 255, .68) 100%) !important;
}
/* 自定义背景色/背景图时：把三团柔光调淡，避免盖住用户选的颜色与图片 */
body.cv-custom-color::before { --bg-glow-1: rgba(61, 139, 255, .12); --bg-glow-2: rgba(41, 213, 255, .08); --bg-glow-3: rgba(120, 96, 255, .08); }
body.cv-has-bg::before { --bg-glow-1: transparent; --bg-glow-2: transparent; --bg-glow-3: transparent; }

/* 12.4 设置面板里的外观控件 */.bg-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bg-swatch {
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 2px solid rgba(122, 163, 255, .35);
  box-shadow: 0 2px 10px rgba(2, 8, 24, .35) inset;
  padding: 0; position: relative;
}
.bg-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(61, 139, 255, .5); }
.bg-swatch.active::after {
  content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.bg-thumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.bg-thumb {
  width: 96px; height: 62px; border-radius: 10px; overflow: hidden; position: relative;
  border: 2px solid rgba(122, 163, 255, .3); background: #0b1020 center/cover no-repeat;
}
.bg-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.bg-thumb video, .bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* ==========================================================================
   13) v2.7.67「🏠 返回宝库」悬浮按钮
   点主页任意图标（弹窗 / 站内 iframe / 详情抽屉 / 分类列表）后都能一键回首页。
   位置：默认左下角；横屏宽屏（≥900px，此时左侧有 190px 侧栏）右移让开侧栏。
   显隐由 app.js 的 syncBackHome() 控制（用 hidden 属性，样式表里 [hidden] 已强制 display:none）。
   注意：老车机 WebView 兼容 —— 不用 inset 简写、不用 :is()/:where()。 */
.cv-back-home {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(150, 190, 255, .55);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(61, 139, 255, .96), rgba(41, 213, 255, .9));
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(2, 8, 24, .55), 0 0 18px rgba(61, 139, 255, .45);
  transition: transform .14s ease, box-shadow .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.cv-back-home:hover { box-shadow: 0 12px 32px rgba(2, 8, 24, .6), 0 0 26px rgba(61, 139, 255, .65); }
.cv-back-home:active { transform: scale(.95); }
/* 横屏宽屏时左侧是固定 190px 侧栏（style.css 的 .sidebar 断点），按钮右移避免压住菜单 */
@media (orientation: landscape) and (min-width: 900px) {
  .cv-back-home { left: 208px; }
}

/* 13.1 v2.7.68 长按拖拽（app.js initBackHomeDrag）
   长按 450ms 后进入 dragging：放大 + 加亮阴影 + 关掉 :active 的缩小（否则一边拖一边抖）。 */
.cv-back-home.dragging {
  transform: scale(1.06);
  box-shadow: 0 18px 42px rgba(2, 8, 24, .62), 0 0 34px rgba(61, 139, 255, .8);
  border-color: rgba(200, 226, 255, .95);
  opacity: .97;
  cursor: grabbing;
  transition: none;
  touch-action: none;
}
.cv-back-home.dragging:active { transform: scale(1.06); }

/* 13.2 「长按我可以拖动哦」气泡：定位在按钮正上方，箭头朝下（app.js bhHint/bhMoveTip） */
.cv-bh-tip {
  position: fixed;
  z-index: 100000;
  padding: 8px 14px;
  border: 1px solid rgba(150, 190, 255, .55);
  border-radius: 12px;
  background: rgba(17, 26, 54, .95);
  color: #eaf1ff;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 26px rgba(2, 8, 24, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: cvBhTipIn .22s ease-out both;
}
.cv-bh-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: rgba(17, 26, 54, .95);
  border-right: 1px solid rgba(150, 190, 255, .55);
  border-bottom: 1px solid rgba(150, 190, 255, .55);
  transform: rotate(45deg);
}
@keyframes cvBhTipIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
html[data-theme="light"] .cv-bh-tip {
  background: rgba(255, 255, 255, .97);
  color: #14213a;
  border-color: rgba(41, 86, 170, .3);
  box-shadow: 0 10px 26px rgba(20, 44, 90, .26);
}
html[data-theme="light"] .cv-bh-tip::after {
  background: rgba(255, 255, 255, .97);
  border-color: rgba(41, 86, 170, .3);
}

/* 13.3 v2.7.68 强制重绘（app.js forceRepaint）
   老车机 WebView 改 CSS 变量后 body::before/#homeBg 有时不重绘，
   给 body 挂一下这个类会提升为独立合成层，回来时自然重绘。抖动本身肉眼不可见。 */
body.cv-repaint { will-change: opacity; }

/* ==========================================================================
   14. v2.7.70：启动遮罩 / 小姐姐全屏播放器 / 消息通知滚动列表
   ========================================================================== */

/* 14.1 启动遮罩（app.js bootDone() 淡出；head 脚本 10 秒兜底）
   需求：刷新页面时原本会先闪一下「侧栏『资源』空白 + 主区无内容 + 『加载中…』」的半成品骨架。
   遮罩在首帧就位（静态 HTML），首屏内容渲染完成后再淡出，用户不会看到半成品。
   注意：老车机 WebView 兼容 —— top/right/bottom/left 四边写法，不用 inset 简写。 */
.boot-mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, var(--bg, #0a1428), var(--bg-mid, var(--bg, #0b1830)));
  opacity: 1;
  transition: opacity .28s ease;
}
.boot-mask.hide { opacity: 0; pointer-events: none; }
.boot-mask .bm-box { text-align: center; padding: 0 24px; }
.boot-mask .bm-logo { font-size: 2.6rem; line-height: 1; margin-bottom: 12px; }
.boot-mask .bm-name { font-size: 1.16rem; font-weight: 700; letter-spacing: .08em; color: var(--text, #eaf2ff); }
.boot-mask .bm-bar {
  position: relative;
  width: 208px; height: 4px; margin: 18px auto 10px;
  border-radius: 99px; overflow: hidden;
  background: var(--line, rgba(122, 163, 255, .2));
}
.boot-mask .bm-bar i {
  position: absolute; left: 0; top: 0; width: 42%; height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent, #3d8bff), var(--accent-2, #29d5ff));
  -webkit-animation: bmSlide 1.05s ease-in-out infinite;
  animation: bmSlide 1.05s ease-in-out infinite;
}
@-webkit-keyframes bmSlide { 0% { -webkit-transform: translateX(-105%); } 100% { -webkit-transform: translateX(245%); } }
@keyframes bmSlide { 0% { transform: translateX(-105%); } 100% { transform: translateX(245%); } }
.boot-mask .bm-tip { color: var(--muted, #9fb3d6); font-size: .84rem; letter-spacing: .04em; }

/* 14.2 小姐姐视频全屏播放层（app.js openBeautyPlayer / closeBeautyPlayer）
   层级：抽屉 41 < 播放层 45 < 通用弹窗 50 < 图表 80 < toast 99 < 返回宝库按钮 99999。
   播放层在通用弹窗之下、抽屉之上 —— 下载扣费提示等弹窗可以正常盖在视频上。 */
.bp-layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: #000;
}
.bp-stage { position: relative; flex: 1; min-height: 0; background: #000; }
.bp-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* 14.2b 被「借用」的预览视频：卡片里的 <video> 整块搬进全屏层继续播（零请求、秒出画）。
   它带着 .dynwall-video 的类，所以这里补一条兜底样式，避免依赖行内样式。 */
.bp-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.bp-tap {
  position: absolute; left: 50%; top: 50%;
  width: 88px; height: 88px; margin: -44px 0 0 -44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; font-size: 1.9rem; color: #fff;
  background: rgba(18, 28, 56, .74);
  border: 1px solid rgba(150, 190, 255, .55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
.bp-bar {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(10, 16, 32, .95);
  border-top: 1px solid rgba(120, 160, 255, .22);
}
.bp-name {
  flex: 1; min-width: 0;
  color: #e8eefc; font-size: .92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-bar .btn { flex: none; }
@media (max-width: 720px) {
  .bp-bar { flex-wrap: wrap; }
  .bp-name { flex-basis: 100%; }
}

/* 14.3 消息通知：列表独立滚动（顶部标题、底部按钮常驻，长列表不把按钮顶出屏幕） */
.notif-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.notif-more { width: 100%; min-width: 0; }

/* ============================================================
   15. 高清壁纸大图预览层（v2.7.72）
   老 WebView 兼容：全屏用 top/right/bottom/left（不用 inset）；
   不使用 :is/:where/:has / aspect-ratio。
   ============================================================ */
.wv-layer {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100000;
  display: flex; flex-direction: column;
  background: rgba(4, 8, 20, .95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.wv-top {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  color: #e8eefc;
}
.wv-name {
  flex: 1; min-width: 0;
  font-weight: 700; font-size: .95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wv-counter { flex: none; color: rgba(232, 238, 252, .78); font-size: .88rem; }
.wv-img {
  flex: 1; min-height: 0; width: 100%;
  object-fit: contain;
  opacity: 0; transition: opacity .18s ease;
}
.wv-bar {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 14px 18px;
}
.wv-btn {
  min-width: 96px; height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid rgba(130, 170, 255, .38);
  background: rgba(20, 34, 62, .88); color: #e8eefc;
  font: inherit; font-size: .92rem; cursor: pointer;
}
.wv-btn:active { background: rgba(46, 74, 128, .92); }
.wv-close { border-color: rgba(255, 130, 130, .5); }
@media (max-width: 720px) {
  .wv-btn { min-width: 84px; padding: 0 10px; }
}

/* ============================================================
   16. v2.8.5：视频「放映厅」扩展件（点赞 / 收藏 / 自动连播 / 收藏夹 / 点赞榜）
   —— 复用 .bp-layer / .bp-stage / .bp-bar（见 14.2），这里只补新增控件。
   老 WebView 兼容：不用 inset / :is / :where / :has / aspect-ratio。
   ============================================================ */
.bp-top {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(10, 16, 32, .95);
  border-bottom: 1px solid rgba(120, 160, 255, .22);
}
.bp-counter { flex: none; color: #9fb3d6; font-size: .85rem; }
.bp-mini {
  flex: none; height: 38px; padding: 0 12px;
  border-radius: 10px; border: 1px solid rgba(130, 170, 255, .38);
  background: rgba(20, 34, 62, .88); color: #e8eefc;
  font: inherit; font-size: .86rem; cursor: pointer;
}
.bp-mini:active { background: rgba(46, 74, 128, .92); }
.bp-mini[hidden] { display: none; }

/* 上滑/下滑提示：进入后展示 5 秒自动淡出，不挡画面也不吃点击 */
.bp-hint {
  position: absolute; left: 50%; top: 12px;
  margin-left: -78px; width: 156px; text-align: center;
  padding: 4px 0; border-radius: 999px;
  background: rgba(10, 16, 32, .62); color: rgba(232, 238, 252, .78);
  font-size: .76rem; pointer-events: none;
  animation: bpHintFade 5s ease forwards;
}
@keyframes bpHintFade { 0%, 62% { opacity: 1; } 100% { opacity: 0; } }

/* 右侧竖排操作条：点赞 / 收藏 / 自动连播 */
.bp-rail {
  position: absolute; right: 12px; top: 50%;
  margin-top: -132px;
  display: flex; flex-direction: column; gap: 12px; z-index: 3;
}
.bp-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 78px; padding: 10px 4px;
  border-radius: 14px; border: 1px solid rgba(150, 190, 255, .34);
  background: rgba(10, 18, 36, .62); color: #e8eefc;
  font: inherit; cursor: pointer;
}
.bp-act:active { background: rgba(46, 74, 128, .9); }
.bp-act i { font-style: normal; font-size: 1.34rem; line-height: 1.1; }
.bp-act b { font-weight: 600; font-size: .72rem; }
.bp-act.on { border-color: transparent; color: #fff; }
.bp-act.on[data-bp="like"] { background: linear-gradient(135deg, #ff4d6d, #ff7a45); }
.bp-act.on[data-bp="fav"] { background: linear-gradient(135deg, #ffb020, #ff8a00); }
.bp-act.on[data-bp="auto"] { background: linear-gradient(135deg, #2f6bff, #21c1a0); }

/* 收藏夹 / 点赞排行榜面板：铺满播放层，内部独立滚动 */
.bp-panel {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 6; display: flex; flex-direction: column;
  background: rgba(6, 10, 22, .97);
}
.bp-panel[hidden] { display: none; }
.bp-p-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid rgba(120, 160, 255, .22);
  color: #e8eefc;
}
.bp-p-head b { font-size: .98rem; }
.bp-p-tip { flex: 1; min-width: 0; color: #9fb3d6; font-size: .8rem; }
.bp-p-list {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 10px 18px;
}
.bp-p-empty { padding: 26px 10px; text-align: center; color: #9fb3d6; font-size: .9rem; }
.bp-p-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; margin-bottom: 6px;
  border-radius: 12px; border: 1px solid rgba(90, 130, 200, .24);
  background: rgba(16, 26, 48, .72); color: #e8eefc;
  font: inherit; text-align: left; cursor: pointer;
}
.bp-p-row:active { background: rgba(46, 74, 128, .86); }
.bp-p-no { flex: none; width: 34px; text-align: center; color: #8fa6cc; font-size: .82rem; }
.bp-p-thumb {
  flex: none; display: block; width: 78px; height: 48px;
  border-radius: 8px; object-fit: cover; background: #0b1020;
}
.bp-p-ph { display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.bp-p-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-p-txt b {
  font-size: .9rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-p-txt i {
  font-style: normal; font-size: .74rem; color: #8fa6cc;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-p-like { flex: none; color: #ffb3c1; font-size: .8rem; }

/* 首页「上滑加载更多」哨兵：滑到底自动续页（小姐姐板块 470 个视频靠它全部露出） */
.load-more {
  margin: 14px 0 26px; padding: 14px 10px;
  text-align: center; font-size: .86rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 12px; cursor: pointer;
}
.load-more:active { border-color: var(--accent); color: var(--accent); }

/* 分类条上的「授权码」胶囊（跟在『股东专属』后面，点击复制） */
.cats .cat.cat-code {
  border-color: rgba(255, 176, 32, .55);
  background: rgba(58, 40, 8, .62);
  color: #ffd591;
}
.cats .cat.cat-code:hover { border-color: rgba(255, 176, 32, .95); }
.cats .cat.cat-code .cat-copy {
  font-size: .72rem; padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 176, 32, .22); color: #ffe0a8;
}

/* 底部操作条：不写行内 min-width，统一在这里控（窄屏居中换行，能摆成整齐的两行） */
.bp-bar { justify-content: center; }
.bp-bar [data-bp="prev"], .bp-bar [data-bp="next"] { min-width: 104px; }
.bp-bar [data-bp="download"] { min-width: 152px; }
.bp-bar [data-bp="close"] { min-width: 88px; }

@media (max-width: 720px) {
  .bp-top { flex-wrap: wrap; row-gap: 8px; }
  .bp-name { flex-basis: 100%; }
  .bp-mini { height: 34px; padding: 0 10px; font-size: .8rem; }
  .bp-rail { width: 68px; right: 8px; margin-top: -120px; }
  .bp-act { width: 66px; padding: 8px 2px; }
  .bp-act i { font-size: 1.2rem; }
  .bp-bar { padding: 8px 8px 12px; gap: 8px; }
  .bp-bar .btn { padding: 0 8px; font-size: .88rem; }
  .bp-bar [data-bp="prev"], .bp-bar [data-bp="next"] { min-width: 84px; }
  .bp-bar [data-bp="download"] { min-width: 120px; }
  .bp-bar [data-bp="close"] { min-width: 72px; }
  .cats .cat.cat-code .cat-copy { display: none; }
  .bp-p-no { width: 26px; }
  .bp-p-thumb { width: 64px; height: 40px; }
}

/* ============================================================
   17. v2.8.6：放映厅「全屏播放 + 3 秒自动隐藏图标」
   需求：① 界面要能真正全屏播放（站点自己的顶栏 / 右上「☰ 展开」浮动按钮 /
            批量操作条都不能压在视频上）；
         ② 3 秒没有操作就把所有图标收起来，只看视频；
         ③ 再点一下屏幕，所有图标回来。
   老 WebView 兼容：只切 class + opacity/visibility，不用 inset / :is / :where / :has。
   ============================================================ */

/* 17.1 播放期间收掉站点自身的浮动件 —— 它们 z-index（60/68）高于播放层，
   不收掉就会出现「视频上飘着一个『展开』按钮」的假全屏。 */
body.bp-open .topbar { visibility: hidden !important; }
body.bp-open .tb-expand,
body.bp-open .cv-batch-bar { display: none !important; }

/* 17.2 图标显隐：用过渡 + opacity，不用 display，
   这样底栏占位不变、视频不会因为「图标一隐就没」而反复重排（老车机很敏感）。 */
.bp-layer .bp-top,
.bp-layer .bp-bar,
.bp-layer .bp-rail,
.bp-layer .bp-hint {
  transition: opacity .26s ease;
}
.bp-layer.bp-immersive .bp-top,
.bp-layer.bp-immersive .bp-bar,
.bp-layer.bp-immersive .bp-rail,
.bp-layer.bp-immersive .bp-hint {
  opacity: 0;
  pointer-events: none; /* 隐藏后点击直接落到画面上（用来把图标唤回来） */
}

/* 17.3 沉浸态给画面加一层极淡的暗角，视觉上更容易分辨「已进入全屏」 */
.bp-layer.bp-immersive .bp-stage::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .38) 100%);
}

@media (max-width: 720px) {
  .bp-top .bp-mini { height: 34px; padding: 0 9px; font-size: .78rem; }
}
