@charset "UTF-8";
/**
 * 轻灵CMS - 前台样式
 * qlcms.cn 2026/8/30 13:09 修改
 */

/* ============ 网址导航（全站唯一页面） ============ */
/* 板块容器：相邻板块之间留出呼吸空间，但不过度 */
.directory-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 单个板块 */
.dir-block {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #eef0f3);
    border-radius: 10px;
    padding: 14px 16px 16px;
}

.dir-block-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color, #eef0f3);
}

.dir-block-title {
    font-size: var(--fs-lg, 17px);
    font-weight: 600;
    color: var(--text-color, #1f2937);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dir-block-count {
    font-size: var(--fs-xs, 12px);
    color: var(--text-muted, #94a3b8);
}

/* 链接区：所有间距由 show.php 内联 <style> 与 <a> 内联 style 精确控制（flex + line-height:14px + margin:0 20px 8px 0） */
/* 此处仅做兜底，保持 flex 布局，避免任何 grid 列均分破坏链接宽度 */
.dir-links {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 0;
    padding: 0;
}

.dir-link-card {
    display: inline-block;
    border-radius: 4px;
    color: var(--text-color, #1f2937);
    font-size: 14px;
    line-height: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
    letter-spacing: 0;
    word-spacing: 0;
}

.dir-link-card:hover {
    background: var(--primary-soft, #eef2ff);
    color: var(--primary-color, #4f46e5);
}

.dir-link-name {
    display: inline-block;
    line-height: 14px;
}

.dir-links-empty {
    font-size: 14px;
    color: var(--text-muted, #94a3b8);
    padding: 8px 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #94a3b8);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 快速导航（侧边栏锚点跳转） */
.dir-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dir-nav-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--text-color, #1f2937);
    text-decoration: none;
    font-size: var(--fs-sm, 13px);
}
.dir-nav-list a:hover { background: var(--primary-soft, #eef2ff); color: var(--primary-color, #4f46e5); }
.dir-nav-count {
    font-size: var(--fs-xs, 12px);
    color: var(--text-muted, #94a3b8);
    background: var(--bg-soft, #f1f5f9);
    border-radius: 10px;
    padding: 1px 8px;
}

/* 页面标题区 */
.directory-header { margin-bottom: 16px; }
.directory-title { font-size: var(--fs-xl, 22px); font-weight: 700; color: var(--text-color, #1f2937); }
.directory-desc { margin-top: 6px; color: var(--text-muted, #64748b); font-size: var(--fs-sm, 13px); line-height: 1.6; }


/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* 字号三档：通过 body 类覆盖变量（A / A+ / A++），全站含侧边栏跟随 */
body {
    --fs-base: 15px;
    --fs-sm: 13px;
    --fs-xs: 12px;
    --fs-lg: 17px;
    --fs-xl: 22px;
    --fs-title: 18px;
    --lh-base: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: #374151;
    background: #f3f4f6 url(/bj.png);
}
/* 标准档（默认） */
body.fs-normal {
    --fs-base: 15px;
    --fs-sm: 13px;
    --fs-xs: 12px;
    --fs-lg: 17px;
    --fs-xl: 22px;
    --fs-title: 18px;
    --lh-base: 1.7;
}
/* 大字号档 */
body.fs-large {
    --fs-base: 18px;
    --fs-sm: 16px;
    --fs-xs: 14px;
    --fs-lg: 21px;
    --fs-xl: 27px;
    --fs-title: 23px;
    --lh-base: 1.9;
}
/* 超大字号档 */
body.fs-xlarge {
    --fs-base: 21px;
    --fs-sm: 18px;
    --fs-xs: 16px;
    --fs-lg: 25px;
    --fs-xl: 32px;
    --fs-title: 28px;
    --lh-base: 2.1;
    overflow-x: auto;
}
body.fs-xlarge .header .container { flex-wrap: nowrap; }
body.fs-xlarge .content-wrapper { flex-wrap: nowrap; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* 容器宽度：后台可配置 1360 或 100% 全屏
   设计：
   - 1360 模式：所有 .container 都居中 1360px，不带 padding
   - 100% 模式：仅 header/footer 的 .container 全屏；主体的 .container 仍居中 1360px，
     并保留左右 padding 让内页(没有 .content-wrapper 的) 也有边距 */
body[data-container="1360"] .container { max-width: 1360px; padding: 0; }
body[data-container="100%"] .header .container,
body[data-container="100%"] .footer .container { max-width: 100%; }
/* 100% 模式下，主体 .container 仍居中 1360px（不动 .content-wrapper 内的子元素），
   单独的 .container 不带 .content-wrapper 时给 20px 左右内边距 */
body[data-container="100%"] .container { max-width: 1360px; }

a { color: #4f46e5; text-decoration: none; transition: color .2s; }
a:hover { color: #4338ca; }

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    min-height: 64px;
    box-sizing: border-box;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    height: 64px;
    min-height: 64px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 50px; width: auto; display: block; }
.logo-text {
    font-size: var(--fs-title);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}
.nav {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
}
.nav::-webkit-scrollbar { display: none; }
.nav.dragging { cursor: grabbing; user-select: none; }
.nav-item {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: var(--fs-lg);
    color: #fff;
    white-space: nowrap;
    transition: all .2s;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.18);
    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: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: var(--fs-title);
    cursor: pointer;
    color: #fff;
    margin-left: auto;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}
.hero-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    max-width: 720px;
    margin: 0 auto;
}

/* 首页幻灯片 */
.slideshow {
    position: relative;
    width: 1020px;
    height: 400px;
    margin: 30px auto 0;
    border-radius: 10px;
    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: 44px;
    height: 44px;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 28px;
    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: 12px; }
.slideshow-next { right: 12px; }

.slideshow-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    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: 40px;
    padding: 30px 0 50px;
}
.content-main { flex: 0 0 1020px; width: 1020px; min-width: 0; }
.sidebar { flex: 0 0 300px; width: 300px; }

/* 文章卡片 - 左侧缩略图模式 */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    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.1);
    transform: translateY(-2px);
}

/* CSS伪缩略图 */
.article-thumb {
    width: 180px;
    min-height: 130px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    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;
}
/* 多种配色循环 */
.article-card:nth-child(5n+1) .article-thumb { background: linear-gradient(135deg, #10b981, #059669); }
.article-card:nth-child(5n+2) .article-thumb { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.article-card:nth-child(5n+3) .article-thumb { background: linear-gradient(135deg, #f59e0b, #d97706); }
.article-card:nth-child(5n+4) .article-thumb { background: linear-gradient(135deg, #ec4899, #db2777); }
.article-card:nth-child(5n+5) .article-thumb { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.article-body {
    flex: 1;
    padding: 18px 20px;
    min-width: 0;
}
.article-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.45;
}
.article-title a { color: #1f2937; }
.article-title a:hover { color: #4f46e5; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: var(--fs-xs);
    color: #9ca3af;
    margin-bottom: 10px;
}
.meta-category a {
    color: #4f46e5;
    background: #eef2ff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: var(--fs-xs);
}
.article-excerpt {
    font-size: var(--fs-sm);
    color: #6b7280;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: #4f46e5;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.badge-top {
    background: #fef3c7;
    color: #d97706;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.breadcrumb {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 18px;
}
.breadcrumb a { color: #6b7280; }
.breadcrumb .separator { margin: 0 8px; }
.breadcrumb .current { color: #4b5563; }
.article-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #f3f4f6; }
.article-header .article-title { font-size: 1.625rem; margin-bottom: 10px; }

/* 本文简介 */
.article-intro {
    margin: 18px 0 24px;
    padding: 18px 22px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-left: 4px solid #4f46e5;
    border-radius: 10px;
    font-size: 0.9375rem;
    line-height: 1.85;
    color: #64748b;
}
.article-intro .intro-label {
    color: #4f46e5;
    font-weight: 700;
    margin-right: 6px;
}

.article-content { font-size: 1rem; line-height: 1.9; color: #374151; }
.article-content h2 { font-size: 1.375rem; margin: 24px 0 12px; color: #1f2937; }
.article-content h3 { font-size: 1.125rem; margin: 20px 0 10px; }
.article-content p { margin-bottom: 16px; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.article-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}
.article-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: var(--fs-sm); }
.article-content pre code { background: none; padding: 0; }
.article-content blockquote { border-left: 4px solid #4f46e5; padding: 8px 16px; margin: 16px 0; background: #f9fafb; color: #6b7280; }



/* 文章标签 */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f3f4f6; }
.tag { display: inline-block; padding: 4px 12px; background: #f3f4f6; border-radius: 20px; font-size: var(--fs-xs); color: #6b7280; transition: all .2s; }
.tag:hover { background: #4f46e5; color: #fff; }

/* 上一篇/下一篇 */
.article-nav {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}
.nav-box {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: 1.6em 1.6em 1.6em 1.6em;
    gap: 0;
    align-items: start;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.nav-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.nav-box.nav-empty {
    background: #94a3b8;
    cursor: default;
}
.nav-title {
    grid-row: 1 / 3;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    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: 14px;
    line-height: 1.6;
    opacity: 0.92;
}


/* 相关文章 */
.related-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.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: 11px 0;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    transition: color .2s;
}
.related-link:hover { color: #4f46e5; }
.related-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-date { flex-shrink: 0; margin-left: 20px; color: #9ca3af; font-size: var(--fs-xs); }

/* 分类/搜索头部 */
.category-header, .search-header {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.category-header h1, .search-header h1 { font-size: var(--fs-title); color: #1f2937; }
.category-desc { color: #6b7280; margin-top: 6px; font-size: var(--fs-sm); }
.category-count, .search-count { font-size: var(--fs-xs); color: #9ca3af; margin-top: 4px; }
.search-inline { margin-bottom: 20px; }

/* 侧边栏 */
.widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.widget-title {
    font-size: var(--fs-title);
    font-weight: 700;
    margin-bottom: 14px;
    color: #1f2937;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2ff;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: #4f46e5;
}

/* 站点统计小部件 */
.widget-site-stats { background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); }
.widget-site-stats .site-stats-body { display: flex; flex-direction: column; gap: 12px; }
.widget-site-stats .site-stats-row {
    display: flex;
    align-items: baseline;
    padding: 12px 14px;
    background: #fff;
    border-radius: 10px;
    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-sm); color: #64748b; }
.widget-site-stats .site-stats-num {
    margin-left: auto;
    font-size: var(--fs-xl);
    font-weight: 800;
    color: #4f46e5;
    line-height: 1;
}
.widget-site-stats .site-stats-unit {
    margin-left: 4px;
    font-size: var(--fs-xs);
    color: #94a3b8;
}

/* 搜索框 - 简洁 pill 式 */
.search-form {
    display: flex;
    width: 100%;
    height: 40px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.search-input {
    flex: 1;
    height: 100%;
    padding: 0 14px;
    border: none;
    border-radius: 20px 0 0 20px;
    background: transparent;
    font-size: var(--fs-sm);
    outline: none;
    color: #374151;
}
.search-input::placeholder { color: #9ca3af; }
.search-btn {
    height: 100%;
    padding: 0 18px;
    border: none;
    border-radius: 0 20px 20px 0;
    background: #4f46e5;
    color: #fff;
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
/* A++ 档：搜索框整体加高、按钮加宽，防止字大偏左 */
body.fs-xlarge .search-form { height: 52px; border-radius: 26px; }
body.fs-xlarge .search-input { padding: 0 18px; border-radius: 26px 0 0 26px; min-width: 0; }
body.fs-xlarge .search-btn { padding: 0 26px; border-radius: 0 26px 26px 0; }
.search-btn:hover { background: #4338ca; }

/* 搜索页内联搜索框保持较大宽度 */
.search-inline .search-form {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.search-inline .search-input { border-radius: 20px 0 0 20px; }

/* 栏目导航 - 大气下拉 */
.category-select-wrapper { position: relative; }
.category-select {
    width: 100%;
    padding: 13px 42px 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: var(--fs-sm);
    color: #374151;
    background: #f9fafb;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: all .2s;
    line-height: 1.5;
}
.category-select:hover { border-color: #a5b4fc; background: #fff; }
.category-select:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.category-select-wrapper::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    margin-top: -5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    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: 10px 0; font-size: var(--fs-sm); color: #4b5563; transition: color .2s; }
.category-list a:hover, .category-list a.active { color: #4f46e5; }

.hot-list { list-style: none; }
.hot-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f9fafb; font-size: var(--fs-sm); }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { flex: 1; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.hot-list a:hover { color: #4f46e5; }
.hot-views { font-size: var(--fs-xs); color: #9ca3af; flex-shrink: 0; }

/* 二维码 */
.qr-code { text-align: center; }
.qr-code img { max-width: 100%; height: auto; border-radius: 8px; }
.qr-code p { font-size: var(--fs-xs); color: #9ca3af; margin-top: 8px; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    background: #fff;
    transition: all .2s;
}
.page-btn:hover { background: #f3f4f6; color: #4f46e5; }
.page-btn.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* 空状态 */
.empty-state {
    background: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 30px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; color: #374151; margin-bottom: 8px; }
.empty-state p { color: #9ca3af; }

/* 错误页 */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 120px; font-weight: 800; color: #e5e7eb; line-height: 1; }
.error-page h2 { font-size: 24px; color: #374151; margin: 16px 0; }
.error-page p { color: #9ca3af; margin-bottom: 24px; }
.btn-home { display: inline-block; padding: 10px 24px; background: #4f46e5; color: #fff; border-radius: 8px; font-size: 15px; font-weight: 600; transition: all .3s; }
.btn-home:hover { background: #4338ca; color: #fff; transform: translateY(-1px); }

/* 底部 */
.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 35px 0;
    text-align: center;
}
.footer-info { font-size: var(--fs-sm); color: #6b7280; line-height: 2; }
.footer-info p { margin-bottom: 2px; }
.footer-info a { color: #4f46e5; }
.footer-info a:hover { color: #4338ca; }
.footer-contact { color: #374151; }
.footer-slogan { color: #4b5563; }
.footer-beian { font-size: var(--fs-xs); color: #9ca3af; }
.footer-beian a { color: #9ca3af; }
.footer-beian a:hover { color: #4f46e5; }
.footer-copyright-line { font-size: var(--fs-xs); color: #9ca3af; }
.footer-sep { margin: 0 8px; color: #d1d5db; }
.footer-powered { font-size: var(--fs-xs); }
.footer-powered a { color: #9ca3af; }
.footer-powered a:hover { color: #4f46e5; }
.footer-stats { margin-top: 6px; }

/* 友情链接（996 通用标准：flex 居中、gap 6px 20px、13px 灰字） */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    line-height: 2;
}
.footer-links-label {
    color: #6b7280;
    font-weight: 600;
}
.footer-links a {
    color: #6b7280;
    transition: color .2s;
}
.footer-links a:hover {
    color: #4f46e5;
    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: 160px;
    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: 160px;
    max-width: 220px;
    padding: 4px 0;
}
.nav-col + .nav-col {
    border-left: 1px solid #e5e7eb;
}

/* 列头：显示当前父级名称 */
.nav-col-header {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* 列项 */
.nav-col-item {
    position: relative;
    padding: 0;
    font-size: 14px;
}
.nav-col-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
    color: #4b5563;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-col-item:hover > a {
    background: #f3f4f6;
    color: #4f46e5;
}

/* 有下级菜单的项：蓝色三角箭头 */
.nav-col-item.has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #3b82f6;
    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;
}

/* 鼠标悬停显示下级菜单（由 main.js 控制 display，避免被 .nav 的 overflow 裁切） */
.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: 14px; }
.category-tree li.cat-level-2 { padding-left: 28px; }
.category-tree li.cat-level-3 { padding-left: 42px; }

/* 响应式 */
@media (max-width: 1024px) {
    .slideshow { width: 100%; height: auto; aspect-ratio: 1020/400; }
    .content-wrapper { flex-direction: column; }
    .content-main { flex: 1; width: 100%; }
    .sidebar { flex: 0 0 auto; width: 100%; }
    .article-thumb { width: 150px; }
    .search-inline .search-form { max-width: 100%; }
}
@media (max-width: 768px) {
    .header .container { height: 56px; }
    .nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #7c3aed;
        flex-direction: column;
        padding: 12px;
    }
    .nav.open { display: flex; }
    .nav-item { border-radius: 8px; }
    .nav-toggle { display: block; }
    .hero { padding: 20px 16px; }
    .hero h1 { font-size: 22px; }
    .content-wrapper { padding: 30px 0 30px; }
    .article-card { flex-direction: column; }
    .article-thumb { width: 100%; min-height: 90px; }
    .article-detail { padding: 20px; }
    .article-header .article-title { font-size: 20px; }
    .article-nav { flex-direction: column; gap: 12px; }
    .nav-box { width: 100%; }
}

/* 加密内容块 */
.encrypted-block {
    margin: 20px 0;
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    overflow: hidden;
}
.encrypted-lock {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.encrypted-icon { font-size: 40px; margin-bottom: 10px; }
.encrypted-title {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 6px;
}
.encrypted-desc {
    font-size: 14px;
    color: #a16207;
    margin-bottom: 16px;
}
.encrypted-input-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}
.encrypted-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.encrypted-input:focus { border-color: #f59e0b; }
.encrypted-btn {
    padding: 8px 20px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.encrypted-btn:hover { background: #d97706; }
.encrypted-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 10px;
}
.encrypted-content {
    padding: 20px;
    background: #fffbeb;
    border-top: 1px dashed #fcd34d;
}

/* 侧边栏标签云 */
.tag-cloud-sidebar{display:flex;flex-wrap:wrap;gap:8px}
.tag-sidebar-item{display:inline-block;padding:5px 12px;background:#f3f4f6;border-radius:20px;font-size:13px;color:#4b5563;text-decoration:none;transition:all .2s}
.tag-sidebar-item:hover{background:#4f46e5;color:#fff}
@media(max-width:991px){.qr-desktop{display:none}}

/* ============ 标签单索引页（989 标准 · 标签4件套） ============ */
.breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px;color:#9ca3af;margin-bottom:18px}
.breadcrumb a{color:#6b7280;text-decoration:none}
.breadcrumb a:hover{color:#4f46e5}
.breadcrumb .sep{color:#cbd5e1}
.breadcrumb .current{color:#4f46e5;font-weight:600}

/* 标题头卡片包裹 */
.single-index-header{padding:20px 24px;background:#fff;border:1px solid #eef0f3;border-radius:12px;margin-bottom:16px}
.single-index-header h1{font-size:28px;font-weight:800;color:#1f2937;margin:0 0 6px}
.single-index-count{font-size:14px;color:#6b7280;margin:0}
.single-index-count strong{color:#4f46e5}

/* 顶部索引切换条：0-9、A~Z 共 27 个（卡片包裹） */
.index-switch{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;padding:16px 20px;background:#fff;border:1px solid #eef0f3;border-radius:12px}
.index-switch-btn{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 8px;background:#f3f4f6;border-radius:8px;font-weight:700;font-size:14px;color:#4b5563;text-decoration:none;transition:all .2s}
.index-switch-btn:hover{background:#4f46e5;color:#fff}
.index-switch-btn.active{background:#4f46e5;color:#fff;box-shadow:0 2px 8px rgba(79,70,229,.3)}

/* 标签列表：按文章数降序，字少的多显示、字多的少显示（自然排列，卡片包裹） */
.single-index-list{display:flex;flex-wrap:wrap;gap:10px;align-content:flex-start;padding:20px 24px;background:#fff;border:1px solid #eef0f3;border-radius:12px}
.single-index-item{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#f3f4f6;border-radius:20px;font-size:14px;color:#4b5563;text-decoration:none;transition:all .2s}
.single-index-item:hover{background:#4f46e5;color:#fff}
.tag-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;background:#e0e7ff;color:#4f46e5;border-radius:9px;font-size:11px;font-weight:700;line-height:18px}
.single-index-item:hover .tag-count-badge{background:#fff;color:#4f46e5}
.single-index-empty{width:100%;text-align:center;color:#9ca3af;padding:70px 0}

/* 加载更多（懒加载） */
.load-more-wrap{text-align:center;margin:20px 0 8px}
.load-more-btn{display:inline-block;padding:11px 34px;background:#fff;border:1px solid #d1d5db;border-radius:24px;font-size:14px;color:#4f46e5;cursor:pointer;transition:all .2s}
.load-more-btn:hover:not(:disabled){background:#4f46e5;border-color:#4f46e5;color:#fff}
.load-more-btn:disabled{opacity:.6;cursor:default}
@media(max-width:768px){
  .single-index-header{padding:14px 16px}
  .single-index-header h1{font-size:22px}
  .index-switch{padding:12px 14px;gap:6px}
  .single-index-list{padding:14px 16px}
  .single-index-empty{padding:50px 0}
}

/* ============ 标签中心（卡片式改版） ============ */
.tag-center-page{padding:26px 0 46px}
/* 页面自带上下留白，抵消 content-wrapper 的默认内边距，避免双重留白 */
.tag-center-page .content-wrapper{padding:0}
.tc-title{font-size:30px;font-weight:800;color:#111827;margin:0 0 20px}
/* 字母索引导航卡片 */
.tc-nav-card{display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px;padding:20px 24px;background:#fff;border:1px solid #eef0f3;border-radius:12px;margin-bottom:20px}
.tc-nav-item{font-size:15px;font-weight:700;color:#374151;text-decoration:none;transition:color .2s}
.tc-nav-item:hover{color:#4f46e5}
.tc-nav-item.has-tags{color:#4f46e5}
/* 索引分组卡片 */
.tc-card{background:#fff;border:1px solid #eef0f3;border-radius:12px;margin-bottom:16px;overflow:hidden}
.tc-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 24px;border-bottom:1px solid #eef0f3}
.tc-card-head-left{display:flex;align-items:baseline;gap:10px}
.tc-card-letter{font-size:18px;font-weight:800;color:#4f46e5}
.tc-card-count{font-size:13px;color:#9ca3af}
.tc-card-more{font-size:13px;color:#9ca3af;text-decoration:none;transition:color .2s}
.tc-card-more:hover{color:#4f46e5}
/* 胶囊标签：白底描边，hover 填充主题色 */
.tc-card-body{display:flex;flex-wrap:wrap;gap:10px;padding:18px 24px 20px}
.tc-tag{display:inline-flex;align-items:center;gap:7px;padding:7px 16px;background:#fff;border:1px solid #e5e7eb;border-radius:999px;font-size:14px;color:#4b5563;text-decoration:none;transition:all .2s}
.tc-tag:hover{background:#4f46e5;border-color:#4f46e5;color:#fff}
.tc-tag:hover .tc-tag-badge{background:#fff;color:#4f46e5}
.tc-tag-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;background:#f3f4f6;color:#6b7280;border-radius:9px;font-size:11px;font-weight:700;line-height:1}
.tc-empty{font-size:14px;color:#9ca3af}
@media(max-width:768px){
  .tc-title{font-size:24px}
  .tc-nav-card{padding:14px 16px;gap:8px 16px}
  .tc-card-head{padding:12px 16px}
  .tc-card-body{padding:14px 16px 16px}
  .tc-card-more{display:none}
}

/* 热门文章 top30：有序排列 */
.hot-list-ordered{list-style:decimal;padding-left:22px}
.hot-list-ordered li{padding:7px 0;border-bottom:1px dashed #f1f3f5}
.hot-list-ordered li a{color:#374151;text-decoration:none;font-size:14px;line-height:1.5}
.hot-list-ordered li a:hover{color:#4f46e5}

/* 评论区 */
.comment-section {
    margin: 40px 0 0;
    width: 100%;
}

.comment-section .section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}
.comment-list {
    margin-bottom: 30px;
}
.comment-item {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #f3f4f6;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    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: 6px;
}
.comment-nickname {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}
.comment-time {
    font-size: 12px;
    color: #9ca3af;
}
.comment-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}
.comment-empty {
    color: #9ca3af;
    text-align: center;
    padding: 30px;
    font-size: 14px;
}
.comment-msg {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.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: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.comment-form-wrapper h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #1f2937;
}
.comment-form .form-group { margin-bottom: 14px; }
.comment-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="number"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.comment-form textarea { resize: vertical; min-height: 100px; }
.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.comment-submit-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.comment-submit-btn:hover { background: #4338ca; }
@media (max-width: 768px) {
    .comment-section {
        padding: 0 16px;
        max-width: 100%;
    }
    .comment-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 字号切换（A / A+ / A++）— 左侧竖排吸附胶囊 */
.font-size-switch {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #4f46e5;
    border-radius: 0 24px 24px 0;
    padding: 12px 10px;
    gap: 12px;
    box-shadow: 3px 3px 14px rgba(79,70,229,0.35);
}
.font-size-switch .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;
}
.font-size-switch .fs-btn small {
    font-size: 14px;
    margin-left: 1px;
    line-height: 1;
}
.font-size-switch .fs-btn[data-fs="normal"] { font-size: 22px; }
.font-size-switch .fs-btn[data-fs="large"] { font-size: 24px; }
.font-size-switch .fs-btn[data-fs="xlarge"] { font-size: 26px; }
.font-size-switch .fs-btn:hover { background: rgba(255,255,255,0.18); }
.font-size-switch .fs-btn:active { transform: scale(0.96); }
.font-size-switch .fs-btn.active {
    background: #fff;
    color: #4f46e5;
}
.font-size-switch .fs-btn.active small { color: #4f46e5; }
@media (max-width: 768px) {
    /* 手机端隐藏字号切换工具条（A/A+/A++），避免遮挡正文阅读 */
    .font-size-switch { display: none; }
}

/* 广告位容器 */
.ad-slot {
    text-align: center;
    margin: 16px 0;
    overflow: hidden;
}
.ad-slot > * { max-width: 100%; }


/* ==================== 工具频道/相关工具卡片（频道页 + 工具页相关工具共用） ==================== */
.tool-channel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 8px;
}
@media (max-width: 1024px) { .tool-channel-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .tool-channel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .tool-channel-grid { grid-template-columns: 1fr; } }

.tool-channel-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    padding: 18px 16px;
    text-decoration: none;
    color: #1f2937;
    transition: box-shadow .15s, transform .15s, border-color .15s;
    min-height: 96px;
}
.tool-channel-card:hover {
    box-shadow: 0 6px 18px rgba(15,23,42,.08);
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

/* 64x64 伪图片：CSS 伪元素渲染文字，背景按 --tool-hue 生成各工具不同的渐变色 */
.tool-channel-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    /* 未提供 --tool-hue 时回退主题紫 */
    --tool-hue: 250;
    background: linear-gradient(135deg,
        hsl(var(--tool-hue), 68%, 58%) 0%,
        hsl(calc(var(--tool-hue) + 28), 72%, 48%) 100%);
    box-shadow: 0 4px 10px hsla(var(--tool-hue), 60%, 50%, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    /* 不设 overflow:hidden：完整呈现站长自定义的文字，溢出时由站长调小字号 */
    padding: 3px;
    box-sizing: border-box;
}
/* 伪元素渲染 data-icon：white-space: pre-line 让 &#10; 换行生效 */
.tool-channel-icon::before {
    content: attr(data-icon);
    color: #fff;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: center;
    /* pre-line：保留站长在后台 textarea 里回车输入的换行 */
    white-space: pre-line;
    /* 不随意拆单词（避免 Whois 被拆成 Who/is），仅超长词才断 */
    word-break: normal;
    overflow-wrap: break-word;
    /* 不做任何截断：行数与字号均由站长在后台自定义，
       显示不完整时应由站长自行调小字号，而不是机器强制裁剪内容 */
}
/* 逐行精确控制：每条 line 单独控制字号，纵向堆叠 */
.tool-channel-icon-line {
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: center;
    max-width: 100%;
    /* 不随意拆单词，仅超长词才断 */
    word-break: normal;
    overflow-wrap: break-word;
}

.tool-channel-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 64px;
    overflow: hidden;
}

/* 标题：单行省略 */
.tool-channel-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 描述：最多 2 行省略 */
.tool-channel-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
