/* 1. 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    overflow-y: scroll; /* 始终显示滚动条 */
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background: linear-gradient(to right, #F8F8F8 50%);
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden; /* 防止横向滚动 */
}

/* 2. 电脑端 Logo */
.desktop-header {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 0 20px 0;
    text-align: center;
}
.logo { font-size: 48px; color: #666; letter-spacing: 5px; text-transform: uppercase; }

/* 导航栏顶部图片 */
.nav-banner {
    max-width: 800px;
    margin: 60px auto 0;
    width: 100%;
    display: block;
    line-height: 0;
    padding: 0;
    position: relative;
    height: 300px;
    overflow: hidden;
}

.nav-banner > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: top;
    margin: 0;
    padding: 0;
}

/* 顶部图片上的文字（分类名称和描述） */
.nav-banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: white;
    max-width: 90%;
}

.nav-banner-title {
    font-size: 32px;
    font-weight: normal; /* 不加粗 */
    margin: 0 0 25px 0; /* 增加与描述的间距 */
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); /* 和描述一样的阴影 */
}

.nav-banner-description {
    font-size: 16px;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

/* Logo 显示在首页顶部图片正中间 */
.nav-banner-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.nav-banner-logo img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    display: block;
}

/* 手机端菜单按钮，显示在顶部图片右上角 */
.mobile-menu-toggle {
    display: none; /* 默认隐藏，桌面端不显示 */
    position: absolute;
    top: 25px;
    right: 25px;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 菜单按钮激活状态（变成 X） */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 如果没有顶部图片，备用菜单按钮显示在导航栏右侧 */
.mobile-menu-toggle-fallback {
    display: none; /* 默认隐藏，桌面端不显示 */
    position: fixed;
    top: 15px;
    right: 15px;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    background-color: #95BF78;
    padding: 12px;
    border-radius: 50%; /* 圆形 */
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-menu-toggle-fallback span {
    display: block;
    width: 22px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 备用菜单按钮激活状态（变成 X） */
.mobile-menu-toggle-fallback.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle-fallback.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle-fallback.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 3. 导航栏 */
nav {
    background-color: #95BF78;
    max-width: 800px;
    margin: 60px auto 0; /* 默认顶部间隔 60px */
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 如果有顶部图片，导航栏紧贴图片（覆盖默认规则） */
.nav-banner + nav {
    margin-top: 0 !important;
}
.nav-container {
    display: flex;
    align-items: center;
    padding: 0 40px;
    height: 60px;
    position: relative;
}
.mobile-logo { 
    display: none; 
    color: white; 
    font-size: 20px; 
    font-weight: bold; 
    text-decoration: none; 
    letter-spacing: 2px; 
}

/* PC 端导航链接样式 */
.nav-links { 
    display: flex; 
    list-style: none; 
    align-items: center; 
    width: 100%;
    flex: 1;
    margin: 0;
    padding: 0;
}
.nav-links li { 
    margin: 0; 
    list-style: none;
}
.nav-links li:not(.search-item) { 
    margin-right: 30px; 
}
.nav-links li a { 
    color: white; 
    text-decoration: none; 
    font-size: 16px; 
}
.nav-links li form { 
    margin: 0; 
}

/* 电脑端搜索框 - 固定在右侧 */
.nav-links > .search-item {
    margin-left: auto !important;
    margin-right: 0 !important;
    flex-shrink: 0;
    order: 999; /* 确保搜索框在最后 */
}
.search-bar { 
    background: rgba(255, 255, 255, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    padding: 6px 12px; 
    border-radius: 4px;
    width: 180px; 
    font-size: 13px; 
    outline: none; 
    color: white;
    transition: all 0.3s ease;
}
.search-bar::placeholder { color: rgba(255, 255, 255, 0.8); }
.search-bar:focus { 
    background: rgba(255, 255, 255, 1); 
    width: 220px; 
    color: #333;
}

/* 手机菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}
.menu-toggle span { display: block; width: 25px; height: 3px; background-color: white; transition: 0.3s; }

/* 4. 内容主体容器 */
.container {
    max-width: 800px;
    margin: 20px auto 30px auto;
    background-color: #FFFFFF;
    border: 1px dashed #95BF78; 
    padding: 40px;
    min-height: 100vh;
}

/* 5. 文章列表 */
.post-item { margin-bottom: 50px; padding-bottom: 10px; }
.post-header { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 15px; 
}
.post-thumb-link {
    display: block;
    flex-shrink: 0;
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.post-thumb-link:hover {
    transform: scale(1.05);
}

.post-thumb { 
    width: 80px; 
    height: 80px; 
    object-fit: cover; 
    border-radius: 4px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    display: block;
    cursor: pointer;
    flex-shrink: 0; /* 防止缩略图被压缩 */
}

.post-info { 
    flex: 1; 
}

.post-info h2 { font-size: 16px; color: #95BF78; margin-bottom: 10px; font-weight: normal; }
.post-info h2 a { color: #95BF78; text-decoration: none; }
.post-info h2 a:hover { text-decoration: underline; }
.post-meta { font-size: 12px; color: #999; }
.post-meta span { margin-right: 15px; }
.post-meta a { color: #999; text-decoration: none; }
.post-meta a:hover { color: #95BF78; text-decoration: underline; }

.post-excerpt-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.3s ease;
    margin-bottom: 15px;
}

.post-excerpt-link:hover {
    opacity: 0.8;
}

.post-excerpt-link:hover .post-excerpt {
    color: #95BF78;
}

.post-excerpt { 
    font-size: 14px;
    color: #666; 
    line-height: 1.8;
    margin: 0; /* 移除 margin-bottom，由父链接控制 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.post-content-area {
    border-top: 1px dashed #95BF78; 
    padding-top: 20px;
    margin-top: 10px;
}

.post-gallery { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; 
    margin-bottom: 15px;
}

/* 如果只有1张图片，全宽显示（正方形） */
.post-gallery[data-count="1"] {
    grid-template-columns: 1fr;
}

.post-gallery img { 
    width: 100%; 
    aspect-ratio: 1/1; 
    object-fit: cover; 
    border-radius: 4px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    cursor: zoom-in; 
    transition: 0.3s; 
}
.post-gallery img:hover { 
    transform: scale(1.05); 
    filter: brightness(1.1); 
}

.read-more { 
    display: block; 
    text-align: right; 
    font-size: 12px; 
    color: #95BF78; 
    text-decoration: none; 
}
.read-more:hover { text-decoration: underline; }

/* 6. 正文 */
.post-content { 
    border-top: 1px dashed #95BF78; 
    padding-top: 20px;
    margin-top: 10px;
    font-size: 14px; 
    color: #666; 
    line-height: 1.8; 
    margin-bottom: 40px;
    word-wrap: break-word; /* 长单词自动换行 */
    word-break: break-word; /* 允许在单词内换行 */
}

/* 文章段落样式 */
.post-content p {
    margin: 0 0 1.2em 0; /* 段落间距 */
    line-height: 1.8; /* 行高 */
}

/* 确保段落之间有适当的间距 */
.post-content p + p {
    margin-top: 1.2em;
}

/* 列表样式 */
.post-content ul,
.post-content ol {
    margin: 1em 0;
    padding-left: 2em;
    line-height: 1.8;
}

.post-content li {
    margin: 0.5em 0;
}

/* 标题样式 */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.5em 0 1em 0;
    line-height: 1.5;
    font-weight: bold;
}

.post-content h1 { font-size: 1.5em; }
.post-content h2 { font-size: 1.3em; }
.post-content h3 { font-size: 1.1em; }

/* 代码块样式 */
.post-content pre,
.post-content code {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}

.post-content pre {
    padding: 10px 15px;
    margin: 1em 0;
    overflow-x: auto;
    white-space: pre-wrap; /* 代码块保留格式 */
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* 引用样式 */
.post-content blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 3px solid #95BF78;
    background-color: #f9f9f9;
    color: #666;
}

/* 水平线样式 */
.post-content hr {
    margin: 2em 0;
    border: none;
    border-top: 1px dashed #95BF78;
}

/* 限制文章内容中图片的最大宽度 */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* 搜索结果标题 */
.search-result-header {
    font-size: 18px;
    color: #95BF78;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed #95BF78;
}

/* 搜索结果文章列表 - 与上面的分隔线有间距 */
.search-article-list {
    margin-top: 30px;
}

/* 8. 评论发表区域 */
.comment-form { 
    border-top: 1px dashed #95BF78; 
    padding-top: 30px; 
    margin-top: 30px; 
}
.comment-textarea { 
    width: 100%; 
    height: 120px; 
    border: 1px dashed #95BF78; 
    background: #fdfdfd; 
    padding: 15px; 
    border-radius: 4px; 
    outline: none; 
    margin-bottom: 15px; 
    resize: none; 
    font-size: 13px; 
    color: #666;
}
.input-group { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
}
.input-group input { 
    flex: 1; 
    border: 1px dashed #95BF78; 
    padding: 10px; 
    border-radius: 4px; 
    font-size: 13px; 
    outline: none; 
    background: #fdfdfd;
}
.submit-btn { 
    background-color: #95BF78; 
    color: white; 
    border: none; 
    padding: 12px; 
    width: 100%; 
    border-radius: 4px; 
    cursor: pointer;
    font-size: 14px;
}
.submit-btn:hover {
    background-color: #7fa662;
}

/* 9. 留言展示样式 */
.comment-count-tag {
    display: inline-block; 
    border: 1px dashed #95BF78;
    padding: 5px 15px; 
    font-size: 12px; 
    color: #95BF78;
    margin: 20px 0; 
    border-radius: 4px;
}

.comment-item { 
    display: flex; 
    margin-bottom: 25px; 
    align-items: flex-start; 
}

.comment-avatar { 
    width: 50px; 
    height: 50px; 
    border-radius: 4px; 
    object-fit: cover; 
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.comment-wrapper {
    flex: 1;
    overflow: visible; /* 允许子评论超出边界 */
}

.comment-wrapper-child {
    flex: 1;
    overflow: hidden;
    min-width: 0; /* 确保 flex 子元素可以收缩 */
}

.comment-card { 
    flex: 1;
    border: 1px dashed #95BF78; 
    padding: 15px; 
    border-radius: 4px; 
    position: relative;
    background-color: #fff;
    box-sizing: border-box;
}

/* 普通用户样式 */
.comment-item.user .comment-avatar { margin-right: 15px; }
.comment-item.user .comment-nickname { color: #666666; font-weight: 600; }

/* 管理员样式 */
.comment-item.admin { flex-direction: row-reverse; } 
.comment-item.admin .comment-avatar { margin-left: 15px; }
.comment-item.admin .comment-nickname { color: #95BF78; font-weight: 600; }

.comment-nickname { 
    font-size: 14px; 
    margin-bottom: 8px; 
    display: flex; 
    align-items: center; 
}
.comment-text { 
    font-size: 13px; 
    color: #666; 
    line-height: 1.6; 
}
.comment-text p { margin: 0; }
.comment-date { 
    font-size: 11px; 
    color: #ccc; 
    text-align: right; 
    margin-top: 10px; 
}
.comment-badge { 
    color: #95BF78; 
    font-size: 12px; 
    margin-left: 5px; 
}

/* 确保子评论（包括管理员回复）正确显示在父评论下方 */
.comment-children-wrapper {
    margin-top: 15px;
    width: 100%;
    padding: 0;
    overflow: visible; /* 允许内容超出边界 */
}

.comment-children-wrapper > .comment-item {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
}

.comment-children-wrapper > .comment-item:first-child {
    margin-top: 15px;
}

/* 子评论中的普通用户样式 */
.comment-children-wrapper .comment-item.user {
    width: 100%;
    margin-left: 0;
}

.comment-children-wrapper .comment-item.user .comment-card {
    flex: 1;
    box-sizing: border-box;
}

/* 管理员回复：虚线框右边缘对齐父评论头像右边缘（65px位置），管理员头像在右侧对齐 */
/* 父评论头像右边缘位置 = 头像宽度(50px) + 右边距(15px) = 65px */
/* comment-children-wrapper 在 comment-wrapper 内部，comment-wrapper 从 65px 位置开始 */
/* 方案：整体向左偏移 65px，宽度增加 65px，这样：
   - comment-card 的右边缘会在 65px 位置（对齐到父评论头像右边缘）
   - 头像的右边缘会在父评论的右边缘（对齐到父评论右边缘） */
.comment-children-wrapper .comment-item.admin {
    display: flex;
    flex-direction: row-reverse;
    position: relative;
    box-sizing: border-box;
    /* 向左偏移 65px，使得 comment-card 的右边缘对齐到父评论头像右边缘（65px位置） */
    transform: translateX(-65px);
    /* 宽度增加 65px，这样头像的右边缘会超出 comment-wrapper 右边缘 65px */
    /* 但由于整体向左偏移了 65px，实际效果是头像右边缘对齐到父评论右边缘 */
    width: calc(100% + 65px);
    /* 使用 margin-right: 0 确保头像紧贴右边缘 */
    margin-right: 0;
}

.comment-children-wrapper .comment-item.admin .comment-card {
    /* flex: 1 会让 comment-card 占据剩余空间（扣除管理员头像65px和间距后） */
    /* 由于整体向左偏移了 65px，comment-card 的右边缘会在页面左边缘的 65px 位置，对齐到父评论头像右边缘 */
    flex: 1;
    box-sizing: border-box;
    min-width: 0;
    background-color: #fff;
}

.comment-children-wrapper .comment-item.admin .comment-avatar {
    /* 头像在右侧（row-reverse），确保不收缩 */
    margin-left: 15px;
    margin-right: 0; /* 确保头像右侧没有边距，对齐到父评论右边缘 */
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.comment-wrapper > ol,
.comment-wrapper > ul,
.comment-children-wrapper > ol,
.comment-children-wrapper > ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
}

.comment-wrapper > ol > li,
.comment-wrapper > ul > li,
.comment-children-wrapper > ol > li,
.comment-children-wrapper > ul > li {
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保所有管理员昵称颜色为 #95BF78 */
.comment-item.admin .comment-nickname {
    color: #95BF78 !important;
}

/* 评论分页和加载更多 */
.pagination {
    text-align: center;
    padding: 20px 0;
}

.pagination-inner {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.pagination a:hover {
    background: #95BF78;
    color: white;
    border-color: #95BF78;
}

.pagination .current {
    background: #95BF78;
    color: white;
    border-color: #95BF78;
}

.load-more-btn {
    background: #95BF78;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover:not(:disabled) {
    background: #7ea863;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#load-more-comments-container {
    padding: 20px 0;
}

/* 10. 其他 UI */
.nav-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.4); 
    z-index: 999; 
}
.nav-overlay.active { display: block; }

#loading-status { 
    text-align: center; 
    padding: 20px; 
    color: #95BF78; 
}
#loading-status a {
    color: #95BF78;
    text-decoration: none;
    margin: 0 10px;
}
#loading-status a:hover {
    text-decoration: underline;
}

#image-viewer { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    justify-content: center; 
    align-items: center; 
    cursor: zoom-out;
    flex-direction: row;
}

.image-viewer-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: calc(100% - 120px); /* 为左右按钮留出空间 */
    height: 100%;
}

#image-viewer img { 
    max-width: 100%; 
    max-height: calc(100vh - 150px); /* 为计数器和按钮留出空间 */
    object-fit: contain;
    cursor: zoom-out;
    display: block;
}

.image-viewer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.image-viewer-counter {
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 4px;
    display: none; /* 默认隐藏，有多张图片时显示 */
}

.image-viewer-nav {
    width: 50px;
    height: 50px;
    background: transparent; /* 移除圆圈背景 */
    border: none; /* 移除边框 */
    color: white;
    font-size: 32px;
    font-weight: bold;
    border-radius: 0; /* 移除圆形 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    margin: 0 15px;
    padding: 0;
    line-height: 1;
}

.image-viewer-nav:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.image-viewer-nav:active {
    transform: scale(0.95);
}

.image-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

footer { 
    text-align: center; 
    padding: 40px; 
    color: #666; 
    font-size: 12px; 
}

/* 底部版权信息中的链接样式 */
footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    color: inherit;
    text-decoration: none;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    /* 放在 container（800px）边框外面，距离右边界 20px */
    /* container 最大宽度 800px，居中显示 */
    /* container 右边界距离屏幕右边的距离 = (100vw - 800px) / 2（当屏幕宽度 > 800px） */
    /* 按钮要放在 container 外面（右侧）20px，所以按钮左边缘距离 container 右边界 = 20px */
    /* 按钮左边缘距离屏幕左边的距离 = container右边界距离屏幕左边 + 20px = (100vw + 800px) / 2 + 20px */
    /* 按钮右边缘距离屏幕左边的距离 = 按钮左边缘距离屏幕左边 + 按钮宽度 = (100vw + 800px) / 2 + 20px + 48px */
    /* 按钮右边缘距离屏幕右边的距离 = 100vw - 按钮右边缘距离屏幕左边 = 100vw - ((100vw + 800px) / 2 + 68px) = (100vw - 800px) / 2 - 68px */
    /* 但当屏幕宽度 <= 800px 时，这个值可能是负数，所以用 max 确保最少 20px */
    right: max(calc((100vw - 800px) / 2 - 68px), 20px); /* -68px = -(20px间距 + 48px按钮宽度) */
    width: 48px;
    height: 48px;
    background-color: #95BF78;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: #7fa662;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* 11. 手机端适配 */
@media (max-width: 800px) {
    .desktop-header { display: none; }
    .nav-banner {
        width: 100%;
        max-width: 100%;
        height: 200px;
        margin-top: 0;
        position: relative;
    }
    
    .nav-banner-title {
        font-size: 24px;
        font-weight: normal; /* 不加粗 */
        margin-bottom: 20px; /* 增加与描述的间距 */
    }
    
    .nav-banner-description {
        font-size: 14px;
    }
    
    .nav-banner-logo img {
        max-width: 120px;
        max-height: 80px;
    }
    
    /* 手机端：让 nav-container 不占用空间，但保留 nav-links 的显示能力 */
    .nav-container {
        height: 0;
        padding: 0;
        overflow: visible; /* 允许 nav-links 超出容器显示 */
    }
    /* 确保 nav-links 在手机端可以独立显示（抽屉导航） */
    .nav-links {
        position: fixed !important;
        display: block !important;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        /* 半透明毛玻璃效果 - 更浅的背景 */
        background-color: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 30px;
        transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000; /* 确保在最上层 */
        visibility: visible !important; /* 强制可见 */
    }
    /* 手机端显示顶部图片中的菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
    }
    /* 如果没有顶部图片，显示备用菜单按钮 */
    .mobile-menu-toggle-fallback {
        display: flex;
    }
    nav { 
        width: 100%; 
        position: sticky; 
        top: 0;
        height: 0; /* 不占用高度 */
        background: transparent; /* 透明背景 */
        box-shadow: none; /* 无阴影 */
    }
    /* 隐藏原来的 menu-toggle（在 nav-container 中） */
    .nav-container .menu-toggle {
        display: none;
    }

    .nav-links.active { right: 0; }
    .nav-links li { margin-bottom: 25px; width: 100%; }
    .nav-links li a { 
        font-size: 18px; 
        display: block; 
        margin-right: 0; 
        color: #333; /* 深色文字，在半透明背景上更清晰 */
    }
    
    /* 移动端搜索框样式 */
    .nav-links .search-item { 
        margin-left: 0 !important; 
        width: 100%; 
    }
    .nav-links .search-item form {
        width: 100%;
    }
    .nav-links .search-bar { 
        width: 100%; 
        background: rgba(255,255,255,0.8); 
        color: #333; 
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 10px 14px; /* 增加上下内边距，让搜索框更高 */
        font-size: 14px; /* 稍微增大字体 */
    }
    .nav-links .search-bar::placeholder {
        color: #999; /* 深色占位符文字，在半透明背景上可见 */
    }
    .nav-links .search-bar:focus { 
        width: 100%; 
        background: rgba(255,255,255,0.95);
    }

    .container { width: 95%; padding: 20px; }
    .post-gallery { grid-template-columns: repeat(2, 1fr); }
    .input-group { flex-direction: column; }
    
    /* 移动端评论样式优化 */
    .comment-item {
        margin-bottom: 20px;
    }
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    
    /* 移动端普通用户头像右边距 */
    .comment-item.user .comment-avatar {
        margin-right: 10px;
    }
    
    /* 移动端管理员回复对齐：移动端头像40px + 间距10px = 50px */
    .comment-children-wrapper .comment-item.admin {
        transform: translateX(-50px); /* 移动端偏移量：40px头像 + 10px间距 */
        width: calc(100% + 50px);
        margin-right: 0; /* 确保右侧对齐 */
    }
    
    /* 移动端管理员头像 */
    .comment-children-wrapper .comment-item.admin .comment-avatar {
        width: 40px;
        height: 40px;
        margin-left: 10px;
        margin-right: 0; /* 确保头像右侧没有边距，对齐到父评论右边缘 */
    }
    
    /* 移动端管理员头像右侧对齐：确保头像右侧对齐到父评论右边缘 */
    .comment-item.admin .comment-avatar {
        margin-left: 10px;
        margin-right: 0;
    }
    
    /* 移动端返回顶部按钮 */
    .back-to-top {
        right: 20px; /* 移动端固定在右侧，距离边缘 20px */
        width: 44px;
        height: 44px;
        bottom: 20px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    /* 移动端图片预览器样式 */
    #image-viewer {
        flex-direction: column;
    }
    
    .image-viewer-content {
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
    }
    
    #image-viewer img {
        max-height: calc(100vh - 200px); /* 为按钮和计数器留出更多空间 */
    }
    
    .image-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
        margin: 10px 5px;
        position: absolute;
    }
    
    #image-viewer-prev {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #image-viewer-prev:hover {
        transform: translateY(-50%) scale(1.2);
    }
    
    #image-viewer-next {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #image-viewer-next:hover {
        transform: translateY(-50%) scale(1.2);
    }
    
    .image-viewer-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
}

#loading-comments { 
    text-align: center; 
    padding: 20px; 
    color: #95BF78; 
    font-size: 13px; 
}

