/**
 * 今日老人 - 轻灵CMS 适老化主题
 * 面向老年用户：大字号、宽行距、高对比、大点击区域
 * 改造要点：正文字号 20px / 行高 2.0 / 字距加宽 / 次要文字加深 / 触摸目标≥48px
 * qlcms.cn
 */

/* ========== 适老化全局变量 ========== */
:root {
    /* 基础字号（默认 15px → 适老化 20px） */
    --fs-base: 20px;
    --fs-sm: 17px;
    --fs-xs: 15px;
    --fs-lg: 24px;
    --fs-xl: 30px;
    --fs-title: 34px;

    /* 行高（比普通主题更宽松，便于逐行阅读） */
    --lh-base: 2.0;
    --lh-tight: 1.6;

    /* 字距 */
    --ls-base: 0.02em;

    /* 颜色（整体加深对比度） */
    --c-text: #1f2937;       /* 正文：近黑深灰 */
    --c-text-soft: #374151;  /* 次要正文 */
    --c-text-muted: #4b5563; /* 弱化文字（原 #9ca3af 太浅，老人看不清） */
    --c-text-light: #6b7280; /* 最弱文字 */
    --c-link: #2563eb;       /* 链接：深蓝，对比更强 */
    --c-link-hover: #1d4ed8;
    --c-primary: #4338ca;    /* 主色加深 */
    --c-primary-soft: #eef2ff;
    --c-border: #d1d5db;
    --c-border-soft: #e5e7eb;
    --c-bg: #f3f4f6;
    --c-card: #ffffff;

    /* 点击区域最小尺寸（手指友好） */
    --tap-min: 48px;
}

/* 字号三档：通过 body 类覆盖变量（A- / A / A+） */
body.fs-small {
    --fs-base: 17px;
    --fs-sm: 15px;
    --fs-xs: 13px;
    --fs-lg: 20px;
    --fs-xl: 26px;
    --fs-title: 28px;
    --lh-base: 1.9;
}
body.fs-large {
    --fs-base: 24px;
    --fs-sm: 20px;
    --fs-xs: 18px;
    --fs-lg: 30px;
    --fs-xl: 38px;
    --fs-title: 42px;
    --lh-base: 2.1;
    --ls-base: 0.03em;
}
/* A+ 档：超大字号下页面横向滚动不裁切 */
body.fs-large { overflow-x: auto; }
body.fs-large .header .container { flex-wrap: nowrap; }
body.fs-large .content-wrapper { flex-wrap: nowrap; }
/* 默认状态：导航超出 1360 时容器内可左右滑动（仿 qlcms 原始设计，无可见滚动条） */

/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    letter-spacing: var(--ls-base);
    color: var(--c-text);
    background: var(--c-bg) url(/bj.png);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

a { color: var(--c-link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-link-hover); }

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 2px 12px rgba(67,56,202,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    height: 76px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 56px; width: auto; display: block; }
.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
/* 导航外层：左右箭头 + 可滑动导航，箭头仅在溢出时显示 */
.nav-scroll {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}
/* 左右箭头按钮（默认隐藏，JS 给 .nav-overflow 时显示） */
.nav-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    user-select: none;
    -webkit-user-select: none;
}
.nav-arrow:hover { background: rgba(255,255,255,0.34); }
.nav-arrow:active { background: rgba(255,255,255,0.46); }
.nav-scroll.nav-overflow .nav-arrow { display: flex; }
/* 已滑到最左/最右时弱化对应箭头 */
.nav-arrow.disabled { opacity: .35; cursor: default; }
.nav-scroll.nav-overflow .nav-arrow.disabled:hover { background: rgba(255,255,255,0.18); }

/* 导航容器：栏目超出 1360 时横向可滑动，无可见滚动条 */
.nav {
    display: flex;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;        /* IE/Edge legacy */
    scrollbar-width: none;           /* Firefox */
}
.nav::-webkit-scrollbar { display: none; height: 0; }   /* WebKit/Chromium */
/* 拖拽横滑时的光标与防选中（像拖滑块一样） */
.nav { cursor: grab; user-select: none; -webkit-user-select: none; }
.nav.nav-dragging { cursor: grabbing; }
.nav.nav-dragging .nav-item { pointer-events: none; }
.nav-item {
    padding: 9px 16px;
    border-radius: 22px;
    font-size: 18px;            /* 导航固定 18px，不跟随 --fs-base（避让宽度） */
    font-weight: 600;
    color: #fff;
    transition: all .2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.nav-item > a,
.nav-dropdown > a {
    color: #fff;
}
.nav-item > a:hover,
.nav-dropdown > a:hover {
    color: #fff;
}
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 26px;
    cursor: pointer;
    color: #fff;
    margin-left: auto;
}

/* 字号切换（适老化 A-/A/A+）— 悬浮左侧竖排胶囊 */
.font-size-switch {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--c-primary);
    border-radius: 0 24px 24px 0;
    padding: 12px 10px;
    gap: 12px;
    box-shadow: 3px 3px 14px rgba(67,56,202,0.35);
}
.fs-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border: 3px solid #fff;            /* 白描边永远在 */
    border-radius: 14px;               /* 圆角矩形（非圆形） */
    background: transparent;           /* 未选中=透明=和容器同色 */
    color: #fff;                       /* 未选中=白字 */
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, transform .1s;
}
.fs-btn small { font-size: 16px; margin-left: 1px; line-height: 1; }
.fs-btn[data-fs="small"] { font-size: 20px; }
.fs-btn[data-fs="normal"] { font-size: 24px; }
.fs-btn[data-fs="large"] { font-size: 30px; }
.fs-btn:hover { background: rgba(255,255,255,0.18); }
.fs-btn:active { transform: scale(0.96); }
/* 选中态：实心白填充 + 紫字（反色）——唯一明显的白色按钮，一眼能认出 */
.fs-btn.active {
    background: #fff;
    color: var(--c-primary);
}
.fs-btn.active small { color: var(--c-primary); }

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: var(--fs-xl);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: var(--lh-tight);
}
.hero-desc {
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.8);
    max-width: 760px;
    margin: 0 auto;
    line-height: var(--lh-base);
}

/* 首页幻灯片 */
.slideshow {
    position: relative;
    width: 1020px;
    height: 400px;
    margin: 24px auto 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.slideshow-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .5s ease-in-out;
}
.slideshow-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.slideshow-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.slideshow-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
    line-height: 1;
}
.slideshow-prev:hover,
.slideshow-next:hover { background: rgba(0,0,0,0.55); }
.slideshow-prev { left: 16px; }
.slideshow-next { right: 16px; }

.slideshow-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.slideshow-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s, border-color .2s;
}
.slideshow-dot.active,
.slideshow-dot:hover {
    background: #fff;
    border-color: #fff;
}

/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 44px;
    padding: 20px 0 60px;
}
.content-main { flex: 0 0 1020px; width: 1020px; min-width: 0; }
.sidebar { flex: 0 0 320px; width: 320px; }

/* 文章卡片 - 左侧缩略图模式 */
.article-list { display: flex; flex-direction: column; gap: 22px; }
.article-card {
    background: var(--c-card);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow .3s, transform .2s;
    position: relative;
    display: flex;
    overflow: hidden;
}
.article-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* CSS伪缩略图 */
.article-thumb {
    width: 220px;
    min-height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    line-height: var(--lh-tight);
    position: relative;
    overflow: hidden;
}
.article-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
}
.article-thumb span {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
/* 指定关键词（thumb_text）：按字数自动调整字号，字越少越大、字越多越小 */
.article-thumb span.thumb-kw { font-weight: 800; line-height: 1.15; letter-spacing: 0.04em; -webkit-line-clamp: 3; }
.article-thumb span.thumb-kw.thumb-len-2 { font-size: 54px; }
.article-thumb span.thumb-kw.thumb-len-3 { font-size: 42px; }
.article-thumb span.thumb-kw.thumb-len-4 { font-size: 32px; }
.article-thumb span.thumb-kw.thumb-len-5 { font-size: 26px; }
.article-thumb span.thumb-kw.thumb-len-6 { font-size: 22px; }
/* 标题兜底（无指定关键词）：保持适老化正文小字，不抢视觉 */
.article-thumb span:not(.thumb-kw) { font-size: 19px; font-weight: 600; line-height: 1.4; }

/* 多种配色循环 */
.article-card:nth-child(5n+1) .article-thumb { background: linear-gradient(135deg, #059669, #047857); }
.article-card:nth-child(5n+2) .article-thumb { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.article-card:nth-child(5n+3) .article-thumb { background: linear-gradient(135deg, #d97706, #b45309); }
.article-card:nth-child(5n+4) .article-thumb { background: linear-gradient(135deg, #db2777, #be185d); }
.article-card:nth-child(5n+5) .article-thumb { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.article-body {
    flex: 1;
    padding: 22px 26px;
    min-width: 0;
}
.article-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: var(--lh-tight);
}
.article-title a { color: #111827; }
.article-title a:hover { color: var(--c-link); }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    margin-bottom: 14px;
}
.meta-category a {
    color: var(--c-link);
    background: var(--c-primary-soft);
    padding: 4px 14px;
    border-radius: 14px;
    font-size: var(--fs-sm);
}
.article-excerpt {
    font-size: var(--fs-base);
    color: var(--c-text-soft);
    line-height: var(--lh-base);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    display: inline-block;
    margin-top: 14px;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--c-link);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: var(--fs-sm);
    font-weight: 700;
}
.badge-top {
    background: #fef3c7;
    color: #b45309;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

/* 文章详情 */
.article-detail {
    background: var(--c-card);
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.breadcrumb {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    margin-bottom: 22px;
    line-height: var(--lh-base);
}
.breadcrumb a { color: var(--c-text-soft); }
.breadcrumb .separator { margin: 0 8px; }
.breadcrumb .current { color: var(--c-text); }
.article-header { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 2px solid var(--c-border-soft); }
.article-header .article-title { font-size: var(--fs-title); margin-bottom: 14px; line-height: var(--lh-tight); }

/* 本文简介 */
.article-intro {
    margin: 24px 0 30px;
    padding: 22px 26px;
    background: var(--c-primary-soft);
    border: 1px solid #c7d2fe;
    border-left: 6px solid var(--c-primary);
    border-radius: 12px;
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--c-text-soft);
}
.article-intro .intro-label {
    color: var(--c-primary);
    font-weight: 700;
    margin-right: 8px;
}

.article-content { font-size: var(--fs-base); line-height: var(--lh-base); color: var(--c-text); letter-spacing: var(--ls-base); }
.article-content h2 { font-size: var(--fs-xl); margin: 32px 0 16px; color: #111827; line-height: var(--lh-tight); }
.article-content h3 { font-size: var(--fs-lg); margin: 26px 0 14px; color: #1f2937; line-height: var(--lh-tight); }
.article-content p { margin-bottom: 22px; }
.article-content img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.article-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
}
.article-content code { background: #f3f4f6; padding: 3px 8px; border-radius: 6px; font-size: var(--fs-sm); }
.article-content pre code { background: none; padding: 0; }
.article-content blockquote { border-left: 6px solid var(--c-primary); padding: 12px 20px; margin: 20px 0; background: #f9fafb; color: var(--c-text-soft); }

/* 文章标签 */
.article-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--c-border-soft); }
.tag { display: inline-block; padding: 8px 18px; background: #f3f4f6; border-radius: 24px; font-size: var(--fs-sm); color: var(--c-text-soft); transition: all .2s; }
.tag:hover { background: var(--c-primary); color: #fff; }

/* 上一篇/下一篇 */
.article-nav {
    display: flex;
    gap: 24px;
    margin-top: 36px;
}
.nav-box {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: 1.8em 1.8em 1.8em 1.8em;
    gap: 0;
    align-items: start;
    padding: 22px 26px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.nav-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}
.nav-box.nav-empty {
    background: #94a3b8;
    cursor: default;
}
.nav-title {
    grid-row: 1 / 3;
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: var(--lh-tight);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.nav-meta {
    grid-row: 4;
    align-self: end;
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
    opacity: 0.92;
}

/* 相关文章 */
.related-card {
    background: var(--c-card);
    border-radius: 14px;
    padding: 28px 30px;
    margin-top: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.related-articles { margin-top: 0; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-item { border-bottom: 1px solid #f0f0f0; }
.related-item:last-child { border-bottom: none; }
.related-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    text-decoration: none;
    color: var(--c-text);
    font-size: var(--fs-base);
    transition: color .2s;
}
.related-link:hover { color: var(--c-link); }
.related-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-date { flex-shrink: 0; margin-left: 20px; color: var(--c-text-muted); font-size: var(--fs-sm); }

/* 分类/搜索头部 */
.category-header, .search-header {
    background: var(--c-card);
    border-radius: 14px;
    padding: 28px 30px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.category-header h1, .search-header h1 { font-size: var(--fs-xl); color: #111827; line-height: var(--lh-tight); }
.category-desc { color: var(--c-text-soft); margin-top: 10px; font-size: var(--fs-base); line-height: var(--lh-base); }
.category-count, .search-count { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: 8px; }
.search-inline { margin-bottom: 24px; }

/* 侧边栏 */
.widget {
    background: var(--c-card);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.widget-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 18px;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-primary-soft);
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 44px;
    height: 2px;
    background: var(--c-primary);
}

/* 站点统计小部件 */
.widget-site-stats { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); }
.widget-site-stats .site-stats-body { display: flex; flex-direction: column; gap: 14px; }
.widget-site-stats .site-stats-row {
    display: flex;
    align-items: baseline;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.widget-site-stats .site-stats-label { font-size: var(--fs-base); color: var(--c-text-soft); }
.widget-site-stats .site-stats-num {
    margin-left: auto;
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--c-primary);
    line-height: 1;
}
.widget-site-stats .site-stats-unit {
    margin-left: 6px;
    font-size: var(--fs-sm);
    color: #64748b;
}

/* 搜索框 - 简洁 pill 式（放大触摸区） */
.search-form {
    display: flex;
    width: 100%;
    height: 56px;
    margin-bottom: 24px;
    border: 2px solid var(--c-border);
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(67,56,202,0.12);
}
.search-input {
    flex: 1 1 auto;
    min-width: 0; /* 防止长 placeholder/中文撑爆 flex，挤压按钮 */
    height: 100%;
    padding: 0 18px;
    border: none;
    border-radius: 28px 0 0 28px;
    background: transparent;
    font-size: var(--fs-base);
    outline: none;
    color: var(--c-text);
}
.search-input::placeholder { color: var(--c-text-muted); }
.search-btn {
    flex: 0 0 auto;
    height: 100%;
    padding: 0 22px;
    border: none;
    border-radius: 0 28px 28px 0;
    background: var(--c-primary);
    color: #fff;
    font-size: var(--fs-base);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap; /* 按钮文字不换行/不裁切 */
}
.search-btn:hover { background: #3730a3; }

/* 搜索页内联搜索框保持较大宽度 */
.search-inline .search-form {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.search-inline .search-input { border-radius: 28px 0 0 28px; }

/* 栏目导航 - 大气下拉 */
.category-select-wrapper { position: relative; }
.category-select {
    width: 100%;
    padding: 16px 46px 16px 18px;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    font-size: var(--fs-base);
    color: var(--c-text);
    background: #f9fafb;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: all .2s;
    line-height: var(--lh-tight);
}
.category-select:hover { border-color: #a5b4fc; background: #fff; }
.category-select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(67,56,202,0.12); }
.category-select-wrapper::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -6px;
    width: 12px;
    height: 12px;
    border-right: 3px solid var(--c-text-muted);
    border-bottom: 3px solid var(--c-text-muted);
    transform: rotate(45deg);
    pointer-events: none;
}

.category-list { list-style: none; }
.category-list li { border-bottom: 1px solid #f9fafb; }
.category-list li:last-child { border-bottom: none; }
.category-list a { display: block; padding: 14px 0; font-size: var(--fs-base); color: var(--c-text-soft); transition: color .2s; }
.category-list a:hover, .category-list a.active { color: var(--c-link); }

.hot-list { list-style: none; }
.hot-list li { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f9fafb; font-size: var(--fs-base); }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { flex: 1; color: var(--c-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }
.hot-list a:hover { color: var(--c-link); }
.hot-views { font-size: var(--fs-sm); color: var(--c-text-muted); flex-shrink: 0; }

/* 二维码 */
.qr-code { text-align: center; }
.qr-code img { max-width: 100%; height: auto; border-radius: 10px; }
.qr-code p { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: 10px; }

/* 分页（放大，手指友好） */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    padding: 10px 18px;
    border: 2px solid var(--c-border);
    border-radius: 10px;
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--c-text-soft);
    background: #fff;
    transition: all .2s;
}
.page-btn:hover { background: #f3f4f6; color: var(--c-link); }
.page-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* 空状态 */
.empty-state {
    background: var(--c-card);
    border-radius: 14px;
    text-align: center;
    padding: 90px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.empty-icon { font-size: 80px; margin-bottom: 20px; }
.empty-state h3 { font-size: var(--fs-lg); color: var(--c-text); margin-bottom: 12px; }
.empty-state p { color: var(--c-text-muted); font-size: var(--fs-base); }

/* 错误页 */
.error-page { text-align: center; padding: 90px 24px; }
.error-code { font-size: 140px; font-weight: 800; color: #e5e7eb; line-height: 1; }
.error-page h2 { font-size: var(--fs-xl); color: var(--c-text); margin: 20px 0; }
.error-page p { color: var(--c-text-muted); margin-bottom: 28px; font-size: var(--fs-base); }
.btn-home { display: inline-block; padding: 14px 30px; background: var(--c-primary); color: #fff; border-radius: 10px; font-size: var(--fs-base); font-weight: 700; transition: all .3s; min-height: var(--tap-min); }
.btn-home:hover { background: #3730a3; color: #fff; transform: translateY(-1px); }

/* 底部 */
.footer {
    background: var(--c-card);
    border-top: 2px solid var(--c-border-soft);
    padding: 44px 0;
    text-align: center;
}
.footer-info { font-size: var(--fs-base); color: var(--c-text-soft); line-height: 2.2; }
.footer-info p { margin-bottom: 4px; }
.footer-info a { color: var(--c-link); }
.footer-info a:hover { color: var(--c-link-hover); }
.footer-contact { color: var(--c-text); font-size: var(--fs-base); }
.footer-slogan { color: var(--c-text-soft); }
.footer-beian { font-size: var(--fs-sm); color: var(--c-text-muted); }
.footer-beian a { color: var(--c-text-muted); }
.footer-beian a:hover { color: var(--c-link); }
.footer-copyright-line { font-size: var(--fs-sm); color: var(--c-text-muted); }
.footer-sep { margin: 0 10px; color: #d1d5db; }
.footer-powered { font-size: var(--fs-sm); }
.footer-powered a { color: var(--c-text-muted); }
.footer-powered a:hover { color: var(--c-link); }
.footer-stats { margin-top: 8px; }

/* 友情链接 */
.friend-links {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px dashed var(--c-border-soft);
    font-size: var(--fs-base);
    line-height: 2.4;
}
.friend-links-label {
    color: var(--c-text-soft);
    font-weight: 700;
}
.friend-links a {
    display: inline-block;
    color: var(--c-link);
    margin: 0 10px;
    transition: color .2s;
    font-size: var(--fs-base);
}
.friend-links a:hover {
    color: var(--c-link-hover);
    text-decoration: underline;
}

/* 导航下拉菜单（级联多列，支持无限层级） */
.nav-dropdown { position: relative; }
.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

/* 级联菜单容器 */
.nav-menu-cascade {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 6px;
    z-index: 200;
}

/* 顶级下拉箭头 */
.nav-dropdown > .nav-menu-cascade::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    border-width: 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff;
}

/* 单列 */
.nav-col {
    min-width: 200px;
    max-width: 260px;
    padding: 4px 0;
}
.nav-col + .nav-col {
    border-left: 1px solid var(--c-border-soft);
}

/* 列头：显示当前父级名称 */
.nav-col-header {
    padding: 10px 18px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid var(--c-border-soft);
    margin-bottom: 4px;
    white-space: nowrap;
}

/* 列项 */
.nav-col-item {
    position: relative;
    padding: 0;
    font-size: var(--fs-base);
}
.nav-col-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    color: var(--c-text-soft);
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-col-item:hover > a {
    background: #f3f4f6;
    color: var(--c-link);
}

/* 有下级菜单的项：蓝色三角箭头 */
.nav-col-item.has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #2563eb;
    flex-shrink: 0;
}

/* 下级菜单在右侧展开 */
.nav-col-item > .nav-menu-cascade {
    top: -8px;
    left: 100%;
    margin-top: 0;
    margin-left: 0;
}
.nav-col-item > .nav-menu-cascade::before {
    display: none;
}

/* 鼠标悬停显示下级菜单 */
.nav-dropdown:hover > .nav-menu-cascade,
.nav-col-item:hover > .nav-menu-cascade {
    display: flex;
}

/* 侧边栏分类树 */
.category-tree li { padding-left: 0; }
.category-tree li.cat-level-1 { padding-left: 16px; }
.category-tree li.cat-level-2 { padding-left: 32px; }
.category-tree li.cat-level-3 { padding-left: 48px; }

/* 响应式：平板 */
@media (max-width: 1200px) {
    .content-main { flex: 1; width: 100%; }
    .sidebar { flex: 0 0 auto; width: 100%; }
    .content-wrapper { flex-direction: column; gap: 36px; }
}

/* 响应式：手机 */
@media (max-width: 1024px) {
    .slideshow { width: 100%; height: auto; aspect-ratio: 1020/400; }
    .article-thumb { width: 180px; }
    .search-inline .search-form { max-width: 100%; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header .container { height: 64px; gap: 12px; }
    .logo-text { font-size: 24px; }
    /* 移动端字号切换：竖排悬浮左下，避免遮挡导航 */
    .font-size-switch { top: auto; bottom: 16px; transform: none; padding: 8px 6px; gap: 8px; border-radius: 0 18px 18px 0; }
    .fs-btn { width: 46px; height: 46px; min-width: 46px; border-width: 2px; border-radius: 10px; }
    .fs-btn[data-fs="small"] { font-size: 16px; }
    .fs-btn[data-fs="normal"] { font-size: 19px; }
    .fs-btn[data-fs="large"] { font-size: 24px; }
    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #6d28d9;
        flex-direction: column;
        padding: 14px;
        gap: 10px;
    }
    .nav.open { display: flex; }
    /* 移动端导航变下拉菜单，箭头按钮无意义，隐藏 */
    .nav-scroll { flex: 0 0 auto; }
    .nav-arrow, .nav-scroll.nav-overflow .nav-arrow { display: none; }
    .nav-item {
        border-radius: 10px;
        min-height: var(--tap-min);
        width: 100%;
        justify-content: flex-start;
        font-size: var(--fs-base);
    }
    .nav-toggle { display: block; }
    .hero { padding: 28px 18px; }
    .hero h1 { font-size: var(--fs-xl); }
    .content-wrapper { padding: 20px 0 40px; gap: 28px; }
    .article-card { flex-direction: column; }
    .article-thumb { width: 100%; min-height: 120px; }
    .article-body { padding: 20px; }
    .article-title { font-size: var(--fs-lg); }
    .article-detail { padding: 24px 20px; }
    .article-header .article-title { font-size: var(--fs-xl); }
    .article-intro { padding: 18px 20px; font-size: var(--fs-base); }
    .article-content { font-size: var(--fs-base); }
    .article-content h2 { font-size: var(--fs-lg); }
    .article-content h3 { font-size: var(--fs-base); }
    .article-nav { flex-direction: column; gap: 16px; }
    .nav-box { width: 100%; min-height: var(--tap-min); }
    .nav-title { font-size: var(--fs-base); }
    .related-link { font-size: var(--fs-base); padding: 14px 0; }
    .category-header, .search-header { padding: 22px 20px; }
    .category-header h1, .search-header h1 { font-size: var(--fs-lg); }
    .widget { padding: 20px; }
    .widget-title { font-size: var(--fs-lg); }
    .search-form { height: 56px; }
    .search-btn { font-size: var(--fs-base); }
    .page-btn { min-width: var(--tap-min); min-height: var(--tap-min); font-size: var(--fs-base); }
    .footer { padding: 36px 0; }
    .footer-info { font-size: var(--fs-base); }
}

/* 加密内容块 */
.encrypted-block {
    margin: 24px 0;
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    overflow: hidden;
}
.encrypted-lock {
    text-align: center;
    padding: 36px 24px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.encrypted-icon { font-size: 48px; margin-bottom: 14px; }
.encrypted-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
}
.encrypted-desc {
    font-size: var(--fs-base);
    color: #a16207;
    margin-bottom: 20px;
}
.encrypted-input-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}
.encrypted-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #fcd34d;
    border-radius: 8px;
    font-size: var(--fs-base);
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.encrypted-input:focus { border-color: #f59e0b; }
.encrypted-btn {
    padding: 12px 24px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.encrypted-btn:hover { background: #d97706; }
.encrypted-error {
    color: #ef4444;
    font-size: var(--fs-sm);
    margin-top: 12px;
}
.encrypted-content {
    padding: 24px;
    background: #fffbeb;
    border-top: 1px dashed #fcd34d;
}

/* 侧边栏标签云 */
.tag-cloud-sidebar { display: flex; flex-wrap: wrap; gap: 12px; }
.tag-sidebar-item { display: inline-block; padding: 8px 16px; background: #f3f4f6; border-radius: 24px; font-size: var(--fs-sm); color: var(--c-text-soft); text-decoration: none; transition: all .2s; }
.tag-sidebar-item:hover { background: var(--c-primary); color: #fff; }
@media (max-width: 991px) { .qr-desktop { display: none; } }

/* 评论区 */
.comment-section {
    margin: 48px 0 0;
    width: 100%;
}
.comment-section .section-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 24px;
    color: #111827;
}
.comment-list {
    margin-bottom: 36px;
}
.comment-item {
    display: flex;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid var(--c-border-soft);
}
.comment-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4338ca, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-base);
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.comment-nickname {
    font-weight: 700;
    font-size: var(--fs-base);
    color: var(--c-text);
}
.comment-time {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
}
.comment-content {
    font-size: var(--fs-base);
    color: var(--c-text-soft);
    line-height: var(--lh-base);
}
.comment-empty {
    color: var(--c-text-muted);
    text-align: center;
    padding: 36px;
    font-size: var(--fs-base);
}
.comment-msg {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: var(--fs-base);
}
.comment-msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.comment-msg-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.comment-form-wrapper {
    background: var(--c-card);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.comment-form-wrapper h4 {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 22px;
    color: #111827;
}
.comment-form .form-group { margin-bottom: 18px; }
.comment-form .form-group label {
    display: block;
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 8px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="number"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--c-border);
    border-radius: 10px;
    font-size: var(--fs-base);
    color: var(--c-text);
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(67,56,202,0.12);
}
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.comment-submit-btn {
    display: inline-block;
    padding: 14px 34px;
    background: var(--c-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--fs-base);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    min-height: var(--tap-min);
}
.comment-submit-btn:hover { background: #3730a3; }
@media (max-width: 768px) {
    .comment-section {
        padding: 0 16px;
        max-width: 100%;
    }
    .comment-form-grid {
        grid-template-columns: 1fr;
    }
    .comment-form-wrapper { padding: 22px; }
}

/* 广告位容器 */
.ad-slot {
    text-align: center;
    margin: 20px 0;
    overflow: hidden;
}
.ad-slot > * { max-width: 100%; }
