/* 全局：hidden 属性永远生效 */
[hidden]{display:none !important}
:root{
  color-scheme:dark;
  --bg:#101513; --surface:#171e1b; --surface2:#202925;
  --text:#f4f6f2; --muted:#9aa59e; --line:#2c3731;
  --green:#b8ef74; --red:#f08484; --nav-h:66px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans SC",sans-serif;
  background:var(--bg); color:var(--text);
}
*{box-sizing:border-box}
body{
  margin:0;min-height:100vh;
  background:radial-gradient(ellipse at 15% -12%,#2f4436 0,transparent 38%),var(--bg);
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
button,input{font:inherit}
button{color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
a{-webkit-tap-highlight-color:transparent}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:6;height:58px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 max(16px,calc((100vw - 1040px)/2));
  border-bottom:1px solid #ffffff12;
  background:#101513cc;backdrop-filter:blur(14px);
}
.brand{display:flex;align-items:center;gap:9px;color:var(--text);text-decoration:none;font-weight:700;font-size:16px}
.brand-mark{
  width:28px;height:28px;border-radius:9px;background:var(--green);
  color:#162014;display:grid;place-items:center;font-size:12px;
}
.top-actions{display:flex;gap:8px}
.icon-button{
  width:36px;height:36px;border-radius:10px;font-size:19px;line-height:1;
  border:1px solid var(--line);background:var(--surface);
}

/* ---------- 主体 ---------- */
main{max-width:1040px;margin:0 auto;padding:22px 16px 30px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:4px 0 18px}
.eyebrow{margin:0 0 5px;color:var(--green);font-size:10px;letter-spacing:1.4px;font-weight:700}
.section-head h1{margin:0;font-size:26px;line-height:1.15}
.update-stamp{font-size:11px;color:var(--muted);white-space:nowrap}

.search-row{display:flex;gap:8px;max-width:620px;margin:0 auto 16px}
.search-row input{
  flex:1;min-width:0;height:44px;padding:0 14px;
  border:1px solid var(--line);border-radius:12px;
  background:var(--surface);color:var(--text);font-size:15px;
}
.search-row button{
  width:46px;border:0;border-radius:12px;
  background:var(--green);color:#182016;font-size:20px;font-weight:700;
}
.search-row #clearSearch{background:var(--surface2);color:var(--text);font-size:18px}

/* ---------- 筛选 ---------- */
.filters{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.filter-bar{display:flex;gap:8px}
.filter-trigger{
  display:flex;align-items:center;gap:7px;padding:9px 13px;border-radius:11px;
  border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:13px;
  max-width:48%;
}
.filter-trigger .ft-label{color:var(--muted);font-size:12px}
.filter-trigger .ft-value{font-weight:600;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filter-trigger .ft-caret{color:var(--muted);font-size:11px}
.filter-trigger.active{border-color:var(--green);background:#1d2a1e;color:var(--green)}
.picker-sheet{max-width:520px}
.picker-search{
  width:100%;height:40px;margin-bottom:12px;padding:0 12px;border-radius:10px;
  border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:14px;
}
.picker-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
  max-height:52vh;overflow-y:auto;padding-right:2px;
}
.picker-item{
  padding:10px 8px;border-radius:9px;border:1px solid var(--line);background:var(--surface);
  color:var(--text);font-size:12px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.picker-item.on{background:var(--green);border-color:var(--green);color:#182016;font-weight:700}
.picker-empty{grid-column:1/-1;text-align:center;color:var(--muted);font-size:13px;padding:20px 0}
.filter-chip{
  flex:0 0 auto;padding:6px 12px;border-radius:999px;font-size:12px;white-space:nowrap;
  border:1px solid var(--line);background:transparent;color:var(--muted);
}
.filter-chip[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:#182016;font-weight:700}
.year-row{border-top:1px solid #ffffff0d;padding-top:8px}

/* ---------- 状态 ---------- */
.status{min-height:20px;margin:2px 0 12px;font-size:12px;color:var(--muted)}
.status.error{color:var(--red)}
.status.loading::before{
  content:'';display:inline-block;width:9px;height:9px;margin-right:7px;
  border:2px solid #ffffff30;border-top-color:var(--green);border-radius:50%;
  animation:spin .7s linear infinite;vertical-align:-1px;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- 卡片网格：手机一排三个 ---------- */
.poster-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px}
.poster-card{min-width:0;cursor:pointer}
.poster{
  position:relative;aspect-ratio:2/3;border-radius:9px;overflow:hidden;
  background:linear-gradient(150deg,#24342c,#3a4535 55%,#332c25);
}
.poster img{width:100%;height:100%;object-fit:cover;display:block}
.poster .placeholder{
  height:100%;display:grid;place-items:center;padding:10px;
  font-size:14px;font-weight:700;line-height:1.4;text-align:center;color:#e6ecd8;
}
.poster::after{
  content:'';position:absolute;inset:52% 0 0;pointer-events:none;
  background:linear-gradient(transparent,#080c0ba6);
}
.poster-tag{
  position:absolute;top:6px;left:6px;z-index:1;max-width:82%;
  padding:3px 6px;border-radius:5px;font-size:9px;overflow:hidden;
  white-space:nowrap;text-overflow:ellipsis;
  background:#101513c9;border:1px solid #ffffff26;
}
.poster-score{position:absolute;right:6px;bottom:6px;z-index:1;font-size:9px;color:var(--green)}
.card-title{
  margin:7px 1px 2px;font-size:12px;font-weight:600;line-height:1.4;min-height:34px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.card-meta{
  margin:0 1px;font-size:10px;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.load-more{
  display:block;margin:24px auto 0;padding:10px 28px;border-radius:11px;
  background:var(--surface2);border:1px solid var(--line);font-size:13px;
}
.load-more[hidden]{display:none}
.empty{grid-column:1/-1;padding:48px 14px;text-align:center;color:var(--muted);font-size:13px}
.empty strong{display:block;margin-bottom:7px;color:var(--text);font-size:15px}

/* ---------- 底部导航 ---------- */
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:8;
  height:calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding:5px 4px env(safe-area-inset-bottom);
  display:grid;grid-template-columns:repeat(4,1fr);
  background:#151b18f4;border-top:1px solid var(--line);backdrop-filter:blur(16px);
}
.bottom-nav a{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--muted);text-decoration:none;font-size:10px;
}
.bottom-nav a[aria-current="page"]{color:var(--green);font-weight:700}
.adult-nav{color:#e88fa8}
.adult-nav[aria-current="page"]{color:#ff9ab5}
.nav-icon{font-size:18px;line-height:20px;height:20px}
.adult-nav .nav-icon{font-size:14px;font-weight:700;letter-spacing:-.5px}

/* ---------- 弹层 ---------- */
.sheet{
  width:min(520px,calc(100% - 24px));max-height:min(80vh,640px);
  padding:18px;border-radius:15px;border:1px solid var(--line);
  background:#171e1b;color:var(--text);
}
.sheet::backdrop{background:#030605b8;backdrop-filter:blur(3px)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.sheet-head h2{margin:0;font-size:17px}
.sheet-list{display:grid;gap:8px;overflow-y:auto;max-height:56vh}
.source-option{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px;border-radius:10px;text-align:left;
  border:1px solid var(--line);background:var(--surface);
}
.source-option strong{font-size:13px;display:block}
.source-option small{display:block;margin-top:3px;font-size:10px;color:var(--muted)}
.quality{font-size:11px;color:var(--green);white-space:nowrap}

/* ---------- 密码门 ---------- */
.gate{position:fixed;inset:0;z-index:40;display:grid;place-items:center;padding:22px;background:var(--bg)}
.gate[hidden]{display:none}
.gate-form{width:min(340px,100%);display:grid;gap:10px}
.gate-form h1{margin:6px 0 0;font-size:24px}
.gate-sub{margin:0 0 8px;font-size:12px;color:var(--muted)}
.gate-form label{font-size:12px;color:var(--muted)}
.gate-form input{
  height:46px;padding:0 13px;border-radius:10px;
  border:1px solid var(--line);background:var(--surface);color:var(--text);
}
.gate-form button{height:44px;border:0;border-radius:10px;background:var(--green);color:#182016;font-weight:700}
.gate-form p{font-size:12px;color:var(--red)}
.gate-form p[hidden]{display:none}

/* ---------- 响应式 ---------- */
@media(min-width:540px){
  main{padding-top:30px}
  .section-head h1{font-size:30px}
  .poster-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 14px}
  .card-title{font-size:13px}
}
@media(min-width:820px){
  .poster-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:22px 16px}
  .bottom-nav{
    left:50%;right:auto;transform:translateX(-50%);
    width:min(500px,calc(100% - 28px));bottom:12px;height:60px;
    padding:4px;border:1px solid var(--line);border-radius:14px;background:#151b18f5;
  }
  body{padding-bottom:90px}
}
@media(prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;transition-duration:.01ms !important}
}

/* 18+ 密码弹窗 */
.pin-sheet{max-width:360px}
.pin-form{display:grid;gap:10px}
.pin-form label{font-size:12px;color:var(--muted)}
.pin-form input{height:44px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text)}
.pin-form button{height:42px;border:0;border-radius:10px;background:var(--green);color:#182016;font-weight:700}
.pin-form p{font-size:12px;color:var(--red);margin:0}
.pin-form p[hidden]{display:none}

/* 继续查找按钮 */
.continue-row{display:flex;justify-content:center;margin:-4px 0 14px}
.continue-btn{
  min-width:180px;padding:10px 22px;border-radius:999px;font-size:13px;font-weight:600;
  border:1px solid var(--line);background:var(--surface);color:var(--text);
}
.continue-btn:active{background:var(--surface2)}
.continue-btn.busy{color:var(--green);border-color:var(--green)}
.continue-btn.done{color:var(--muted);border-style:dashed}

/* ---------- 收藏夹 ---------- */
.fav-sheet{max-width:560px}
.fav-collections{display:flex;gap:8px;overflow-x:auto;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid var(--line)}
.fav-collections::-webkit-scrollbar{display:none}
.fav-chip{
  flex:0 0 auto;padding:8px 13px;border-radius:999px;font-size:12px;
  border:1px solid var(--line);background:var(--surface);color:var(--muted);white-space:nowrap;
}
.fav-chip.on{background:var(--green);border-color:var(--green);color:#182016;font-weight:700}
.fav-chip .n{opacity:.7;margin-left:4px;font-size:11px}
.new-fav{
  width:100%;padding:10px;border-radius:10px;font-size:13px;
  border:1px dashed var(--line);background:transparent;color:var(--muted);margin-bottom:12px;
}
.fav-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px;max-height:46vh;overflow-y:auto}
.fav-card{position:relative;cursor:pointer}
.fav-card .poster{aspect-ratio:2/3}
.fav-card .card-title{font-size:11px;min-height:30px}
.fav-del{
  position:absolute;top:5px;right:5px;z-index:2;width:22px;height:22px;border-radius:50%;
  border:0;background:#000000b0;color:#fff;font-size:13px;line-height:1;
}
.fav-empty{grid-column:1/-1;padding:30px 10px;text-align:center;color:var(--muted);font-size:13px}
/* 卡片收藏星标 */
.card-fav{
  position:absolute;top:5px;right:5px;z-index:2;width:26px;height:26px;border-radius:50%;
  border:1px solid #ffffff2e;background:#0b0f0dbb;color:#fff;font-size:14px;line-height:1;
  display:grid;place-items:center;
}
.card-fav.on{color:var(--green);border-color:var(--green);background:#0b0f0de6}

/* ---------- 浏览记录 ---------- */
.his-card{
  display:flex;align-items:center;gap:11px;padding:9px;border-radius:11px;
  border:1px solid var(--line);background:var(--surface);position:relative;
}
.his-thumb{
  position:relative;width:62px;height:62px;flex:0 0 62px;border-radius:8px;overflow:hidden;
  background:linear-gradient(140deg,#26372e,#3d4a36);display:grid;place-items:center;
  font-size:20px;font-weight:700;color:#e7ecd7;
}
.his-thumb img{width:100%;height:100%;object-fit:cover}
.his-thumb i{position:absolute;left:0;bottom:0;height:3px;background:var(--green);display:block}
.his-info{flex:1;min-width:0}
.his-info strong{display:block;font-size:13px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.his-info small{display:block;margin-top:4px;color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.his-info em{display:inline-block;margin-top:5px;font-style:normal;font-size:10px;color:var(--green)}
.his-del{
  position:absolute;right:6px;top:6px;width:22px;height:22px;border-radius:50%;
  border:1px solid var(--line);background:#12171590;color:var(--muted);font-size:13px;line-height:1;
}
#historyItems{display:grid;gap:8px;max-height:56vh;overflow-y:auto}
#favItems{max-height:44vh}

/* ---------- 细节打磨 ---------- */
.topbar{height:56px}
.icon-button{width:38px;height:38px;font-size:17px}
.brand{font-size:17px}
.section-head{margin:2px 0 16px}
.section-head h1{letter-spacing:.3px}
.search-row input{height:46px;font-size:15px}
.continue-btn{padding:11px 24px}
.filter-trigger{padding:10px 14px}
.poster-card:active .poster{transform:scale(.97)}
.poster{transition:transform .12s ease}
.card-meta{line-height:1.5}
.sheet{border-radius:16px;box-shadow:0 18px 50px #00000066}
@media(max-width:380px){
  .poster-grid{gap:15px 8px}
  .card-title{font-size:11px;min-height:32px}
}

/* ---------- 刷视频入口 ---------- */
.swipe-entry{
  display:none;width:100%;align-items:center;gap:12px;margin:0 0 14px;padding:14px;
  border-radius:14px;border:1px solid var(--line);text-align:left;
  background:linear-gradient(120deg,#26382d,#3d4a33 55%,#4a3b2b);color:#f4f6f2;
}
.swipe-entry[hidden]{display:none}
.swipe-entry:not([hidden]){display:flex}
.se-play{
  width:38px;height:38px;flex:0 0 38px;border-radius:50%;display:grid;place-items:center;
  background:var(--green);color:#182016;font-size:14px;
}
.se-text{flex:1;min-width:0}
.se-text strong{display:block;font-size:15px}
.se-text small{display:block;margin-top:3px;font-size:11px;color:#cbd6c8}
.se-arrow{font-size:20px;color:#cbd6c8}

/* ---------- 全屏竖滑 ---------- */
.feed{
  position:fixed;inset:0;z-index:70;background:#000;
  height:100dvh;overflow:hidden;touch-action:pan-y;
}
.feed[hidden]{display:none}
.feed-slides{position:absolute;inset:0}
.feed-slide{
  position:absolute;inset:0;display:none;align-items:center;justify-content:center;
  background:#000;
}
.feed-slide.on{display:flex}
.feed-slide video{width:100%;height:100%;object-fit:contain;background:#000}
.feed-slide .slide-err{
  position:absolute;inset:0;display:grid;place-items:center;gap:8px;
  color:#cbd6c8;font-size:13px;text-align:center;padding:24px;background:#0b0f0d;
}
.feed-top{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;padding:12px 14px;z-index:3}
.feed-icon{
  width:36px;height:36px;border-radius:50%;border:1px solid #ffffff33;
  background:#00000066;color:#fff;font-size:17px;line-height:1;backdrop-filter:blur(6px);
}
.feed-side{
  position:absolute;right:10px;bottom:120px;z-index:3;display:flex;flex-direction:column;gap:16px;
}
.feed-action{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  background:transparent;border:0;color:#fff;font-size:12px;
}
.feed-action span{
  width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  background:#00000066;border:1px solid #ffffff33;font-size:19px;backdrop-filter:blur(6px);
}
.feed-action.on span{background:var(--green);color:#182016;border-color:var(--green)}
.feed-meta{position:absolute;left:14px;right:90px;bottom:40px;z-index:3;color:#fff}
.feed-meta h3{margin:0;font-size:14px;font-weight:600;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.feed-meta p{margin:6px 0 0;font-size:11px;color:#cbd6c8}
.feed-hint{
  position:absolute;left:50%;bottom:12px;transform:translateX(-50%);
  font-size:11px;color:#ffffff8c;z-index:3;transition:opacity .4s;
}
.feed-ad{
  position:absolute;left:14px;top:14px;z-index:3;
  padding:4px 8px;border-radius:6px;background:#e8894b;color:#1a1108;font-size:10px;font-weight:700;
}

.feed-top-right{display:flex;gap:8px}
.feed-ad-btn{width:auto;padding:0 12px;font-size:12px;border-radius:18px}
.feed-ad-btn.off{color:#cbd6c8;opacity:.7}

.feed-bar{
  position:absolute;left:12px;right:12px;bottom:10px;z-index:4;
  display:flex;align-items:center;gap:8px;color:#fff;font-size:11px;
}
.feed-bar input[type=range]{
  flex:1;-webkit-appearance:none;height:3px;border-radius:3px;background:#ffffff45;outline:none;
}
.feed-bar input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:var(--green);
}
.feed-icon.small{width:30px;height:30px;font-size:13px}
.feed-meta{bottom:44px}

.scan-link{
  display:block;width:max-content;margin:26px auto 90px;padding:7px 14px;
  font-size:11px;color:var(--muted);text-decoration:none;
  border:1px solid var(--line);border-radius:999px;background:var(--surface);
}

/* ---------- 回到顶部 ---------- */
.to-top{
  position:fixed;right:14px;bottom:86px;z-index:30;
  width:42px;height:42px;border-radius:50%;
  border:1px solid var(--line);background:#171e1bf0;color:var(--green);
  font-size:17px;line-height:1;backdrop-filter:blur(8px);
  box-shadow:0 6px 20px #00000066;
}
.to-top[hidden]{display:none}

/* ---------- 18+ 锁标 ---------- */
.nav-lock{font-style:normal;font-size:9px;margin-left:2px;opacity:.75}

/* ---------- 卡片已看标记 ---------- */
.card-watched{
  position:absolute;left:6px;bottom:6px;z-index:3;
  padding:2px 6px;border-radius:5px;font-size:9px;font-weight:600;
  background:#0d1210cc;color:var(--green);backdrop-filter:blur(4px);
}

/* ---------- 骨架屏 ---------- */
.skeleton{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 10px;padding-bottom:10px}
.sk-card{border-radius:10px;overflow:hidden;background:var(--surface);border:1px solid var(--line)}
.sk-poster{aspect-ratio:2/3;background:linear-gradient(100deg,#1b2320 30%,#243029 50%,#1b2320 70%);
  background-size:220% 100%;animation:sk 1.3s infinite linear}
.sk-line{height:10px;margin:8px 8px 0;border-radius:4px;background:#232c27}
.sk-line.short{width:55%;margin-bottom:10px}
@keyframes sk{0%{background-position:120% 0}100%{background-position:-120% 0}}

/* ---------- 搜索历史 ---------- */
.search-history{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 12px}
.sh-chip{
  padding:6px 11px;border-radius:999px;font-size:12px;
  border:1px solid var(--line);background:var(--surface);color:#dfe6db;
}
.sh-chip.clear{color:var(--muted);border-style:dashed}

/* ---------- 弹层头部动作 ---------- */
.sheet-head-actions{display:flex;align-items:center;gap:8px}
.text-btn{
  background:transparent;border:1px solid var(--line);border-radius:8px;
  color:var(--muted);font-size:12px;padding:5px 10px;
}

/* ---------- 导航高亮 ---------- */
.bottom-nav a.active{color:var(--green)}
.bottom-nav a.active .nav-icon{background:#1f2a22;border-color:#3f5a3d}

.picker-group{
  grid-column:1/-1;margin:10px 0 2px;font-size:10px;letter-spacing:.08em;
  color:var(--muted);text-transform:uppercase;
}
.picker-group:first-of-type{margin-top:2px}

.fav-chip-wrap{display:flex;align-items:center;gap:6px}
.fav-edit{
  width:26px;height:26px;border-radius:8px;flex:0 0 26px;
  border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:12px;
}
.fav-edit.del{color:var(--red);border-color:#4a2b2b}

/* ---------- 浅色主题 ---------- */
[data-theme="light"]{
  color-scheme:light;
  --bg:#f5f7f2; --surface:#ffffff; --surface2:#eef2e9;
  --text:#1b211d; --muted:#6b7770; --line:#d8e0d4;
  --green:#3f7d24; --red:#c0392b;
}
[data-theme="light"] body{
  background:radial-gradient(ellipse at 15% -12%,#dcecd2 0,transparent 38%),var(--bg);
}
[data-theme="light"] .topbar{background:#f5f7f2e0;border-bottom-color:#00000012}
[data-theme="light"] .bottom-nav{background:#ffffffe8;border-top-color:#00000012}
[data-theme="light"] .poster{background:#e7ece2}
[data-theme="light"] .sheet{background:#ffffff;border-color:var(--line)}
[data-theme="light"] .picker-item,[data-theme="light"] .fav-chip,[data-theme="light"] .sh-chip{
  background:#eef2e9;color:var(--text);border-color:var(--line)
}
[data-theme="light"] .card-watched{background:#ffffffd0;color:#3f7d24}
[data-theme="light"] .to-top{background:#fffffff0;border-color:var(--line)}

/* ---------- 图标统一 ---------- */
.icon-button{width:42px;height:42px;display:grid;place-items:center;border-radius:12px}
.icon-button svg{width:19px;height:19px;display:block}
.top-actions{gap:6px}
.bottom-nav .nav-icon{display:grid;place-items:center;width:22px;height:22px;margin:0 auto}
.bottom-nav .nav-icon svg{width:21px;height:21px;display:block}
.bottom-nav a{position:relative}
.bottom-nav a.active::after{
  content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:18px;height:2px;border-radius:2px;background:var(--green);
}

/* ---------- 首屏层级精简 ---------- */
.section-head{display:flex;align-items:baseline;gap:10px;margin:4px 0 14px}
.section-head h1{font-size:24px;letter-spacing:.2px;margin:0}
.update-stamp{font-size:11px;color:var(--muted)}

/* ---------- 状态文案弱化 ---------- */
.status{font-size:11.5px;color:var(--muted);opacity:.9;margin:0 0 10px}

/* ---------- 绿色收敛 ---------- */
.filter-trigger{background:var(--surface2)}
.filter-trigger.active{background:#22331f;border-color:#3f5a3d;color:var(--green)}
.continue-btn{background:var(--surface2);color:var(--text);border-color:var(--line)}
.continue-btn.running{background:#22331f;border-color:#3f5a3d;color:var(--green)}

/* ---------- 卡片层次 ---------- */
.card-title{font-size:12px;line-height:1.42;font-weight:500}
.poster-score{background:#0d121099;color:#d7e2d2;font-size:9.5px;padding:2px 5px}
.card-fav{width:30px;height:30px;font-size:16px}

/* ---------- 修复：display 压过了 [hidden] ---------- */
.skeleton[hidden]{display:none !important}
.search-history[hidden]{display:none !important}

/* ---------- 视觉统一：圆角 / 间距 / 层级 ---------- */
:root{
  --r-sm:10px; --r-md:14px; --r-lg:18px;
  --sp-1:6px; --sp-2:10px; --sp-3:14px; --sp-4:20px;
}

/* 弹层统一 */
.sheet{border-radius:var(--r-lg);border:1px solid var(--line)}
.sheet-head{margin-bottom:var(--sp-3);padding-bottom:var(--sp-2);border-bottom:1px solid var(--line)}
.sheet-head h2{font-size:17px}
.sheet-head .eyebrow{color:var(--muted);font-size:9.5px;letter-spacing:1.6px}

/* 空状态：给一个图标位，不再只有两行字 */
.empty{padding:56px 16px;line-height:1.7}
.empty::before{
  content:"◎";display:block;font-size:30px;color:var(--line);
  margin-bottom:10px;
}
.empty strong{font-size:14px;margin-bottom:6px}

/* 卡片：图片圆角与卡片一致，按压更有质感 */
.poster{border-radius:var(--r-sm);box-shadow:0 2px 10px #00000033}
.poster-card:active .poster{transform:scale(.975);box-shadow:0 1px 4px #00000040}
.card-title{color:#e9eee6}
[data-theme="light"] .card-title{color:#2a332c}

/* 底部导航：图标与文字节奏统一 */
.bottom-nav a{gap:3px;padding:6px 0 8px;font-size:11px}
.bottom-nav a.active{font-weight:600}

/* 搜索框按钮与输入框等高 */
.search-row input{height:46px}
.search-row button{height:46px;border-radius:var(--r-sm)}

/* 筛选栏三个按钮等宽等高，不再长短不一 */
.filter-bar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.filter-trigger{justify-content:space-between}
.filter-trigger.skip-trigger[hidden]{display:none !important}
.filter-bar:not(:has(.skip-trigger:not([hidden]))){grid-template-columns:1fr 1fr}

/* ---------- 刷视频：角标移除 + 顶部按钮不再重叠 ----------
   （原先橙色「已去广告」固定在左上，和关闭按钮压在一起） */
.feed-ad{display:none !important}
.feed-top{padding:12px 14px;gap:8px}
.feed-top-right{gap:8px}
.feed-ad-btn{min-width:64px;text-align:center}

/* ---------- 筛选栏防吞字 ---------- */
.filter-trigger{min-width:0;gap:6px;padding:10px 11px;overflow:hidden}
.filter-trigger .ft-label{
  flex:0 0 auto;font-size:10px;color:var(--muted);letter-spacing:.04em;
}
.filter-trigger .ft-value{
  flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-align:left;font-size:12.5px;
}
.filter-trigger .ft-caret{flex:0 0 auto;font-size:10px;color:var(--muted);opacity:.8}
@media(max-width:400px){
  .filter-trigger .ft-label{display:none}
  .filter-trigger{padding:10px 8px;justify-content:center}
  .filter-trigger .ft-value{text-align:center}
}

/* ---------- 筛选栏：标签在上、值在下，完整显示不截断 ---------- */
.filter-trigger{
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  gap:2px;padding:8px 24px 8px 11px;position:relative;min-width:0;overflow:visible;
}
.filter-trigger .ft-label{
  display:block;flex:none;font-size:9px;line-height:1;letter-spacing:.06em;
  color:var(--muted);white-space:nowrap;
}
.filter-trigger .ft-value{
  display:block;flex:none;font-size:13px;line-height:1.25;font-weight:600;
  white-space:nowrap;overflow:visible;text-overflow:clip;text-align:left;
}
.filter-trigger .ft-caret{
  position:absolute;right:9px;top:50%;transform:translateY(-50%);
  font-size:10px;color:var(--muted);opacity:.75;
}
@media(max-width:400px){
  .filter-trigger{padding:8px 20px 8px 9px}
  .filter-trigger .ft-label{display:block}   /* 不再隐藏，改成两行显示 */
  .filter-trigger .ft-value{font-size:12.5px}
}

/* ---------- 禁止长按视频弹出系统菜单（会挡住画面） ---------- */
video,.feed-slide,#player,.player-container{
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
.feed-slide{-webkit-tap-highlight-color:transparent}
#feedSpeed span{font-size:13px;font-weight:700}

/* ---------- 刷视频长按加速提示 ---------- */
.boost-badge{
  position:fixed;left:50%;top:24%;transform:translateX(-50%);z-index:80;
  padding:9px 18px;border-radius:999px;
  background:#000000c4;color:var(--green);
  font-size:13px;font-weight:700;letter-spacing:.02em;
  border:1px solid #3f5a3d;backdrop-filter:blur(6px);
  pointer-events:none;
}
.feed .boost-badge{top:22%}

/* ---------- 筛选栏：横向一行（覆盖之前的上下两行） ---------- */
.filter-bar{
  display:flex;align-items:center;gap:8px;
  overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;
  padding-bottom:2px;
}
.filter-bar::-webkit-scrollbar{display:none}
.filter-trigger{
  flex:0 0 auto;display:inline-flex;flex-direction:row;align-items:center;
  gap:5px;padding:9px 12px;white-space:nowrap;overflow:visible;
}
.filter-trigger .ft-label{
  display:inline;flex:none;font-size:11px;line-height:1;letter-spacing:0;
  color:var(--muted);white-space:nowrap;
}
.filter-trigger .ft-value{
  display:inline;flex:none;font-size:13px;line-height:1;font-weight:600;
  white-space:nowrap;overflow:visible;text-overflow:clip;
}
.filter-trigger .ft-caret{
  position:static;transform:none;font-size:10px;color:var(--muted);opacity:.7;line-height:1;
}
@media(max-width:400px){
  .filter-trigger{padding:8px 10px}
  .filter-trigger .ft-label{display:inline;font-size:10.5px}
  .filter-trigger .ft-value{font-size:12.5px}
}

/* ================= 美化 第二批 ================= */

/* 1. 分类抽屉：选中项更明显，条目更像按钮 */
.picker-item{
  border-radius:var(--r-sm);
  transition:background .12s ease,border-color .12s ease,color .12s ease;
}
.picker-item.on{
  background:#22331f;border-color:#4a6b41;color:var(--green);font-weight:600;
  box-shadow:inset 0 0 0 1px #4a6b4155;
}
.picker-search{
  border-radius:var(--r-sm);height:42px;font-size:13px;
  background:var(--surface2);
}

/* 2. 收藏夹：卡片与选中态 */
.fav-chip{
  border-radius:var(--r-sm);padding:7px 12px;font-size:12.5px;
  transition:background .12s ease,border-color .12s ease;
}
.fav-chip.on{background:#22331f;border-color:#4a6b41;color:var(--green)}
.fav-card .poster{border-radius:var(--r-sm)}
.fav-card .card-title{font-size:11.5px}

/* 3. 收藏 / 历史 空状态 */
.fav-empty{
  padding:34px 16px;line-height:1.8;color:var(--muted);font-size:12.5px;
  border:1px dashed var(--line);border-radius:var(--r-md);
  background:#0d121040;
}
[data-theme="light"] .fav-empty{background:#f0f4ec}

/* 4. 状态栏：加载中给个小圆点，不再只是灰字 */
.status[data-state="loading"]::before{
  content:"";display:inline-block;width:6px;height:6px;border-radius:50%;
  background:var(--green);margin-right:6px;vertical-align:middle;
  animation:pulse 1.1s infinite ease-in-out;
}
@keyframes pulse{0%,100%{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}

/* 5. 弹层进场动画，减少突兀感 */
.sheet[open]{animation:sheetIn .18s ease-out}
@keyframes sheetIn{from{opacity:.4;transform:translateY(10px)}to{opacity:1;transform:none}}

/* 6. 继续查找按钮：主次更清晰 */
.continue-btn{
  border-radius:var(--r-sm);font-weight:600;letter-spacing:.02em;
}
.continue-btn.running::before{
  content:"";display:inline-block;width:7px;height:7px;border-radius:2px;
  background:var(--green);margin-right:7px;vertical-align:middle;
  animation:pulse 1s infinite;
}

/* 7. 刷视频侧栏按钮：加一层柔性背景，和深色视频区分 */
.feed-action span{box-shadow:0 2px 8px #00000055}
.feed-action:active span{transform:scale(.94)}

/* 8. 图片统一：圆角 + 淡入，避免生硬跳出 */
.poster img{animation:fadeIn .22s ease-out}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

/* ================= 美化 第三批 ================= */

/* 1. 卡片边缘微光：深色下不再发平 */
.poster{
  border:1px solid #ffffff0f;
  box-shadow:0 2px 10px #00000033, inset 0 0 0 1px #ffffff06;
}
.poster-card:hover .poster{border-color:#ffffff22}
[data-theme="light"] .poster{
  border-color:#00000010;box-shadow:0 2px 8px #00000012;
}

/* 2. 底部导航：选中时图标填充 + 轻微上浮 */
.bottom-nav a .nav-icon svg{transition:fill .15s ease,transform .15s ease}
.bottom-nav a.active .nav-icon svg{fill:currentColor;fill-opacity:.16;transform:translateY(-1px)}
.bottom-nav a.active{color:var(--green)}

/* 3. 首屏标题：加一条短装饰线，排版更稳 */
.section-head{position:relative;padding-left:0}
.section-head h1{
  font-size:25px;font-weight:800;letter-spacing:.3px;
  background:linear-gradient(100deg,var(--text) 30%,#9fb894 130%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
[data-theme="light"] .section-head h1{
  background:linear-gradient(100deg,#1b211d 30%,#4d6b47 130%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.section-head::after{
  content:"";display:block;position:absolute;left:0;bottom:-7px;
  width:34px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,var(--green),transparent);
}

/* 4. 分类抽屉：分组标签更克制 */
.picker-group{
  font-size:9.5px;letter-spacing:.14em;color:var(--muted);opacity:.8;
  margin:12px 0 4px;
}

/* 5. 加载更多按钮：与主按钮风格统一 */
.load-more{
  border-radius:var(--r-sm);font-size:13px;font-weight:600;
  border:1px solid var(--line);background:var(--surface2);color:var(--text);
}
.load-more:active{transform:scale(.98)}

/* ================= 美化 第四批 ================= */

/* 1. 弹层：毛玻璃 + 顶部高光，层次更清楚 */
.sheet{
  background:#161d1af2;
  backdrop-filter:blur(18px) saturate(120%);
  -webkit-backdrop-filter:blur(18px) saturate(120%);
  box-shadow:0 -8px 40px #00000059, inset 0 1px 0 #ffffff0d;
}
[data-theme="light"] .sheet{
  background:#ffffffF2;
  box-shadow:0 -8px 40px #00000018, inset 0 1px 0 #ffffffAA;
}

/* 2. 搜索框：聚焦有明确反馈 */
.search-row input{
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.search-row input:focus{
  border-color:#4a6b41;
  box-shadow:0 0 0 3px #b8ef7420;
  background:var(--surface2);
}

/* 3. 顶栏滚动后加深阴影，和内容分层 */
.topbar.scrolled{box-shadow:0 6px 24px #00000055}

/* 4. 图片未加载完时的底衬，避免空洞 */
.poster{background:linear-gradient(140deg,#1c2420,#232d26)}
[data-theme="light"] .poster{background:linear-gradient(140deg,#e8ede3,#dfe6d8)}

/* 5. 空结果：给一个可点的建议 */
.empty .empty-actions{
  display:flex;gap:8px;justify-content:center;margin-top:14px;flex-wrap:wrap;
}
.empty .empty-actions button{
  padding:8px 14px;border-radius:999px;font-size:12px;
  border:1px solid var(--line);background:var(--surface2);color:var(--text);
}

/* 6. 隐藏页面级滚动条（移动端更干净） */
html,body{scrollbar-width:none;-ms-overflow-style:none}
body::-webkit-scrollbar{display:none}

/* 7. 尊重系统减弱动效设置 */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;
    transition-duration:.01ms !important;}
}

/* 8. 卡片标题在两行时对齐更稳 */
.card-title{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:34px;
}

/* ---------- 内嵌播放浮层：列表页保持存活，可继续抓取 ---------- */
.player-overlay{
  position:fixed;inset:0;z-index:90;background:#0b0f0d;
  display:flex;flex-direction:column;
}
.player-overlay[hidden]{display:none !important}
.po-bar{
  display:flex;align-items:center;gap:10px;padding:10px 12px;
  background:#121816ee;border-bottom:1px solid var(--line);
}
.po-bar #poTitle{
  flex:1;min-width:0;font-size:13px;font-weight:600;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.po-close{
  padding:7px 14px;border-radius:9px;font-size:12px;font-weight:600;
  border:1px solid var(--line);background:var(--surface2);color:var(--text);
}
#playerFrame{flex:1;width:100%;border:0;background:#000}

/* 看完回来高亮那条 */
.poster-card.just-watched .poster{
  box-shadow:0 0 0 2px var(--green), 0 6px 20px #00000055;
}
.poster-card.just-watched{animation:pop .5s ease-out}
@keyframes pop{0%{transform:scale(.96)}100%{transform:scale(1)}}

/* ---------- 直播板块 ---------- */
.live-entry{background:linear-gradient(120deg,#3a1f22,#4a2b2b 55%,#3f2a20)}
.live-dot{color:#ff5c5c;animation:livePulse 1.6s infinite}
@keyframes livePulse{0%,100%{opacity:.45}50%{opacity:1}}
.live-panel{position:fixed;inset:0;z-index:88;background:var(--bg);display:flex;flex-direction:column}
.live-panel[hidden]{display:none !important}
.live-head{
  display:flex;align-items:center;gap:10px;padding:12px 14px;
  border-bottom:1px solid var(--line);background:var(--surface);
}
.live-head strong{font-size:15px}
.live-count{flex:1;font-size:11px;color:var(--muted)}
.live-grid{
  flex:1;overflow-y:auto;padding:14px;
  display:grid;grid-template-columns:repeat(2,1fr);gap:12px;
}
.live-card{
  border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;
  background:var(--surface);text-align:left;
}
.live-card .lc-poster{aspect-ratio:16/10;background:#1b2320 center/cover no-repeat;position:relative}
.live-card .lc-live{
  position:absolute;left:6px;top:6px;padding:2px 6px;border-radius:5px;
  background:#e23b3b;color:#fff;font-size:9px;font-weight:700;
}
.live-card h3{margin:0;padding:8px 9px;font-size:12px;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.live-empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:12.5px;line-height:1.8}
.live-empty strong{display:block;margin-bottom:8px;color:var(--text);font-size:14px}

.build-stamp{
  margin:22px auto 0;text-align:center;font-size:10px;color:var(--muted);opacity:.6;
}
