/* ========================================
   开发者社区首页（community/index）页面级样式
   从模板 <style> 块外置而来；颜色全部走 CSS 变量，深色模式自动跟随
   ======================================== */

.page-header { background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-card-hover) 100%); padding: 84px 0 50px; text-align: center; }
.page-header h1 { color: var(--text-primary); font-size: 28px; margin: 0; }
.page-header p { color: var(--text-secondary); margin-top: 8px; }
/* body 是 flex column（components.css），auto margins 会取消拉伸使宽度=内容宽；
   必须显式 width:100% 先撑满，再由 max-width 封顶 */
body .container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 30px 20px; }
.stats-bar { display: flex; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.stat-item { flex: 1; min-width: 120px; background: rgba(0,153,204,0.05); border: 1px solid rgba(0,153,204,0.1); border-radius: 10px; padding: 16px; text-align: center; }
.stat-item .num { color: #0099cc; font-size: 24px; font-weight: 700; }
.stat-item .label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.cat-grid { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.cat-item { padding: 8px 18px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 20px; color: var(--text-secondary); text-decoration: none; font-size: 13px; transition: all 0.3s; }
.cat-item:hover { background: rgba(0,153,204,0.1); border-color: #0099cc; color: #0099cc; }
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.section-title { color: var(--text-primary); font-size: 18px; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
.section-title a { margin-left: auto; color: #0099cc; font-size: 13px; text-decoration: none; }
.section-gap { margin-top: 30px; }
.post-list { display: grid; gap: 12px; }
.post-item { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 10px; padding: 18px; transition: all 0.3s; }
.post-item:hover { border-color: rgba(0,153,204,0.2); }
.post-item h4 { color: var(--text-primary); font-size: 15px; margin: 0 0 8px; }
.post-item h4 a { color: var(--text-primary); text-decoration: none; }
.post-item h4 a:hover { color: #0099cc; }
.post-meta { display: flex; gap: 14px; color: var(--text-muted); font-size: 12px; }
.post-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: rgba(0,153,204,0.1); color: #0099cc; }
.sidebar-card { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.sidebar-card h3 { color: var(--text-primary); font-size: 16px; margin: 0 0 14px; }
.sidebar-list { display: grid; gap: 10px; }
.sidebar-list a { color: var(--text-secondary); text-decoration: none; font-size: 13px; display: flex; justify-content: space-between; }
.sidebar-list a:hover { color: #0099cc; }
.sidebar-list .count { color: var(--text-muted); }
.action-bar { display: flex; gap: 12px; margin-bottom: 24px; }
.action-btn { padding: 10px 24px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.btn-primary { background: linear-gradient(135deg, #0099cc, #0077b3); color: #fff; }
.btn-outline { background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-secondary); }
.question-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: rgba(255,152,0,0.15); color: #ff9800; }
.solved-badge { background: rgba(76,175,80,0.15); color: #4caf50; }
.reward-badge { background: rgba(255,215,0,0.15); color: #ffd700; }
.rules-text { color: var(--text-muted); font-size: 13px; line-height: 1.7; }
@media (max-width: 768px) { .main-grid { grid-template-columns: 1fr; } }
