/* 论坛式留言板样式 */
.forum-page { background: #f5f5f5; min-height: 100vh; padding: 20px 0; }
.forum-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 头部 */
.forum-header { 
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}
.forum-header h1 { font-size: 28px; margin-bottom: 8px; }
.forum-header p { opacity: 0.9; font-size: 14px; }
.btn-post-topic {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #8B4513;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}
.btn-post-topic:hover { background: #f0f0f0; transform: translateY(-50%) scale(1.05); }

/* 主布局 */
.forum-main { display: flex; gap: 20px; }
.forum-left { flex: 1; min-width: 0; }
.forum-sidebar { width: 300px; flex-shrink: 0; }

/* 发表表单 */
.post-form-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.post-form-box h3 { color: #8B4513; margin-bottom: 15px; font-size: 16px; }
.post-form-box .form-group { margin-bottom: 12px; }
.post-form-box input,
.post-form-box textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s;
}
.post-form-box input:focus,
.post-form-box textarea:focus { border-color: #D2691E; outline: none; }
.form-row { display: flex; gap: 10px; }
.form-row input { flex: 1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-actions .btn { padding: 8px 20px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; }
.form-actions .btn-primary { background: #D2691E; color: #fff; }
.form-actions .btn-default { background: #f0f0f0; color: #666; }

/* ========== 上传区域修复样式 ========== */

/* 上传区域容器 */
.upload-section {
    margin: 10px 0;
    padding: 0;
}

/* 字数统计 */
.textarea-tip {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    margin-bottom: 10px;
}

/* VIP上传按钮区域 */
.upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 上传图片按钮 - 绿色按钮样式 */
.btn-upload-img {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #009688;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-upload-img:hover {
    background: #00796b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,150,136,0.3);
}

.btn-upload-img i {
    font-size: 16px;
}

/* 上传提示文字 */
.upload-hint {
    font-size: 12px;
    color: #999;
}

/* 非VIP提示 */
.upload-vip-only {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff8e1;
    border: 1px dashed #ffc107;
    border-radius: 6px;
    font-size: 13px;
    color: #ff8f00;
}

.upload-vip-only i {
    color: #ffc107;
}

/* 图片预览区域 */
.image-preview {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    padding-bottom: 2px;
}

.preview-item .remove-btn:hover {
    background: rgba(244,67,54,0.8);
}

/* ========== 话题图片展示 ========== */
.topic-images {
    display: flex;
    gap: 8px;
    margin: 12px 0 12px 60px;
    flex-wrap: wrap;
}
.topic-image-item {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s;
}
.topic-image-item:hover { transform: scale(1.02); }
.topic-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 有图标签 */
.tag-image { background: #4caf50; color: #fff; }

/* ========== 图片查看弹窗 ========== */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.image-viewer img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
}
.viewer-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* 话题列表 */
.topic-list { display: flex; flex-direction: column; gap: 15px; }
.topic-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}
.topic-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.topic-top { border-left: 4px solid #ff6b6b; background: linear-gradient(to right, #fff8f8, #fff); }

/* 楼主信息 */
.topic-author { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: #f0e6d3; display: flex; align-items: center; justify-content: center; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-default { color: #D2691E; font-size: 24px; }
.author-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.author-name { font-weight: bold; color: #8B4513; font-size: 15px; }
.author-level { 
    background: linear-gradient(135deg, #FFD700, #FFA500); 
    color: #fff; 
    padding: 2px 8px; 
    border-radius: 10px; 
    font-size: 11px; 
}
.tag { padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-left: 4px; }
.tag-top { background: #ff6b6b; color: #fff; }
.tag-hot { background: #ff9500; color: #fff; }
.post-time { color: #999; font-size: 12px; margin-left: auto; }

/* 内容 */
.topic-content { 
    font-size: 15px; 
    line-height: 1.8; 
    color: #333; 
    margin: 12px 0;
    padding-left: 60px;
}
.admin-reply {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 12px 15px;
    margin: 12px 0 12px 60px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
}
.admin-badge {
    background: #D2691E;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* 互动按钮 */
.topic-actions {
    display: flex;
    gap: 15px;
    padding: 12px 0 0 60px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}
.action-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
    padding: 4px 8px;
    border-radius: 4px;
}
.action-btn:hover { color: #D2691E; background: #fff5eb; }
.action-btn.liked { color: #ff6b6b; }
.action-btn.liked i { font-weight: bold; }

/* 回复区域 */
.reply-section {
    margin-top: 15px;
    padding-left: 60px;
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    margin-left: 60px;
}
.quick-reply-box { margin-bottom: 15px; }
.quick-reply-box textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    min-height: 60px;
}
.quick-reply-box .reply-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}
.quick-reply-box input {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

/* 回复列表 */
.reply-list { display: flex; flex-direction: column; gap: 12px; }
.reply-item {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}
.reply-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reply-avatar { width: 32px; height: 32px; border-radius: 50%; background: #f0e6d3; display: flex; align-items: center; justify-content: center; color: #D2691E; font-size: 18px; }
.reply-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.reply-name { font-weight: bold; color: #666; font-size: 13px; }
.reply-time { color: #bbb; font-size: 12px; margin-left: auto; }
.reply-content { font-size: 14px; color: #555; line-height: 1.6; padding-left: 40px; }
.reply-actions-bar {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-left: 40px;
}
.reply-actions-bar button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.reply-actions-bar button:hover { color: #D2691E; }

/* 楼中楼 */
.sub-reply-list {
    margin: 8px 0 8px 40px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 6px;
}
.sub-reply-item {
    font-size: 13px;
    color: #666;
    padding: 4px 0;
    border-bottom: 1px dashed #e0e0e0;
}
.sub-reply-item:last-child { border-bottom: none; }
.sub-name { color: #8B4513; font-weight: bold; }

/* 子回复表单 */
.sub-reply-form {
    margin: 8px 0 8px 40px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}
.sub-reply-form input,
.sub-reply-form textarea {
    width: 100%;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 13px;
}
.sub-reply-form textarea { min-height: 50px; resize: vertical; }

/* 加载更多 */
.load-more-replies {
    text-align: center;
    margin-top: 10px;
}
.load-more-replies button {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 8px 20px;
    border-radius: 20px;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}
.load-more-replies button:hover { border-color: #D2691E; color: #D2691E; }

/* 无话题 */
.no-topic { text-align: center; padding: 60px 20px; color: #999; }
.no-topic p { margin-top: 15px; font-size: 15px; }

/* 侧边栏 */
.sidebar-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sidebar-box h3 {
    color: #8B4513;
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0e6d3;
}
.hot-list { list-style: none; padding: 0; }
.hot-list li { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { text-decoration: none; color: inherit; display: block; }
.hot-list a:hover .hot-title { color: #D2691E; }
.hot-title { font-size: 14px; color: #555; display: block; margin-bottom: 4px; }
.hot-meta { font-size: 12px; color: #999; }
.hot-meta i { margin-right: 3px; }
.notice-content { font-size: 13px; color: #666; line-height: 1.8; }
.notice-content p { margin: 6px 0; }
.stats-grid { display: flex; gap: 15px; }
.stat-item { flex: 1; text-align: center; padding: 10px; background: #fafafa; border-radius: 8px; }
.stat-num { display: block; font-size: 24px; font-weight: bold; color: #D2691E; }
.stat-label { font-size: 12px; color: #999; margin-top: 4px; display: block; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 5px; margin: 20px 0; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}
.pagination a { background: #fff; color: #666; border: 1px solid #e0e0e0; }
.pagination a:hover { background: #D2691E; color: #fff; border-color: #D2691E; }
.pagination .current { background: #D2691E; color: #fff; }
.pagination .page-disabled { color: #ccc; background: #f5f5f5; }

/* 按钮 */
.btn-sm { padding: 5px 14px; font-size: 13px; border-radius: 4px; border: none; cursor: pointer; }
.btn-primary { background: #D2691E; color: #fff; }
.btn-default { background: #f0f0f0; color: #666; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .forum-main { flex-direction: column; }
    .forum-sidebar { width: 100%; }
    .forum-header h1 { font-size: 20px; }
    .btn-post-topic {
        position: static;
        transform: none;
        margin-top: 15px;
        display: inline-block;
    }
    .topic-content,
    .topic-actions,
    .reply-section,
    .admin-reply { padding-left: 0; margin-left: 0; }
    .reply-content,
    .reply-actions-bar { padding-left: 0; }
    .sub-reply-list,
    .sub-reply-form { margin-left: 0; }
    
    /* 移动端上传区域 */
    .upload-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .btn-upload-img {
        width: 100%;
        justify-content: center;
    }
    .upload-hint {
        font-size: 11px;
    }
    .preview-item {
        width: 80px;
        height: 80px;
    }
    .topic-images { margin-left: 0; }
    .topic-image-item { width: calc(33.33% - 6px); height: 100px; }
    .image-viewer img { max-width: 95%; max-height: 80%; }
}

/* ========== 美化分页样式 ========== */
.pagination-wrapper {
    margin: 30px 0;
    text-align: center;
}

/* 分页信息 */
.pagination-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.pagination-info .info-item {
    display: inline-block;
    margin: 0 12px;
    padding: 4px 12px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8e0d5;
}

.pagination-info .info-item strong {
    color: #D2691E;
    font-weight: bold;
    font-size: 15px;
}

/* 分页按钮区域 */
.pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 通用按钮样式 */
.pagination .page-btn,
.pagination .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e0d5c8;
}

/* 普通页码 */
.pagination .page-num {
    background: #fff;
    color: #666;
    font-weight: 500;
}

.pagination .page-num:hover {
    background: #D2691E;
    color: #fff;
    border-color: #D2691E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.25);
}

/* 当前页码 */
.pagination .page-num.current {
    background: linear-gradient(135deg, #D2691E 0%, #8B4513 100%);
    color: #fff;
    border-color: #D2691E;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(210, 105, 30, 0.3);
    transform: scale(1.05);
}

/* 首页/上一页/下一页/尾页按钮 */
.pagination .page-btn {
    background: #fff;
    color: #8B4513;
    font-weight: 500;
    padding: 0 14px;
    gap: 4px;
}

.pagination .page-btn:hover {
    background: #D2691E;
    color: #fff;
    border-color: #D2691E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.25);
}

/* 禁用状态 */
.pagination .page-btn.disabled,
.pagination .page-num.disabled {
    background: #f5f0eb;
    color: #bbb;
    border-color: #e8e0d5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 省略号 */
.pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #999;
    font-size: 14px;
    letter-spacing: 2px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .pagination-info .info-item {
        margin: 0 4px 8px 4px;
        font-size: 12px;
        padding: 3px 8px;
    }

    .pagination {
        gap: 4px;
    }

    .pagination .page-btn,
    .pagination .page-num {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
        border-radius: 6px;
    }

    .pagination .page-btn {
        padding: 0 10px;
    }
}

/* ========== 佛缘堂公告 - 问心阁夜话样式 ========== */
.night-theme {
    background: #ffffff;
    border: 1px solid #e8e0d5;
    color: #5a4a3a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 6px;
}

.night-title {
    font-size: 16px;
    color: #8B4513;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d4c4b0;
}

.night-welcome {
    color: #6b5b4f;
    font-size: 13px;
    margin-bottom: 10px;
}

.night-poem {
    color: #7a6a5a;
    font-size: 13px;
    line-height: 1.8;
    margin: 8px 0;
}

.night-questions {
    background: #faf8f5;
    border-left: 3px solid #D2691E;
    padding: 12px 15px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
}

.night-questions p {
    margin: 6px 0;
    color: #5a4a3a;
    font-size: 13px;
}

.night-wish {
    text-align: center;
    color: #8B4513;
    font-size: 14px;
    margin-top: 15px;
    font-weight: 500;
}

.night-sign {
    text-align: center;
    color: #D2691E;
    font-size: 13px;
    margin: 10px 0;
}

.night-time {
    text-align: right;
    color: #a09080;
    font-size: 12px;
    font-style: italic;
    margin-top: 8px;
}

/* 今日动态间距修复 - 合并到原有sidebar-box */
.sidebar-box {
    margin-top: 12px;
    margin-bottom: 6px;
}

/* ========== 公告警示提示样式 ========== */
.notice-warning {
    color: #c62828;
    font-size: 16px;
    text-align: center;
    margin: 13px 0;
    font-weight: bold;
    background: #ffebee;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
}

.notice-warning i {
    margin-right: 12px;
    font-size: 15px;
}