@charset "UTF-8";
/* ==========================================================================
   cililinghang.com 磁力领航 - 前端样式（参考站 hifast.cn 快导航网风格）
   浅色红调三栏布局：左侧分类树 + 中间板块列表 + 右侧 widget 栏。
   主色 #f1304b，页面浅灰底 #f5f6f8，白色圆角卡片。
   手写组件样式，零构建，与 PHP SSR 直出模板配合；内容不依赖 JS 渲染。
   ========================================================================== */

:root {
    --primary:      #f1304b;
    --primary-2:    #ff5c70;
    --primary-dark: #d92640;
    --primary-bg:   #fff0f2;
    --bg:           #f5f6f8;
    --card:         #ffffff;
    --text:         #2f3440;
    --text-2:       #5a6272;
    --text-3:       #9aa3b2;
    --line:         #ebeef5;
    --line-2:       #f3f5f9;
    --radius:       10px;
    --radius-sm:    6px;
    --shadow:       0 1px 3px rgba(31, 41, 55, .05);
    --shadow-hov:   0 6px 18px rgba(31, 41, 55, .10);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-size: inherit; font-weight: inherit; }
p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d9e3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c0c8d6; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 16px; }

.sr-only, .skip-link {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
    position: fixed; top: .5rem; left: .5rem; width: auto; height: auto;
    margin: 0; padding: .5rem 1rem; clip: auto; z-index: 200;
    background: var(--primary); color: #fff; border-radius: var(--radius-sm);
}

/* 标题渐变文字：浅色主题下改为深色正文 + 红色点缀（保留类名，避免改动模板） */
.gradient-text { color: var(--text); }

.card-hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-hov); }

/* ==================== 顶部细条 ==================== */
.topbar {
    background: #fff; border-bottom: 1px solid var(--line);
    font-size: 12px; color: var(--text-2);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 36px; }
.topbar-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.topbar a { padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.topbar a:hover { color: var(--primary); background: var(--primary-bg); }
.topbar .tb-ico { margin-right: 2px; }
.topbar-pill {
    background: var(--primary); color: #fff !important; font-weight: 600;
    padding: 3px 12px; border-radius: 999px;
}
.topbar-pill:hover { background: var(--primary-dark); }
.topbar-sep { color: #dde2ea; }

/* ==================== Hero 头部（渐变背景 + 大搜索） ==================== */
.site-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, #33415c 0%, #4d6183 45%, #6d84a8 100%);
    color: #fff;
}
/* 装饰：右上光斑 + 左下光斑 + 细点阵，纯 CSS 零请求 */
.site-hero::before {
    content: ""; position: absolute; right: -80px; top: -90px; width: 300px; height: 300px;
    border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.site-hero::after {
    content: ""; position: absolute; left: -60px; bottom: -110px; width: 260px; height: 260px;
    border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.hero-inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 28px;
    padding: 26px 0 30px;
}
.hero-inner .logo { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--primary-2), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff;
    box-shadow: 0 8px 18px rgba(217, 38, 64, .35);
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 20px; font-weight: 700; line-height: 1.25; color: #fff; letter-spacing: .5px; }
.logo-sub { font-size: 12px; color: rgba(255, 255, 255, .75); }

.hero-search { flex: 1 1 auto; min-width: 0; max-width: 680px; }
.hs-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.hs-tab {
    padding: 5px 16px; border-radius: 6px 6px 0 0; font-size: 13px;
    color: rgba(255, 255, 255, .78); white-space: nowrap;
}
.hs-tab:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.hs-tab.active { color: #fff; font-weight: 600; background: rgba(255, 255, 255, .16); }
.hs-form { display: flex; }
.hs-input {
    flex: 1; min-width: 0; height: 46px; padding: 0 18px; font-size: 14px;
    border: 0; border-radius: var(--radius) 0 0 var(--radius);
    background: #fff; color: var(--text); outline: none;
}
.hs-input::placeholder { color: var(--text-3); }
.hs-btn {
    flex: 0 0 auto; height: 46px; padding: 0 30px; border-radius: 0 var(--radius) var(--radius) 0;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 2px;
}
.hs-btn:hover { filter: brightness(1.06); }
.hs-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 10px; }
.hs-quick a { font-size: 12px; color: rgba(255, 255, 255, .72); }
.hs-quick a:hover { color: #fff; text-decoration: underline; }

/* ==================== 主导航 ==================== */
.main-nav {
    position: sticky; top: 0; z-index: 40;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(31, 41, 55, .04);
}
.mn-inner { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mn-inner::-webkit-scrollbar { display: none; }
.mn-link {
    display: block; padding: 13px 18px; font-size: 14px; font-weight: 500;
    color: var(--text-2); white-space: nowrap; border-bottom: 2px solid transparent;
}
.mn-link:hover { color: var(--primary); }
.mn-link.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.mn-link .mn-hot {
    display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px;
    background: var(--primary); color: #fff; font-size: 10px; font-weight: 400; line-height: 15px;
    vertical-align: 2px;
}

/* ==================== 三栏布局 ==================== */
.layout {
    display: grid; align-items: start; gap: 16px;
    grid-template-columns: 216px minmax(0, 1fr) 300px;
    padding: 16px 0 8px;
    flex: 1 0 auto;
}
.side-col { position: sticky; top: 58px; display: grid; gap: 12px; }
.main-col { min-width: 0; display: grid; gap: 16px; align-content: start; }
.aside-col { display: grid; gap: 12px; align-content: start; }

/* ==================== 左侧分类树 ==================== */
.side-menu { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.sm-item {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 13.5px; color: var(--text-2);
}
.sm-item:hover { background: var(--line-2); color: var(--primary); }
.sm-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.sm-ico {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1; background: var(--line-2);
}
.sm-item.active .sm-ico { background: #fff; }
.sm-ico img { width: 14px; height: 14px; }
.sm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-dot { flex: 0 0 auto; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--primary); }
.sm-title {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 12px 6px; font-size: 12px; color: var(--text-3);
}

/* ==================== 板块卡片（参考站日常生活/工具大全样式） ==================== */
.mod {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 16px 16px;
}
.mod-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.mod-icon {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff; font-size: 14px; line-height: 1;
    box-shadow: 0 3px 8px rgba(241, 48, 75, .28);
}
.mod-icon img { width: 15px; height: 15px; }
.mod-title { font-size: 16px; font-weight: 700; color: var(--text); }
.mod-sep { color: #dfe4ee; }
.mod-tabs { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.mod-tab { padding: 2px 9px; border-radius: 4px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.mod-tab:hover { color: var(--primary); background: var(--primary-bg); }
.mod-more { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.mod-more:hover { color: var(--primary); }
.mod-body { padding-top: 12px; }

/* 条目单元格（参考站：图标 + 名称，右侧悬停箭头） */
.cell-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.cell {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    font-size: 13.5px; color: var(--text-2);
}
.cell:hover { background: var(--line-2); color: var(--primary); }
.cell-ico {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1; overflow: hidden;
}
.cell-ico img { width: 18px; height: 18px; }
.cell-ico .ico-char {
    width: 22px; height: 22px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    background: var(--line-2); color: var(--text-3);
    font-size: 12px; font-weight: 600;
}
.cell:hover .cell-ico .ico-char { background: #fff; color: var(--primary); }
.cell-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-go {
    flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--line-2); color: var(--text-3); font-size: 11px;
    opacity: 0; transition: opacity .2s ease;
}
.cell:hover .cell-go { opacity: 1; background: var(--primary); color: #fff; }

/* 热门磁力站横条（参考站「我的导航」推荐位） */
.bm-strip { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.bm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bm-pill {
    padding: 4px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    box-shadow: 0 4px 10px rgba(241, 48, 75, .25);
}
.bm-tip { font-size: 12px; color: var(--text-3); }
.bm-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bm-cell {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px;
    border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--text);
    overflow: hidden;
}
.bm-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-hov); }
.bm-cell .cell-ico { width: 24px; height: 24px; }
.bm-cell .cell-ico img { width: 20px; height: 20px; }
.bm-cell .cell-ico .ico-char { width: 24px; height: 24px; background: #fff; font-size: 13px; }
.bm-cell:nth-child(6n+1) { background: #e8f1ff; }
.bm-cell:nth-child(6n+2) { background: #fff0e8; }
.bm-cell:nth-child(6n+3) { background: #e9f8ef; }
.bm-cell:nth-child(6n+4) { background: #f2edff; }
.bm-cell:nth-child(6n+5) { background: #fff6e0; }
.bm-cell:nth-child(6n+6) { background: #ffe9f2; }
.bm-cell:nth-child(6n+1):hover { color: #1c7ed6; }
.bm-cell:nth-child(6n+2):hover { color: #e8590c; }
.bm-cell:nth-child(6n+3):hover { color: #2f9e44; }
.bm-cell:nth-child(6n+4):hover { color: #7048e8; }
.bm-cell:nth-child(6n+5):hover { color: #f08c00; }
.bm-cell:nth-child(6n+6):hover { color: #d6336c; }

/* ==================== 右侧 widget ==================== */
.widget { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.wg-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.wg-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.wg-title::before {
    content: ""; width: 4px; height: 14px; border-radius: 2px;
    background: linear-gradient(180deg, var(--primary-2), var(--primary));
}
.wg-more { margin-left: auto; font-size: 12px; color: var(--text-3); }
.wg-more:hover { color: var(--primary); }
.wg-body { padding-top: 10px; }

/* 排行榜（热门磁力站） */
.rank-list { display: grid; gap: 2px; }
.rl-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--radius-sm); font-size: 13px; }
.rl-item:hover { background: var(--line-2); }
.rl-num {
    flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    background: var(--line-2); color: var(--text-3);
    font-size: 11px; font-weight: 700; font-style: normal;
}
.rl-item:nth-child(1) .rl-num { background: linear-gradient(135deg, #ff6b6b, var(--primary)); color: #fff; }
.rl-item:nth-child(2) .rl-num { background: linear-gradient(135deg, #ffa94d, #f76707); color: #fff; }
.rl-item:nth-child(3) .rl-num { background: linear-gradient(135deg, #74c0fc, #1c7ed6); color: #fff; }
.rl-item:hover .rl-num { color: #fff; }
.rl-item:nth-child(1):hover .rl-num,
.rl-item:nth-child(2):hover .rl-num,
.rl-item:nth-child(3):hover .rl-num { filter: brightness(1.08); }
.rl-name { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-item:hover .rl-name { color: var(--primary); }
.rl-val { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); }

/* 资讯列表（最新资讯） */
.news-list { display: grid; gap: 2px; }
.ns-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--radius-sm); font-size: 13px; }
.ns-item:hover { background: var(--line-2); }
.ns-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #d4d9e3; }
.ns-item:hover .ns-dot { background: var(--primary); }
.ns-name { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-item:hover .ns-name { color: var(--primary); }
.ns-date { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); }

/* 标签云（热门搜索 / 深入探索） */
.wg-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.wg-tag {
    display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px;
    background: var(--line-2); color: var(--text-2);
}
.wg-tag:hover { background: var(--primary-bg); color: var(--primary); }

/* ==================== 通用内容区（内页 / SEO 文本） ==================== */
.page-main { padding: 0; }
.layout > .main-col > .content-section:first-child { margin-top: 0; }

.content-section {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px 20px;
    scroll-margin-top: 64px;
}
.content-section + .content-section { margin-top: 0; }
.sec-head { margin-bottom: 14px; }
.sec-title { font-size: 18px; font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.sec-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 2px; align-self: center;
    background: linear-gradient(180deg, var(--primary-2), var(--primary));
}
.sec-page { font-size: 13px; color: var(--text-3); font-weight: 400; }
.sec-sub { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.sec-more { margin-top: 14px; text-align: center; }

.btn-more {
    display: inline-block; margin: .25rem; padding: .5rem 1.25rem;
    border-radius: 999px; font-size: 13px;
    background: var(--line-2); border: 1px solid var(--line); color: var(--text-2);
}
.btn-more:hover { background: var(--primary-bg); border-color: #ffd2d9; color: var(--primary); }

.empty { text-align: center; color: var(--text-3); padding: 1.5rem 0; }

/* ==================== 磁力搜索专区卡片 ==================== */
.magnet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .magnet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.magnet-card {
    display: block; padding: 16px 14px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line);
}
.magnet-card:hover { border-color: #ffd2d9; box-shadow: var(--shadow-hov); }
.mc-icon {
    width: 46px; height: 46px; margin: 0 auto .75rem; border-radius: 12px;
    background: linear-gradient(135deg, #ffe3e8, #ffd2d9);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1; transition: transform .25s ease;
}
.mc-icon img { width: 26px; height: 26px; }
.magnet-card:hover .mc-icon { transform: scale(1.08); }
.mc-name { font-weight: 600; color: var(--text); margin-bottom: .25rem; text-align: center; }
.magnet-card:hover .mc-name { color: var(--primary); }
.mc-desc { font-size: 12px; color: var(--text-3); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ico-char { font-size: 1.25rem; line-height: 1; }

.howto-box {
    margin-top: 16px; padding: 18px; border-radius: var(--radius);
    background: var(--line-2); border: 1px solid var(--line);
}
.box-title { display: flex; align-items: center; gap: .5rem; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.howto-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .howto-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.howto-item { text-align: center; }
.hi-num {
    width: 40px; height: 40px; margin: 0 auto .75rem; border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
}
.hi-title { font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.hi-desc { font-size: 13px; color: var(--text-2); }

/* ==================== 网址导航卡片 ==================== */
.nav-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.nav-card { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.nav-card:hover { border-color: #ffd2d9; box-shadow: var(--shadow-hov); }
.nc-head { display: flex; align-items: center; gap: .75rem; padding: 12px 14px; background: var(--line-2); border-bottom: 1px solid var(--line); }
.nc-icon { font-size: 18px; line-height: 1; }
.nc-icon img { width: 20px; height: 20px; }
.nc-title { font-size: 15px; font-weight: 700; color: var(--text); }
.nc-count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.nav-card:hover .nc-title { color: var(--primary); }
.nc-body { display: grid; gap: 2px; padding: 8px; }

.nc-link { display: flex; align-items: center; gap: .75rem; padding: 8px 10px; border-radius: var(--radius-sm); }
.nc-link:hover { background: var(--line-2); }
.nl-icon {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
    background: var(--line-2);
    display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
}
.nc-link:hover .nl-icon { background: #fff; }
.nl-icon img { width: 16px; height: 16px; }
.nl-body { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; }
.nl-name { font-weight: 500; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-link:hover .nl-name { color: var(--primary); }
.nl-desc { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-go { flex-shrink: 0; color: #c6cddb; font-size: 13px; }
.nc-link:hover .nl-go { color: var(--primary); }

/* ==================== 资源文章卡片 ==================== */
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* 文章列表统一一行一个 */

.art-card { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.art-card:hover { border-color: #ffd2d9; box-shadow: var(--shadow-hov); }
.art-card-link { display: block; padding: 16px 18px; height: 100%; }
.art-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.badge-cat {
    display: inline-block; padding: .125rem .5rem; font-size: 12px; border-radius: 4px;
    background: var(--primary-bg); color: var(--primary); border: 1px solid #ffd2d9;
}
a.badge-cat:hover { background: var(--primary); color: #fff; }
.art-date { font-size: 12px; color: var(--text-3); }
.art-views { font-size: 12px; color: var(--text-3); }
.art-card-title {
    font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: .375rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.art-card:hover .art-card-title { color: var(--primary); }
.art-card-sum {
    font-size: 13px; color: var(--text-2); margin-bottom: .75rem; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.art-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-badge {
    display: inline-block; padding: .125rem .5rem; font-size: 12px;
    background: var(--line-2); color: var(--text-2); border-radius: 4px;
    border: 1px solid transparent; transition: all .2s ease;
}
a.tag-badge:hover, .tag-badge:hover { background: var(--primary-bg); color: var(--primary); }
.tag-badge.on { background: var(--primary-bg); color: var(--primary); border-color: #ffd2d9; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud + .tag-cloud { margin-top: .75rem; }

/* ==================== 分页 ==================== */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 18px; }
.pg-btn {
    display: inline-block; padding: .375rem .75rem; border-radius: var(--radius-sm);
    font-size: 13px; background: #fff; border: 1px solid var(--line); color: var(--text-2);
}
a.pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.current {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    border-color: transparent; color: #fff; font-weight: 600;
}
.pg-btn.disabled { opacity: .45; cursor: default; }
.pg-gap { color: var(--text-3); }
.pg-info { font-size: 12px; color: var(--text-3); margin-left: .5rem; }

/* ==================== 面包屑 ==================== */
.breadcrumb { margin-bottom: 12px; font-size: 12.5px; color: var(--text-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.breadcrumb li { display: flex; align-items: center; gap: .375rem; }
.breadcrumb li + li::before { content: "/"; color: #d4d9e3; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] span { color: var(--text-2); }

/* ==================== 文章详情 ==================== */
.art-detail {
    padding: 20px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
@media (min-width: 768px) { .art-detail { padding: 28px; } }
.art-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }
.art-title { font-size: 22px; font-weight: 700; line-height: 1.35; margin-bottom: .75rem; color: var(--text); }
@media (min-width: 768px) { .art-title { font-size: 24px; } }

.art-content { font-size: 14.5px; line-height: 1.9; color: var(--text-2); }
.art-content h2 { font-size: 18px; font-weight: 700; color: var(--text); margin: 1.75rem 0 .75rem; }
.art-content h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 1.25rem 0 .5rem; }
.art-content p { margin: .75rem 0; }
.art-content ul, .art-content ol { margin: .75rem 0 .75rem 1.25rem; list-style: disc; }
.art-content li { margin: .25rem 0; }
.art-content a { color: var(--primary); }
.art-content a:hover { text-decoration: underline; }
.art-content code { padding: .125rem .375rem; border-radius: 4px; background: var(--line-2); color: var(--primary-dark); font-size: .875em; }
.art-content img { margin: 1rem 0; border-radius: var(--radius); }
.art-content blockquote {
    margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid var(--primary);
    background: var(--primary-bg); color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.art-keywords { font-size: 13px; color: var(--text-3); }

.art-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2);
}
.art-tags-label { font-size: 13px; color: var(--text-3); }
.art-nav-links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }

/* ==================== 使用技巧 / SEO 文本 ==================== */
.tips-box {
    margin-top: 16px; padding: 18px; border-radius: var(--radius);
    background: var(--line-2); border: 1px solid var(--line);
}
.tips-list { display: grid; gap: .5rem; font-size: 13.5px; color: var(--text-2); }
.tips-list li { display: flex; align-items: flex-start; gap: .5rem; }
.tips-list .dot { color: var(--primary); }

.seo-text { font-size: 14px; line-height: 1.9; color: var(--text-2); }
.seo-text p { margin: .75rem 0; }
.seo-text a { color: var(--primary); }
.seo-text a:hover { text-decoration: underline; }
.seo-h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 1.5rem 0 .5rem; }
.seo-list { margin-left: 1.25rem; list-style: disc; display: grid; gap: .5rem; }
.seo-list strong { color: var(--text); }

/* ==================== 404 ==================== */
.err-box { text-align: center; padding: 3rem 1rem; }
.err-code {
    font-size: 4rem; font-weight: 700; line-height: 1; color: var(--primary);
}
.err-text { margin: 1rem 0 1.5rem; color: var(--text-3); }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }

/* ==================== 页脚（浅色） ==================== */
.site-footer {
    margin-top: 20px; padding: 30px 0 20px;
    border-top: 1px solid var(--line); background: #fff;
    font-size: 13px;
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-brand .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.foot-brand .logo-mark { width: 40px; height: 40px; font-size: 20px; }
.foot-brand .logo-title { font-size: 18px; color: var(--text); }
.foot-brand .logo-sub { color: var(--text-3); }
.foot-slogan { color: var(--text-3); font-size: 12.5px; }
.foot-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: .75rem; }
.foot-links { display: grid; gap: .375rem; }
.foot-links a { color: var(--text-2); }
.foot-links a:hover { color: var(--primary); }
.foot-count { color: var(--text-3); font-size: 12px; margin-left: .125rem; }
.foot-tags { display: flex; flex-wrap: wrap; gap: .375rem .75rem; }

.foot-bottom {
    margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2);
    text-align: center; color: var(--text-3); font-size: 12.5px;
}
.foot-bottom p { margin: .25rem 0; }
.footer-copyright { color: var(--text-2); }
.footer-icp a { color: var(--text-2); }
.footer-icp a:hover { color: var(--primary); }

/* ==================== 回到顶部浮动按钮 ==================== */
.fab-top {
    position: fixed; right: 18px; bottom: 40px; z-index: 45;
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff; border: 1px solid var(--line); color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: var(--shadow-hov);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease, color .2s ease;
}
.fab-top.is-show { opacity: 1; visibility: visible; }
.fab-top:hover { color: var(--primary); border-color: #ffd2d9; }

/* ==================== 响应式 ==================== */
/* 中屏：隐藏左侧分类树（导航已在主导航），保留正文 + 右栏 */
@media (max-width: 1279px) {
    .layout { grid-template-columns: minmax(0, 1fr) 290px; }
    .side-col { display: none; }
}
/* 平板：右栏下沉为通栏两列 */
@media (max-width: 1023px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .aside-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-inner { flex-direction: column; gap: 18px; padding: 22px 0 24px; }
    .hero-search { max-width: 100%; }
}
/* 手机 */
@media (max-width: 640px) {
    .container { padding: 0 12px; }
    .topbar-inner { height: auto; flex-wrap: wrap; padding: 6px 0; gap: 2px; }
    .topbar-left, .topbar-right { flex-wrap: wrap; }
    .logo-title { font-size: 18px; }
    .logo-mark { width: 38px; height: 38px; font-size: 19px; }
    .hs-input { height: 42px; font-size: 15px; }
    .hs-btn { height: 42px; padding: 0 20px; letter-spacing: 1px; }
    .mn-link { padding: 12px 13px; font-size: 13.5px; }
    .layout { padding: 12px 0 8px; gap: 12px; }
    .mod { padding: 12px 12px 14px; }
    .cell-grid { grid-template-columns: minmax(0, 1fr); }
    .bm-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aside-col { grid-template-columns: minmax(0, 1fr); }
    .content-section { padding: 14px 14px; }
    .magnet-grid { grid-template-columns: minmax(0, 1fr); }
    .sec-title { font-size: 16px; }
    .art-title { font-size: 19px; }
    .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .fab-top { right: 12px; bottom: 24px; }
}
@media (max-width: 380px) {
    .bm-cells { grid-template-columns: minmax(0, 1fr); }
    .foot-grid { grid-template-columns: minmax(0, 1fr); }
    .hs-tab { padding: 5px 11px; font-size: 12px; }
}

/* 手机横屏矮屏：压缩 Hero 纵向高度 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-inner { padding: 14px 0 16px; }
    .hs-quick { display: none; }
}

/* ==================== 无障碍辅助 ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    .card-hover:hover { transform: none; }
    .bm-cell:hover { transform: none; }
}

/* ==================== 站点二级详情页 ==================== */
.site-detail {
    display: flex; gap: 1.75rem; align-items: flex-start;
}
.sd-side { flex: 0 0 190px; text-align: center; }
.sd-logo-box {
    width: 116px; height: 116px; margin: 0 auto 1rem; border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(241, 48, 75, .18);
}
.sd-logo { font-size: 3.25rem; line-height: 1; }
.sd-badges { display: grid; gap: .5rem; }
.sd-badge {
    font-size: .8125rem; color: var(--primary-dark); background: var(--primary-bg);
    border: 1px solid #ffd7de; border-radius: 999px; padding: .35rem .75rem;
}
.sd-main { flex: 1 1 auto; min-width: 0; }
.sd-name-row { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.sd-name { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.sd-broken { font-size: .8125rem; color: var(--text-3); }
.sd-broken:hover { color: var(--primary); }
.sd-desc { margin: .75rem 0 0; color: var(--text-2); line-height: 1.75; }
.sd-tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sd-tags-label { color: var(--text-3); font-size: .8125rem; }
.sd-tag {
    font-size: .8125rem; color: var(--primary-dark); background: var(--primary-bg);
    border: 1px solid #ffd7de; border-radius: 999px; padding: .25rem .75rem;
}
.sd-tag:hover { background: #ffe2e7; }
.sd-actions { margin-top: 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-sd-go {
    display: inline-flex; align-items: center; gap: .25rem; padding: .7rem 1.6rem;
    background: linear-gradient(135deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #fff; font-weight: 600; border-radius: 999px;
    box-shadow: 0 6px 16px rgba(241, 48, 75, .28);
}
.btn-sd-go:hover { filter: brightness(1.05); }
.btn-sd-ghost {
    display: inline-flex; align-items: center; gap: .25rem; padding: .7rem 1.6rem;
    color: var(--primary-dark); background: #fff; border: 1px solid #ffd7de;
    border-radius: 999px; font-weight: 500;
}
.btn-sd-ghost:hover { background: var(--primary-bg); }
.sd-note { margin-top: 1.25rem; font-size: .8125rem; color: var(--text-3); line-height: 1.6; }

/* 站点详情页 404 */
.notfound { text-align: center; padding: 3rem 1rem; }
.notfound-icon { font-size: 3rem; margin-bottom: 1rem; }
.notfound h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; }
.notfound p { color: var(--text-3); margin-bottom: 1.25rem; }

/* 移动端：详情页竖排 */
@media (max-width: 640px) {
    .site-detail { flex-direction: column; align-items: center; text-align: center; }
    .sd-main { width: 100%; }
    .sd-name-row { justify-content: center; }
    .sd-tags, .sd-actions { justify-content: center; }
}
