:root{
  --bg:#0b0f19;
  --bg2:#111725;
  --card:#161d2e;
  --card-hi:#1c2438;
  --line:rgba(255,255,255,.08);
  --txt:#e8edf7;
  --txt2:#93a0b8;
  --txt3:#63708a;
  --acc:#4d8cff;
  --acc2:#8b5cf6;
  --ok:#22c55e;
  --warn:#f59e0b;
  --r:16px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--txt);
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  min-height:100vh;
  padding:0 14px 40px;
  padding-bottom:calc(40px + env(safe-area-inset-bottom));
  overflow-x:hidden;
}
.bg-glow{
  position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(600px 380px at 15% -5%, rgba(77,140,255,.22), transparent 70%),
    radial-gradient(520px 340px at 90% 8%, rgba(139,92,246,.17), transparent 70%),
    radial-gradient(700px 500px at 50% 105%, rgba(34,197,94,.07), transparent 70%);
}
a{color:var(--acc);text-decoration:none}

/* ---------- 顶部 ---------- */
.top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:22px 2px 14px;
  max-width:880px;margin:0 auto;
}
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.logo{
  width:46px;height:46px;flex:0 0 auto;border-radius:14px;
  display:grid;place-items:center;font-size:24px;
  background:linear-gradient(140deg,#4d8cff,#8b5cf6);
  box-shadow:0 8px 22px -8px rgba(77,140,255,.75);
}
.brand-txt{min-width:0}
.brand-txt h1{margin:0;font-size:20px;font-weight:700;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-txt p{margin:1px 0 0;font-size:12px;color:var(--txt2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel{
  flex:0 0 auto;font-size:12px;color:var(--acc);
  background:rgba(77,140,255,.12);
  border:1px solid rgba(77,140,255,.28);
  padding:6px 11px;border-radius:999px;font-weight:600;
  white-space:nowrap;
}
.channel:empty{display:none}

/* ---------- 公告 ---------- */
.notice{
  max-width:880px;margin:0 auto 14px;
  display:flex;gap:9px;align-items:flex-start;
  background:linear-gradient(180deg,rgba(245,158,11,.13),rgba(245,158,11,.06));
  border:1px solid rgba(245,158,11,.26);
  border-radius:var(--r);padding:12px 14px;
  font-size:13px;color:#f2d9a8;line-height:1.65;
}
.notice-ico{flex:0 0 auto;font-size:15px;line-height:1.5}
.notice-txt{white-space:pre-wrap;word-break:break-word}

/* ---------- 搜索 ---------- */
.searchbar{
  position:sticky;top:0;z-index:30;
  max-width:880px;margin:0 auto;
  display:flex;align-items:center;gap:9px;
  background:rgba(17,23,37,.88);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:14px;
  padding:11px 14px;margin-bottom:12px;
  transition:border-color .18s, box-shadow .18s;
}
.searchbar:focus-within{
  border-color:rgba(77,140,255,.55);
  box-shadow:0 0 0 3px rgba(77,140,255,.14);
}
.search-ico{font-size:15px;opacity:.75;flex:0 0 auto}
.searchbar input{
  flex:1;min-width:0;background:none;border:0;outline:0;
  color:var(--txt);font-size:15px;font-family:inherit;
}
.searchbar input::placeholder{color:var(--txt3)}
.searchbar input::-webkit-search-cancel-button{display:none}
.q-clear{
  flex:0 0 auto;background:rgba(255,255,255,.09);border:0;color:var(--txt2);
  width:24px;height:24px;border-radius:50%;cursor:pointer;font-size:12px;
  display:grid;place-items:center;
}

/* ---------- 分类 chips ---------- */
.chips{
  max-width:880px;margin:0 auto 16px;
  display:flex;gap:8px;overflow-x:auto;
  padding-bottom:4px;scrollbar-width:none;
}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;font-size:13px;font-weight:600;
  color:var(--txt2);background:var(--card);
  border:1px solid var(--line);border-radius:999px;
  padding:7px 15px;cursor:pointer;transition:.15s;white-space:nowrap;
}
.chip.on{color:#fff;background:linear-gradient(140deg,#4d8cff,#6d7bfa);border-color:transparent;box-shadow:0 6px 16px -8px rgba(77,140,255,.9)}
.chip:active{transform:scale(.96)}

/* ---------- 分组 ---------- */
.list{max-width:880px;margin:0 auto}
.group{margin-bottom:26px}
.group-hd{
  display:flex;align-items:center;gap:9px;
  margin:0 0 11px 2px;
}
.group-hd .g-ico{font-size:16px}
.group-hd h2{margin:0;font-size:15px;font-weight:700;letter-spacing:.4px}
.group-hd .g-count{
  font-size:11px;color:var(--txt3);background:rgba(255,255,255,.06);
  padding:1px 7px;border-radius:999px;
}
.group-hd .g-line{flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}

/* ---------- 链接卡片 ---------- */
.cards{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:600px){.cards{grid-template-columns:1fr 1fr}}
@media(min-width:860px){.cards{grid-template-columns:repeat(3,1fr)}}

.card{
  position:relative;display:flex;align-items:center;gap:12px;
  background:linear-gradient(160deg,var(--card),var(--bg2));
  border:1px solid var(--line);border-radius:var(--r);
  padding:13px 14px;
  transition:transform .14s, border-color .16s, background .16s;
  overflow:hidden;
}
.card::after{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,#4d8cff,#8b5cf6);
  opacity:0;transition:opacity .16s;
}
.card:hover{border-color:rgba(77,140,255,.4);background:linear-gradient(160deg,var(--card-hi),var(--bg2))}
.card:hover::after{opacity:1}
.card:active{transform:scale(.985)}
.card.no-url{opacity:.55}
.card.no-url::after{background:linear-gradient(180deg,#63708a,#3d465c)}

.c-ico{
  flex:0 0 auto;width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;font-size:20px;
  background:rgba(77,140,255,.13);
  border:1px solid rgba(77,140,255,.2);
  overflow:hidden;
}
.c-ico img{width:100%;height:100%;object-fit:cover;border-radius:11px}
.c-body{min-width:0;flex:1}
.c-title{
  font-size:14.5px;font-weight:650;color:var(--txt);
  display:flex;align-items:center;gap:6px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.c-desc{
  font-size:12px;color:var(--txt2);margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.badge{
  flex:0 0 auto;font-size:10px;font-weight:700;letter-spacing:.3px;
  padding:1.5px 6px;border-radius:6px;line-height:1.5;
  background:rgba(77,140,255,.16);color:#8fb6ff;
  border:1px solid rgba(77,140,255,.3);
}
.badge.free{background:rgba(34,197,94,.15);color:#7ee2a8;border-color:rgba(34,197,94,.3)}
.badge.hot{background:rgba(239,68,68,.15);color:#ff9a9a;border-color:rgba(239,68,68,.3)}
.badge.new{background:rgba(245,158,11,.15);color:#fbcf76;border-color:rgba(245,158,11,.3)}
.c-go{flex:0 0 auto;color:var(--txt3);font-size:15px}
.card.no-url .c-go::before{content:"—";font-size:12px}
.card:not(.no-url) .c-go::before{content:"›";font-size:20px;line-height:1}

/* ---------- 视频卡片 ---------- */
.vgrid{display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:600px){.vgrid{grid-template-columns:1fr 1fr}}
@media(min-width:860px){.vgrid{grid-template-columns:repeat(3,1fr)}}

.vcard{
  background:linear-gradient(160deg,var(--card),var(--bg2));
  border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;cursor:pointer;
  transition:transform .14s, border-color .16s;
}
.vcard:hover{border-color:rgba(77,140,255,.45)}
.vcard:active{transform:scale(.985)}

.vthumb{
  position:relative;width:100%;aspect-ratio:16/9;
  background:#0a0e16;overflow:hidden;
  display:grid;place-items:center;
}
.vthumb img{width:100%;height:100%;object-fit:cover;display:block}
.v-ph{font-size:34px;opacity:.45}
.vplay{
  position:absolute;inset:0;margin:auto;
  width:48px;height:48px;border-radius:50%;
  display:grid;place-items:center;
  font-size:16px;color:#fff;
  background:rgba(0,0,0,.55);
  border:1.5px solid rgba(255,255,255,.65);
  backdrop-filter:blur(4px);
  transition:transform .16s, background .16s;
  padding-left:3px;
}
.vcard:hover .vplay{transform:scale(1.1);background:rgba(77,140,255,.8);border-color:#fff}
.vtime{
  position:absolute;right:7px;bottom:7px;
  font-size:11px;color:#fff;font-weight:600;
  background:rgba(0,0,0,.72);
  padding:1.5px 6px;border-radius:5px;
  letter-spacing:.3px;
}
.vbody{padding:11px 13px 13px}
.vtitle{
  font-size:14px;font-weight:650;line-height:1.45;
  display:flex;align-items:center;gap:6px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.vti{font-size:14px;flex:0 0 auto}
.vdesc{
  font-size:12px;color:var(--txt2);margin-top:3px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.vmeta{
  font-size:11px;color:var(--txt3);margin-top:6px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* ---------- APK / 安装包卡片 ---------- */
.alist{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:600px){.alist{grid-template-columns:1fr 1fr}}

.acard{
  display:flex;align-items:center;gap:11px;
  padding:12px 13px;
  background:linear-gradient(160deg,var(--card),var(--bg2));
  border:1px solid var(--line);border-radius:var(--r);
  transition:transform .14s,border-color .16s;
}
.acard:hover{border-color:rgba(77,140,255,.45)}
.acard:active{transform:scale(.985)}
.a-ico{
  flex:0 0 auto;
  width:46px;height:46px;border-radius:12px;
  display:grid;place-items:center;overflow:hidden;
  font-size:22px;
  background:linear-gradient(140deg,rgba(77,140,255,.22),rgba(139,92,246,.18));
  border:1px solid rgba(77,140,255,.24);
}
.a-ico img{width:100%;height:100%;object-fit:cover;display:block}
.a-body{flex:1 1 auto;min-width:0}
.a-title{
  display:flex;align-items:center;gap:6px;
  font-size:14px;font-weight:650;line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.a-desc{
  font-size:12px;color:var(--txt2);margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.a-dl{
  flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  height:32px;padding:0 14px;
  border-radius:8px;
  font-size:12.5px;font-weight:600;
  color:#fff;
  background:linear-gradient(140deg,#4d8cff,#6d7bfa);
  box-shadow:0 4px 12px -6px rgba(77,140,255,.9);
}

/* ---------- 骨架屏 ---------- */
.skeleton-wrap{display:grid;gap:10px}
.sk{
  height:68px;border-radius:var(--r);
  background:linear-gradient(90deg,var(--card) 25%,var(--card-hi) 50%,var(--card) 75%);
  background-size:200% 100%;animation:shine 1.3s infinite;
}
@keyframes shine{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ---------- 空态 ---------- */
.empty{text-align:center;padding:60px 0;color:var(--txt3)}
.empty-ico{font-size:38px;margin-bottom:8px;opacity:.6}
.empty p{margin:0;font-size:13px}

/* ---------- 底部 ---------- */
.foot{
  max-width:880px;margin:34px auto 0;padding-top:18px;
  border-top:1px solid var(--line);
  text-align:center;font-size:12px;color:var(--txt3);
}
.foot p{margin:0 0 4px;padding:0 8px}
.foot-sub{opacity:.7}
.foot-sub a{color:var(--txt3)}

/* ---------- 回到顶部 ---------- */
.to-top{
  position:fixed;right:16px;bottom:calc(20px + env(safe-area-inset-bottom));
  width:42px;height:42px;border-radius:50%;border:1px solid var(--line);
  background:rgba(28,36,56,.92);color:var(--txt);font-size:17px;
  cursor:pointer;backdrop-filter:blur(8px);z-index:40;
  box-shadow:0 8px 22px -8px #000;
}
.to-top:active{transform:scale(.94)}

/* ---------- 播放弹层 ---------- */
.player{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:14px}
.player[hidden]{display:none}
.player-mask{
  position:absolute;inset:0;background:rgba(4,7,12,.88);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
.player-box{
  position:relative;width:100%;max-width:900px;
  background:var(--card);border:1px solid var(--line);
  border-radius:16px;overflow:hidden;
  box-shadow:0 30px 80px -20px #000;
  animation:pop .18s ease-out;
}
@keyframes pop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
.player-hd{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border-bottom:1px solid var(--line);
}
.player-title{
  font-size:14px;font-weight:650;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.player-x{
  flex:0 0 auto;width:30px;height:30px;border-radius:9px;
  background:rgba(255,255,255,.07);border:0;color:var(--txt2);
  font-size:14px;cursor:pointer;display:grid;place-items:center;
}
.player-x:hover{background:rgba(239,68,68,.2);color:#ffb1b1}
.player-stage{background:#000;display:grid;place-items:center}
.player-stage video{
  width:100%;max-height:72vh;display:block;background:#000;
  outline:0;
}
.player-ft{
  padding:10px 14px 12px;font-size:12px;color:var(--txt3);
  line-height:1.6;word-break:break-word;
}
.player-ft:empty{display:none}

@media(max-width:420px){
  body{padding-left:11px;padding-right:11px}
  .brand-txt h1{font-size:18px}
  .logo{width:42px;height:42px;font-size:22px}
  .player{padding:8px}
  .player-stage video{max-height:60vh}
}