/* ========== 论坛全局样式 ========== */
.sf-forum-container {
    max-width: 1200px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.5;
}

/* 头部区域 */
.sf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sf-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1e3c72;
}

/* 按钮通用样式 */
.sf-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #f5f7fa;
    border: 1px solid #dce5f0;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sf-btn:hover {
    background: #e9ecef;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.sf-btn-primary {
    background: #2c7da0;
    border-color: #1f5e7a;
    color: #fff;
}

.sf-btn-primary:hover {
    background: #1f5e7a;
    border-color: #154a60;
}

/* 帖子列表表格 */
.sf-topics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.sf-topics-table th,
.sf-topics-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.sf-topics-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e466e;
    font-size: 14px;
}

.sf-topics-table tr:hover {
    background: #fef9e7;
}

/* 帖子列表中的标题链接，去掉下划线 */
.sf-topics-table td a {
    text-decoration: none;
    color: #2c7da0;
    font-weight: 500;
    transition: color 0.2s;
}

.sf-topics-table td a:hover {
    color: #1f5e7a;
    text-decoration: underline;
}

/* 置顶/精华标签 */
.sf-sticky {
    color: #e67e22;
    font-weight: bold;
    margin-right: 6px;
    background: #fff4e6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.sf-essence {
    color: #f39c12;
    font-weight: bold;
    margin-right: 6px;
    background: #fff8e7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* 帖子详情页 */
.sf-single-topic .sf-topic-header {
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.sf-topic-header h2 {
    font-size: 28px;
    margin: 0 0 10px;
    color: #1e3c72;
}

.sf-meta {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.sf-topic-content {
    margin: 25px 0;
    padding: 20px;
    background: #f9fbfd;
    border-radius: 12px;
    border: 1px solid #eef2f8;
    font-size: 16px;
    line-height: 1.7;
}

/* 回复列表 */
.sf-reply-item {
    margin: 20px 0;
    padding: 20px;
    background: #fafcff;
    border: 1px solid #eef2f8;
    border-radius: 12px;
    transition: box-shadow 0.2s;
}

.sf-reply-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sf-reply-meta {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

.sf-reply-content {
    font-size: 15px;
    line-height: 1.6;
    margin: 12px 0;
}

.sf-topic-actions,
.sf-reply-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
}

/* 点赞/举报/编辑/删除按钮 */
.sf-like-btn,
.sf-report-btn,
.sf-edit-btn,
.sf-delete-btn {
    background: none;
    border: none;
    color: #4a6fa5;
    cursor: pointer;
    margin-right: 15px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.sf-like-btn:hover,
.sf-report-btn:hover,
.sf-edit-btn:hover,
.sf-delete-btn:hover {
    background: #f0f4f9;
}

.sf-delete-btn {
    color: #e74c3c;
}

.sf-admin-actions {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef5e7;
    border-radius: 8px;
    font-size: 13px;
}

.sf-admin-actions a {
    margin-right: 12px;
    color: #e67e22;
    text-decoration: none;
}

/* 表单元素 */
.sf-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border 0.2s;
}

.sf-input:focus {
    border-color: #2c7da0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44,125,160,0.1);
}

/* 编辑器区域微调 */
.wp-editor-container {
    border-radius: 8px;
    overflow: hidden;
}

/* 分页 */
.sf-pagination {
    margin-top: 20px;
    text-align: center;
}

.page-numbers,
.sf-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
}

.page-numbers.current,
.sf-pagination .page-numbers.current {
    background: #2c7da0;
    border-color: #1f5e7a;
    color: #fff;
}

/* 错误提示 */
.sf-error {
    background: #fee2e2;
    border-left: 4px solid #e53e3e;
    padding: 12px 16px;
    border-radius: 6px;
    color: #c53030;
    margin-bottom: 20px;
}

/* ========== 两栏布局 ========== */
.sf-two-columns {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sf-main-content {
    flex: 2;
    min-width: 0;
}

/* 右栏宽度调整：更窄，文字更小 */
.sf-sidebar {
    width: 260px;          /* 固定宽度，更窄 */
    flex-shrink: 0;
}

/* 侧边栏小工具 */
.sf-widget {
    background: #f9fbfd;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 25px;
    border: 1px solid #eef2f8;
    transition: box-shadow 0.2s;
}

.sf-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sf-widget-title {
    font-size: 16px;          /* 原18px，缩小 */
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    color: #1e3c72;
}

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

.sf-widget-list li {
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 13px;          /* 原14px，缩小 */
}

.sf-widget-list li a {
    text-decoration: none;
    color: #2c7da0;
    transition: color 0.2s;
    font-size: 13px;
}

.sf-widget-list li a:hover {
    color: #1f5e7a;
    text-decoration: underline;
}

.sf-reply-count {
    font-size: 11px;          /* 原12px，缩小 */
    color: #7f8c8d;
    margin-left: 5px;
}

.sf-reply-excerpt {
    font-size: 11px;          /* 原12px，缩小 */
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.3;
}

/* 回复编辑内联表单 */
.sf-edit-reply-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.sf-edit-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}

.sf-edit-reply-btn,
.sf-delete-reply {
    background: none;
    border: none;
    color: #4a6fa5;
    cursor: pointer;
    margin-left: 10px;
    font-size: 12px;
    text-decoration: none;
}

.sf-delete-reply {
    color: #e74c3c;
}

.sf-edit-reply-btn:hover,
.sf-delete-reply:hover {
    text-decoration: underline;
}

/* 响应式：移动设备上侧边栏自适应 */
@media (max-width: 768px) {
    .sf-forum-container {
        padding: 15px 20px;
        margin: 20px;
    }
    .sf-two-columns {
        flex-direction: column;
    }
    .sf-sidebar {
        width: 100%;
    }
    .sf-topics-table th,
    .sf-topics-table td {
        padding: 10px 8px;
    }
    .sf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ========== 特殊主题样式 ========== */
.sf-poll-container, .sf-product-container, .sf-reward-container, .sf-activity-container, .sf-debate-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.poll-option-item {
    margin: 12px 0;
}
.poll-progress {
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
}
.progress-bar {
    height: 100%;
    background: #2c7da0;
    transition: width 0.3s;
}
.vote-count {
    position: absolute;
    right: 10px;
    top: 0;
    line-height: 24px;
    font-size: 12px;
    color: #333;
}
.product-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.product-image img {
    max-width: 200px;
    border-radius: 12px;
}
.product-price {
    font-size: 24px;
    color: #e53e3e;
    font-weight: bold;
}
.reward-points {
    font-size: 18px;
    font-weight: bold;
    color: #e67e22;
}
.debate-positions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.pro-position, .con-position {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.support-count {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    color: #6c86a3;
}
.sf-joined {
    display: inline-block;
    background: #c6f6d5;
    padding: 6px 12px;
    border-radius: 30px;
    color: #22543d;
}