/* ======================== 全局基础样式 ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    background-color: #f9f3ed;
    color: #5a4a42;
    line-height: 1.6;
    font-size: 16px;
    padding-top: 60px;
}

/* 图片统一限制，避免撑爆容器 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 全局链接样式：彻底去掉所有默认下划线 */
a {
    text-decoration: none !important;
    transition: all 0.2s ease;
    color: #5a4a42;
    position: relative;
}

a:hover {
    color: #e67e22;
    text-decoration: none !important;
}

/* 自定义渐变下划线动画（仅 .link-underline 生效） */
a.link-underline::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #e67e22, #d35400);
    transition: width 0.3s ease;
}

a.link-underline:hover::after {
    width: 100%;
}

/* 按钮类链接：禁用所有下划线 */
a.btn-link {
    color: inherit;
}

a.btn-link:hover {
    color: inherit;
}

a.btn-link::after {
    display: none;
}

ul,
li {
    list-style: none;
}

/* ======================== 顶部导航菜单 ======================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo a {
    color: #2d3436;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #e67e22;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.1);
}

.nav-link.special-link {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #ffffff;
    padding: 0.5rem 1.2rem;
}

.nav-link.special-link:hover {
    background: linear-gradient(135deg, #d35400 0%, #b04600 100%);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #2d3436;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 深色模式导航菜单样式 */
body.dark-mode .top-nav {
    background: linear-gradient(135deg, #2d3436 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-logo a {
    color: #ffffff;
}

body.dark-mode .nav-logo a:hover {
    color: #ff9d3d;
}

body.dark-mode .nav-link {
    color: #dcdcdc;
}

body.dark-mode .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 157, 61, 0.15);
}

body.dark-mode .mobile-menu-btn span {
    background: #ffffff;
}

/* ======================== 主容器布局 ======================== */
.container {
    width: 100%;
    min-width: 0;
    margin: 0 auto;

    /*宽度自适应*/
    max-width: 90%;
    width: min(1400px, 92vw);

    padding: 0 1.5rem;

    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 2.2rem;
}

/* ======================== 左侧边栏 ======================== */
/* 修复左栏头像不居中 */

.author-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

    /* 新增：强制内容垂直排列并水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;

    /* 关键修复：图片块级 + 自动居中 */
    display: block;
    margin: 0 auto 1rem auto;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.author-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.author-card h3 {
    color: #e67e22;
    margin-bottom: 0.5rem;
}

.author-card p {
    font-size: 0.9rem;
    color: #666666;
}

.widget {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget h4 {
    color: #e67e22;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #fde6d2;
    color: #d35400;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
}

/* ======================== 中间文章列表 ======================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.post-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
}

.post-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.post-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.post-meta {
    font-size: 0.85rem;
    color: #999999;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-title {
    font-size: 1.25rem;
    color: #333333;
    transition: color 0.2s ease;
}

a:hover .post-title {
    color: #e67e22;
}

.post-excerpt {
    color: #666666;
    font-size: 0.9rem;
}

.post-tags {
    font-size: 0.85rem;
    color: #d35400;
}

.post-card.sticky {
    position: relative;
    border: 1px solid #fde6d2;
}

.post-card.sticky::before {
    content: "置顶";
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: #e67e22;
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ======================== 右侧边栏 ======================== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.friend-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.friend-links li a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    background-color: #fff5eb;
    border-radius: 8px;
    color: #5a4a42;
}

.friend-links li a:hover {
    background-color: #fde6d2;
    color: #d35400;
    transform: translateX(4px);
}

.email-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.6rem 0;
}

.email-link {
    color: #d35400;
    font-size: 0.95rem;
    font-weight: 500;
}

.email-link:hover {
    color: #b04600;
    text-decoration: none !important;
}

.email-tip {
    color: #666666;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* ======================== 赞助按钮&弹窗 ======================== */
.sponsor-widget {
    padding: 0.2rem;
}

.sponsor-btn {
    width: 100%;
    padding: 0.8rem 0;
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sponsor-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sponsor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 1rem;
    box-sizing: border-box;
}

.sponsor-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #e67e22;
}

.sponsor-title {
    color: #e67e22;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.qr-code-container {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex: 0 1 auto;
    max-width: 100%;
}

.qr-label {
    color: #5a4a42;
    font-weight: 500;
    font-size: 1rem;
}

.qr-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #fde6d2;
    box-sizing: border-box;
}

/* ======================== 鸣谢按钮 ======================== */
.thanks-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 0;
    margin-top: 0.8rem;
    background-color: #fde6d2;
    color: #d35400;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    text-decoration: none !important;
}

.thanks-btn:hover {
    background-color: #f9e0c8;
    color: #b04600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ======================== 返回顶部按钮 ======================== */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: transparent;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    overflow: hidden;
}

.back-top-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top-btn:hover .back-top-img {
    opacity: 0.9;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* ======================== 页脚 ======================== */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #999999;
    font-size: 0.85rem;
    margin-top: 2rem;
    border-top: 1px solid #f0e6dc;
}

/* ======================== 更新日志模块 ======================== */
.update-log-container {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 5px;
}

.update-log-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-item {
    padding: 6px 0;
    border-bottom: 1px dashed #f0e6dc;
}

.log-date {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #e67e22;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.log-text {
    font-size: 13px;
    color: #5a4a42;
    line-height: 1.4;
    padding-left: 2px;
}

/* ======================== 自定义主题滚动条 ======================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f9f3ed;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #f3bf90;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

.update-log-container::-webkit-scrollbar {
    width: 5px;
}

/* ======================== 分页导航 ======================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid #f0e6dc;
}

.pagination-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #f3d7bd;
    border-radius: 8px;
    background: #ffffff;
    color: #5a4a42;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #fde6d2;
    border-color: #e67e22;
    color: #d35400;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #5a4a42;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #fde6d2;
    color: #d35400;
}

.page-number.active {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #ffffff;
}

/* 深色模式分页样式 */
body.dark-mode .pagination {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .pagination-btn {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8e8e8;
}

body.dark-mode .pagination-btn:hover {
    background: #333333;
    border-color: #ff9d3d;
    color: #ff9d3d;
}

body.dark-mode .page-number {
    color: #e8e8e8;
}

body.dark-mode .page-number:hover {
    background: rgba(255, 157, 61, 0.15);
    color: #ff9d3d;
}

/* ======================== 响应式适配 ======================== */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }

    .right-sidebar {
        display: flex !important;
    }

    body {
        padding-top: 60px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .qr-img {
        max-width: 160px;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-bottom: 1rem;
    }

    .right-sidebar {
        display: flex !important;
    }

    body {
        padding-top: 60px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* 修复 hover 放大抖动 */
    .post-card:hover {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .post-cover img {
        height: 160px;
    }

    .sponsor-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        padding: 1.2rem 1rem;
    }

    .qr-code-container {
        flex-direction: column;
        gap: 1rem;
    }

    .qr-code-item {
        width: 100%;
    }

    .qr-img {
        width: min(65vw, 180px);
        max-width: 180px;
        min-width: 120px;
    }

    .sponsor-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .qr-label {
        font-size: 0.9rem;
    }

    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .thanks-btn {
        padding: 0.7rem 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .qr-img {
        width: min(60vw, 150px);
        max-width: 150px;
    }

    .sponsor-modal-content {
        padding: 1rem 0.8rem;
    }

    .close-btn {
        top: 0.6rem;
        right: 1rem;
        font-size: 1.3rem;
    }
}

/*=================用户协议弹窗样式=================*/

.agreement-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.agreement-content {
    width: 90%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #fde6d2;
}

.agreement-title {
    text-align: center;
    color: #e67e22;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.agreement-scroll {
    max-height: 380px;
    overflow-y: auto;
    background: #fffaf5;
    border: 1px solid #f3e3d4;
    border-radius: 10px;
    padding: 1rem;
    color: #5a4a42;
    line-height: 1.8;
    font-size: 14px;
}

.agreement-scroll p {
    margin-bottom: 0.8rem;
}

.agreement-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.agreement-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 0.9rem 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.decline-btn {
    background: #fde6d2;
    color: #d35400;
}

.decline-btn:hover {
    background: #f8d7b7;
}

.accept-btn {
    background: #e67e22;
    color: white;
}

.accept-btn:hover {
    background: #d35400;
}

.accept-btn:disabled {
    background: #f3bf90;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .agreement-content {
        padding: 1.2rem;
    }

    .agreement-scroll {
        max-height: 300px;
    }

    .agreement-btns {
        flex-direction: column;
    }
}

/*=============浅色和深色模式切换按钮=============*/

.theme-toggle-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
}

/*深色模式*/

body.dark-mode {
    background: #121212;
    color: #e8e8e8;
}

body.dark-mode .post-card,
body.dark-mode .widget,
body.dark-mode .author-card,
body.dark-mode .agreement-content,
body.dark-mode .sponsor-modal-content {
    background: #1e1e1e !important;
    color: #e8e8e8 !important;
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode a {
    color: #dcdcdc;
}

body.dark-mode .theme-toggle-btn {
    background: rgba(30,30,30,0.95);
    color: #ffffff;
}

body.dark-mode .footer {
    background: #181818;
    color: #d8d8d8;
}

body.dark-mode .tag {
    background: rgba(255,255,255,0.08);
    color: #f2f2f2;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode button {
    color: #ffffff;
}

/*恢复浅色模式原始配色*/


/* 深色模式专属标题  优化只影响 dark-mode*/
/* 深色模式：标题颜色白色 */
body.dark-mode .post-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.7 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    margin: 12px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* 深色模式：置顶文章标题 */
body.dark-mode .post-card.sticky .post-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

/* 深色模式：摘要 */
body.dark-mode .post-excerpt {
    color: rgba(255,255,255,0.88) !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
}

/* 深色模式：时间 */
body.dark-mode .post-meta {
    color: rgba(255,255,255,0.65) !important;
    font-size: 13px !important;
}

/* 深色模式：标签 */
body.dark-mode .post-tags {
    color: #ff9d3d !important;
    font-size: 14px !important;
    font-weight: 600;
}

/* 深色模式：按钮保持高可读性 */
body.dark-mode .btn-link,
body.dark-mode .thanks-btn {
    background: #f6efe6 !important;
    color: #1f1f1f !important;
}

body.dark-mode .btn-link:hover,
body.dark-mode .thanks-btn:hover {
    background: #fff7ee !important;
    color: #000 !important;
}

body.dark-mode .sponsor-btn {
    background: #e67e22 !important;
    color: #ffffff !important;
}

body.dark-mode .sponsor-btn:hover {
    background: #d35400 !important;
}

/* =========================
修复深色模式 banner 与内容连接处发白问题
========================= */

/* 浅色模式保持原样 */
.banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(249, 243, 237, 0),
        #f9f3ed
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 深色模式下改为深色渐变 */
body.dark-mode .banner::after {
    background: linear-gradient(
        to bottom,
        rgba(18, 18, 18, 0),
        #121212
    ) !important;
}

/* 深色模式主体背景统一 */
body.dark-mode {
    background: #121212 !important;
}

/* 容器区域保持统一深色 */
body.dark-mode .container {
    background: transparent;
}

/* 左下角主题切换按钮 */
body.dark-mode .theme-toggle-btn {
    background: rgba(35, 35, 35, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

/* 鸣谢名单 / 用户协议 / 常见问题按钮 */
body.dark-mode .btn-link,
body.dark-mode .thanks-btn {
    background: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

body.dark-mode .btn-link:hover,
body.dark-mode .thanks-btn:hover {
    background: #333333 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* 赞助按钮 */
body.dark-mode .sponsor-btn {
    background: #c96a12 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

body.dark-mode .sponsor-btn:hover {
    background: #b85d08 !important;
    color: #ffffff !important;
}

/* 返回主页按钮 */
body.dark-mode .back-home {
    background: #2d2d2d !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.06);
}

body.dark-mode .back-home:hover {
    background: #383838 !important;
    color: #ffffff !important;
}

/* 附件下载按钮区域 */
body.dark-mode .attachment-item {
    background: #252525 !important;
    color: #ffffff !important;
}

body.dark-mode .attachment-download {
    color: #ffffff !important;
}

body.dark-mode .attachment-download:hover {
    color: #ffb366 !important;
}

/* =========================
全站搜索框
========================= */
.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1 1 auto;        /* 允许扩展，但不乱缩 */
    min-width: 0;          /* 防止内容撑破或异常压缩 */
    width: 100%;

    height: 48px;
    border: 1px solid #f3d7bd;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    background: #fffaf5;
    color: #5a4a42;
    outline: none;

    box-sizing: border-box; /*避免 padding 影响宽度*/
}

.search-box input:focus {
    border-color: #e67e22;
}

/*按钮禁止压缩 */
#searchBtn {
    flex-shrink: 0;

    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: #e67e22;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#searchBtn:hover {
    background: #d35400;
    transform: translateY(-1px);
}

/*深色模式*/
body.dark-mode .search-box {
    background: #1e1e1e;
    box-shadow: none;
}

body.dark-mode .search-box input {
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
}

body.dark-mode #searchBtn {
    background: #a85a1f;
    color: #ffffff;
}

body.dark-mode #searchBtn:hover {
    background: #8e4915;
}

@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    #searchBtn {
        width: 100%;
    }
}

/*左侧公告栏样式*/

.notice-widget {
    background: #ffffff;
    border: 1px solid #fde6d2;
    position: relative;
    overflow: hidden;
}

.notice-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e67e22;
    border-radius: 4px;
}

.notice-widget h4 {
    color: #e67e22;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    padding-left: 0.5rem;
}

.notice-content {
    padding-left: 0.5rem;
}

.notice-content p {
    margin-bottom: 0.6rem;
    font-size: 14px;
    line-height: 1.7;
    color: #5a4a42;
}

.notice-list {
    margin: 1rem 0;
    padding: 0.8rem;
    background: #fff8f2;
    border-radius: 10px;
    border: 1px solid #fde6d2;
}

.notice-list p {
    margin-bottom: 0.5rem;
    color: #d35400;
    font-weight: 500;
}

.notice-tip {
    font-size: 13px;
    color: #888;
    padding-top: 0.5rem;
    border-top: 1px dashed #f0e6dc;
}

/*适配深色模式*/

body.dark-mode .notice-widget {
    background: #1e1e1e !important;
    border: 1px solid rgba(255,255,255,0.08);
}

body.dark-mode .notice-widget::before {
    background: #ff9d3d;
}

body.dark-mode .notice-widget h4 {
    color: #ffb266;
}

body.dark-mode .notice-content p {
    color: #f2f2f2;
}

body.dark-mode .notice-list {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

body.dark-mode .notice-list p {
    color: #ffb266;
}

body.dark-mode .notice-tip {
    color: rgba(255,255,255,0.65);
    border-top: 1px dashed rgba(255,255,255,0.08);
}

/*筛选动画样式  向上渐入*/

.post-card {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: all 0.4s ease;
}

/* 隐藏状态 */
.post-card.hide {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(6px);
    pointer-events: none;
    position: absolute;
}

/* 显示动画 */
.post-card.show {
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}