/* ============================================================
   公共样式 style.css
   - 三段式骨架：.header（上）/ .main-content（中）/ .footer（下）
   - 帖子列表卡片样式
   - 不含任何具体页面独有背景，.main-content 保持纯净
   ============================================================ */

/* ===== 全局 ===== */
a {
	    text-decoration: none;
	    cursor:pointer;
    }



* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
}

/* =====【上】顶部栏 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header .logo { font-size: 17px; font-weight: 600; color: var(--primary); }
.header nav a { margin-left: 14px; text-decoration: none; color: var(--text-muted); font-size: 14px; }
.header nav a:hover { color: var(--primary); }
.msg-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--danger); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px;
  line-height: 16px; text-align: center;
  border-radius: 8px; padding: 0 4px;
}

/* =====【中】主内容区：纯净容器，背景由具体页面自行决定 ===== */
.main-content {
  /* 页面如需渐变，自行在页面内覆盖，如：
     .main-content { background: linear-gradient(to bottom, var(--primary-bg), var(--white)); } */
}

/* 社区公约 */
.notice {
  display:none;
  background: var(--primary-bg);
  padding: 10px 16px;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}


/* 板块标签 */
.tabs {
  display: flex;
  overflow-x: auto;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* 发帖入口 */
.post-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.post-entry .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--avatar-grad); flex-shrink: 0;
}
.post-entry .placeholder { color: var(--text-muted); font-size: 13px; }

/* 帖子列表 */
.post-list { background: var(--white); }
.post-item {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--avatar-grad); flex-shrink: 0;
}
.post-body { flex: 1; min-width: 0; }

.post-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.nickname { font-size: 13px; font-weight: 500; }
.time { font-size: 11px; color: var(--text-muted); }
.post-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.post-title a { color: var(--text-main); text-decoration: none; }
.post-title a:hover { color: var(--primary); }
.post-content {
  font-size: 13px; line-height: 1.6; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
}
.reply { margin-left: auto; font-size: 12px; color: var(--text-muted); text-decoration: none; }
.reply:hover { color: var(--primary); }

/* AJAX 滚动提示 */
#loading-tip { text-align: center; padding: 15px; color: #999; font-size: 14px; display: none; }
#no-more-tip { text-align: center; padding: 15px; color: #bbb; font-size: 13px; display: none; }

/* =====【下】底部 ===== */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
