/* 易支付盖楼讨论社区 - 样式（优化版） */
:root {
    --primary: #1a56db;
    --primary-light: #3b82f6;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --hot: #ef4444;
    --good: #10b981;
    --top: #f59e0b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* 顶部导航 */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}
.nav {
    display: flex;
    gap: 4px;
    flex: 1;
}
.nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
}
.nav a:hover, .nav a.active {
    background: #eff6ff;
    color: var(--primary);
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 20px;
    padding: 6px 14px;
    width: 240px;
}
.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 13px;
}
.btn-post {
    background: var(--primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

/* 主体布局 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}
.main { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }

/* 分类标签栏 */
.category-bar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--border);
}
.cat-tab {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    border: 1px solid transparent;
    background: transparent;
}
.cat-tab:hover {
    background: var(--bg);
    color: var(--text);
}
.cat-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.post-card {
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.post-card:last-child {
    border-bottom: none;
}
.post-card:hover {
    background: #f9fafb;
}
.post-card:hover .post-title {
    color: var(--primary);
}
.post-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.tag-hot { background: #fef2f2; color: var(--hot); }
.tag-top { background: #fffbeb; color: var(--top); }
.tag-new { background: #eff6ff; color: var(--primary); }
.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
    transition: color 0.2s;
}
.post-summary {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
}
.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.post-cat {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}
.post-stats {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 侧边栏 */
.sidebar-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 热门话题 */
.hot-list { list-style: none; }
.hot-item {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: all 0.2s;
}
.hot-item:last-child { border-bottom: none; }
.hot-item:hover {
    color: var(--primary);
}
.hot-rank {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--text-secondary);
}
.hot-rank.rank-top {
    background: var(--hot);
    color: #fff;
}
.hot-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

/* 在线用户 */
.online-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.online-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.online-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 帖子详情页 */
.post-detail-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.post-detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}
.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.user-level {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 600;
}
.post-detail-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}
.post-detail-content strong {
    color: var(--text);
    font-weight: 700;
}
.post-detail-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.6;
}
.post-detail-content code {
    font-family: "Consolas", "Monaco", monospace;
}

/* 回帖盖楼 */
.reply-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 24px;
    border: 1px solid var(--border);
}
.reply-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.reply-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    position: relative;
}
.reply-item:last-child {
    border-bottom: none;
}
.reply-floor {
    position: absolute;
    top: 18px;
    right: 0;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}
.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}
.reply-content {
    flex: 1;
    min-width: 0;
    padding-right: 50px;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.reply-user {
    font-weight: 600;
    font-size: 14px;
}
.reply-level {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 500;
}
.reply-time {
    font-size: 12px;
    color: var(--text-light);
}
.reply-quote {
    background: var(--bg);
    border-left: 3px solid var(--primary-light);
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 0 6px 6px 0;
    line-height: 1.6;
}
.reply-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}
.reply-actions {
    margin-top: 10px;
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: var(--text-light);
}
.reply-action {
    cursor: pointer;
    transition: color 0.2s;
}
.reply-action:hover {
    color: var(--primary);
}
.reply-action.report:hover {
    color: var(--hot);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    color: var(--text-secondary);
}
.page-btn:hover:not([disabled]) {
    border-color: var(--primary);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: var(--text-light);
}

/* 底部 */
.footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
}
.footer a { color: #9ca3af; margin: 0 8px; }
.footer a:hover { color: #fff; }

/* 福利Banner */
.welfare-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #f59e0b;
    gap: 16px;
}
.welfare-left {
    flex: 1;
}
.welfare-title {
    font-size: 18px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 6px;
}
.welfare-desc {
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
}
.welfare-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.welfare-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220,38,38,0.4);
}

/* 福利专区卡片 */
.welfare-card {
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
}
.welfare-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}
.welfare-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.welfare-item:hover {
    background: #fef2f2;
}
.welfare-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.welfare-name {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}
.welfare-sub {
    font-size: 11px;
    color: #6b7280;
}
.welfare-card-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.welfare-card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.welfare-qq {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .header-inner { gap: 10px; }
    .nav { display: none; }
    .search-box { width: 140px; }
    .post-detail-card { padding: 20px 16px; }
    .reply-section { padding: 16px; }
}
