/* ============================================================
 * style.css — 基础布局与响应式
 * 参考 WPS 文章页面的布局结构
 * ============================================================ */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --theme-color: #E0A33E;
    --theme-color-active: #E0A33E;
    --text-color: #22292D;
    --text-muted: #5F676F;
    --text-light: #8D949B;
    --border-color: #E8ECF0;
    --bg-color: #F5F7FA;
    --white: #FFFFFF;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --radius-lg: 14px;
    --max-width: 1320px;
    --max-width-sm: 1180px;
    --sidebar-width: 320px;
    --sidebar-width-sm: 280px;
    --gap: 44px;
    --gap-sm: 40px;
    --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--bg-color);
    min-height: 100vh;
}

a {
    color: var(--theme-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #008A85;
}

img {
    max-width: 100%;
    height: auto;
}

.clear::after {
    content: "";
    display: table;
    clear: both;
}

.fl { float: left; }
.fr { float: right; }

/* ============================================================
 * Header — WPS 风格
 * ============================================================ */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 66px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    display: block;
}

/* 导航栏 — WPS 风格 ul.li 结构 */
.nav-bar {
    flex: 1;
    margin-left: 30px;
}

.nav {
    list-style: none;
    display: flex;
    gap: 0;
}

.navbar-item {
    position: relative;
}

.navbar-item a {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.navbar-item a:hover {
    background: var(--bg-color);
    color: var(--theme-color);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0;
    cursor: pointer;
    padding: 6px;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn i {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    margin-bottom: 4px;
}

.mobile-menu-btn i:last-child {
    margin-bottom: 0;
}

.mobile-title {
    display: none;
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* 移动端遮罩层 */
.mobile-nav-bar-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

/* ============================================================
 * Main Layout
 * ============================================================ */
.container-sub {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

.index_cont {
    min-height: 60vh;
}

.main_cont {
    display: flex;
    gap: var(--gap);
}

.list-cont {
    flex: 1 1 auto;
    max-width: 900px;
    min-width: 0;
}

/* ============================================================
 * Breadcrumb
 * ============================================================ */
.breadcrumb {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--theme-color);
}

.breadcrumb i {
    margin: 0 6px;
    font-size: 10px;
}

.breadcrumb span {
    color: var(--text-color);
}

/* ============================================================
 * Article Detail
 * ============================================================ */
.detail_main {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-title {
    font-size: clamp(34px, 2.8vw, 42px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* 文章元信息 — WPS 风格 p.meta */
p.meta,
.article-meta {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

p.meta span,
.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

p.meta i,
.article-meta i {
    opacity: 0.5;
    font-size: 15px;
}

/* 正文内容 */
.detail_article {
    font-size: 18px;
    line-height: 1.92;
    letter-spacing: 0.01em;
    color: var(--text-color);
}

.detail_article h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 36px 0 16px;
    line-height: 1.4;
    color: var(--text-color);
}

.detail_article h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px;
    line-height: 1.4;
}

.detail_article p {
    margin-bottom: 16px;
}

.detail_article ul, .detail_article ol {
    margin: 12px 0 16px 24px;
}

.detail_article li {
    margin-bottom: 8px;
}

.detail_article blockquote {
    border-left: 4px solid var(--theme-color);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--bg-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
}

.detail_article code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.detail_article pre {
    background: #1E1E2E;
    color: #CDD6F4;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.detail_article pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.detail_article img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
    display: block;
}

/* 正文内链 — 指向相关文章 */
.detail_article a.inner-article-link,
.detail_article a {
    color: var(--theme-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.detail_article a.inner-article-link {
    color: #333;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.detail_article a.inner-article-link:hover {
    color: var(--theme-color);
}

.detail_article a:hover {
    text-decoration: none;
}

/* 正文表格 — WPS 风格 */
.detail_article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.detail_article thead {
    background: linear-gradient(180deg, #fafbfc 0%, #f2f4f7 100%);
}

.detail_article th,
.detail_article td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    text-align: left;
}

.detail_article th {
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.detail_article tbody tr:nth-child(even) {
    background: #fafbfc;
}

.detail_article tbody tr:hover {
    background: #f5f7fa;
}

.detail_article tbody tr:last-child td {
    border-bottom: none;
}

/* 正文图片 — 居中、带阴影、圆角 */
.detail_article img {
    display: block;
    max-width: 90%;
    height: auto;
    margin: 28px auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail_article img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* 章节分隔线 — 渐变 */
.detail_article hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224, 163, 62, 0.6), transparent);
    margin: 36px 0;
}

/* 标题下方装饰线 */
.detail_article h2 {
    position: relative;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.detail_article h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--theme-color), transparent);
    border-radius: 2px;
}

/* 关键词加粗 */
.detail_article strong,
.detail_article b {
    font-weight: 700;
    color: var(--text-color);
    background: rgba(224, 163, 62, 0.06);
    padding: 0 3px;
    border-radius: 3px;
}

/* 内链更醒目 */
.detail_article a {
    color: #c58220;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.detail_article a:hover {
    color: var(--theme-color);
    text-decoration: none;
}

/* 列表间距 */
.detail_article ul,
.detail_article ol {
    margin: 16px 0 20px 28px;
}

.detail_article li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 正文段落 */
.detail_article p {
    margin-bottom: 18px;
    line-height: 1.92;
}

/* ============================================================
 * Article Footer — WPS 风格 .article_footer
 * ============================================================ */
.article_footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

.article_footer .tag {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.article_footer .tag span {
    color: var(--text-muted);
    margin-right: 4px;
}

.article_footer .tag a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}

.article_footer .tag a:hover {
    background: var(--theme-color);
    color: var(--white);
}

/* 分享组件 */
.article_footer .share {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.article_footer .share-widget {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article_footer .share-widget span {
    color: var(--text-muted);
    font-size: 13px;
    margin-right: 4px;
}

.article_footer .share-widget a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.2s;
}

.article_footer .share-widget a:hover {
    background: var(--theme-color);
    color: var(--white);
}

/* 微信分享二维码弹窗 */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    max-width: 280px;
    position: relative;
}

.qr-modal-content img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    margin: 12px 0 0;
}

.qr-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.qr-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.qr-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.qr-close:hover {
    color: var(--text-color);
}

/* ============================================================
 * Post Navigation — WPS 风格卡片式
 * ============================================================ */
.post-navigation {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
    min-height: 96px;
}

.nav-card:hover {
    border-color: rgba(224, 163, 62, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.nav-card:hover h4 {
    color: var(--theme-color);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    flex-direction: row-reverse;
    text-align: right;
}

.nav-empty {
    background: transparent;
    border: 1px dashed var(--border-color);
    pointer-events: none;
}

.nav-thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 12px;
}

.nav-prev .nav-label {
    justify-content: flex-start;
}

.nav-next .nav-label {
    justify-content: flex-end;
}

.nav-card h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

/* ============================================================
 * Related Articles — WPS 风格 (横向卡片)
 * ============================================================ */
.related_article {
    margin-top: 44px;
}

.box_title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-color);
}

.box_title span {
    position: relative;
}

.box_title i {
    margin-right: 6px;
    color: var(--theme-color);
}

.box_title span::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--theme-color);
}

.related_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
}

.related-card:hover {
    border-color: rgba(224, 163, 62, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.related-card:hover h3 {
    color: var(--theme-color);
}

.related-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.related-img {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.related-card:hover .related-img img {
    transform: scale(1.05);
}

.related-detail {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.related-detail h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.related-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.related-detail .meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 12px;
}

.related-detail .meta i {
    margin-right: 3px;
    opacity: 0.6;
}

@media (max-width: 767px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }
    .nav-next {
        flex-direction: row;
        text-align: left;
    }
    .nav-next .nav-label {
        justify-content: flex-start;
    }
    .related_list {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * Sidebar — 精致卡片式侧边栏
 * ============================================================ */
.sidebar {
    flex: 0 0 var(--sidebar-width);
    min-width: 0;
}

.sidebar .part {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.sidebar .part:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.sidebar .top {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .top .title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .top .title i {
    color: var(--theme-color);
    font-size: 15px;
}

.sidebar .top .more-link {
    font-size: 13px;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.sidebar .top .more-link:hover {
    color: var(--theme-color);
}

.sidebar .top .more-link i {
    font-size: 12px;
}

/* 站点简介卡片 */
.sidebar-profile {
    position: relative;
    padding-top: 0 !important;
    overflow: hidden;
}

.profile-cover {
    height: 64px;
    background: linear-gradient(135deg, var(--theme-color) 0%, #181830 100%);
    margin: -24px -24px 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--white);
    overflow: hidden;
    margin: -32px auto 12px auto;
    background: linear-gradient(135deg, var(--theme-color) 0%, #b9802a 100%);
    box-shadow: 0 4px 14px rgba(184,128,42,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar svg {
    width: 54%;
    height: 54%;
}

.profile-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.profile-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 92%;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.profile-stats span {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.profile-stats strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

/* 推荐阅读 — 纯文字列表 */
.featured-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.featured-item {
    position: relative;
    padding: 12px 0 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.featured-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.featured-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--theme-color);
    transition: all 0.2s ease;
}

.featured-item:hover::before {
    box-shadow: 0 0 0 4px rgba(224, 163, 62, 0.12);
}

.featured-item a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.featured-item a:hover {
    color: var(--theme-color);
}

.hot-posts {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.hot-post-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.hot-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-body h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 4px;
}

.hot-body h4 a {
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.hot-body h4 a:hover {
    color: var(--theme-color);
}

.hot-meta,
.latest-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hot-meta i,
.latest-meta i {
    font-size: 11px;
    opacity: 0.7;
}

/* 最新文章 */
.latest-posts {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.latest-post-item {
    border-bottom: 1px solid var(--border-color);
}

.latest-post-item:last-child {
    border-bottom: none;
}

.latest-post-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    transition: color 0.2s ease;
}

.latest-post-item a:hover .latest-title {
    color: var(--theme-color);
}

.latest-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.latest-meta {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.latest-meta i {
    font-size: 11px;
    opacity: 0.7;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: 20px;
    transition: all 0.2s ease;
    font-size: 13px;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: rgba(224, 163, 62, 0.08);
    color: var(--theme-color);
    border-color: rgba(224, 163, 62, 0.25);
    transform: translateY(-1px);
}

/* ============================================================
 * Category & Tag Pages
 * ============================================================ */
.category_main, .tag_main, .index_main {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

/* 分类/标签页头部 */
.category-header {
    display: flex;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.category-header-accent {
    flex: 0 0 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--theme-color) 0%, #181830 100%);
}

.category-header-content {
    flex: 1;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.category-desc, .site-intro {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 720px;
}

.category-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 12px;
    background: var(--bg-color);
    border-radius: 20px;
}

.stat-item i {
    color: var(--theme-color);
}

/* 分类导航卡片 */
.category-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.cat-card {
    display: block;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cat-card:hover {
    border-color: var(--theme-color);
    background: var(--white);
    box-shadow: var(--shadow);
}

.cat-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.cat-desc {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

/* 文章列表 — 卡片式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
}

.list-item-thumb {
    flex: 0 0 260px;
    width: 260px;
    max-width: 260px;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.list-item-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.list-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.list-item:hover .list-item-thumb img {
    transform: scale(1.03);
}

.list-item:hover {
    border-color: rgba(224, 163, 62, 0.35);
    box-shadow: 0 8px 28px rgba(224, 163, 62, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.list-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.list-item h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.list-item h2 a {
    color: var(--text-color);
    background-image: linear-gradient(var(--theme-color), var(--theme-color));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0 2px;
    transition: color 0.2s, background-size 0.25s;
}

.list-item h2 a:hover {
    color: var(--theme-color);
    background-size: 100% 2px;
}

.list-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.list-item-meta i {
    margin-right: 3px;
    font-size: 12px;
}

.meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--text-muted);
}

.meta-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-dot {
    color: var(--border-color);
    user-select: none;
}

.meta-category a {
    color: var(--theme-color);
    font-weight: 500;
}

.meta-category a:hover {
    text-decoration: underline;
}

.list-item-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.list-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-item-tags a {
    font-size: 12px;
    padding: 4px 12px;
    background: var(--bg-color);
    color: var(--text-muted);
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.list-item-tags a:hover {
    background: rgba(224, 163, 62, 0.08);
    color: var(--theme-color);
    border-color: rgba(224, 163, 62, 0.25);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-color);
    white-space: nowrap;
}

.read-more i {
    font-size: 11px;
    transition: transform 0.2s;
}

.read-more:hover i {
    transform: translateX(3px);
}

.no-content {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

.no-content i {
    display: block;
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 16px;
}

/* ============================================================
 * 分页导航（首页 / 分类 / 标签 / 热门 / 推荐，统一 6 条/页）
 * ============================================================ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 36px 0 8px;
}

.pagination .pg-prev,
.pagination .pg-next,
.pagination .pg-num {
    display: inline-flex;
    align-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #e3e6ea);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color, #333);
    font-size: 14px;
    text-decoration: none;
    transition: all .15s ease;
    cursor: pointer;
}

.pagination .pg-num {
    justify-content: center;
    padding: 0 10px;
}

.pagination a.pg-prev:hover,
.pagination a.pg-next:hover,
.pagination a.pg-num:hover {
    border-color: var(--brand-color, #3a7afe);
    color: var(--brand-color, #3a7afe);
}

.pagination .pg-current {
    background: var(--brand-color, #3a7afe);
    border-color: var(--brand-color, #3a7afe);
    color: #fff;
    font-weight: 600;
    cursor: default;
}

.pagination .pg-disabled {
    color: #b6bcc4;
    background: #f5f6f8;
    border-color: var(--border-color, #e3e6ea);
    cursor: not-allowed;
}

/* ============================================================
 * Footer
 * ============================================================ */
.p-footer {
    background: #22292D;
    color: #5F676F;
    margin-top: 60px;
    padding: 40px 20px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-links a {
    color: #5F676F;
    margin: 0 8px;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    font-size: 13px;
}

.copyright a {
    color: #5F676F;
    margin-left: 8px;
}

.hidden-links {
    font-size: 1px;
    color: #22292D;
    margin-top: 8px;
    overflow: hidden;
    height: 0;
}

.hidden-links a {
    color: #22292D;
    margin: 0 4px;
}

/* ============================================================
 * Back to Top
 * ============================================================ */
#backtop {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--theme-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 99;
}

#backtop.visible {
    opacity: 1;
}

/* ============================================================
 * Responsive — 大屏
 * ============================================================ */
@media (max-width: 1359px) {
    .container-sub {
        padding: 20px 16px;
    }
}

@media (max-width: 1279px) {
    .container-sub {
        max-width: var(--max-width-sm);
    }
    .main_cont {
        gap: var(--gap-sm);
    }
    .sidebar {
        flex: 0 0 var(--sidebar-width-sm);
    }
}

@media (max-width: 1200px) {
    .sidebar {
        display: none;
    }
    .list-cont {
        max-width: 100%;
    }
}

@media (max-width: 1023px) {
    .main_cont {
        flex-direction: column;
    }
    .container-sub {
        padding: 12px;
    }
}

@media (max-width: 991px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    body {
        padding-top: 66px;
    }
}

@media (max-width: 919px) {
    .nav-bar {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        background: var(--white);
        margin-left: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .nav-bar.open {
        display: block;
    }
    .nav {
        flex-direction: column;
        padding: 8px 16px;
    }
    .navbar-item a {
        padding: 12px 8px;
        border-radius: 0;
        border-bottom: 1px solid var(--bg-color);
    }
    .navbar-item:last-child a {
        border-bottom: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .mobile-title {
        display: block;
    }
}

@media (max-width: 768px) {
    .detail_main, .category_main, .tag_main, .index_main {
        padding: 24px 16px;
        border-radius: 0;
    }
    .article-title {
        font-size: 25px;
    }
    .detail_article {
        font-size: 17px;
    }
    .detail_article h2 {
        font-size: 20px;
        margin: 28px 0 12px;
    }
    .related_list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .related_img {
        height: 180px;
    }
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .post-next {
        text-align: left;
    }
    .category-nav {
        grid-template-columns: 1fr;
    }
    .category-header {
        flex-direction: column;
        gap: 12px;
        padding-bottom: 24px;
    }
    .category-header-accent {
        width: 48px;
        height: 4px;
        background: linear-gradient(90deg, var(--theme-color) 0%, #181830 100%);
    }
    .page-title {
        font-size: 26px;
    }
    .list-item {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    .list-item-thumb {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        aspect-ratio: 16 / 9;
    }
    .list-item h2 {
        font-size: 18px;
    }
    .list-item-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .article_footer .tag {
        margin-bottom: 12px;
    }
    #backtop {
        bottom: 20px;
        right: 16px;
    }
}

@media (max-width: 599px) {
    .article-meta, p.meta {
        gap: 10px;
        font-size: 13px;
    }
    .article_footer {
        flex-direction: column;
    }
    .header-container {
        padding: 0 12px;
    }
    .logo {
        margin-right: 0;
    }
    .logo img {
        height: 28px;
    }
    .related_img {
        height: 160px;
    }
}