/* ===== 全局基础统一样式 封面/列表/内容页共用 ===== */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
    font-family: "PingFang SC","Microsoft YaHei",sans-serif;
    background:#f8f9fc;
    color:#1a1a2e;
    line-height:1.8;
    font-size:16px;
}
.container{max-width:880px;margin:0 auto;padding:0 24px;}

/* 导航栏 */
.nav-bar{
    position:sticky;top:0;z-index:100;
    background:rgba(255,255,255,0.92);
    backdrop-filter:blur(12px);
    border-bottom:1px solid #eef0f5;
    height:56px;display:flex;align-items:center;
    padding:0 24px;
}
.nav-bar .container{
    display:flex;justify-content:space-between;align-items:center;width:100%;
}
.nav-logo{
    font-weight:700;font-size:18px;color:#2563eb;letter-spacing:-0.3px;
}
.nav-logo span{color:#1a1a2e;}
.nav-links{display:flex;gap:24px;list-style:none;}
.nav-links a{
    text-decoration:none;color:#4a5568;font-size:14px;font-weight:500;
    transition:color 0.2s;
}
.nav-links a:hover{color:#2563eb;}

/* 头部Banner */
.hero{
    background:#2563eb;
    color:#fff;padding:70px 0 50px;
}
.hero-badge{
    display:inline-block;
    background:rgba(255,255,255,0.12);
    padding:4px 14px;border-radius:20px;font-size:12px;font-weight:600;
    color:#93c5fd;margin-bottom:20px;
}
.hero h1{
    font-size:36px;font-weight:800;line-height:1.2;margin-bottom:16px;
}
.hero-meta{
    margin-top:24px;display:flex;gap:24px;font-size:14px;color:rgba(255,255,255,0.55);flex-wrap:wrap;
}

        /* ===== TOC ===== */
        .toc {
            background: #fff; border: 1px solid #eef0f5; border-radius: 12px;
            padding: 28px 32px; margin: -32px auto 40px;
            position: relative; z-index: 10; box-shadow: 0 4px 24px rgba(0,0,0,0.04);
        }
        .toc h2 { font-size: 14px; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
        .toc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 32px; }
        .toc-grid a { text-decoration: none; color: #4a5568; font-size: 14px; padding: 4px 0; transition: color 0.2s; display: flex; align-items: center; gap: 8px; }
        .toc-grid a::before { content: ''; width: 4px; height: 4px; background: #2563eb; border-radius: 50%; flex-shrink: 0; }
        .toc-grid a:hover { color: #2563eb; }

/* 通用卡片区块 */
.section{
    background:#fff;border:1px solid #eef0f5;border-radius:12px;
    padding:40px 48px;margin:24px 0;
}
.section h2{
    font-size:26px;font-weight:700;color:#0f172a;
    margin-bottom:20px;padding-bottom:12px;
    border-bottom:3px solid #2563eb;display:inline-block;
}
.section h3{
    font-size:20px;font-weight:600;color:#1e293b;
    margin:32px 0 12px;
}
.section p{margin-bottom:16px;color:#334155;}
.section strong{color:#0f172a;}
.section blockquote{
    border-left:4px solid #2563eb;background:#f0f7ff;
    padding:16px 20px;margin:20px 0;border-radius:0 8px 8px 0;
    font-size:15px;color:#1e40af;
}
.section ul,.section ol{margin:12px 0 20px 24px;color:#334155;}
.section li{margin-bottom:6px;}

/* TAG标签 */
.tag{
    display:inline-block;padding:2px 10px;border-radius:4px;font-size:12px;font-weight:500;margin:0 4px 4px 0;
}
.tag-blue{background:#dbeafe;color:#1d4ed8;}

/* 两栏文章卡片（列表/内容页相关阅读通用） */
.relate-article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}
.relate-article-item {
    padding: 16px;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.24s ease;
}
.relate-article-item:hover {
    background: #f0f7ff;
    border-color: #2563eb;
    transform: translateY(-3px);
}
.relate-article-item a {
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
}
.relate-article-item a:hover { color: #2563eb; }
.relate-article-desc {
    font-size: 13px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 上下篇导航（仅内容页） */
.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
.pn-item {
    padding: 16px;
    border: 1px solid #eef0f5;
    border-radius: 10px;
}
.pn-item a { text-decoration: none; color:#2563eb; font-weight:500; }

/* 列表页专用列表项 */
.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 10px;
}
.list-item {
    border: 1px solid #eef0f5;
    border-radius: 10px;
    background: #f8fafc;
    padding: 20px;
    transition: all 0.24s ease;
}
.list-item:hover {
    background: #f0f7ff;
    border-color: #2563eb;
    transform: translateY(-3px);
}
.list-item-title a {
    text-decoration: none;
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}
.list-item-title a:hover { color: #2563eb; }
.list-item-desc {
    font-size: 13px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.list-item-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

/* 分页（仅列表页） */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.page-nav a, .page-nav strong {
    padding: 6px 14px;
    border: 1px solid #eef0f5;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}
.page-nav strong {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.page-nav a:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* 页脚全局 */
.footer{
    background:#0f172a;color:rgba(255,255,255,0.6);
    padding:40px 0;text-align:center;font-size:13px;margin-top:40px;
}
.footer a{color:#60a5fa;text-decoration:none;}
.footer-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px;}
.footer-tags span{
    background:rgba(255,255,255,0.06);padding:4px 12px;
    border-radius:12px;font-size:12px;color:rgba(255,255,255,0.5);
}

/* 响应式统一 */
@media(max-width:768px){
    .nav-links{display:none;}
    .hero h1{font-size:28px;}
    .section{padding:28px 20px;}
    .section h2{font-size:22px;}
    .section h3{font-size:18px;}
    .relate-article-list, .article-list { grid-template-columns:1fr; }
    .prev-next { grid-template-columns:1fr; }
}
@media print{
    .nav-bar,.hero,.footer,.page-nav{display:none;}
    body{background:#fff;}
}