/*
Theme Name: NDPress
Author: Auto
Description: Professional news magazine theme with SEO optimization and high performance. Supports Schema.org, Open Graph, lazy loading, dark mode.
Version: 1.0
License: GPL v2 or later
Text Domain: ndpress
Tags: news, blog, seo, responsive, performance
Requires PHP: 7.4
Requires at least: 5.8
*/

:root {
    --c-accent: #1e293b;
    --c-accent-hover: #334155;
    --c-accent-light: #eef2ff;
    --c-gradient: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    --c-gradient-warm: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --c-bg: #fff;
    --c-bg-alt: #f8fafc;
    --c-bg-card: #f7f8fa;
    --c-bg-dark: #1e293b;
    --c-text: #1a1a1a;
    --c-text-light: #555;
    --c-text-lighter: #999;
    --c-border: #e5e7eb;
    --c-border-light: #f0f0f0;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --max-w: 1200px;
    --radius: 10px;
    --radius-sm: 6px;
    --gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100% }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important } }
body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block }
ul, ol { list-style: none }
button, input, select, textarea { font-family: inherit; font-size: inherit }
button { cursor: pointer; border: none; background: none; color: inherit }
a { color: var(--c-accent); text-decoration: none; transition: color .2s }
a:hover { color: var(--c-accent-hover) }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 2px }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0 }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 20px; clip: auto; background: var(--c-accent); color: #fff; z-index: 9999; border-radius: 4px; font-weight: 600 }

/* ========== Layout ========== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px }
.mt-30 { margin-top: 30px }
.row { display: flex; gap: var(--gap) }
.main-content { flex: 1; min-width: 0 }
.sidebar { width: 300px; flex-shrink: 0 }
@media (max-width: 900px) {
    .row { flex-direction: column }
    .sidebar { width: 100% }
    .mt-30 { margin-top: 20px }
}

/* ========== Header ========== */
.site-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--c-border-light);
    position: sticky; top: 0; z-index: 1100;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px; height: 52px; gap: 20px;
}

/* Logo */
.site-branding { flex-shrink: 0; line-height: 0 }
.site-branding .custom-logo-link { line-height: 0 }
.site-branding .custom-logo { height: 32px; width: auto }

/* ======== 桌面导航 ======== */
.main-nav { margin: 0 auto }
.main-nav ul {
    display: flex; align-items: center; gap: 2px; list-style: none;
}
.main-nav > ul > li { position: relative }
.main-nav a {
    display: flex; align-items: center; padding: 6px 14px;
    color: var(--c-text); font-size: .88rem; font-weight: 500;
    transition: color .2s; white-space: nowrap; text-decoration: none;
}
.main-nav a:hover { color: var(--c-accent) }
/* 当前菜单高亮 —— 仅颜色变化 */
.main-nav .current-menu-item > a,
.main-nav .current-menu-parent > a {
    color: var(--c-accent);
}

/* 下拉子菜单 */
.main-nav .sub-menu {
    display: none; position: absolute; top: 100%; left: 0;
    min-width: 160px; background: var(--c-bg); border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    padding: 6px; flex-direction: column; z-index: 100;
}
.main-nav li:hover > .sub-menu { display: flex }
.main-nav .sub-menu a {
    padding: 8px 12px; border-radius: 4px; font-size: .84rem;
    color: var(--c-text); width: 100%;
}
.main-nav .sub-menu a:hover { background: var(--c-bg-alt); color: var(--c-accent) }
.main-nav .sub-menu .sub-menu {
    top: -6px; left: 100%;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none; width: 40px; height: 40px; align-items: center;
    justify-content: center; background: transparent; border: none;
    cursor: pointer; border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--c-bg-alt) }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block; width: 20px; height: 2px; background: var(--c-text);
    border-radius: 2px; position: relative; transition: all .3s cubic-bezier(.4,0,.2,1);
}
.menu-toggle span::before,
.menu-toggle span::after { content: ''; position: absolute; left: 0 }
.menu-toggle span::before { top: -6px }
.menu-toggle span::after  { top:  6px }
.menu-toggle.active span { background: transparent }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg) }
.menu-toggle.active span::after  { top: 0; transform: rotate(-45deg) }

/* 常规搜索表单（侧边栏等） */
.search-form { display: flex }
.search-form input {
    flex: 1; padding: 12px 18px; border: 1px solid var(--c-border); border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: .95rem;
    background: var(--c-bg); color: var(--c-text); outline: none;
}
.search-form input:focus { border-color: var(--c-accent) }
.search-form button {
    padding: 12px 24px; background: var(--c-accent); color: #fff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-weight: 500;
    transition: opacity .2s;
}
.search-form button:hover { opacity: .9 }

/* ======== 移动端导航 ======== */
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; height: 48px; gap: 12px }
    .site-branding .custom-logo { height: 28px }

    .menu-toggle { display: flex }
    .main-nav {
        display: none !important; position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
        background: var(--c-bg); flex-direction: column; padding: 8px 0;
        overflow-y: auto; z-index: 999;
    }
    .main-nav.active { display: flex !important }
    .main-nav > ul {
        flex-direction: column; gap: 0; width: 100%; padding: 0 16px;
    }
    .main-nav > ul > li { width: 100% }
    .main-nav a {
        padding: 12px 0; font-size: .95rem; color: var(--c-text);
        border-bottom: 1px solid var(--c-border-light);
    }
    .main-nav .current-menu-item > a,
    .main-nav .current-menu-parent > a {
        color: var(--c-accent);
    }
    .main-nav .sub-menu {
        position: static; box-shadow: none; border-radius: 0;
        padding: 0; background: transparent; display: none !important;
    }
    .main-nav li.menu-item-has-children.active > .sub-menu {
        display: flex !important; flex-direction: column;
    }
    .main-nav .sub-menu a {
        padding: 10px 0 10px 16px; font-size: .88rem;
        color: var(--c-text-light); border-bottom: 1px solid var(--c-border-light);
    }
    .main-nav .sub-menu .sub-menu a { padding-left: 32px; font-size: .84rem }

}

/* ========== Breadcrumb ========== */
.breadcrumb { padding: 10px 0; font-size: .8rem; color: var(--c-text-lighter); border-bottom: 1px solid var(--c-border-light); margin-bottom: 18px }
.breadcrumb a { color: var(--c-text-light); transition: color .2s }
.breadcrumb a:hover { color: var(--c-accent) }
.breadcrumb .sep { margin: 0 8px; color: #ccc }

/* ========== Hero ========== */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 28px }
@media (max-width: 768px) { .hero-grid { grid-template-columns: 1fr } }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden }
.hero-main img { width: 100%; height: 420px; object-fit: cover; transition: transform .6s }
.hero-main:hover img { transform: scale(1.03) }
.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,.4) 40%, rgba(0,0,0,.9) 100%);
    padding: 60px 28px 28px; color: #fff;
}
.cat-label { display: inline-block; background: rgba(255,255,255,.25); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: .75rem; font-weight: 600; backdrop-filter: blur(8px); letter-spacing: .3px }
.hero-main h2 { font-size: 1.5rem; line-height: 1.35; margin: 10px 0; letter-spacing: -0.2px }
.hero-main h2 a { color: #fff }
.hero-meta { font-size: .8rem; opacity: .8 }

.hero-side { display: flex; flex-direction: column; gap: 12px }
.hero-side-item { display: flex; gap: 14px; padding: 14px; background: var(--c-bg-card); border-radius: var(--radius-sm); transition: all .25s; align-items: center; border: 1px solid var(--c-border-light) }
.hero-side-item:hover { background: var(--c-bg); box-shadow: 0 2px 12px rgba(0,0,0,.06); border-color: var(--c-border) }
.hero-side-item img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0 }
.hero-side-item h3 { font-size: .9rem; line-height: 1.45; font-weight: 600 }

/* ========== Post Cards ========== */
.section-title {
    font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 2px solid var(--c-border); letter-spacing: -0.2px; position: relative;
}
.section-title::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    width: 60px; height: 2px; background: var(--c-gradient-warm); border-radius: 1px;
}
.section-title::before {
    content: '●'; margin-right: 8px; color: #7c3aed; font-size: .45rem;
    vertical-align: middle; position: relative; top: -1px;
}
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px }
.post-card { background: var(--c-bg); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; border: 1px solid var(--c-border-light); position: relative }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); border-color: transparent }
.post-card .card-img { position: relative; overflow: hidden }
.post-card .card-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.5) 100%);
    opacity: 0; transition: opacity .4s;
}
.post-card:hover .card-img::after { opacity: 1 }
.post-card .card-img img { width: 100%; height: 200px; object-fit: cover; transition: transform .6s }
.post-card:hover .card-img img { transform: scale(1.06) }
.post-card .cat-label {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    background: var(--c-gradient-warm); backdrop-filter: none; padding: 4px 14px;
    font-size: .72rem; font-weight: 600;
}
.post-card .card-body { padding: 14px 16px }
.post-card h3 { font-size: .95rem; line-height: 1.45; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; letter-spacing: -0.2px }
.post-card h3 a { color: var(--c-text) }
.post-card h3 a:hover { color: var(--c-accent) }
.card-excerpt { font-size: .85rem; color: var(--c-text-light); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px }
.card-meta { display: flex; gap: 14px; font-size: .75rem; color: var(--c-text-lighter) }
.cat-label-inline {
    display: inline-block; background: var(--c-accent); color: #fff;
    padding: 2px 10px; border-radius: 4px; font-size: .7rem; font-weight: 600;
    margin-bottom: 6px; letter-spacing: .3px; transition: opacity .2s;
}
.cat-label-inline:hover { opacity: .85; color: #fff }
.archive-desc {
    background: var(--c-bg-alt); padding: 16px; border-radius: var(--radius);
    margin-bottom: var(--gap); font-size: .85rem; color: var(--c-text-light); line-height: 1.6;
}

/* ========== List Layout ========== */
.posts-list { display: flex; flex-direction: column; gap: 16px }
.post-list-item { display: flex; gap: 20px; padding: 20px; background: var(--c-bg-card); border-radius: var(--radius); transition: all .25s; border: 1px solid var(--c-border-light) }
.post-list-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,.06); border-color: transparent }
.post-list-item .list-thumb { width: 220px; flex-shrink: 0 }
.post-list-item .list-thumb img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-sm) }
.post-list-item .list-content { flex: 1; min-width: 0 }
.post-list-item h2 { font-size: 1.1rem; line-height: 1.45; margin-bottom: 8px; font-weight: 600; letter-spacing: -0.2px }
.post-list-item h2 a { color: var(--c-text) }
.post-list-item h2 a:hover { color: var(--c-accent) }
.list-excerpt { font-size: .9rem; color: var(--c-text-light); margin-bottom: 10px }
@media (max-width: 600px) { .post-list-item { flex-direction: column } .post-list-item .list-thumb { width: 100% } }

/* ========== Single Article ========== */
.article-header { padding: 16px 0 16px; margin-bottom: 4px }
.article-cat {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    font-size: .78rem; font-weight: 600; margin-bottom: 10px;
    background: var(--c-accent-light); color: #4f46e5; border: 1px solid #c7d2fe;
    transition: all .2s;
}
.article-cat:hover { background: var(--c-gradient-warm); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(124,58,237,.25) }
.article-header h1 { font-size: 1.75rem; line-height: 1.3; margin-bottom: 10px; font-weight: 800; letter-spacing: -0.5px }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; color: var(--c-text-lighter) }
.article-meta span { display: flex; align-items: center; gap: 4px }
.article-meta a { color: var(--c-text-light); font-weight: 500 }
.article-meta a:hover { color: var(--c-accent) }
.meta-icon { font-size: .75rem; opacity: .7 }
.article-featured-image { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden }
.article-featured-image img { width: 100%; max-height: 420px; object-fit: cover }

.post-content { font-size: 1rem; line-height: 1.8; color: #333 }
.post-content h2 { font-size: 1.25rem; margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid var(--c-accent); font-weight: 700; letter-spacing: -0.3px }
.post-content h3 { font-size: 1.1rem; margin: 22px 0 10px; font-weight: 700 }
.post-content p { margin-bottom: 16px }
.post-content ul, .post-content ol { margin-bottom: 16px; padding-left: 24px }
.post-content ul { list-style: disc } .post-content ol { list-style: decimal }
.post-content li { margin-bottom: 6px; padding-left: 4px }
.post-content blockquote {
    margin: 20px 0; padding: 16px 20px;
    background: var(--c-bg-card); border-left: 3px solid var(--c-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--c-text-light); font-style: italic; font-size: .95rem;
}
.post-content img { border-radius: var(--radius-sm); margin: 16px 0 }
.post-content a { text-decoration: underline; text-underline-offset: 2px }
.post-content pre { background: #2d2d2d; color: #e8e8e8; padding: 16px 20px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; margin-bottom: 16px; line-height: 1.6 }
.post-content :not(pre) > code { background: var(--c-bg-card); padding: 2px 7px; border-radius: 4px; font-size: .9em; color: #d6336c }
.article-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--c-border-light) }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.article-tags::before { content: '标签 '; font-size: .85rem; color: var(--c-text-lighter); margin-right: 4px }
.article-tags a { padding: 5px 16px; background: var(--c-bg-card); border-radius: 20px; font-size: .8rem; color: var(--c-text-light); transition: all .2s; border: 1px solid var(--c-border-light) }
.article-tags a:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent) }

/* Author */
.author-box { display: flex; gap: 16px; padding: 24px; margin-top: 32px; background: var(--c-bg-card); border-radius: var(--radius); align-items: center; border: 1px solid var(--c-border-light) }
.author-box .avatar { border-radius: 50%; width: 60px; height: 60px }
.author-box h4 { font-size: .95rem; margin-bottom: 4px; font-weight: 600 }
.author-box p { font-size: .85rem; color: var(--c-text-light) }

/* Related */
.related-posts { margin-top: 28px }
.related-posts .section-title { margin-bottom: 14px }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px }
.related-item { border-radius: var(--radius-sm); overflow: hidden; transition: transform .25s }
.related-item:hover { transform: translateY(-2px) }
.related-item img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm) }
.related-item h4 { font-size: .85rem; line-height: 1.5; margin-top: 10px; font-weight: 600 }
.related-item h4 a { color: var(--c-text) }
.related-item h4 a:hover { color: var(--c-accent) }

/* ========== Comments ========== */
.comments-area, .comment-respond { margin-top: 40px }
.comments-title { font-size: 1.05rem; margin-bottom: 20px; font-weight: 700 }
.comment-list > li { padding: 16px 0; border-bottom: 1px solid var(--c-border-light) }
.comment-body { display: flex; gap: 12px }
.comment-author img { border-radius: 50% }
.comment-meta { font-size: .75rem; color: var(--c-text-lighter); margin-bottom: 6px }
.comment-content { font-size: .9rem }
.comment-respond label { display: block; font-size: .85rem; margin-bottom: 4px; font-weight: 500 }
.comment-respond input,
.comment-respond textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-bg); color: var(--c-text); transition: border-color .2s }
.comment-respond input:focus,
.comment-respond textarea:focus { border-color: var(--c-accent); outline: none }
.comment-respond textarea { min-height: 120px; resize: vertical }
.comment-respond .submit { padding: 10px 28px; background: var(--c-accent); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: background .2s }
.comment-respond .submit:hover { background: var(--c-accent-hover) }
.comment-nav { text-align: center; margin: 20px 0 }
.comments-closed { color: var(--c-text-light); font-size: .9rem }

/* ========== Sidebar ========== */
.sidebar .widget { background: var(--c-bg-card); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; border: 1px solid var(--c-border-light) }
.widget-title {
    font-size: .95rem; font-weight: 800; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 2px solid var(--c-border); position: relative; letter-spacing: -0.2px;
}
.widget-title::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    width: 48px; height: 2px; background: var(--c-gradient-warm); border-radius: 1px;
}
.sidebar .widget ul li { padding: 7px 0; border-bottom: 1px solid var(--c-border-light) }
.sidebar .widget ul li:last-child { border-bottom: none; padding-bottom: 0 }
.sidebar .widget ul li a { color: var(--c-text); font-size: .9rem; transition: color .2s }
.sidebar .widget ul li a:hover { color: var(--c-accent) }
.post-date { display: block; font-size: .75rem; color: var(--c-text-lighter); margin-top: 3px }

.popular-post-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-border-light); align-items: center }
.popular-post-item:last-child { border-bottom: none }
.popular-post-item .rank { width: 24px; height: 24px; color: var(--c-text-lighter); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0 }
.popular-post-item img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; flex-shrink: 0 }
.popular-post-item .pop-info { flex: 1 }
.popular-post-item .pop-info a { font-size: .85rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--c-text); font-weight: 500 }
.popular-post-item .pop-info a:hover { color: var(--c-accent) }
.popular-post-item .pop-info .pop-date { font-size: .7rem; color: var(--c-text-lighter); margin-top: 3px }

/* ========== Pagination ========== */
.pagination, .nav-links {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; margin-top: 28px; padding: 12px 0;
    user-select: none;
}
.pagination .page-numbers,
.pagination a, .pagination span,
.nav-links a, .nav-links span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 4px;
    background: var(--c-bg); border-radius: var(--radius-sm);
    font-size: .9rem; color: var(--c-text-light);
    border: 1.5px solid var(--c-border); font-weight: 500;
    transition: all .2s cubic-bezier(.4,0,.2,1);
}
.pagination .current,
.pagination .page-numbers.current {
    background: var(--c-gradient-warm); color: #fff;
    border-color: transparent; box-shadow: 0 4px 12px rgba(124,58,237,.3);
}
.pagination .dots,
.pagination .page-numbers.dots {
    border-color: transparent; background: transparent;
    cursor: default; letter-spacing: 3px; min-width: auto; width: 28px;
}
.pagination a:hover,
.pagination .page-numbers:not(.current):not(.dots):hover {
    background: var(--c-gradient-warm); color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px rgba(124,58,237,.25);
}
.pagination .prev,
.pagination .next,
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    padding: 0 16px; font-weight: 600;
}
.pagination h2, .nav-links .screen-reader-text { display: none }

/* ========== 404 ========== */
.error-404 { padding: 60px 24px; text-align: center }
.error-404 h1 { font-size: 6rem; color: var(--c-accent); line-height: 1.1; font-weight: 800; letter-spacing: -2px }
.error-404 h2 { font-size: 1.5rem; margin: 12px 0; font-weight: 600 }
.error-404 p { color: var(--c-text-light); margin-bottom: 28px; font-size: .95rem }
.error-search { max-width: 400px; margin: 0 auto 24px }

/* ========== Footer ========== */
.site-footer { background: var(--c-bg-dark); color: #aaa; border-top: 4px solid #7c3aed; padding: 36px 0 20px; margin-top: 40px; position: relative }
.site-footer::before { content: ''; position: absolute; top: -4px; left: 0; right: 0; height: 4px; background: var(--c-gradient-warm) }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 24px }
.footer-widgets h4 { font-size: .95rem; margin-bottom: 16px; color: #ddd; font-weight: 600 }
.footer-widgets ul li { padding: 6px 0 }
.footer-widgets a { font-size: .85rem; color: #999; transition: color .2s }
.footer-widgets a:hover { color: #fff }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: #999 }
.footer-bottom a { color: #999 }
.footer-bottom a:hover { color: #fff }
.footer-nav { margin-bottom: 8px }
.footer-nav ul { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap }
.footer-nav a { font-size: .82rem; color: #999 }
.footer-nav a:hover { color: #fff }
.icp { font-size: .78rem; color: #999; text-decoration: none }
.icp:hover { color: #fff }

/* ========== Footer Links (友情链接) ========== */
.footer-links {
    text-align: center; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08);
}
.footer-links .links-title {
    font-size: .85rem; color: #999;
}
.footer-links a {
    font-size: .85rem; color: #999; transition: color .2s; margin-left: 4px;
}
.footer-links a:hover { color: #fff }

/* ========== Back to top ========== */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px;
    width: 46px; height: 46px; background: var(--c-gradient-warm); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; opacity: 0; transform: translateY(16px);
    transition: all .35s cubic-bezier(.4,0,.2,1); z-index: 999;
    box-shadow: 0 4px 20px rgba(124,58,237,.35);
}
.back-to-top:hover { background: var(--c-accent-hover); transform: translateY(-2px) }
.back-to-top.visible { opacity: 1; transform: translateY(0) }

/* ========== No Content ========== */
.no-content { text-align: center; padding: 60px 20px }
.no-content p { font-size: .95rem; color: var(--c-text-light); margin-bottom: 20px }
.no-content h3 { font-size: 1.1rem; margin-bottom: 8px }
.btn-home { display: inline-block; padding: 10px 24px; background: var(--c-accent); color: #fff; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; transition: background .2s }
.btn-home:hover { background: var(--c-accent-hover); color: #fff }

/* ========== Search ========== */
.search .breadcrumb { border-bottom: none; margin-bottom: 12px }
.search-count { font-size: .85rem; color: var(--c-text-light); margin-bottom: 14px }
.no-results { text-align: center; padding: 48px 20px }
.no-results h3 { font-size: 1.1rem; margin-bottom: 8px }
.no-results p { color: var(--c-text-light); margin-bottom: 20px; font-size: .9rem }
.no-results .search-form { max-width: 420px; margin: 0 auto }

/* ========== Animations ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: translateY(0) } }
.fade-in-up { animation: fadeInUp .6s ease forwards; opacity: 0 }

/* ========== Print ========== */
@media print {
    .site-header, .sidebar, .site-footer, .back-to-top, .comments-area { display: none }
    body { font-size: 13px; color: #000 }
    a { color: #000 }
}

/* ========== Dark Mode (optional) ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --c-bg: #111827; --c-bg-alt: #1f2937; --c-bg-card: #1a2332;
        --c-text: #e5e7eb; --c-text-light: #9ca3af; --c-text-lighter: #6b7280;
        --c-border: #2d3748; --c-border-light: #243044;
        --c-accent: #60a5fa; --c-accent-hover: #93bbfd;
        --c-accent-light: rgba(96,165,250,.12);
    }
    .site-header { background: rgba(17,24,39,0.92); box-shadow: 0 1px 3px rgba(0,0,0,.3) }
    .post-content { color: #d1d5db }
    .post-content blockquote { color: #9ca3af }
    .search-form input { background: var(--c-bg-card); color: var(--c-text) }
    .article-cat:hover { color: #fff }
    .footer-bottom { border-color: rgba(255,255,255,.06) }
    .main-nav a:hover { color: var(--c-accent) }
    /* 分类标签 */
    .cat-label-inline { color: #fff }
    .cat-label-inline:hover { color: rgba(255,255,255,.85) }
}
