/*
Theme Name:   XiaBiBi Masonry
Theme URI:    https://www.xiabibi.top
Author:       瞎逼逼
Author URI:   https://www.xiabibi.top
Description:  自用主题，集成按钮，快捷发布，评论盖楼。
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  my-awesome-theme
Tags:         blog, custom-logo, translation-ready
*/

/* ========== CSS Variables ========== */
:root {
    --card-width: 300px;
    /* --card-height: 380px; */
    --img-height: 180px;
    --gap: 20px;
    --radius: 12px;
    --logo-height: 40px;
    --color-bg: #f5f5f7;
    --color-card: #ffffff;
    --color-text: #333333;
    --color-text-light: #888888;
    --color-primary: #4a90d9;
    --color-border: #e8e8e8;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --content-width: 780px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); background: var(--color-bg); color: var(--color-text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: color .2s; }
a:hover { color: var(--color-primary); }
img { max-width: 100%; display: block; }

/* ========== Header ========== */
.site-header {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 40px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo-img {
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: inherit;
    white-space: nowrap;
    line-height: 1.2;
}
.site-title a { color: var(--color-text); }

.header-right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    flex-shrink: 1;
}

.search-wrapper form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper input[type="search"] {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 14px;
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.search-wrapper input[type="search"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, .1);
}

.search-submit-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color .2s, background .2s;
}

.search-submit-btn:hover {
    color: var(--color-primary);
    background: rgba(74, 144, 217, .08);
}

.header-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-light);
    font-size: 16px;
    transition: all .2s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.header-login-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-1px);
}

/* ========== 搜索结果页 ========== */
.search-header {
    text-align: center;
    padding: 40px 20px 30px;
    background: var(--color-card);
    border-radius: var(--radius);
    margin-bottom: 30px;
}
.search-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}
.search-header .search-query {
    color: var(--color-primary);
}
.search-result-count {
    color: var(--color-text-light);
    font-size: 14px;
}

/* ========== Header Mobile ========== */
@media (max-width: 768px) {
    .site-header {
        padding: 0 16px;
        height: 60px;
        gap: 10px;
    }
    .site-logo-img {
        height: 36px !important;
    }
    .site-title {
        font-size: 18px !important;
    }
    .search-wrapper {
        max-width: 160px !important;
        flex-shrink: 1;
    }
    .search-wrapper input[type="search"] {
        height: 34px;
        font-size: 13px;
        padding: 0 34px 0 12px;
        border-radius: 17px;
    }
    .search-submit-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
        right: 3px;
    }
    .header-right-group {
        gap: 6px;
        flex-shrink: 1;
        min-width: 0;
        overflow: visible;
    }
    .header-user-btn {
        padding: 2px 8px 2px 2px;
        flex-shrink: 0;
    }
    .header-user-btn .user-avatar-small {
        width: 28px;
        height: 28px;
    }
    .header-login-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
        flex-shrink: 0;
    }
    .user-dropdown {
        min-width: 180px;
        right: -8px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0 12px;
        height: 54px;
    }
    .site-logo-img {
        height: 30px !important;
    }
    .site-title {
        font-size: 15px !important;
    }
    .search-wrapper {
        max-width: 120px !important;
    }
    .search-wrapper input[type="search"] {
        height: 30px;
        font-size: 12px;
        padding: 0 28px 0 10px;
        border-radius: 15px;
    }
    .search-submit-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
        right: 2px;
    }
    .header-right-group {
        gap: 4px;
    }
    .header-user-btn .user-avatar-small {
        width: 24px;
        height: 24px;
    }
    .header-login-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ========== Masonry Grid ========== */
.site-main { max-width: 1400px; margin: 30px auto; padding: 0 20px; }
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap, 20px);
}

/* ========== 响应式适配（覆盖原有媒体查询） ========== */
@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    .card {
        aspect-ratio: 3 / 2;
    }
}

/* ========== 新卡片样式（背景图 + 毛玻璃） ========== */
/* ========== 新卡片样式（背景图 + 底部毛玻璃信息条） ========== */
.card {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius, 12px);
    overflow: hidden;
    background-color: #2d2d2d;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.card__bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* ========== 底部信息条（浅色毛玻璃） ========== */
.card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px 12px;           /* 上下内边距缩小，降低毛玻璃高度 */
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;                    /* 所有文字白色 */
    transition: background .3s ease;
    border-radius: 0 0 var(--radius, 12px) var(--radius, 12px);
    min-height: 70px;                  /* 降低最小高度 */
}
.card:hover .card__info {
    background: rgba(255, 255, 255, 0.30);
}

.card__title {
    font-size: 16px;                   /* 略微缩小，适配更紧凑的布局 */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;                /* 标题与下方信息的间距缩小 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.3em + 2px);
}
.card__title a {
    color: #ffffff;                    /* 白色标题 */
    text-decoration: none;
    transition: color .2s ease;
}
.card__title a:hover {
    color: #f0c27f;                    /* hover 暖色高亮（可根据喜好更换） */
    text-decoration: none;
}

/* ===== 元信息：强制同一行 ===== */
.card__meta {
    display: flex;
    flex-wrap: nowrap;                 /* ✅ 强制不换行，确保在同一行 */
    align-items: center;
    gap: 10px 16px;                    /* 水平间距 16px，垂直 10px（备用） */
    font-size: 12px;                   /* 略微缩小，便于一行显示 */
    color: rgba(255, 255, 255, 0.90);  /* 白色半透明，柔和 */
    overflow: hidden;                  /* 防止溢出 */
    white-space: nowrap;               /* 文字不换行 */
}
.card__meta i {
    margin-right: 3px;
    font-size: 11px;
    opacity: 0.8;
}
/* 分类链接颜色继承白色 */
.card__meta .card__category a {
    color: rgba(255, 255, 255, 0.90);
    text-decoration: none;
}
.card__meta .card__category a:hover {
    color: #f0c27f;
    text-decoration: none;
}

/* 如果某些元信息太长，允许其截断（但尽量保持在一行） */
.card__meta .card__author,
.card__meta .card__date,
.card__meta .card__category {
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}
@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    .card {
        aspect-ratio: 3 / 2;
    }
    /* ✅ 已移除隐藏日期的规则，日期正常显示 */
}
/* ========== Single Post ========== */
.single-page { max-width: var(--content-width); margin: 40px auto; padding: 0 20px; }
.single-container { background: var(--color-card); border-radius: var(--radius); box-shadow: 0 2px 16px rgba(0,0,0,.06); padding: 48px 56px; margin-bottom: 30px; }
.single-header { margin-bottom: 32px; text-align: center; }

.single-title-row {
    display: block;
    margin-bottom: 16px;
    width: 100%;
}

.single-title {
    font-size: clamp(20px, 4.5vw, 32px);
    font-weight: 800;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0;
    word-break: break-word;
}

.single-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-light);
    flex-wrap: wrap;
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item i { font-size: 13px; opacity: .7; }
.meta-divider { color: #ddd; user-select: none; }
.meta-cat { color: var(--color-primary); font-weight: 500; cursor: default; }
.meta-cat i { opacity: 1; font-size: 14px; }
.single-featured-image { margin-bottom: 36px; border-radius: 10px; overflow: hidden; }
.single-featured-image img { width: 100%; height: auto; }

/* ========== 文章底部管理按钮 ========== */
.single-admin-actions-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    justify-content: flex-end;
}

.single-admin-actions-bottom .admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text-light);
}

.single-admin-actions-bottom .admin-btn:hover {
    transform: translateY(-2px);
}

.single-admin-actions-bottom .admin-btn--edit:hover {
    background: var(--color-primary, #4a90d9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.single-admin-actions-bottom .admin-btn--delete:hover {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.single-admin-actions-bottom .admin-btn--delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ========== Entry Content ========== */
.entry-content { font-size: 17px; line-height: 2; color: #2c2c2c; }
.entry-content p { margin-bottom: 1.8em; }
.entry-content h2 { font-size: 24px; font-weight: 700; margin: 2.5em 0 1em; padding-bottom: 10px; border-bottom: 2px solid var(--color-bg); }
.entry-content h3 { font-size: 20px; font-weight: 600; margin: 2em 0 .8em; }
.entry-content h4 { font-size: 18px; font-weight: 600; margin: 1.5em 0 .6em; }
.entry-content img { border-radius: 8px; margin: 28px auto; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.entry-content img[class*="wp-image-"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 28px auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.08) !important;
}
.entry-content img.wp-smiley,
.entry-content img.icon {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    display: inline-block !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.entry-content a {
    color: var(--color-primary);
    border-bottom: 1px dashed var(--color-primary);
}
.entry-content a:hover {
    border-bottom-style: solid;
}
.entry-content .topic-tag {
    display: inline-block;
    padding: 0 4px;
    color: #7c3aed !important;
    font-weight: 600;
    border-bottom: none !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
}
.entry-content .topic-tag:hover {
    color: #f59e0b !important;
    border-bottom: none !important;
    text-decoration: none !important;
}
.entry-content .topic-tag--pending {
    color: #999 !important;
    font-weight: 400;
    cursor: default;
    border-bottom: none !important;
}
.entry-content .topic-tag--pending:hover {
    color: #999 !important;
    border-bottom: none !important;
}
.entry-content ul, .entry-content ol { margin: 1.5em 0; padding-left: 1.8em; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote { margin: 2em 0; padding: 20px 24px; border-left: 4px solid var(--color-primary); background: rgba(74,144,217,.04); border-radius: 0 8px 8px 0; color: #555; font-style: italic; font-size: 16px; }
.entry-content pre { background: #1e1e2e; color: #cdd6f4; padding: 20px 24px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.7; margin: 2em 0; font-family: "JetBrains Mono", "Fira Code", monospace; }
.entry-content code:not(pre code) { background: rgba(74,144,217,.08); color: #d63384; padding: 2px 6px; border-radius: 4px; font-size: .9em; font-family: "JetBrains Mono", "Fira Code", monospace; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--color-border); padding: 12px 16px; text-align: left; }
.entry-content th { background: var(--color-bg); font-weight: 600; }

/* ========== Single Tags ========== */
.single-tags { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--color-text-light); }
.single-tags i { color: var(--color-primary); }
.single-tags a { display: inline-block; padding: 4px 12px; border-radius: 6px; background: var(--color-bg); color: var(--color-text-light); font-size: 13px; transition: all .2s; }
.single-tags a:hover { background: var(--color-primary); color: #fff; }

/* ========== Single Footer ========== */
.single-footer { margin-top: 40px; }
.author-card { display: flex; align-items: center; gap: 18px; padding: 24px; background: var(--color-bg); border-radius: 10px; margin-bottom: 30px; }
.author-avatar img { border-radius: 50%; width: 64px; height: 64px; object-fit: cover; }
.author-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.author-bio { font-size: 13px; color: var(--color-text-light); line-height: 1.5; }
.post-navigation { display: flex; gap: 16px; }
.nav-prev, .nav-next { flex: 1; padding: 18px 20px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; transition: all .2s; }
.nav-prev:hover, .nav-next:hover { border-color: var(--color-primary); box-shadow: 0 4px 12px rgba(74,144,217,.1); }
.nav-prev a, .nav-next a { display: flex; flex-direction: column; gap: 6px; }
.nav-next { text-align: right; }
.nav-next a { align-items: flex-end; }
.nav-label { font-size: 12px; color: var(--color-text-light); display: flex; align-items: center; gap: 4px; }
.nav-title { font-size: 14px; font-weight: 500; color: var(--color-text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== Comments ========== */
.single-comments { background: var(--color-card); border-radius: var(--radius); box-shadow: 0 2px 16px rgba(0,0,0,.06); padding: 40px 56px; }
.comment-status { text-align: center; padding: 48px 20px; color: var(--color-text-light); }
.comment-status i { font-size: 36px; margin-bottom: 16px; display: block; opacity: .5; }
.comment-status p { font-size: 15px; }
.comment-status--locked i { color: #e6a23c; }
.comment-status--closed i { color: #ccc; }
.comments-title { font-size: 20px; font-weight: 700; margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.comments-title i { color: var(--color-primary); }
.comment-list { list-style: none; padding: 0; margin: 0 0 36px; }
.comment-list .children { list-style: none; padding-left: 0; margin-left: 32px; margin-top: 0; border-left: 2px solid var(--color-border); }
.comment-list .children .children { margin-left: 24px; }
.comment-item { margin-bottom: 0; padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,.04); }
.comment-item:last-child { border-bottom: none; }
.comment-body { display: flex; gap: 14px; align-items: flex-start; }
.comment-avatar img { border-radius: 50%; width: 44px; height: 44px; flex-shrink: 0; object-fit: cover; }
.comment-content { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.comment-author { font-size: 14px; font-weight: 600; color: var(--color-text); }
.comment-badge { font-size: 10px; padding: 1px 7px; border-radius: 10px; background: var(--color-primary); color: #fff; font-weight: 500; line-height: 1.6; }
.comment-reply-to { font-size: 12px; color: var(--color-primary); font-weight: 500; }
.comment-time { font-size: 12px; color: #bbb; margin-left: auto; }
.comment-text { font-size: 14px; line-height: 1.75; color: #444; word-break: break-word; }
.comment-actions { margin-top: 6px; }
.comment-reply-link { font-size: 12px; color: var(--color-text-light); display: inline-flex; align-items: center; gap: 4px; transition: color .2s; cursor: pointer; }
.comment-reply-link:hover { color: var(--color-primary); }
.comment-form-custom { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--color-border); }
.logged-in-as { font-size: 13px; color: var(--color-text-light); margin-bottom: 14px; }
.logged-in-as a { color: var(--color-primary); font-size: 12px; }
.form-row { margin-bottom: 14px; }
.form-row textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 10px; font-size: 15px; font-family: var(--font-family); outline: none; transition: border-color .2s, box-shadow .2s; background: var(--color-bg); resize: vertical; min-height: 100px; }
.form-row textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(74,144,217,.1); }
.comment-form-custom .submit { display: inline-block; padding: 12px 32px; background: var(--color-primary); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s, transform .1s; }
.comment-form-custom .submit:hover { background: #3a7bc8; }
.comment-form-custom .submit:active { transform: scale(.98); }
.comment-login-hint { text-align: center; padding: 36px 20px; margin-top: 32px; border-top: 1px solid var(--color-border); color: var(--color-text-light); }
.comment-login-hint i { font-size: 32px; margin-bottom: 12px; display: block; opacity: .4; }
.comment-login-hint p { font-size: 15px; }
.comment-login-hint a { color: var(--color-primary); font-weight: 600; }
.comment-login-hint a:hover { text-decoration: underline; }
#respond { margin-top: 16px; padding: 20px; background: var(--color-bg); border-radius: 10px; }
#respond .comment-form-custom { margin-top: 0; padding-top: 0; border-top: none; }
#cancel-comment-reply-link { font-size: 12px; color: var(--color-text-light); margin-left: 12px; }
#cancel-comment-reply-link:hover { color: #e74c3c; }

/* ========== Pagination ========== */
.pagination { text-align: center; padding: 40px 0; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; margin: 0 4px; border-radius: 8px; font-size: 14px; border: 1px solid var(--color-border); background: var(--color-card); transition: all .2s; }
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ========== Footer ========== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: var(--color-text-light);
    z-index: 999;
}
.site-main {
    padding-bottom: 120px;
}

/* ========== Custom Login Page ========== */
.login-page-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--color-bg);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
    padding: 48px 40px;
    text-align: center;
}
.login-card__favicon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 12px;
    object-fit: contain;
}
.login-card__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--color-text);
}
.login-form .form-row {
    margin-bottom: 16px;
    text-align: left;
}
.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 6px;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: var(--color-bg);
    color: var(--color-text);
    box-sizing: border-box;
}
.login-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, .1);
}
.login-form .agreement-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
    text-align: left;
    font-size: 12px;
    color: var(--color-text-light);
    line-height: 1.5;
}
.login-form .agreement-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}
.login-form .agreement-row a {
    color: var(--color-primary);
    text-decoration: none;
}
.login-form .agreement-row a:hover {
    text-decoration: underline;
}
.login-form .submit-btn {
    width: 100%;
    height: 46px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: var(--font-family);
}
.login-form .submit-btn:hover { background: #3a7bc8; }
.login-form .submit-btn:active { transform: scale(.98); }
.login-form .submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-form .form-input {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 48px !important;
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}
.login-form .form-input:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}
.login-form .form-input:-webkit-autofill,
.login-form .form-input:-webkit-autofill:hover,
.login-form .form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #333 !important;
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
input[type="email"].form-input {
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 6px !important;
}
.form-input::-ms-clear,
.form-input::-ms-reveal {
    display: none !important;
}
.form-input::-webkit-search-decoration,
.form-input::-webkit-search-cancel-button,
.form-input::-webkit-search-results-button,
.form-input::-webkit-search-results-decoration {
    display: none !important;
}

.login-card__links {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
}
.login-card__links a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color .2s;
}
.login-card__links a:hover { color: var(--color-primary); }
.login-card__links .link-divider {
    color: var(--color-border);
    user-select: none;
}
.login-error-msg {
    background: rgba(231, 76, 60, .08);
    color: #e74c3c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}
.login-error-msg i { margin-right: 6px; }
.login-success-msg {
    background: rgba(82, 196, 26, .08);
    color: #52c41a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}
.login-success-msg i { margin-right: 6px; }

@media (max-width: 480px) {
    .search-wrapper { max-width: 140px; }
    .search-wrapper input[type="search"] { font-size: 13px; padding-left: 12px; }
    .login-card { padding: 36px 24px; }
    .login-card__title { font-size: 20px; margin-bottom: 24px; }
}

/* ========== Header User Menu ========== */
.header-user-menu {
    position: relative;
    flex-shrink: 0;
}
.header-user-btn {
    display: flex;
    align-items: center;
    padding: 4px 12px 4px 4px;
    border: none;
    border-radius: 30px;
    background: var(--color-bg);
    cursor: pointer;
    transition: all .2s ease;
    font-family: var(--font-family);
    color: var(--color-text);
}
.header-user-btn:hover {
    background: var(--color-border);
}
.header-user-btn .user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========== User Dropdown ========== */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border: 1px solid var(--color-border);
    padding: 8px 0;
    z-index: 1001;
    animation: dropdownFadeIn .2s ease;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
    padding: 8px 16px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-header strong {
    font-size: 14px;
    color: var(--color-text);
}
.dropdown-role {
    font-size: 11px;
    color: var(--color-text-light);
    text-transform: capitalize;
}
.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 6px 12px;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--color-text);
    text-decoration: none;
    transition: background .15s ease;
}
.dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}
.dropdown-item i {
    width: 18px;
    font-size: 14px;
    color: var(--color-text-light);
}
.dropdown-item:hover i {
    color: var(--color-primary);
}
.dropdown-item--danger {
    color: #e74c3c;
}
.dropdown-item--danger i {
    color: #e74c3c;
}
.dropdown-item--danger:hover {
    background: rgba(231, 76, 60, .08);
    color: #c0392b;
}
.dropdown-item--danger:hover i {
    color: #c0392b;
}
.dropdown-badge {
    margin-left: auto;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    line-height: 1.6;
}

/* ========== Comment Tips ========== */
.comment-tip {
    font-size: 13px;
    color: var(--color-text-light);
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: 8px;
    margin-bottom: 14px;
}
.comment-tip i {
    margin-right: 6px;
}

@media (max-width: 600px) {
    .header-user-btn {
        padding: 4px;
    }
    .header-user-btn .user-avatar-small {
        width: 28px;
        height: 28px;
    }
    .user-dropdown {
        right: -8px;
        min-width: 180px;
    }
}

/* ========== Quick Post Modal ========== */
.quick-post-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayFadeIn 0.25s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.quick-post-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 660px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.quick-post-modal::-webkit-scrollbar {
    width: 6px;
}
.quick-post-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.quick-post-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
.quick-post-modal::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
.quick-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.quick-post-header h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.quick-post-header h3 i {
    color: var(--color-primary, #4a90d9);
}
.quick-post-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.quick-post-close:hover {
    background: #f0f0f0;
    color: #333;
}
#quickPostForm {
    padding: 20px 24px 24px;
}
.quick-post-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.quick-post-col--title {
    flex: 1;
}
.quick-post-col--category {
    flex-shrink: 0;
    width: 120px;
}
.quick-post-row input[type="text"],
.quick-post-row select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.quick-post-row input[type="text"]:focus,
.quick-post-row select:focus {
    border-color: var(--color-primary, #4a90d9);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
    background: #fff;
    outline: none;
}
.quick-post-row input[type="text"]::placeholder {
    color: #bbb;
}
.quick-post-field textarea {
    width: 100%;
    min-height: 160px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    background: #fafafa;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.quick-post-field textarea:focus {
    border-color: var(--color-primary, #4a90d9);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
    background: #fff;
    outline: none;
}
.quick-post-field textarea::placeholder {
    color: #bbb;
}
.quick-post-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.quick-post-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}
.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.toolbar-btn:hover {
    background: #f0f0f0;
    color: var(--color-primary, #4a90d9);
}
.toolbar-btn--upload {
    position: relative;
    cursor: pointer;
}
.toolbar-btn--upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.toolbar-btn--submit {
    width: 40px;
    height: 40px;
    background: var(--color-primary, #4a90d9);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
}
.toolbar-btn--submit:hover {
    background: #3a7bc8;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(74, 144, 217, 0.3);
}
.toolbar-btn--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.emoji-picker {
    position: relative;
    margin-top: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.emoji-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 160px;
    overflow-y: auto;
}
.emoji-picker-grid .emoji-item {
    font-size: 24px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.4;
}
.emoji-picker-grid .emoji-item:hover {
    background: #e8e8e8;
    transform: scale(1.2);
}
.quick-post-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 0;
}
.quick-post-preview .error-hint {
    color: #e74c3c;
    font-size: 13px;
    width: 100%;
    text-align: center;
    padding: 8px 0;
}
.preview-item {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-item .preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.preview-item .preview-remove:hover {
    background: #e74c3c;
}
.upload-status {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    color: #888;
    font-size: 13px;
}
.upload-status i {
    margin-right: 6px;
}
.quick-post-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
    display: none;
}
.quick-post-status.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    text-align: center;
}
.quick-post-status.error {
    display: block;
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

@media (max-width: 640px) {
    .quick-post-modal {
        max-height: 98vh;
        border-radius: 12px;
    }
    .quick-post-header {
        padding: 14px 18px;
    }
    .quick-post-header h3 {
        font-size: 15px;
    }
    #quickPostForm {
        padding: 16px 18px 20px;
    }
    .quick-post-row {
        flex-direction: column;
        gap: 8px;
    }
    .quick-post-col--category {
        width: 100%;
    }
    .quick-post-field textarea {
        min-height: 120px;
    }
    .emoji-picker-grid .emoji-item {
        font-size: 20px;
        padding: 2px 6px;
    }
    .preview-item {
        width: 56px;
        height: 56px;
    }
}

/* ========== Tag Archive ========== */
.tag-archive-header {
    text-align: center;
    padding: 40px 20px 30px;
    background: var(--color-card);
    border-radius: var(--radius);
    margin-bottom: 30px;
}
.tag-archive-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.tag-archive-header h1 i {
    color: var(--color-primary);
    margin-right: 10px;
}
.tag-archive-header .tag-description {
    color: var(--color-text-light);
    font-size: 15px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .single-container, .single-comments { padding: 28px 20px; }
    .single-title {
        font-size: clamp(18px, 4vw, 26px) !important;
        line-height: 1.4;
        word-break: break-word;
    }
    .single-meta { font-size: 12px; gap: 6px; }
    .entry-content { font-size: 16px; }
    .post-navigation { flex-direction: column; }
    .author-card { flex-direction: column; text-align: center; }
    .single-title-row {
        flex-wrap: wrap;
        gap: 10px;
    }
}
@media (max-width: 768px) {
    .single-comments { padding: 28px 20px; }
    .comment-list .children { margin-left: 16px; }
    .comment-list .children .children { margin-left: 12px; }
    .comment-time { margin-left: 0; }
    .comment-avatar img { width: 36px; height: 36px; }
}

/* ========== Social Share ========== */
.social-share-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.social-share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: none;
    border-radius: 9999px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-family);
    white-space: nowrap;
}

.share-btn i,
.share-btn .share-icon-text {
    font-size: 16px;
    line-height: 1;
}

.share-btn .share-icon-text {
    font-weight: 700;
    font-size: 14px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.share-btn--weibo { background: #ff8200; }
.share-btn--weibo:hover { background: #e67300; }

.share-btn--douban { background: #00b51d; }
.share-btn--douban:hover { background: #009918; }

.share-btn--xiaohongshu { background: #fe2c55; }
.share-btn--xiaohongshu:hover { background: #d91a44; }

.share-btn--wechat { background: #07c160; }
.share-btn--wechat:hover { background: #05a34f; }

/* ============================================
   响应式 - 手机端
   ============================================ */
@media (max-width: 600px) {
    .social-share-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .share-btn {
        padding: 8px 4px;
        font-size: 12px;
        gap: 4px;
    }
    .share-btn i,
    .share-btn .share-icon-text {
        font-size: 14px;
    }
    .share-btn .share-icon-text {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .social-share-buttons {
        gap: 4px;
    }
    .share-btn {
        padding: 6px 4px;
        font-size: 11px;
    }
    .share-btn i,
    .share-btn .share-icon-text {
        font-size: 12px;
    }
    .share-btn .share-icon-text {
        font-size: 11px;
    }
}

/* ============================================
   移动端整体大气优化
   ============================================ */
@media (max-width: 768px) {
    .site-main {
        padding: 0 16px;
        padding-bottom: 100px;
    }
    .single-container {
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }
    .single-meta {
        font-size: 13px;
        gap: 6px;
    }
    .entry-content {
        font-size: 17px;
        line-height: 2;
    }
    .single-comments {
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }
    .author-card {
        padding: 20px;
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 0 12px;
        padding-bottom: 80px;
    }
    .single-container {
        padding: 20px 16px !important;
        border-radius: 12px !important;
    }
    .single-title {
        font-size: clamp(16px, 3.8vw, 22px) !important;
        line-height: 1.4;
        word-break: break-word;
    }
    .single-comments {
        padding: 20px 16px !important;
    }
}

/* ============================================
   微信分享弹窗
   ============================================ */
.wechat-share-modal::-webkit-scrollbar {
    width: 4px;
}
.wechat-share-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}
.wechat-share-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

/* ============================================
   404 页面
   ============================================ */

.error-404-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.error-404-container {
    display: flex;
    align-items: center;
    gap: 60px;
    background: var(--color-card, #ffffff);
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
    min-height: 500px;
}

/* ===== 左侧插画 ===== */
.error-404-illustration {
    flex: 0 0 340px;
    text-align: center;
    position: relative;
}

.error-404-number {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    color: #1a1a1a;
    letter-spacing: -6px;
    position: relative;
    z-index: 1;
}

.error-404-number span {
    background: linear-gradient(135deg, var(--color-primary, #4a90d9), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-404-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 56px;
    color: rgba(74, 144, 217, 0.10);
    z-index: 0;
    animation: compassSpin 12s linear infinite;
}

@keyframes compassSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.error-404-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.error-404-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.error-404-dots span:nth-child(1) {
    background: var(--color-primary, #4a90d9);
    animation-delay: -0.32s;
}
.error-404-dots span:nth-child(2) {
    background: #7c3aed;
    animation-delay: -0.16s;
}
.error-404-dots span:nth-child(3) {
    background: #f97316;
    animation-delay: 0s;
}

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== 右侧内容 ===== */
.error-404-content {
    flex: 1;
}

.error-404-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.error-404-desc {
    font-size: 16px;
    color: var(--color-text-light, #888888);
    line-height: 1.8;
    margin-bottom: 28px;
}

/* ===== 搜索框 ===== */
.error-404-search form {
    display: flex;
    align-items: center;
    background: var(--color-bg, #f5f5f7);
    border-radius: 12px;
    border: 2px solid var(--color-border, #e8e8e8);
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
}

.error-404-search form:focus-within {
    border-color: var(--color-primary, #4a90d9);
    box-shadow: 0 0 0 4px rgba(74, 144, 217, .1);
}

.error-404-search input[type="search"] {
    flex: 1;
    padding: 14px 18px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: var(--font-family, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
    outline: none;
    color: var(--color-text, #333333);
}

.error-404-search input[type="search"]::placeholder {
    color: #bbb;
}

.error-404-search button {
    flex-shrink: 0;
    padding: 14px 20px;
    background: var(--color-primary, #4a90d9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: background .2s;
}

.error-404-search button:hover {
    background: #3a7bc8;
}

/* ===== 快捷按钮 ===== */
.error-404-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    cursor: pointer;
}

.error-btn--home {
    background: var(--color-primary, #4a90d9);
    color: #fff;
}
.error-btn--home:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 144, 217, .3);
    color: #fff;
}

.error-btn--back {
    background: var(--color-bg, #f5f5f7);
    color: var(--color-text, #333333);
}
.error-btn--back:hover {
    background: var(--color-border, #e8e8e8);
    transform: translateY(-2px);
}

/* ===== 热门文章 ===== */
.error-404-hot {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border, #e8e8e8);
}

.hot-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #333333);
    margin-bottom: 12px;
}

.hot-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .04);
}

.hot-list li:last-child {
    border-bottom: none;
}

.hot-rank {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.hot-list li a {
    font-size: 14px;
    color: var(--color-text, #333333);
    text-decoration: none;
    transition: color .2s;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-list li a:hover {
    color: var(--color-primary, #4a90d9);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .error-404-container {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
        gap: 30px;
    }

    .error-404-illustration {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .error-404-number {
        font-size: 80px;
        letter-spacing: -4px;
    }

    .error-404-icon {
        font-size: 40px;
    }

    .error-404-actions {
        justify-content: center;
    }

    .hot-list li {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .error-404-container {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .error-404-number {
        font-size: 60px;
    }

    .error-404-title {
        font-size: 24px;
    }

    .error-404-desc {
        font-size: 14px;
    }

    .error-404-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-btn {
        width: 100%;
        justify-content: center;
    }

    .hot-list li {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hot-list li a {
        -webkit-line-clamp: 2;
    }
}
