* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, "Helvetica Neue", sans-serif; background:#fafafa; color:#333; }
a { text-decoration:none; color:inherit; }

/* ===== 顶部导航 ===== */
.topnav { background:#fff; border-bottom:1px solid #eee; position:sticky; top:0; z-index:100; }
.topnav-inner { max-width:1200px; margin:0 auto; padding:10px 20px; display:flex; align-items:center; gap:16px; }
.logo { display:flex; align-items:center; gap:8px; cursor:pointer; }
.logo-icon { width:32px; height:32px; background:#000; color:#fff; border-radius:8px; display:flex; align-items:center; justify-content:center; font-weight:bold; font-size:14px; }
.logo-text { font-size:16px; font-weight:bold; line-height:1.2; }
.logo-slogan { font-size:10px; color:#999; }
.nav-links { display:flex; gap:16px; font-size:14px; }
.nav-links a { cursor:pointer; padding:4px 2px; color:#666; }
.nav-links a.active { color:#000; font-weight:bold; border-bottom:2px solid #000; }
.nav-links a:hover { color:#000; }
.search { flex:1; text-align:center; }
.search input { width:280px; padding:7px 14px; border-radius:20px; border:1px solid #eee; background:#f5f5f5; font-size:13px; outline:none; }
.icon-btn { display:inline-flex; align-items:center; font-size:16px; cursor:pointer; }
/* 顶栏签到按钮（2026-10-22 #9 入口前移）：form+button 复用 .icon-btn 布局，
   未签到金色醒目（可点），已签到灰色禁用（与设置页签到卡同一口径）。 */
form.icon-btn.checkin-btn { background:none; border:0; padding:0; margin:0; color:#e67e22; }
form.icon-btn.checkin-btn button { background:none; border:0; padding:0; margin:0; font:inherit; color:inherit; cursor:pointer; display:inline-flex; align-items:center; }
form.icon-btn.checkin-btn:not(.is-done):hover { color:#d35400; }
form.icon-btn.checkin-btn.is-done { color:#bbb; }
form.icon-btn.checkin-btn.is-done button { cursor:default; }
.avatar { width:28px; height:28px; border-radius:50%; background:#ddd; cursor:pointer; }

/* ===== 发布下拉菜单 ===== */
.publish-wrap { position:relative; }
.publish-btn { background:#000; color:#fff; padding:7px 16px; border:none; border-radius:6px; font-size:12px; cursor:pointer; display:flex; align-items:center; gap:4px; }
.publish-btn:hover { background:#222; }
.publish-dropdown { display:none; position:absolute; top:100%; right:0; margin-top:6px; background:#fff; border:1px solid #eee; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,0.1); min-width:200px; overflow:hidden; }
.publish-wrap:hover .publish-dropdown { display:block; }
.publish-item { padding:10px 14px; font-size:13px; cursor:pointer; display:flex; align-items:center; gap:8px; }
.publish-item:hover { background:#f5f5f5; }
.publish-item .desc { font-size:11px; color:#999; margin-left:auto; }

/* ===== 布局 ===== */
.container { max-width:1200px; margin:0 auto; padding:20px; }
.two-col { display:flex; gap:24px; }
.main-col { flex:1; min-width:0; }
.side-col { width:280px; flex-shrink:0; }

/* ===== 卡片 ===== */
.card { background:#fff; border:1px solid #eee; border-radius:10px; }
.side-card { background:#fff; border:1px solid #eee; border-radius:10px; padding:16px; margin-bottom:16px; }
.side-card h4 { font-size:14px; margin-bottom:10px; }

/* ===== 按钮 ===== */
.btn-primary { background:#000; color:#fff; border:none; padding:8px 20px; border-radius:8px; font-size:13px; cursor:pointer; }
.btn-outline { background:#fff; color:#333; border:1px solid #ddd; padding:8px 16px; border-radius:8px; font-size:13px; cursor:pointer; }

/* ===== 标签 ===== */
.tag { padding:2px 8px; border-radius:4px; font-size:11px; }
.tag-green { background:#e8f5e9; color:#2e7d32; }
.tag-blue { background:#e3f2fd; color:#1565c0; }
.tag-orange { background:#fff3e0; color:#e65100; }
.tag-purple { background:#f3e5f5; color:#7b1fa2; }
.tag-pink { background:#fce4ec; color:#c62828; }
.tag-teal { background:#e0f2f1; color:#00796b; }
.tag-indigo { background:#e8eaf6; color:#3f51b5; }
.tag-yellow { background:#fff8e1; color:#f57c00; }

/* ===== 排序Tab ===== */
.sort-tabs { display:flex; gap:20px; border-bottom:1px solid #eee; padding-bottom:10px; font-size:14px; }
.sort-tabs a { cursor:pointer; color:#666; padding-bottom:10px; }
.sort-tabs a.active { font-weight:bold; color:#000; border-bottom:2px solid #000; }

/* ===== 分类标签行 ===== */
.cat-row { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; font-size:12px; }
.cat-row a { background:#f5f5f5; padding:3px 10px; border-radius:12px; cursor:pointer; color:#666; }
.cat-row a.active { background:#000; color:#fff; }

/* ===== 帖子列表 ===== */
.post-item { padding:14px 0; border-bottom:1px solid #f5f5f5; cursor:pointer; }
.post-item:hover .post-title { color:#1565c0; }
.post-title { font-size:15px; font-weight:bold; margin-bottom:4px; line-height:1.4; }
.post-excerpt { font-size:13px; color:#888; margin-bottom:6px; line-height:1.5; }
.post-meta { display:flex; align-items:center; gap:10px; font-size:12px; color:#999; }
.post-meta .right { margin-left:auto; }

/* ===== 产品卡片 ===== */
.product-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.product-card { background:#fff; border:1px solid #eee; border-radius:10px; overflow:hidden; cursor:pointer; }
.product-card:hover { box-shadow:0 2px 12px rgba(0,0,0,0.06); }
.product-cover { height:110px; display:flex; align-items:center; justify-content:center; font-size:36px; }
.product-body { padding:12px; }
.product-name { font-size:14px; font-weight:bold; margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.product-desc { font-size:12px; color:#888; line-height:1.5; margin-bottom:8px; height:36px; overflow:hidden; }
.product-meta { font-size:11px; color:#999; display:flex; gap:10px; }

/* ===== 资源列表 ===== */
.resource-item { display:flex; gap:14px; padding:14px 16px; border-bottom:1px solid #f5f5f5; cursor:pointer; }
.resource-item:last-child { border-bottom:none; }
.resource-icon { width:48px; height:48px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }

/* ===== 评论 ===== */
.comment { display:flex; gap:12px; margin-bottom:16px; }
.comment-avatar { width:36px; height:36px; border-radius:50%; background:#ddd; flex-shrink:0; }
.comment-body { flex:1; }
.comment-head { display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:13px; }
.comment-text { font-size:14px; line-height:1.7; }
.comment-replies { background:#f9f9f9; border-radius:8px; padding:10px 12px; margin-top:8px; }
.nested-comment { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid #f0f0f0; }
.nested-comment:last-child { border-bottom:none; }

/* ===== 统计 ===== */
.stat-row { display:flex; text-align:center; }
.stat-row > div { flex:1; }
.stat-num { font-size:20px; font-weight:bold; }
.stat-label { font-size:11px; color:#999; }

/* ===== 分类网格 ===== */
.cat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.cat-card { background:#fff; border:1px solid #eee; border-radius:8px; padding:14px; cursor:pointer; }
.cat-card:hover { border-color:#ccc; }

/* ===== 面包屑 ===== */
.breadcrumb { display:flex; justify-content:space-between; font-size:12px; color:#999; margin-bottom:16px; }

/* ===== 评论输入框 ===== */
.comment-input { border:1px solid #e0e0e0; border-radius:12px; overflow:hidden; background:#fff; }
.comment-input textarea { width:100%; border:none; padding:16px; font-size:14px; resize:none; outline:none; font-family:inherit; height:80px; }
.comment-input-bar { display:flex; align-items:center; padding:10px 16px; border-top:1px solid #f0f0f0; background:#fafafa; }

/* ===== 页脚 ===== */
.footer { border-top:1px solid #eee; background:#fff; margin-top:30px; padding:20px; text-align:center; font-size:12px; color:#999; }

/* ===== 帖子操作栏（点赞/评论/收藏） ===== */
.action-bar {
  display:flex;
  align-items:center;
  gap:8px;
  padding:14px 0;
}
.action-btn {
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  background:#f5f5f5;
  border:none;
  border-radius:20px;
  font-size:13px;
  cursor:pointer;
  transition:all 0.2s;
  color:#666;
}
.action-btn:hover {
  background:#e8e8e8;
  color:#333;
}
.action-btn.liked {
  background:#e3f2fd;
  color:#1565c0;
}
.action-btn.liked:hover {
  background:#bbdefb;
}
.action-btn.saved {
  background:#fff8e1;
  color:#f57c00;
}
.action-divider {
  width:1px;
  height:20px;
  background:#e0e0e0;
  margin:0 6px;
}
.action-right {
  margin-left:auto;
  display:flex;
  gap:8px;
}

/* ===== 回到顶部 ===== */
.back-top { position:fixed; right:30px; bottom:60px; width:40px; height:40px; background:#fff; border:1px solid #e0e0e0; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,0.08); z-index:99; }
