/* ===== 前台内容样式 ===== */

/* 顶部浮动导航栏 */
.pub-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1031;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-bottom: 1px solid #e8e8e8;
}
.pub-nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: #16b777;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}
.pub-nav-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.pub-nav-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 15px;
  color: #555;
  text-decoration: none;
  background: transparent;
}
.pub-nav-tab:hover { background: #f0f0f0; color: #555; }
.pub-nav-tab.active { background: #16b777; color: #fff; }
.pub-nav-search { flex: 1; max-width: 400px; margin: 0 auto; }
.pub-nav-search-wrap { position: relative; }
.pub-nav-search input {
  width: 100%;
  height: 36px;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  padding: 0 40px 0 16px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
}
.pub-nav-search input:focus { border-color: #16b777; }
.pub-nav-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
}
.pub-nav-right { flex-shrink: 0; margin-left: auto; }

/* 页面布局 */
.pub-content {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 20px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
}
.pub-layout { display: flex; gap: 20px; }
.pub-main { flex: 1; min-width: 0; }
.pub-sidebar { width: 280px; flex-shrink: 0; }
@media (max-width: 768px) {
  .pub-sidebar { display: none; }
  .pub-layout { flex-direction: column; }
}

/* 卡片 */
.pub-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}
.pub-card-title {
  padding: 14px 16px 10px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* 文章列表项 */
.pub-article-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  transition: background 0.15s;
}
.pub-article-item:last-child { border-bottom: none; }
.pub-article-item:hover { background: #fafafa; }
.pub-article-item:hover .pub-article-title { color: #16b777; }

.pub-article-inner { flex: 1; min-width: 0; }

.pub-article-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-article-summary {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-article-meta {
  font-size: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* 文章详情 */
.pub-article-detail { padding: 24px; }
.pub-article-heading {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 8px 0 12px;
}
.pub-article-content {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  word-break: break-word;
}
.pub-article-content p { margin: 0 0 12px; }
.pub-article-content img { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.pub-article-content a { color: #16b777; text-decoration: none; }
.pub-article-content blockquote {
  border-left: 3px solid #16b777;
  padding: 10px 16px;
  margin: 16px 0;
  background: #f9f9f9;
  border-radius: 0 6px 6px 0;
  color: #555;
}

/* 标签 */
.pub-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  background: #f0f0f5;
  color: #555;
  border-radius: 10px;
}

/* 徽章 */
.pub-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}
.pub-badge-flash { background: #fff3e0; color: #e65100; }
.pub-badge-star { background: #e3f2fd; color: #1565c0; }

/* 热榜 */
.pub-hot-list { padding: 0 0 8px; }
.pub-hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.15s;
}
.pub-hot-item:hover { background: #fafafa; }
.pub-hot-item:hover .pub-hot-title { color: #16b777; }

.pub-hot-num {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  background: #f5f5f5;
  text-align: center;
  line-height: 18px;
  flex-shrink: 0;
}
.pub-hot-num.top { background: #ff4d4f; color: #fff; }
.pub-hot-num:nth-child(1).top { background: #ff4d4f; }
.pub-hot-num:nth-child(2).top { background: #ff7a45; }
.pub-hot-num:nth-child(3).top { background: #ffa940; }

.pub-hot-title {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-link-btn {
  flex: 1;
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pub-link-btn:hover { background: #eee; color: #333; }

/* 热榜行模式 */
.pub-hot-row { align-items: center; }
.pub-hot-row .pub-hot-num { font-size: 16px; width: 24px; height: 24px; line-height: 24px; }

/* 分类Tab */
.pub-tab-btn {
  display: inline-block;
  padding: 4px 12px;
  margin: 2px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  background: #f0f0f0;
}
.pub-tab-btn.active,
.pub-tab-btn:hover { background: #16b777; color: #fff; }
