@charset "UTF-8";
/* =============================================================
   bt磁力天堂  ——  站点样式
   设计说明:
     · 参考竞品「效率集」(xiaolvji.com) 的整体布局骨架
       (顶部工具栏 / 时钟大搜索 / 分类标签 / 图标宫格 / 分组链接 / 底部彩色卡片)
     · 差异化改版: 改为浅色渐变底 + 青蓝主色, 去掉大图背景与冗余交互
     · 移动端优先, 纯 CSS 实现, 不依赖任何前端框架与 JS 渲染
   ============================================================= */

/* ---------------- 设计变量 ---------------- */
:root {
  /* 本站为固定浅色主题：声明后，Android Chrome / 微信内置浏览器的
     「强制深色」(Force Dark) 不会再自动反转配色，避免手机上出现半黑半白 */
  color-scheme: light;
  --c-bg:        #f4f7fb;
  --c-bg-2:      #e9eefb;
  --c-card:      #ffffff;
  --c-line:      #e6ecf6;
  --c-line-soft: #f1f5fb;
  --c-text:      #1e293b;
  --c-text-2:    #475569;
  --c-sub:       #7c899c;
  --c-primary:   #0e9aa7;
  --c-primary-2: #3b6ef5;
  --c-brand-grad: linear-gradient(135deg, #0e9aa7 0%, #3b6ef5 100%);
  --c-warm:      #f59e0b;
  --c-radius:    14px;
  --c-radius-sm: 9px;
  --c-shadow:    0 1px 2px rgba(24, 39, 75, .04), 0 8px 24px rgba(24, 39, 75, .06);
  --c-shadow-hov:0 4px 10px rgba(24, 39, 75, .08), 0 16px 36px rgba(24, 39, 75, .10);
  --wrap:        1200px;
}

/* ---------------- 基础重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text);
  background: linear-gradient(180deg, #f7fafd 0%, var(--c-bg) 220px, var(--c-bg-2) 100%);
  /* fixed 背景在 iOS / Android 上会拖慢滚动，只有真正支持 hover 的设备才启用 */
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;            /* 新版浏览器：避开移动端地址栏高度抖动 */
  /* 点按时不要出现灰色高亮块；同时去掉 300ms 点击延迟 */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow-x: hidden;
}
a { color: var(--c-text-2); text-decoration: none; transition: color .18s, background-color .18s; }
a:hover { color: var(--c-primary); }
/* height:auto 让正文配图按原始比例缩放；图标类规则有明确 width+height，不会被覆盖 */
img { border: 0; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; overflow-wrap: break-word; }
ul, ol { margin: 0; padding: 0; list-style: none; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 13px; color: #be185d; }

.container {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 0 16px;                                       /* 兜底：不支持 max()/env() 的老内核 */
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =============================================================
   1. 顶部工具栏
   ============================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);   /* iOS Safari ≤ 15 必须带前缀 */
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  /* 刘海屏 / 灵动岛：加入「添加到主屏幕」全屏运行时，避免内容钻进状态栏 */
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--c-brand-grad);
  color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; letter-spacing: -.5px; box-shadow: 0 4px 10px rgba(14, 154, 167, .3);
}
.brand-name { font-size: 17px; font-weight: 700; color: var(--c-text); white-space: nowrap; }

.topnav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; overflow: hidden; }
.topnav a {
  padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--c-text-2); white-space: nowrap;
}
.topnav a:hover { background: var(--c-line-soft); color: var(--c-primary); }
.topnav a.is-active { background: #e6f6f8; color: var(--c-primary); font-weight: 600; }

.topbar-search { flex: 0 0 250px; display: flex; }
.topbar-search input {
  flex: 1; min-width: 0; height: 34px; padding: 0 12px; border: 1px solid var(--c-line);
  border-right: 0; border-radius: 9px 0 0 9px; background: #fbfcfe; outline: none; color: var(--c-text);
}
.topbar-search input:focus { border-color: var(--c-primary); background: #fff; }
.topbar-search button {
  height: 34px; padding: 0 14px; border: 0; border-radius: 0 9px 9px 0; cursor: pointer;
  background: var(--c-brand-grad); color: #fff; font-weight: 600;
}

/* =============================================================
   2. 首页 Hero（时钟 + 大搜索 + 引擎直达）
   ============================================================= */
.hero {
  margin: 22px 0 0; padding: 30px 20px 26px; text-align: center;
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: 20px; box-shadow: var(--c-shadow); position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c-brand-grad);
}
.hero-date { font-size: 13px; color: var(--c-sub); letter-spacing: .5px; }
.hero-clock {
  font-size: 46px; font-weight: 700; letter-spacing: 1px; line-height: 1.15;
  font-variant-numeric: tabular-nums; color: var(--c-text); margin: 2px 0 18px;
}
.hero-clock small { font-size: 20px; font-weight: 500; color: var(--c-sub); margin-left: 4px; }

.search-form { display: flex; max-width: 660px; margin: 0 auto; }
.search-form input[type=text] {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px; font-size: 15px;
  border: 1px solid var(--c-line); border-right: 0; border-radius: 12px 0 0 12px;
  background: #fbfcfe; outline: none; color: var(--c-text);
}
.search-form input[type=text]:focus { border-color: var(--c-primary); background: #fff; box-shadow: inset 0 0 0 3px rgba(14, 154, 167, .08); }
.search-form button {
  height: 48px; padding: 0 30px; border: 0; border-radius: 0 12px 12px 0; cursor: pointer;
  background: var(--c-brand-grad); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(59, 110, 245, .28); transition: filter .18s;
}
.search-form button:hover { filter: brightness(1.06); }

.engine-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px auto 0; max-width: 720px;
}
.engine-links a {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; font-size: 12.5px;
  border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-text-2); background: #fbfcfe;
}
.engine-links a:hover { border-color: var(--c-primary); color: var(--c-primary); background: #f2fbfc; }
.engine-links .eng-label { color: var(--c-sub); border: 0; background: none; padding-left: 0; }

.hero-h1 {
  margin-top: 18px; font-size: 16px; font-weight: 700; color: var(--c-text); letter-spacing: .2px;
}
.hero-h1 em { font-style: normal; color: var(--c-primary); }
.hero-slogan { margin-top: 6px; font-size: 13px; color: var(--c-sub); }
.hero-slogan strong { color: var(--c-primary); font-weight: 600; }

/* 区块小标题（H2 层级） */
.section-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--c-sub); font-weight: 400; }

/* =============================================================
   3. 分类标签栏
   ============================================================= */
.cat-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 22px 0 0; padding: 14px; background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--c-radius); box-shadow: var(--c-shadow);
}
.cat-tab {
  padding: 6px 15px; border-radius: 999px; font-size: 13.5px; color: var(--c-text-2);
  border: 1px solid transparent; background: var(--c-line-soft);
}
.cat-tab:hover { background: #e6f6f8; color: var(--c-primary); border-color: #cdeef1; }
.cat-tab.is-active {
  background: var(--c-brand-grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(14, 154, 167, .28);
}

/* =============================================================
   4. 图标宫格
   ============================================================= */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));            /* 兜底 */
  grid-template-columns: repeat(auto-fill, minmax(min(94px, 100%), 1fr)); /* 240px 极窄机型也不会溢出 */
  gap: 10px; margin: 14px 0 0; padding: 16px; background: var(--c-card);
  border: 1px solid var(--c-line); border-radius: var(--c-radius); box-shadow: var(--c-shadow);
}
.icon-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px;
  border-radius: 11px; border: 1px solid transparent; transition: all .18s;
  min-width: 0;   /* 同上：允许列被压缩，长站名走省略号而不是把宫格撑宽 */
}
.icon-card:hover {
  background: #f8fbff; border-color: #dbe7fb; transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(24, 39, 75, .08);
}
.icon-tile {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; overflow: hidden; background: #f2f6fd; border: 1px solid var(--c-line-soft);
}
.icon-tile img { width: 26px; height: 26px; object-fit: contain; display: block; }
.icon-name {
  font-size: 12.5px; color: var(--c-text-2); text-align: center; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-card:hover .icon-name { color: var(--c-primary); }

/* -------------------------------------------------------------
   无图标时的「文字小图」：取名称首字，做成品牌 App 图标观感
   正圆 + 饱和渐变底 + 白色粗字；尺寸/字号/底色由 PHP 的 icon_html() 内联输出
   ------------------------------------------------------------- */
.ico-char {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; font-weight: 700; line-height: 1;
  border-radius: 50%; color: #fff; font-family: inherit; letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(24, 39, 75, .18);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  text-align: center; user-select: none; -webkit-user-select: none;
}
/* 容器内是文字小图时去掉浅色底与外框，避免「方框套圆」的割裂感 */
.icon-tile:has(.ico-char),
.lcard-icon:has(.ico-char) { background: transparent; border-color: transparent; }
.icon-card:hover .ico-char {
  box-shadow: 0 5px 14px rgba(24, 39, 75, .28); transform: translateY(-1px);
}

/* =============================================================
   5. 信息条 / 通用区块
   ============================================================= */
.notice-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 16px 0 0; padding: 11px 16px; font-size: 13px; color: var(--c-text-2);
  background: linear-gradient(90deg, #f0fbfc 0%, #f2f6ff 100%);
  border: 1px solid #dceef2; border-radius: var(--c-radius-sm);
}
.notice-bar .nb-left { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.notice-bar b { color: var(--c-primary); font-weight: 700; }
.notice-bar a { color: var(--c-primary); }
.notice-bar a:hover { text-decoration: underline; }

.section {
  margin: 16px 0 0; padding: 18px 18px 6px; background: var(--c-card);
  border: 1px solid var(--c-line); border-radius: var(--c-radius); box-shadow: var(--c-shadow);
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line-soft);
}
.section-title { font-size: 16px; color: var(--c-text); display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--c-brand-grad);
}
.section-more { font-size: 13px; color: var(--c-sub); }
.section-more:hover { color: var(--c-primary); }

/* =============================================================
   6. 分组链接（对应竞品的「常用网址 / 酷站」区）
   ============================================================= */
.link-group {
  display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--c-line);
}
.link-group:last-child { border-bottom: 0; }
.lg-title {
  flex: 0 0 96px; font-size: 13.5px; font-weight: 600; color: var(--c-text-2);
  display: flex; align-items: center; gap: 6px;
}
.lg-title span {
  width: 3px; height: 14px; border-radius: 2px; background: var(--c-primary); opacity: .75;
}
.lg-list {
  flex: 1; min-width: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));            /* 兜底 */
  grid-template-columns: repeat(auto-fill, minmax(min(126px, 100%), 1fr));
  gap: 2px 10px;
}
/* 网格项默认 min-width:auto，会被 nowrap 的长站名撑破列宽；置 0 后才能正常出现省略号 */
.lg-list > li { min-width: 0; }
.lg-item {
  display: block; padding: 5px 9px; border-radius: 7px; font-size: 13px; color: var(--c-text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lg-item:hover { background: #f3f8ff; color: var(--c-primary-2); padding-left: 12px; }

/* =============================================================
   7. 底部三卡片（竞品为 记事便签/待办事/心情纸片，本站全部改为文章模块）
   ============================================================= */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 0; }
.a-card {
  border: 1px solid var(--c-line); border-radius: var(--c-radius); overflow: hidden;
  background: var(--c-card); box-shadow: var(--c-shadow); display: flex; flex-direction: column;
}
.a-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 16px; font-size: 15px; font-weight: 700;
}
.a-card-head .ach-more { font-size: 12.5px; font-weight: 400; opacity: .78; color: inherit; }
.a-card-head .ach-more:hover { text-decoration: underline; color: inherit; }
.a-card-body { padding: 12px 16px 16px; flex: 1; }
.a-card-foot { padding: 0 16px 14px; font-size: 12px; color: var(--c-sub); }

.a-card--amber  { background: #fffaf0; border-color: #fce7bd; }
.a-card--amber  .a-card-head { background: #fef3d7; color: #a35b06; }
.a-card--emerald{ background: #f6fefa; border-color: #c9ecd9; }
.a-card--emerald .a-card-head { background: #e2f7ec; color: #12704a; }
.a-card--sky    { background: #f7fbff; border-color: #cfe3fb; }
.a-card--sky    .a-card-head { background: #e6f1fe; color: #1d5fb5; }

.a-item { display: block; padding: 8px 0; border-bottom: 1px dashed rgba(0, 0, 0, .07); }
.a-item:last-child { border-bottom: 0; }
.a-item-title {
  font-size: 13.5px; font-weight: 600; color: var(--c-text); line-height: 1.5;
  display: block; margin-bottom: 3px;
}
.a-item:hover .a-item-title { color: var(--c-primary); }
.a-item-desc {
  font-size: 12.5px; color: var(--c-sub); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.a-item-meta { margin-top: 5px; font-size: 11.5px; color: var(--c-sub); display: flex; gap: 10px; }

/* =============================================================
   8. 列表 / 文章卡片 / 详情
   ============================================================= */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 18px 0 0; font-size: 13px; color: var(--c-sub);
}
.crumb a { color: var(--c-sub); }
.crumb a:hover { color: var(--c-primary); }
.crumb-sep { color: #cbd5e1; }
.crumb-cur { color: var(--c-text-2); font-weight: 600; }

.page-head { margin: 16px 0 0; }
.page-head h1 { font-size: 22px; color: var(--c-text); }
.page-head .ph-desc { margin-top: 8px; font-size: 13.5px; color: var(--c-sub); line-height: 1.75; }
.page-head .ph-meta { margin-top: 8px; font-size: 12.5px; color: var(--c-sub); }

.lgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));            /* 兜底 */
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px; margin-top: 14px;
}
.lcard {
  display: flex; gap: 11px; padding: 13px; background: var(--c-card);
  border: 1px solid var(--c-line); border-radius: var(--c-radius-sm);
  box-shadow: 0 1px 2px rgba(24, 39, 75, .03); transition: all .18s;
}
.lcard:hover { border-color: #cfe0fb; box-shadow: var(--c-shadow-hov); transform: translateY(-2px); }
.lcard-icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; background: #f2f6fd;
  border: 1px solid var(--c-line-soft); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lcard-icon img { width: 24px; height: 24px; object-fit: contain; }
.lcard-main { min-width: 0; flex: 1; }
.lcard-name { font-size: 14px; font-weight: 600; color: var(--c-text); display: block; }
.lcard:hover .lcard-name { color: var(--c-primary); }
.lcard-desc {
  margin-top: 3px; font-size: 12.5px; color: var(--c-sub); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lcard-cat { margin-top: 6px; font-size: 11.5px; color: var(--c-primary); }

.art-item {
  display: block; padding: 16px 18px; background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--c-radius-sm); margin-top: 12px; box-shadow: 0 1px 2px rgba(24, 39, 75, .03);
  transition: all .18s;
}
.art-item:hover { border-color: #cfe0fb; box-shadow: var(--c-shadow-hov); }
.art-item h3 { font-size: 16px; color: var(--c-text); margin-bottom: 6px; }
.art-item:hover h3 { color: var(--c-primary); }
.art-item p { margin: 0; font-size: 13.5px; color: var(--c-sub); line-height: 1.7; }
.art-meta { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--c-sub); }
.art-cat { padding: 1px 8px; border-radius: 999px; background: #eef6ff; color: var(--c-primary-2); }

.tag {
  display: inline-block; padding: 3px 10px; margin: 0 6px 6px 0; font-size: 12px;
  border-radius: 999px; background: var(--c-line-soft); color: var(--c-text-2); border: 1px solid var(--c-line);
}
.tag:hover { background: #e6f6f8; color: var(--c-primary); border-color: #cdeef1; }
.tag-list { margin-top: 12px; }

/* 详情页 */
.detail {
  margin-top: 16px; padding: 24px; background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--c-radius); box-shadow: var(--c-shadow);
}
.detail h1 { font-size: 23px; line-height: 1.5; color: var(--c-text); }
.detail-meta {
  margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--c-line-soft);
  display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--c-sub);
}
.detail-body { margin-top: 18px; font-size: 15px; line-height: 1.95; color: var(--c-text-2); }
.detail-body h3 { margin: 22px 0 8px; font-size: 17px; color: var(--c-text); }
.detail-body h4 { margin: 18px 0 6px; font-size: 15px; color: var(--c-text); }
.detail-body p { margin: 10px 0; }
.detail-body ul, .detail-body ol { margin: 10px 0 10px 22px; list-style: disc; }
.detail-body ol { list-style: decimal; }
.detail-body li { margin: 5px 0; }
.detail-body strong { color: var(--c-text); }
.detail-body img { border-radius: 10px; margin: 10px 0; }
/* 正文里的宽内容（表格 / 代码块 / 长链接）在窄屏上改为块级横向滚动，不撑破页面 */
.detail-body table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.detail-body pre { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px; background: #f8fafc; border-radius: 10px; font-size: 13px; }
.detail-body a { overflow-wrap: anywhere; }

/* 磁力占位框 */
.magnet-box {
  margin-top: 18px; padding: 15px 16px; background: #f8fbff;
  border: 1px dashed #bcd6f7; border-radius: var(--c-radius-sm);
}
.magnet-box .mb-title { font-size: 13px; font-weight: 700; color: var(--c-primary-2); margin-bottom: 8px; }
.magnet-box .mb-value {
  display: block; padding: 10px 12px; background: #fff; border: 1px solid var(--c-line);
  border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  color: var(--c-text-2); word-break: break-all; line-height: 1.6;
}
.magnet-box .mb-tip { margin-top: 8px; font-size: 12px; color: var(--c-sub); }

/* 站点详情按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 22px; border-radius: 10px;
  background: var(--c-brand-grad); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(59, 110, 245, .26); border: 0; cursor: pointer;
}
.btn:hover { color: #fff; filter: brightness(1.06); }
.btn--ghost { background: #fff; color: var(--c-primary); border: 1px solid var(--c-line); box-shadow: none; }
.btn--ghost:hover { color: var(--c-primary); border-color: var(--c-primary); }

/* =============================================================
   9. 分页（PHP 直出）
   ============================================================= */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 22px 0 6px; justify-content: center;
}
.pg-btn {
  min-width: 34px; padding: 6px 11px; text-align: center; font-size: 13px;
  border: 1px solid var(--c-line); border-radius: 8px; background: #fff; color: var(--c-text-2);
}
.pg-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pg-btn.is-active { background: var(--c-brand-grad); border-color: transparent; color: #fff; font-weight: 700; }
.pg-btn.is-disabled { color: #c3ccda; background: #fafbfd; cursor: not-allowed; }
.pg-gap { padding: 0 3px; color: var(--c-sub); }
.pg-info { margin-left: 8px; font-size: 12.5px; color: var(--c-sub); }

/* =============================================================
   10. 空状态 / 页脚
   ============================================================= */
.empty {
  padding: 46px 20px; text-align: center; color: var(--c-sub); font-size: 14px;
  background: var(--c-card); border: 1px dashed var(--c-line); border-radius: var(--c-radius); margin-top: 14px;
}

.footer {
  margin: 28px 0 0; padding: 26px 0 34px; border-top: 1px solid var(--c-line);
  background: rgba(255, 255, 255, .6); font-size: 12.5px; color: var(--c-sub); text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 12px; }
.footer-links a { color: var(--c-text-2); font-size: 13px; }
.footer-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.footer p { margin: 5px 0; line-height: 1.8; }

/* =============================================================
   11. 后台管理
   ============================================================= */
.adm { display: flex; min-height: 100vh; min-height: 100dvh; background: #f4f7fb; }
.adm-side {
  flex: 0 0 190px; background: #12233b; color: #cbd8e8; padding: 18px 0;
}
.adm-side .as-brand { padding: 0 18px 16px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #1e3350; margin-bottom: 12px; }
.adm-side a { display: block; padding: 10px 18px; color: #a9bcd2; font-size: 13.5px; }
.adm-side a:hover { background: #1a3050; color: #fff; }
.adm-side a.is-active { background: #1d4ed8; color: #fff; font-weight: 600; }
.adm-main { flex: 1; min-width: 0; padding: 20px 24px 60px; }
.adm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adm-top h1 { font-size: 20px; }
.adm-panel { background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius); padding: 20px; box-shadow: var(--c-shadow); margin-bottom: 18px; }
.adm-panel h2 { font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line-soft); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-2); margin-bottom: 5px; }
.form-row .hint { font-size: 12px; color: var(--c-sub); font-weight: 400; margin-left: 6px; }
.inp, .sel, .txa {
  width: 100%; padding: 8px 11px; border: 1px solid var(--c-line); border-radius: 8px;
  background: #fbfcfe; outline: none; color: var(--c-text);
}
.inp:focus, .sel:focus, .txa:focus { border-color: var(--c-primary); background: #fff; }
.txa { min-height: 110px; resize: vertical; line-height: 1.7; }
.txa-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-grid .form-row.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 8px; }

.btn-adm {
  display: inline-block; padding: 8px 18px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--c-brand-grad); color: #fff; font-size: 13.5px; font-weight: 600;
}
.btn-adm:hover { color: #fff; filter: brightness(1.06); }
.btn-adm--gray { background: #eef2f8; color: var(--c-text-2); }
.btn-adm--gray:hover { color: var(--c-text); }
.btn-adm--danger { background: #fee2e2; color: #b91c1c; }
.btn-adm--sm { padding: 4px 10px; font-size: 12.5px; }

/* 表格外层滚动容器：窄屏下横向滑动查看，避免撑破页面 */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-wrap::-webkit-scrollbar { height: 6px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: #d5dfec; border-radius: 3px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--c-line-soft); text-align: left; vertical-align: middle; }
.tbl th { background: #f8fafd; font-weight: 600; color: var(--c-text-2); white-space: nowrap; }
.tbl tr:hover td { background: #fbfdff; }
.tbl .col-act { white-space: nowrap; }
.tbl .col-act a { margin-right: 8px; font-size: 12.5px; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert--ok  { background: #e7f8f0; color: #12704a; border: 1px solid #bfe8d4; }
.alert--err { background: #fdecec; color: #b91c1c; border: 1px solid #f6c9c9; }

.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #eef4ff, #f7fbfd); padding: 20px; }
/* 固定 340px 在 320px 机型上会横向溢出，改成「不超过容器」；
   用 width+max-width 而非 min()，老内核同样生效 */
.login-box { width: 340px; max-width: 100%; padding: 30px 26px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(24, 39, 75, .12); }
.login-box h1 { font-size: 18px; margin-bottom: 20px; text-align: center; }

/* =============================================================
   12. 响应式 / 多机型适配
   -------------------------------------------------------------
   断点梯度（桌面优先，由宽到窄逐级覆盖）：
     ≥1600   2K / 4K 显示器            —— 版面加宽
     1280+   常规台式机                 —— 默认样式
     1120    小笔记本 / 平板横屏        —— 导航改横向滑动，不再被裁切
     1024    iPad / iPad Pro           —— 卡片两栏
     900     小平板 / 大屏手机横屏      —— 顶部栏改两行
     640     主流手机（iPhone 12-16 / 大部分安卓）
     480     小屏手机（iPhone SE / 老安卓）
     375     极窄屏（iPhone SE1 / 小屏安卓）
     340     超窄屏（小屏安卓分屏）
     300     折叠机外屏（Galaxy Fold 280px）
   另含：手机横屏矮屏兜底 / 触摸设备 / 减弱动态效果偏好
   ============================================================= */

/* ---------------- 2K 及以上：加宽版面，避免两侧过空 ---------------- */
@media (min-width: 1600px) {
  :root { --wrap: 1320px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .lg-list   { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .lgrid     { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
  .hero-clock { font-size: 52px; }
  .hero-clock small { font-size: 22px; }
}

/* ---------------- 小笔记本 / 平板横屏 ---------------- */
@media (max-width: 1279px) {
  .topbar-search { flex: 0 0 210px; }
  .icon-grid { gap: 8px; padding: 14px; }
  /* 导航项放不下时改为横向滑动，避免链接被 overflow:hidden 直接裁掉（不可达） */
  .topnav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { padding: 6px 9px; }
}

/* ---------------- 平板（iPad 横竖屏 / iPad Pro） ---------------- */
@media (max-width: 1024px) {
  .cards3 { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { flex: 0 0 200px; }
  .adm-side { flex: 0 0 172px; }
  .lgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .hero-clock { font-size: 42px; }
}

/* ---------------- 小平板 / 大屏手机横屏：顶部栏改为两行 ---------------- */
@media (max-width: 900px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 9px 0; gap: 9px; }
  .topnav { order: 3; flex: 1 1 100%; padding-bottom: 2px; }
  .topbar-search { flex: 1 1 180px; min-width: 0; }
  .detail { padding: 20px 18px; }
}

/* ---------------- 主流手机（iPhone 12-16 / 大部分安卓 360-430px） ---------------- */
@media (max-width: 640px) {
  .container {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  /* --- 顶部栏 --- */
  .topbar-inner { padding: 8px 0; gap: 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
  .brand-name { font-size: 16px; }
  .topnav a { padding: 8px 11px; font-size: 13px; }   /* 触控区 ≥ 36px */
  .topbar-search { flex: 1 1 140px; min-width: 0; }
  /* 关键：输入框字号 < 16px 时 iOS Safari 聚焦会自动放大整页，这里强制 16px */
  .topbar-search input { height: 38px; font-size: 16px; padding: 0 10px; }
  .topbar-search button { height: 38px; padding: 0 15px; font-size: 13.5px; }

  /* --- 首屏 --- */
  .hero { margin-top: 16px; padding: 22px 14px 20px; border-radius: 16px; }
  .hero-date { font-size: 12px; }
  .hero-clock { font-size: 32px; margin-bottom: 14px; }
  .hero-clock small { font-size: 15px; }
  .search-form input[type=text] { height: 44px; font-size: 16px; padding: 0 14px; }
  .search-form button { height: 44px; padding: 0 18px; font-size: 15px; }
  .engine-links { gap: 6px; margin-top: 12px; }
  .engine-links a { padding: 5px 11px; font-size: 12px; }
  .hero-h1 { font-size: 15px; margin-top: 16px; }
  .hero-slogan { font-size: 12.5px; }

  /* --- 分类标签：横向滑动，避免多行占屏 --- */
  .cat-tabs {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 7px;
    margin-top: 16px; padding: 12px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex: 0 0 auto; padding: 8px 15px; font-size: 13px; }

  /* --- 图标宫格 --- */
  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(72px, 100%), 1fr));
    gap: 6px; padding: 12px 10px; margin-top: 12px;
  }
  .icon-card { padding: 10px 4px 8px; gap: 6px; }
  .icon-tile { width: 40px; height: 40px; }
  .icon-name { font-size: 11.5px; }

  /* --- 信息条 --- */
  .notice-bar {
    margin-top: 12px; padding: 10px 13px; font-size: 12.5px;
    flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .notice-bar .nb-left { gap: 10px; }

  /* --- 分组链接区块 --- */
  .section { margin-top: 12px; padding: 15px 13px 4px; }
  .section-head { padding-bottom: 10px; gap: 8px; }
  .section-title { font-size: 15px; }
  .section-more { font-size: 12px; white-space: nowrap; }
  .section-sub { font-size: 12px; }
  .link-group { flex-direction: column; gap: 5px; padding: 12px 0; }
  .lg-title { flex: none; font-size: 13px; }
  .lg-list { grid-template-columns: repeat(auto-fill, minmax(min(104px, 100%), 1fr)); gap: 2px 8px; }
  .lg-item { padding: 8px 9px; font-size: 13px; }     /* 加大触控区 */

  /* --- 底部三卡片：单列 --- */
  .cards3 { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .a-card-head { padding: 10px 14px; font-size: 14.5px; }
  .a-card-body { padding: 10px 14px 14px; }
  .a-card-foot { padding: 0 14px 12px; }

  /* --- 列表 / 详情 --- */
  .crumb { margin-top: 14px; font-size: 12.5px; }
  .page-head h1 { font-size: 19px; }
  .page-head .ph-desc { font-size: 13px; }
  .lgrid { grid-template-columns: 1fr; gap: 10px; }
  .lcard { padding: 12px; }
  .art-item { padding: 14px; margin-top: 10px; }
  .art-item h3 { font-size: 15px; }
  .detail { padding: 18px 14px; margin-top: 12px; }
  .detail h1 { font-size: 19px; }
  .detail-body { font-size: 15px; line-height: 1.9; }
  .detail-body h3 { font-size: 16px; }
  .magnet-box { padding: 13px 12px; }
  .magnet-box .mb-value { font-size: 12px; padding: 9px 10px; }
  .btn { padding: 10px 20px; }

  /* --- 分页：加大点击区 --- */
  .pager { gap: 6px; margin: 18px 0 6px; }
  .pg-btn { min-width: 38px; padding: 8px 11px; font-size: 13px; }
  .pg-info { flex: 1 1 100%; text-align: center; margin: 6px 0 0; }

  /* --- 页脚 --- */
  .footer { margin-top: 22px; padding: 20px 0 calc(24px + env(safe-area-inset-bottom)); }
  .footer-links { gap: 8px 14px; }
  .footer-links a { font-size: 12.5px; }
  .footer-tags { gap: 6px; }

  /* --- 后台 --- */
  .adm { flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .adm-side {
    flex: none; display: flex; overflow-x: auto; padding: 8px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    position: sticky; top: 0; z-index: 20;
  }
  .adm-side::-webkit-scrollbar { display: none; }
  .adm-side .as-brand { display: none; }
  .adm-side a { white-space: nowrap; padding: 10px 14px; border-radius: 8px; }
  .adm-main { padding: 14px 12px calc(48px + env(safe-area-inset-bottom)); }
  .adm-top h1 { font-size: 18px; }
  .adm-panel { padding: 15px 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .inp, .sel, .txa { font-size: 16px; }               /* 防 iOS 聚焦缩放 */
  .login-box { padding: 26px 20px; }
  /* 多列宽表：给足最小宽度后由外层 .tbl-wrap 横向滑动查看（概览那张 4 列小表不加，避免无谓滚动） */
  .tbl-wrap .tbl { min-width: 600px; }
}

/* ---------------- 小屏手机（iPhone SE / 6-8 / 老安卓 320-480px） ---------------- */
@media (max-width: 480px) {
  .hero { padding: 18px 12px; }
  .hero-clock { font-size: 29px; }
  /* 搜索框在窄屏改为上下堆叠，更好点按与输入 */
  .search-form { flex-wrap: wrap; }
  .search-form input[type=text] { flex: 1 1 100%; border-right: 1px solid var(--c-line); border-radius: 11px; }
  .search-form button { flex: 1 1 100%; margin-top: 8px; border-radius: 11px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(min(66px, 100%), 1fr)); }
  .icon-tile { width: 38px; height: 38px; }
  .notice-bar .nb-left { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-title { font-size: 14.5px; }
  .lg-list { grid-template-columns: repeat(auto-fill, minmax(min(96px, 100%), 1fr)); }
  .detail-body { font-size: 14.5px; }
  .magnet-box .mb-value { font-size: 11.5px; }
  .pg-btn { min-width: 36px; padding: 8px 10px; }
}

/* ---------------- 极窄屏（iPhone SE 第一代 320px / 小屏安卓） ---------------- */
@media (max-width: 375px) {
  .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .brand-name { font-size: 15px; }
  .topbar-search button { padding: 0 12px; }
  .hero-clock { font-size: 26px; }
  .hero-clock small { font-size: 13px; }
  .hero-h1 { font-size: 14px; line-height: 1.5; }
  .cat-tab { padding: 7px 12px; font-size: 12.5px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(min(62px, 100%), 1fr)); gap: 4px; padding: 10px 8px; }
  .icon-tile { width: 36px; height: 36px; }
  .icon-name { font-size: 11px; }
  .lg-list { grid-template-columns: repeat(auto-fill, minmax(min(88px, 100%), 1fr)); }
  .pg-btn { min-width: 34px; padding: 7px 9px; font-size: 12.5px; }
  .a-card-head { padding: 10px 12px; }
  .a-card-body { padding: 8px 12px 12px; }
}

/* ---------------- 超窄屏（小屏安卓分屏 / 折叠机内屏窄态） ---------------- */
@media (max-width: 340px) {
  .brand-name { font-size: 14px; }
  .hero { padding: 16px 10px; border-radius: 14px; }
  .hero-clock { font-size: 24px; }
  .hero-h1 { font-size: 13.5px; }
  .hero-slogan { font-size: 12px; }
  .engine-links a { padding: 4px 9px; font-size: 11.5px; }
  .icon-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px 8px; }
  .lg-list { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 13px 10px 2px; }
  .lg-item { padding: 7px; font-size: 12.5px; }
  .magnet-box .mb-value { font-size: 11px; }
  .pg-gap { display: none; }                          /* 极窄时省略页码省略号，优先保证按钮可点 */
}

/* ---------------- 折叠机外屏（Galaxy Fold 280px 等） ---------------- */
@media (max-width: 300px) {
  .brand-name { display: none; }                      /* 只留站标，把宽度让给搜索框 */
  .topbar-search { flex: 1 1 100%; }
  .hero-clock { font-size: 22px; }
  .icon-grid { grid-template-columns: repeat(2, 1fr); }
  .pg-info { font-size: 11.5px; }
}

/* ---------------- 手机横屏 / 矮屏：压缩纵向高度，让首屏信息量最大化 ---------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar-inner { padding: 6px 0; gap: 6px; }
  .hero { margin-top: 12px; padding: 14px 16px; }
  .hero-clock { font-size: 28px; margin: 0 0 10px; }
  .hero-date, .hero-slogan { display: none; }
  .hero-h1 { margin-top: 10px; font-size: 14px; }
  .engine-links { margin-top: 8px; }
  .cat-tabs { margin-top: 12px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(min(84px, 100%), 1fr)); }
}

/* ---------------- 触摸设备：关闭依赖 hover 的位移，避免「点完状态卡住」 ---------------- */
@media (hover: none) and (pointer: coarse) {
  body { background-attachment: scroll; }             /* fixed 背景在移动端会掉帧 */
  html { scroll-behavior: auto; }
  .icon-card:hover { transform: none; box-shadow: none; background: none; border-color: transparent; }
  .icon-card:hover .ico-char { transform: none; }
  .lcard:hover { transform: none; }
  .lg-item:hover { padding-left: 9px; }
  .btn:active, .btn-adm:active, .pg-btn:active, .cat-tab:active { filter: brightness(.94); }
}

/* ---------------- 尊重系统「减弱动态效果」偏好 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}
