.site-title a { color: var(--text); text-decoration: none; }
.site-title a:hover { color: var(--primary); }
.search-wrapper { position: relative; }
.search-suggestions { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--elevation-2); z-index: 1000; max-height: 360px; overflow-y: auto; margin-top: -1px; min-width: 260px; }
.search-suggestions a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--divider); transition: background 0.15s; }
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a:hover, .search-suggestions a.active { background: #E3F2FD; color: var(--primary); }
.search-suggestions .suggestion-title { font-weight: 500; font-size: 14px; }
.search-suggestions .suggestion-excerpt { font-size: 12px; color: var(--text-secondary); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestions .suggestion-date { font-size: 11px; color: var(--text-hint); margin-top: 4px; }
.search-suggestions .no-result { padding: 12px 14px; color: var(--text-hint); font-size: 13px; text-align: center; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; border: 1px solid var(--border); color: var(--text-secondary); text-decoration: none; transition: all 0.15s; }
.pagination a:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); text-decoration: none; }
.pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination span.dots { border: none; color: var(--text-hint); }
.top-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-left: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }
pre { position: relative; padding-top: 28px !important; }
pre::before { content: attr(data-lang); position: absolute; top: 0; left: 0; right: 0; padding: 3px 12px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-hint); background: rgba(0,0,0,0.03); border-bottom: 1px solid rgba(0,0,0,0.06); }
pre code { display: block; overflow-x: auto; }
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 50%; font-size: 18px; cursor: pointer; box-shadow: var(--elevation-2); z-index: 999; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; }
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); box-shadow: var(--elevation-3); transform: translateY(-2px); }
.search-highlight { background: none; color: #E65100; font-weight: 700; }
.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--divider); }
.article-nav a { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text-secondary); font-size: 13px; transition: all 0.2s; max-width: 48%; text-decoration: none; }
.article-nav a:hover { background: var(--primary-bg); color: var(--primary); }
.article-nav .nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-hint); }
.article-nav .nav-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-articles { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--divider); }
.related-articles h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.related-list a { display: block; padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); transition: all 0.2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-list a:hover { background: var(--primary-bg); color: var(--primary); text-decoration: none; }
.share-buttons { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: var(--radius-round); font-size: 12px; font-weight: 500; color: #fff; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none; }
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; color: #fff; }
.share-weibo { background: #E6162D; }
.share-twitter { background: #1DA1F2; }
.share-facebook { background: #1877F2; }
.share-copy { background: var(--text-secondary); }
.share-copy.copied { background: #0F9D58; }

nav input[type="text"] { width: clamp(120px, 18vw, 180px); }

.menu-toggle {
    display: none;
    background: none;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 16px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}
.menu-toggle:hover { background: var(--surface); }

/* 文章卡片样式 */
.article-card { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--divider); align-items: flex-start; }
.article-card:last-child { border-bottom: none; }
.article-card:hover { background: #fafafa; }
.article-info { flex: 1; min-width: 0; }
.article-info h3 { margin: 0 0 4px 0; font-size: 1.05em; }
.article-info p { margin: 4px 0; color: var(--text-secondary); font-size: 0.9em; line-height: 1.4; }
.article-info small { color: var(--text-hint); font-size: 0.8em; }
.article-thumb { flex-shrink: 0; width: 140px; height: 100px; border-radius: 8px; overflow: hidden; order: 1; position: relative; }

/* 旋转加载动画 */
.thumb-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    z-index: 2;
    transition: opacity 0.3s ease;
}
.thumb-loader.loaded {
    opacity: 0;
    pointer-events: none;
}
.thumb-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #E3F2FD;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: thumbSpin 0.8s linear infinite;
}
@keyframes thumbSpin {
    to { transform: rotate(360deg); }
}
.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: opacity 0.4s ease;
}
.article-thumb img.lazy-load { opacity: 0; }
.article-thumb img.lazy-loaded { opacity: 1; }
.thumb-fallback {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    z-index: 3;
    font-size: 24px;
    color: #90CAF9;
}

@media (max-width: 600px) {
    .article-card { flex-direction: row; }
    .article-thumb { width: 120px; height: 75px; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 6px; }
    nav {
        display: none;
        flex-wrap: wrap;
        gap: 4px;
        background: var(--surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        padding: 8px;
        margin-top: 8px;
    }
    nav.show { display: flex; }
    nav a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: var(--radius-sm);
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        background: #fff;
        border: 1px solid var(--divider);
        transition: all 0.15s;
        white-space: nowrap;
    }
    nav a:hover { background: #E8F0FE; color: var(--primary); border-color: var(--primary); }
    nav a i { color: var(--primary); font-size: 13px; }
    nav .search-wrapper { width: 100%; padding: 4px 0 0 0; }
    nav form { display: flex; width: 100%; gap: 6px; }
    nav input[type="text"] { flex: 1; width: auto; min-width: 0; font-size: 16px; padding: 10px 12px; }
    nav button { font-size: 16px; padding: 10px 14px; flex-shrink: 0; }
    .search-wrapper { width: 100%; }
    .search-suggestions { min-width: auto; width: 100%; }
    .back-to-top { bottom: 20px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
    .article-nav { flex-direction: column; }
    .article-nav a { max-width: 100%; }
    .related-list { grid-template-columns: 1fr; }
    .share-btn { padding: 8px 12px; font-size: 13px; }
}
.share-qq { padding: 8px 12px; font-size: 13px; background: #12B7F5; }
.share-wechat { padding: 8px 12px; font-size: 13px; background: #07C160; }