/* ============ 网址导航站 样式(360 新标签页风格,自写实现) ============ */
:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --text: #1e293b;
  --text-sub: #64748b;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --card-hover: rgba(255, 255, 255, 0.95);
  --radius: 14px;
  --ctl-h: 36px;   /* 分类按钮 / 搜索框的统一高度 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: #0f172a;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* 内置壁纸(渐变) */
.wp-g1 { background: linear-gradient(160deg, #4facfe 0%, #00f2fe 100%); }
.wp-g2 { background: linear-gradient(160deg, #5b247a 0%, #1bcedf 100%); }
.wp-g3 { background: linear-gradient(160deg, #11998e 0%, #38ef7d 100%); }
.wp-g4 { background: linear-gradient(160deg, #f7971e 0%, #ffd200 100%); }
.wp-g5 { background: linear-gradient(160deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.wp-g6 { background: #f4f1ec; }
.wp-file { background: center / cover no-repeat fixed; }

/* 浅色壁纸下的文字适配 */
body.light .site-head { color: var(--text); text-shadow: none; }
body.light .ann-bar { background: rgba(15,23,42,.06); color: var(--text-sub); }
body.light .cat-tab { background: rgba(15,23,42,.05); color: var(--text); }
body.light .cat-tab:hover { background: rgba(15,23,42,.12); }
body.light .cat-tab.active { background: var(--primary); color: #fff; }
body.light .engine-btn { background: rgba(15,23,42,.06); color: var(--text); }
body.light .engine-btn:hover { background: rgba(15,23,42,.12); }
body.light .link-card, body.light .search-panel {
  background: rgba(255,255,255,.85);
  border-color: rgba(15,23,42,.08);
  box-shadow: 0 4px 20px rgba(15,23,42,.08);
}
body.light .link-card:hover { background: #fff; box-shadow: 0 14px 30px rgba(15,23,42,.14); }
body.light .empty-tip { color: var(--text-sub); }
body.light .foot { color: rgba(15,23,42,.55); }
body.light .foot a { color: rgba(15,23,42,.8); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

/* ---------- 前台 ---------- */
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 14px 20px 30px; }
.ann-bar {
  width: 100%; max-width: 860px; margin-bottom: 14px; padding: 7px 18px;
  text-align: center; color: #fff; font-size: 13px;
  background: rgba(15, 23, 42, 0.38); border-radius: 999px;
}
.site-head { text-align: center; margin: 8px 0 0; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.site-head h1 { font-size: 34px; font-weight: 700; letter-spacing: 1px; }
.site-head p  { margin-top: 6px; font-size: 15px; opacity: .92; }
.site-logo { width: 400px; height: 170px; object-fit: contain; max-width: 92vw; filter: drop-shadow(0 6px 18px rgba(0,0,0,.3)); }

.search-panel { width: 100%; max-width: 640px; margin: 14px auto 20px; padding: 10px 12px; display: flex; align-items: center; position: relative; z-index: 50; }
.engine-btn {
  display: flex; align-items: center; gap: 8px; flex: none; padding: 9px 14px; border: none; border-radius: 10px;
  background: rgba(255,255,255,.18); color: #fff; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.engine-btn:hover { background: rgba(255,255,255,.3); }
.engine-menu {
  position: absolute; margin-top: 8px; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: 6px; z-index: 30; min-width: 150px;
}
.engine-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 14px; border: none; background: none;
  font-size: 14px; border-radius: 8px; cursor: pointer; color: var(--text);
}
.engine-menu button:hover { background: #eff6ff; color: var(--primary-dark); }
.search-input {
  flex: 1 1 auto; min-width: 0;   /* min-width:0 很重要:否则 input 的默认最小宽会把搜索按钮顶出面板 */
  margin: 0 10px; padding: 12px 18px; font-size: 16px; border: none; outline: none;
  background: rgba(255,255,255,.9); border-radius: 12px; color: var(--text);
}
.search-input:focus { box-shadow: 0 0 0 3px rgba(59,130,246,.55); }
.search-btn {
  flex: none; padding: 12px 26px; border: none; border-radius: 12px; background: var(--primary); color: #fff;
  font-size: 16px; cursor: pointer; font-weight: 600;
}
.search-btn:hover { background: var(--primary-dark); }

.nav-wrap { width: 100%; max-width: 1080px; }
.cat-tabs { display: block; margin-bottom: 0; }

/* ---------- 左侧竖排分类导航(复刻芒果TV .channel-left-list)----------)----------
   透明的左侧轨道 + 右侧 1px 竖线(hsla(0,0%,100%,.12));文字 #fff9 -> hover/选中 #fff */
.nav-flex { display: flex; gap: 0; align-items: flex-start; }
.side-toggle {
  display: none; float: left; margin: 0 10px 10px 0; padding: 0 16px; height: var(--ctl-h);
  border: 1px solid hsla(0,0%,100%,.1); border-radius: 22px; cursor: pointer;
  color: hsla(0,0%,100%,.6); font-size: 14px; font-weight: 500; font-family: inherit;
  background: linear-gradient(270deg, hsla(0,0%,100%,.10), hsla(0,0%,100%,.05));
  -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
}
.side-toggle:hover { color: #fff; }
.sidebar {
  width: 196px; flex: none; position: sticky; top: 14px;
  max-height: calc(100vh - 30px); overflow: visible;
  padding: 4px 24px 10px 0;
  background: transparent;
}
/* 分割线:1px 竖线,两端渐隐(芒果TV 的做法) */
.sidebar::after {
  content: ''; position: absolute; top: 2px; bottom: 2px; right: 0; width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.22) 14%,
              rgba(255,255,255,.22) 86%, rgba(255,255,255,0) 100%);
}
/* 分割线上的光标:滑动到当前选中的大分类(芒果TV channel-left-list__indicator)
   圆角三角 + 光晕,水平居中骑在那条 1px 竖线上 */
.side-indicator {
  position: absolute; right: -13px; top: 0; width: 26px; height: 30px; margin-top: -15px;
  display: none; pointer-events: none; z-index: 3;
  transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
.side-indicator::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cpath d='M9 8L19 14L9 20Z' fill='%23fff' fill-opacity='.16' stroke='%23fff' stroke-opacity='.16' stroke-width='6' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M9.5 10.5L16 14L9.5 17.5Z' fill='%23fff' stroke='%23fff' stroke-width='3.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.5));
}
.side-nav { padding: 6px 0; }
.side-group { margin-bottom: 4px; }
.side-item {
  display: flex; align-items: center; width: 100%; text-align: left; cursor: pointer;
  font-family: inherit; background: transparent; border: 0;
  color: rgba(255,255,255,.60); font-size: 16px; font-weight: 400; line-height: 20px;
  padding: 0 0 0 18px; margin-bottom: 26px; transition: color .2s ease;
}
.side-item:last-child { margin-bottom: 0; }
.side-item:hover, .side-item.active { color: #fff; }
.side-item.active { font-weight: 600; }
.side-item.lv1 {
  font-size: 14px; line-height: 18px; padding-left: 36px; margin-bottom: 12px;
  color: rgba(255,255,255,.55);
}
.side-item.lv1:hover, .side-item.lv1.active { color: #fff; }
.side-caret { font-size: 10px; opacity: .7; flex: none; transition: transform .2s ease; }
.side-item:hover .side-caret, .side-item.active .side-caret { opacity: 1; }
.side-group.open .side-caret { transform: rotate(180deg); }
.side-kids { display: none; }
.side-group.open .side-kids { display: block; }
/* 分类搜索框:放在分类导航上面(芒果TV footer 的淡边风格) */
.side-search { margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid hsla(0,0%,100%,.10); }
.side-search .quick-search {
  float: none; width: 100%; margin: 0; height: 34px; font-size: 13px;
  padding: 0 12px 0 30px; background-position: 10px center;
}
/* 右侧子分类标签:复刻芒果TV 电影页 .m-hottag__item(radius 30 / 44px 高 / 白10%渐变 + 1px 白10%边 / 白 80% 加粗) */
.cat-subnav { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.sub-chip {
  display: inline-flex; align-items: center; flex: none; cursor: pointer;
  height: 44px; padding: 0 22px; border-radius: 30px; font-family: inherit;
  font-size: 16px; font-weight: 700; line-height: 1; color: #fffc;
  background: linear-gradient(270deg, hsla(0,0%,100%,.10), hsla(0,0%,100%,.05));
  border: 1px solid hsla(0,0%,100%,.10);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.sub-chip:hover {
  background: linear-gradient(270deg, hsla(0,0%,100%,.15), hsla(0,0%,100%,.10));
  border-color: hsla(0,0%,100%,.15); color: #fff;
}
.sub-chip.active {
  background: linear-gradient(270deg, #ff5f00, rgba(255,95,0,.6));
  border-color: rgba(255,95,0,.6); color: #fff;
}

.nav-main { flex: 1; min-width: 0; padding-left: 26px; }

/* ---------- 分类标签卡(横排圆角 chip,参考 aewz.com) ---------- */
.cat-nav { overflow: hidden; }        /* 形成 BFC,让标签们绕开右侧浮动的搜索框换行 */
.cat-subnav { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 14px; clear: both; }
/* 毛玻璃分类标签(参考芒果TV mgtv.com:强 blur + 白色微渐变 + 1px 半透明白边)*/
.cat-chip {
  display: inline-block; margin: 0 10px 10px 0; vertical-align: top; white-space: nowrap;
  padding: 7px 17px; border-radius: 999px; font-size: 14.5px; cursor: pointer;
  color: #fff;
  background: linear-gradient(270deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.20);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  backdrop-filter: blur(40px) saturate(1.5);
  box-shadow: 0 2px 12px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s;
}
.cat-chip:hover {
  background: linear-gradient(270deg, rgba(255,255,255,.28), rgba(255,255,255,.14));
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
}
.cat-chip.active {
  background: linear-gradient(270deg, rgba(255,255,255,.98), rgba(255,255,255,.86));
  border-color: rgba(255,255,255,.9);
  color: var(--primary-dark); font-weight: 700;
  box-shadow: 0 4px 18px rgba(0,0,0,.16), inset 0 1px 0 #fff;
}
.cat-chip.sub {
  font-size: 13px; padding: 5px 14px;
  background: linear-gradient(270deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  border-color: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
}
.cat-chip.sub.active {
  background: linear-gradient(270deg, rgba(255,255,255,.97), rgba(255,255,255,.85));
  border-color: rgba(255,255,255,.9); color: var(--primary-dark);
}
body.light .cat-chip {
  color: var(--text);
  background: linear-gradient(270deg, rgba(255,255,255,.75), rgba(255,255,255,.5));
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 2px 12px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.9);
}
body.light .cat-chip:hover { background: linear-gradient(270deg, #fff, rgba(255,255,255,.75)); border-color: rgba(15,23,42,.16); }
body.light .cat-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
body.light .cat-chip.sub { background: linear-gradient(270deg, rgba(255,255,255,.6), rgba(255,255,255,.4)); }
body.light .cat-chip.sub.active { background: var(--primary); color: #fff; }

.link-grid.mode-groups { display: block; }
.group-block { margin-bottom: 22px; }
.group-title {
  margin: 2px 0 10px; font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
body.light .group-title { color: var(--text-sub); text-shadow: none; }

/* 顶部网站公告:与下方内容同宽、左对齐,自动适应页面宽度 */
.ann-top {
  width: 100%; max-width: 960px; margin: 0 auto 6px;
  overflow: hidden; text-align: left;
  font-size: 13px; line-height: 1.5; height: 1.5em;
  color: rgba(255,255,255,.88); text-shadow: 0 1px 3px rgba(0,0,0,.28);
}
.ann-top .ann-roll { will-change: transform; }
.ann-top .ann-line { height: 1.5em; line-height: 1.5; white-space: nowrap; overflow: hidden; }
.ann-top .ann-text { display: inline-block; white-space: nowrap; will-change: transform; }

/* 分类与卡片之间:搜索框浮动在右侧,分类标签可换行并铺满后续整行 */
.tool-row { margin-bottom: 6px; overflow: hidden; }
.quick-search {
  float: right; width: 200px; margin: 0 0 10px 12px;
  height: var(--ctl-h); padding: 0 12px 0 29px;
  border-radius: 999px; font-size: 13px; line-height: 1.4; font-family: inherit; outline: none;
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(255,255,255,.18) url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMi42IiBzdHJva2UtbGluZWNhcD0icm91bmQiPjxjaXJjbGUgY3g9IjEwLjUiIGN5PSIxMC41IiByPSI2LjgiLz48bGluZSB4MT0iMTUuNiIgeTE9IjE1LjYiIHgyPSIyMSIgeTI9IjIxIi8+PC9zdmc+") no-repeat 10px center;
  background-size: 13px 13px;
  color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.10);
  transition: background-color .2s, border-color .2s, box-shadow .2s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.quick-search::placeholder { color: rgba(255,255,255,.62); }
.quick-search:focus {
  background-color: rgba(255,255,255,.34); border-color: rgba(255,255,255,.8);
  box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 2px 10px rgba(0,0,0,.12);
}
body.light .quick-search {
  border-color: rgba(15,23,42,.16); background-color: rgba(15,23,42,.05); color: var(--text);
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM2NDc0OGIiIHN0cm9rZS13aWR0aD0iMi42IiBzdHJva2UtbGluZWNhcD0icm91bmQiPjxjaXJjbGUgY3g9IjEwLjUiIGN5PSIxMC41IiByPSI2LjgiLz48bGluZSB4MT0iMTUuNiIgeTE9IjE1LjYiIHgyPSIyMSIgeTI9IjIxIi8+PC9zdmc+"); box-shadow: none;
}
body.light .quick-search::placeholder { color: var(--text-sub); }
body.light .quick-search:focus {
  background-color: rgba(15,23,42,.10); border-color: rgba(15,23,42,.35);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
body.light .ann-top { color: var(--text-sub); text-shadow: none; }
.cat-tab {
  display: inline-block; height: var(--ctl-h); margin: 0 10px 10px 0; vertical-align: top;
  padding: 9px 22px; border: none; border-radius: 999px; background: rgba(255,255,255,.16);
  color: #fff; font-size: 15px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cat-tab:hover { background: rgba(255,255,255,.3); }
.cat-tab.active { background: #fff; color: var(--primary-dark); font-weight: 700; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
/* 「我的收藏」页:背景悬浮提示字 */
.link-grid { position: relative; }
.fav-watermark {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: clamp(22px, 3.6vw, 50px); font-weight: 800; letter-spacing: .12em;
  color: rgba(255,255,255,.10); text-shadow: 0 2px 18px rgba(0,0,0,.12);
  -webkit-user-select: none; user-select: none;
  animation: favFloat 7s ease-in-out infinite;
}
body.light .fav-watermark { color: rgba(15,23,42,.07); }
@keyframes favFloat {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(10px); }
}
/* 卡片右上角快捷操作:☆ 收藏到常用 / ★ 已收藏 / × 从常用移除 */
.card-act {
  position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1;
  background: rgba(255,255,255,.14); color: rgba(255,255,255,.75); cursor: pointer;
  opacity: .45; transition: opacity .15s, background .15s, color .15s;
  -webkit-user-select: none; user-select: none; z-index: 2;
}
.link-card:hover .card-act { opacity: 1; }
.card-act:hover { background: rgba(255,255,255,.34); color: #fff; }
.card-act.fav-on { opacity: 1; color: #ffb020; background: rgba(255,176,32,.16); }
body.light .card-act { background: rgba(0,0,0,.06); color: rgba(30,41,59,.7); }
body.light .card-act:hover { background: rgba(0,0,0,.14); color: #0f172a; }
body.light .card-act.fav-on { background: rgba(255,176,32,.22); color: #d97706; }
/* 右侧漂浮:清空记录(仅「常用」页) / 回到顶部 */
.float-clear {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; align-items: center; gap: 6px; padding: 10px 15px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass); color: inherit;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  cursor: pointer; font-size: 13px; box-shadow: 0 8px 22px rgba(15,23,42,.14);
}
.float-clear:hover { background: var(--card-hover); }
.to-top {
  position: fixed; right: 16px; bottom: 22px; z-index: 40; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass);
  color: inherit; cursor: pointer; display: none; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 8px 22px rgba(15,23,42,.14);
}
.to-top.show { display: flex; }
.to-top:hover { background: var(--card-hover); }
@media (max-width: 720px) {
  .float-clear { right: 10px; padding: 9px 12px; font-size: 12px; }
  .to-top { right: 10px; bottom: 74px; }
}
.link-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 10px 16px;
  text-decoration: none; color: var(--text); border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.link-card:hover { transform: translateY(-4px); background: var(--card-hover); box-shadow: 0 16px 34px rgba(15,23,42,.16); }
.link-icon {
  width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fff; border: 1px solid rgba(15,23,42,.08);
}
.link-icon img { width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; border-radius: 13px; }
.link-icon span {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; font-size: 21px; font-weight: 700; border-radius: 13px;
}
.link-card .l-name { font-size: 14px; text-align: center; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.link-card .l-desc {
  font-size: 11px; color: var(--text-sub); text-align: center; line-height: 1.4; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.empty-tip { padding: 60px 0; text-align: center; color: #fff; opacity: .9; font-size: 15px; }

/* 网址卡片的属性标签(免费/半免费/收费、中文/英文…) */
.l-labels {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  width: 100%; margin-top: -2px;
}
.l-label {
  padding: 1px 7px; border-radius: 999px; font-size: 10px; line-height: 1.6;
  white-space: nowrap; border: 1px solid transparent;
}
.l-label.l-free { color: #15803d; background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.30); }
.l-label.l-half { color: #b45309; background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.32); }
.l-label.l-paid { color: #b91c1c; background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.30); }
.l-label.l-lang { color: #1d4ed8; background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.25); }
body.light .l-label.l-free { background: #dcfce7; }
body.light .l-label.l-half { background: #fef3c7; }
body.light .l-label.l-paid { background: #fee2e2; }
body.light .l-label.l-lang { background: #dbeafe; }

/* 后台:标签快捷选择 */
.label-picks { display: flex; flex-direction: column; gap: 8px; }
.label-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.label-row .lb-name { font-size: 12px; color: var(--text-sub); width: 34px; flex: none; }
.label-pick {
  border: 1px solid #e2e8f0; background: #fff; color: var(--text); cursor: pointer;
  padding: 3px 11px; border-radius: 999px; font-size: 12.5px;
}
.label-pick:hover { border-color: var(--primary); background: #f8fafc; }
.label-pick.on { border-color: var(--primary); background: #eff6ff; color: var(--primary-dark); font-weight: 600; }

/* 加密分类:输入访问密码(在网格里横跨整行并水平居中)*/
.lock-panel {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  margin: 6px 0 40px;
  padding: 28px 22px 24px;
  text-align: center;
  box-sizing: border-box;
}
.lock-panel .lock-icon { font-size: 34px; line-height: 1; }
.lock-panel h3 { margin: 12px 0 6px; font-size: 17px; color: var(--text); }
.lock-panel p { margin: 0; font-size: 13px; color: var(--text-sub); }
.lock-row { display: flex; gap: 8px; margin-top: 18px; }
.lock-input {
  flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(148,163,184,.5);
  background: rgba(255,255,255,.9); color: var(--text); font-size: 14px; outline: none;
}
.lock-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.lock-btn {
  padding: 0 18px; border: none; border-radius: 10px; background: var(--primary); color: #fff;
  font-size: 14px; cursor: pointer;
}
.lock-btn:hover { background: var(--primary-dark); }
.lock-tip { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #dc2626; }

/* 后台:内置图标选择器 */
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick {
  width: 34px; height: 34px; padding: 4px; border-radius: 9px; cursor: pointer;
  border: 1px solid #e2e8f0; background: #fff; display: flex; align-items: center; justify-content: center;
}
.icon-pick img { width: 100%; height: 100%; display: block; }
.icon-pick:hover { border-color: var(--primary); background: #f8fafc; }
.icon-pick.active { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
.icon-pick.clear { color: #94a3b8; font-size: 14px; }

/* 后台:分类列表里的「已加密 / 已隐藏」标记 */
.tag-lock {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11.5px; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; vertical-align: middle;
}
.tag-hide {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11.5px; color: #1d4ed8; background: #dbeafe; border: 1px solid #bfdbfe; vertical-align: middle;
}
.tag-child {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11.5px; color: #0f766e; background: #ccfbf1; border: 1px solid #99f6e4; vertical-align: middle;
}
.cat-indent { color: #94a3b8; }

/* 后台:网址多分类勾选 */
.tag-checks {
  display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px;
  border: 1px solid #e2e8f0; border-radius: 9px; max-height: 150px; overflow: auto; background: #fff;
}
.tag-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.tag-check input { width: auto; margin: 0; }
.tag-check.disabled { color: #94a3b8; cursor: not-allowed; }

.foot { margin-top: 36px; padding: 0 16px 10px; max-width: 900px; text-align: center; font-size: 12px; line-height: 1.8; white-space: pre-line; color: rgba(255,255,255,.72); }

/* 底部版权里的低调文字链接(站长统计=隐藏分类入口) */
.site-stat-link {
  color: inherit; text-decoration: none; cursor: pointer; margin-left: 6px;
  font-size: inherit; font-family: inherit;
}
.site-stat-link:hover { text-decoration: underline; }

/* ---------- 后台 ---------- */
.admin-body { background: #f1f5f9; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; height: 56px; background: #0f172a; color: #fff;
  position: sticky; top: 0; z-index: 50;
}
.admin-top .brand { font-size: 17px; font-weight: 700; }
.admin-nav { display: flex; gap: 4px; margin-left: 34px; flex: 1; }
.admin-nav button {
  border: none; background: transparent; color: #cbd5e1; font-size: 14px; padding: 8px 16px;
  border-radius: 8px; cursor: pointer;
}
.admin-nav button:hover { color: #fff; background: rgba(255,255,255,.1); }
.admin-nav button.active { color: #fff; background: var(--primary); }
.admin-body-inner { max-width: 1080px; margin: 26px auto; padding: 0 18px 60px; }
.panel { display: none; }
.panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 20px; color: var(--text); }

/* 管理员功能:内容居中 + 两个独立表单的标题/分隔 */
#view-account .panel-head { justify-content: center; }
#view-account .cards { max-width: 420px; margin-left: auto; margin-right: auto; }
#view-account .form-item { margin-bottom: 16px; }
#view-account .btn { margin-top: 6px; }
.func-title { font-size: 14px; color: var(--text); margin-bottom: 10px; }
.func-sep { border: none; border-top: 1px solid #e2e8f0; margin: 20px 0 16px; }

.btn {
  border: none; border-radius: 9px; padding: 9px 18px; font-size: 14px; cursor: pointer;
  background: var(--primary); color: #fff; transition: filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid #e2e8f0; }
.btn.danger { background: #ef4444; }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 7px; }
.btn.plain { background: none; color: var(--primary-dark); padding: 5px 8px; }
.btn.plain.danger { color: #dc2626; background: none; }

.cards { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left; padding: 10px 12px; color: var(--text-sub); font-weight: 600; font-size: 13px;
  border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
table.list td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #f8fafc; }

/* 拖拽排序 */
.drag-handle { cursor: grab; user-select: none; color: #94a3b8; white-space: nowrap; }
.drag-handle:active { cursor: grabbing; }
table.list tr.dragging td { background: #eff6ff; opacity: .7; }
table.list tr[draggable="true"] { box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.row-actions { white-space: nowrap; }
.row-actions button { margin-right: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-item label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.form-item.full { grid-column: 1 / -1; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 9px; font-size: 14px;
  outline: none; background: #fff; color: var(--text); font-family: inherit;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none;
  align-items: center; justify-content: center; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal { width: 480px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 22px; }
.modal h3 { margin-bottom: 16px; font-size: 17px; }
.modal .form-item { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.wp-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }
.wp-item { cursor: pointer; border-radius: 12px; overflow: hidden; border: 3px solid transparent; position: relative; }
.wp-item.selected { border-color: var(--primary); }
.wp-thumb { height: 74px; background-size: cover; background-position: center; }
.wp-item.g1 .wp-thumb { background: linear-gradient(160deg,#4facfe,#00f2fe); }
.wp-item.g2 .wp-thumb { background: linear-gradient(160deg,#5b247a,#1bcedf); }
.wp-item.g3 .wp-thumb { background: linear-gradient(160deg,#11998e,#38ef7d); }
.wp-item.g4 .wp-thumb { background: linear-gradient(160deg,#f7971e,#ffd200); }
.wp-item.g5 .wp-thumb { background: linear-gradient(160deg,#0f2027,#2c5364); }
.wp-item.g6 .wp-thumb { background: #f4f1ec; border: 1px solid #e2e8f0; }
.wp-item.file .wp-thumb { background-color:#cbd5e1; }
.wp-item .wp-name { font-size: 12px; text-align: center; padding: 5px 2px; background: #fff; }
.wp-upload { border: 2px dashed #cbd5e1; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 13px; cursor: pointer; min-height: 74px; }
.wp-upload:hover { border-color: var(--primary); color: var(--primary-dark); }

/* 登录遮罩 */
.login-mask {
  position: fixed; inset: 0; z-index: 200; background: linear-gradient(160deg,#4facfe,#00f2fe);
  display: none; align-items: center; justify-content: center;
}
.login-mask.show { display: flex; }
.login-box { width: 360px; background: #fff; border-radius: 18px; padding: 34px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.login-box h2 { text-align: center; margin-bottom: 22px; font-size: 20px; }
.login-box .form-item { margin-bottom: 14px; }
.login-tip { margin-top: 12px; text-align: center; font-size: 12px; color: #ef4444; min-height: 16px; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: #0f172a; color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.show { opacity: .95; }
.toast.err { background: #dc2626; }

/* 后台底部版权 */
.admin-foot {
  margin: 24px 0 8px; padding: 14px 16px 4px; text-align: center;
  font-size: 12.5px; line-height: 1.8; color: #94a3b8; border-top: 1px solid #e2e8f0;
}
.admin-foot a { color: #64748b; text-decoration: none; }
.admin-foot a:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 900px) {
  .cat-chip { font-size: 13px; padding: 6px 13px; margin: 0 8px 8px 0; }
  .cat-chip.sub { font-size: 12.5px; padding: 5px 11px; }
  .cat-subnav { gap: 6px 8px; }
}

/* 窄屏:侧边栏变左侧抽屉 */
@media (max-width: 768px) {
  .nav-flex { display: block; }
  .side-toggle { display: inline-block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 272px; max-height: none; z-index: 120;
    padding: 22px 18px 22px 0; overflow: auto;
    background: linear-gradient(180deg, rgba(11,13,15,.96), rgba(26,30,34,.86));
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  body.side-open .sidebar { transform: translateX(0); }
  body.side-open::before { content: ''; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 110; }
  .nav-main { padding-left: 0; }
}

@media (max-width: 640px) {
  .site-head h1 { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-top { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .admin-nav { margin-left: 0; }
  .quick-search { width: 100%; height: 34px; max-width: none; font-size: 13px; padding: 0 12px 0 30px; background-position: 10px center; }
  .ann-top { font-size: 12px; }
  /* 搜索面板:窄屏收紧间距/字号,保证「搜索」按钮不会被顶出去 */
  .search-panel { padding: 8px 10px; margin: 12px auto 16px; }
  .engine-btn { padding: 9px 10px; font-size: 14px; gap: 6px; }
  .search-input { margin: 0 6px; padding: 10px 12px; font-size: 15px; }
  .search-btn { padding: 10px 14px; font-size: 15px; }
}

@media (max-width: 380px) {
  /* 超窄屏:引擎按钮只留名字,把空间让给输入框 */
  .engine-btn { padding: 9px 8px; font-size: 13px; }
  .search-btn { padding: 10px 11px; }
}


/* ================= 芒果TV 风格主题(整站重做) =================
   参考 mgtv.com:深色底 + 玻璃药丸搜索框 + 白 60% 文字 + 橙 #ff5f00 强调 + 半透明卡片(tile)
   字体 PingFang SC;导航项 hover/选中 由 60% 白 -> 纯白;面板 blur(16px) + #0b0d0f 渐变 + 0 6px 40px rgba(0,0,0,.5)
*/
body.site-front {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #fff;
  background-color: #0b0d0f;
  background-attachment: fixed;
}
/* 暗色罩在壁纸之上、内容之下(仅前台) */
body.site-front::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255,255,255,.10), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(11,13,15,.82) 0%, rgba(11,13,15,.92) 42%, #0b0d0f 100%);
}

.page-wrap { padding: 0 32px 40px; max-width: 1400px; margin: 0 auto; align-items: stretch; }
.ann-top { max-width: none; margin: 0 0 8px; color: rgba(255,255,255,.75); font-size: 12.5px; }
.top-bar { display: flex; align-items: center; gap: 28px; padding: 20px 0 26px; }
.site-head { flex: none; text-align: left; margin: 0; text-shadow: none; color: #fff; }
.site-head h1 { font-size: 26px; font-weight: 600; letter-spacing: 0; }
.site-head p { margin-top: 4px; font-size: 13px; color: rgba(255,255,255,.45); opacity: 1; }
.site-logo { width: 190px; height: 60px; object-fit: contain; filter: none; }

/* 搜索框:芒果TV 的玻璃药丸(blur40 + 白10%渐变 + 1px 白10%边 + radius 22) */
.search-panel {
  flex: 1 1 auto; max-width: 560px; margin: 0 0 0 auto; height: 48px; padding: 4px 5px 4px 6px;
  border-radius: 24px; background: linear-gradient(270deg, hsla(0,0%,100%,.10), hsla(0,0%,100%,.05));
  border: 1px solid hsla(0,0%,100%,.10); box-shadow: none;
  -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
}
.engine-btn { height: 40px; padding: 0 14px; border-radius: 20px; background: transparent; color: hsla(0,0%,100%,.60); font-size: 14px; font-weight: 500; gap: 6px; }
.engine-btn:hover { background: hsla(0,0%,100%,.10); color: #fff; }
.search-input { height: 40px; margin: 0 8px; padding: 0 6px; background: transparent; color: #fff; font-size: 15px; border-radius: 0; }
.search-input:focus { box-shadow: none; }
.search-input::placeholder { color: hsla(0,0%,100%,.40); }
.search-btn { height: 40px; padding: 0 22px; border-radius: 20px; font-size: 14px; font-weight: 500; color: #fff;
  background: linear-gradient(270deg, #ff5f00, rgba(255,95,0,.6)); border: 1px solid rgba(255,95,0,.6); }
.search-btn:hover { background: linear-gradient(270deg, #ff7a26, rgba(255,95,0,.75)); }
.engine-menu { background: linear-gradient(180deg, #0b0d0f, rgba(26,30,34,.92)); border: 1px solid hsla(0,0%,100%,.10); border-radius: 10px; box-shadow: 0 6px 40px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.engine-menu button { color: hsla(0,0%,100%,.70); }
.engine-menu button:hover { background: hsla(0,0%,100%,.10); color: #fff; }

/* 大搜索框:留在顶部那行,但**水平对齐到右侧内容列(标签那一列)的中心**
   做法:左侧 logo 占位 = 侧边栏宽 + 左侧内边距(246px),搜索框在剩余空间里居中 */
.top-bar .site-head { flex: 0 0 246px; }
.top-bar .search-panel { flex: 1 1 auto; width: auto; max-width: 620px; margin: 0 auto; }

/* 内容区:芒果TV 的半透明 tile */
.nav-wrap { max-width: none; }
.link-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.link-card { gap: 9px; padding: 16px 12px 14px; border-radius: 8px;
  background: hsla(0,0%,100%,.05); border: 1px solid transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.link-card:hover { background: hsla(0,0%,100%,.10); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.link-icon { width: 46px; height: 46px; border-radius: 8px; background: rgba(255,255,255,.94); border: 0; }
.link-card .l-name { font-size: 15px; font-weight: 500; color: #fff; }
.link-card .l-desc { font-size: 12px; color: hsla(0,0%,100%,.45); }
.empty-tip { color: rgba(255,255,255,.5); }
.group-title { color: rgba(255,255,255,.85); font-size: 15px; }
.lock-panel { background: hsla(0,0%,100%,.05); border: 1px solid hsla(0,0%,100%,.10); border-radius: 10px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: none; }
.lock-panel h3 { color: #fff; }
.lock-panel p { color: rgba(255,255,255,.5); }

/* 底部 */
.foot { max-width: none; margin-top: 40px; color: rgba(255,255,255,.38); font-size: 12px; }
.foot a { color: rgba(255,255,255,.55); }

/* 深色主题下,把原来"浅色壁纸专用"的深色文字覆盖掉 */
body.light, body.light .site-head, body.light .ann-top, body.light .empty-tip,
body.light .foot, body.light .link-card .l-name, body.light .group-title { color: #fff; }
body.light .site-head p, body.light .link-card .l-desc { color: rgba(255,255,255,.45); }
body.light .link-card, body.light .search-panel, body.light .lock-panel { background: hsla(0,0%,100%,.05); border-color: transparent; box-shadow: none; }
body.light .quick-search { background-color: hsla(0,0%,100%,.08); border-color: hsla(0,0%,100%,.10); color: #fff; }
body.light .quick-search::placeholder { color: rgba(255,255,255,.45); }

@media (max-width: 768px) {
  .page-wrap { padding: 0 16px 32px; }
  .top-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 0 18px; }
  .top-bar .site-head { flex: none; }
  .top-bar .search-panel { width: 100%; max-width: none; margin: 0; }
  .site-head { text-align: center; }
  .search-panel { max-width: none; margin: 0; width: 100%; }
  .link-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
}


/* ================= 极夜黑底纹(只压暗一点点,不再全黑) ================= */
body.site-front { background-color: #0b0d0f !important; background-attachment: fixed; }
body.site-front.wp-file { background-image: none !important; }   /* 自定义上传壁纸暂不启用 */
body.site-front::before {
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255,255,255,.055), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(11,13,15,.62) 0%, rgba(11,13,15,.80) 45%, rgba(9,10,12,.93) 100%) !important;
}
/* 字体再压一档对比 */
.side-item { color: rgba(255,255,255,.6); }
.side-item:hover, .side-item.active { color: #fff; }

/* ================= SEO:视觉隐藏(保留在 DOM,爬虫可读) ================= */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
  border: 0 !important; padding: 0 !important; margin: -1px !important;
}
/* 站点副标题(logo 下面那句「一个有意思的导航」):前台不显示,但保留在 DOM 给爬虫 */
body.site-front #site-subtitle {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
  border: 0 !important; padding: 0 !important; margin: -1px !important;
}


/* ================= 高端化打磨(2026-09-29) ================= */
/* 1) 字体:Windows 上给最好的中文字体链 + 抗锯齿;数字用等宽数位 */
body.site-front,
body.site-front input, body.site-front button, body.site-front textarea, body.site-front select {
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
               system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.site-front {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: .1px;
}
.foot, .link-card .l-desc, table.list { font-variant-numeric: tabular-nums; }

/* 2) LOGO:宽度对齐左侧导航栏(196px),比例不变 */
.site-logo { width: 196px; height: auto; max-width: 100%; object-fit: contain; }

/* 3) 顶部:呼吸感 + 对齐 */
.top-bar { align-items: center; padding: 24px 0 28px; }
.top-bar .search-panel { height: 48px; border-radius: 24px; padding: 4px; }
.search-input { font-size: 15px; }
.search-btn { height: 40px; border-radius: 20px; letter-spacing: .6px; }
.engine-btn { height: 40px; }

/* 4) 左栏图标 */
.side-ic { width: 20px; height: 20px; flex: none; margin-right: 10px; opacity: .6; transition: opacity .2s; }
.side-item:hover .side-ic, .side-item.active .side-ic { opacity: 1; }
.side-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item { gap: 0; }

/* 5) 卡片:细渐变底 + 更柔的边 + 悬浮抬升(去掉生硬的白底描边) */
.link-grid { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.link-card {
  gap: 12px; padding: 24px 16px 20px; border-radius: 14px;
  background: linear-gradient(180deg, hsla(0,0%,100%,.065), hsla(0,0%,100%,.032));
  border: 1px solid hsla(0,0%,100%,.07); box-shadow: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.link-card:hover {
  background: linear-gradient(180deg, hsla(0,0%,100%,.11), hsla(0,0%,100%,.055));
  border-color: hsla(0,0%,100%,.14);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.45);
}
.link-icon {
  width: 54px; height: 54px; border-radius: 15px;
  background: hsla(0,0%,100%,.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,.28), 0 0 0 1px hsla(0,0%,100%,.10);
}
.link-icon img { padding: 4px; } /* 低清图标自动缩小显示,少发糊 */
.link-icon.low-res img { width: 70%; height: 70%; padding: 0; }
.link-card .l-name { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.link-card .l-desc { font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,.52); }

/* 属性标签(免费/半免费/收费/语种):深色底上换成亮色文字,别再发暗 */
.l-label { font-size: 10.5px; padding: 1.5px 8px; font-weight: 500; border-radius: 999px; }
.l-label.l-free { color: #74e6a6; background: rgba(34,197,94,.20); border-color: rgba(34,197,94,.38); }
.l-label.l-half { color: #ffd166; background: rgba(245,158,11,.22); border-color: rgba(245,158,11,.40); }
.l-label.l-paid { color: #ff9c9c; background: rgba(239,68,68,.20); border-color: rgba(239,68,68,.38); }
.l-label.l-lang { color: #a9c8ff; background: rgba(96,165,250,.20); border-color: rgba(96,165,250,.34); }
body.light .l-label.l-free { color: #74e6a6; background: rgba(34,197,94,.20); border-color: rgba(34,197,94,.38); }
body.light .l-label.l-half { color: #ffd166; background: rgba(245,158,11,.22); border-color: rgba(245,158,11,.40); }
body.light .l-label.l-paid { color: #ff9c9c; background: rgba(239,68,68,.20); border-color: rgba(239,68,68,.38); }
body.light .l-label.l-lang { color: #a9c8ff; background: rgba(96,165,250,.20); border-color: rgba(96,165,250,.34); }

/* 6) 子分类药丸:把 16px/700 调轻一点,少点“土味” */
.sub-chip { height: 40px; padding: 0 18px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.72); }
.sub-chip.active { font-weight: 600; }
.cat-subnav { gap: 10px; margin: 0 0 20px; }

/* 7) 页脚:克制不刺眼;限制宽度别“满贯”,ICP 链接 */
.foot {
  max-width: 760px; margin: 48px auto 0; padding: 0 16px 10px;
  font-size: 12px; line-height: 1.95; color: rgba(255,255,255,.30);
  letter-spacing: .2px; text-align: center;
}
.foot a { color: rgba(255,255,255,.45); text-decoration: none; }
.foot a:hover { color: rgba(255,255,255,.72); }
.site-stat-link { color: inherit !important; }

/* 8) 滚动条(桌面)统一成细条,别让默认灰条拉低质感 */
body.site-front ::-webkit-scrollbar { width: 8px; height: 8px; }
body.site-front ::-webkit-scrollbar-thumb { background: hsla(0,0%,100%,.14); border-radius: 4px; }
body.site-front ::-webkit-scrollbar-thumb:hover { background: hsla(0,0%,100%,.24); }
body.site-front ::-webkit-scrollbar-track { background: transparent; }

/* ---------- 三级分类标签(sub-chip-3):与二级不同色,蓝色系区分 ---------- */
.sub-chip-3 {
  height: 34px; padding: 0 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.68);
}
.sub-chip-3:hover { color: #fff; }
.sub-chip-3.active {
  background: linear-gradient(270deg, #2f7bff, rgba(47,123,255,.55));
  border-color: rgba(47,123,255,.55); color: #fff; font-weight: 600;
}
body.light .sub-chip-3 { color: rgba(15,23,42,.58); }
body.light .sub-chip-3.active { color: #fff; }

/* ---------- 友情链接:紧凑标签卡(参考 aigc.cn 每个网址的 url-card) ---------- */
.link-grid.mode-tags {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; align-content: start;
}
.link-grid.mode-tags .link-card {
  display: grid; grid-template-columns: 64px 1fr; grid-template-areas: "i n" "i d";
  column-gap: 14px; row-gap: 4px; align-items: center;
  padding: 16px 18px; border-radius: 14px; transform: none; text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  box-shadow: none; transition: background .18s ease, border-color .18s ease;
}
.link-grid.mode-tags .link-card:hover {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); transform: none;
}
.link-grid.mode-tags .link-icon {
  grid-area: i; width: 64px; height: 64px; overflow: visible;
  background: none; border: 0; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
.link-grid.mode-tags .link-icon img {
  width: 56px; height: 56px; padding: 0; border-radius: 12px; object-fit: contain;
}
.link-grid.mode-tags .l-name {
  grid-area: n; font-size: 17px; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.link-grid.mode-tags .l-desc {
  grid-area: d; font-size: 13px; line-height: 1.35; opacity: .6; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.link-grid.mode-tags .l-labels { display: none; }

/* ---------- 后台:分类树(网址管理的分类选择器) ---------- */
.cat-picker { border: 1px solid rgba(255,255,255,.10); border-radius: 10px; margin-bottom: 14px; background: rgba(255,255,255,.03); overflow: hidden; }
.cat-picker-head { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.cat-picker-head .input { flex: 1 1 220px; min-width: 160px; margin: 0; }
.cat-picker-cur { font-size: 13px; color: #94a3b8; white-space: nowrap; }
.cat-picker-cur b { color: #e2e8f0; font-weight: 600; }

.cat-picker-body { max-height: 260px; overflow-y: auto; padding: 6px 0; }
.cat-tree-row { display: flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 13px; color: #cbd5e1; cursor: pointer; line-height: 1.5; }
.cat-tree-row:hover { background: rgba(255,255,255,.07); }
.cat-tree-row.top { font-weight: 600; color: #e2e8f0; }
.cat-tree-row.active { background: rgba(47,123,255,.18); color: #fff; }
.cat-tree-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tree-cnt { flex: 0 0 auto; font-size: 12px; color: #94a3b8; background: rgba(255,255,255,.06); border-radius: 10px; padding: 0 8px; }
.cat-tree-empty { padding: 10px 12px; font-size: 13px; color: #94a3b8; }
.cat-caret { flex: 0 0 14px; width: 14px; text-align: center; font-size: 11px; color: #94a3b8; user-select: none; }
.cat-caret.none { opacity: 0; }
.cat-caret:hover { color: #fff; }
.tag-child-3 { background: rgba(47,123,255,.18) !important; color: #93b8ff !important; }

/* ======================================================================
   2026-09-30 深色版功能样式(卡片大小 / 热搜词 / 收藏按钮 / 漂浮按钮 / 收藏页)
   ====================================================================== */
/* 卡片统一小尺寸(取消大小切换) */
.link-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 14px; }
.tool-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.size-pick, .size-label, .size-btn { display: none !important; }
.side-item .side-cnt { margin-left: auto; font-size: 11px; opacity: .5; }
/* 左侧导航整体下移一点(别太靠顶) */
.sidebar { padding-top: 38px; }
/* 右侧内容整体下移,与左侧 logo 对齐 */
.nav-main { padding-top: 36px; }
/* logo / 标题 放到左侧顶部 */
.sidebar .site-head { text-align: left; margin: 0 0 20px; }
.sidebar .site-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .5px; line-height: 1.25;
  color: #fff; text-shadow: none; }
.sidebar #site-subtitle { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 4px; }
.sidebar .site-logo { width: 150px; height: auto; max-width: 100%; }
/* 展开/收起的小箭头:放大 + 与文字拉开间距 */
.side-item .side-caret {
  font-size: 16px; line-height: 1; opacity: .9; flex: none;
  margin-left: 12px; margin-right: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
}

/* ======================================================================
   全站字体:苹果字体优先(PingFang SC / 系统苹方)
   ====================================================================== */
html, body, button, input, select, textarea {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang SC Regular",
    "Helvetica Neue", "Hiragino Sans GB", "Heiti SC", "HarmonyOS Sans SC", "MiSans",
    "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif !important;
}

/* 搜索联想下拉 */
.search-panel { position: relative; }
.search-sug {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 90;
  background: rgba(255, 255, 255, .98); border-radius: 14px; padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32); border: 1px solid rgba(255,255,255,.5);
  max-height: 380px; overflow-y: auto;
}
.search-sug .sug-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: #1e293b; font-size: 14px; white-space: nowrap; overflow: hidden;
}
.search-sug .sug-item:hover, .search-sug .sug-item.on { background: rgba(59, 130, 246, .13); }
.search-sug .sug-item img { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.search-sug .sug-nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.search-sug .sug-host { margin-left: auto; font-size: 12px; color: #94a3b8; flex: none; }
.search-sug .sug-web { color: #2563eb; }
.hot-words { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; max-width: 780px; margin: 14px auto 0; }
.hot-words .hw { font-size: 12.5px; line-height: 1; padding: 8px 13px; border-radius: 999px; text-decoration: none;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); transition: background .16s, color .16s; }
.hot-words .hw:hover { background: #fff; color: #1e293b; }
.card-act { background: rgba(255,255,255,.14); color: rgba(255,255,255,.75); }
.card-act:hover { background: rgba(255,255,255,.34); color: #fff; }
.card-act.fav-on { background: rgba(255,176,32,.16); color: #ffb020; }
.fav-watermark { color: rgba(255,255,255,.10); }
.fav-tip { grid-column: 1 / -1; text-align: center; font-size: 13px; color: rgba(255,255,255,.6); padding: 6px 0 2px; }
