﻿/* ===== 谱圈 Community — 2026-11-21 大师级重绘 ===== */

.community-page {
  min-height: calc(100vh - var(--header-height));
  padding: calc(var(--header-height) + 16px) 0 60px;
  background: var(--bg-page);
}

/* ─────────────────────────────────────────────────────
   HERO — Full-bleed, premium, scholarly
   ───────────────────────────────────────────────────── */
.community-header {
  position: relative;
  padding: 72px 0 56px;
  margin-bottom: 32px;
  overflow: hidden;
  background:
    linear-gradient(160deg, #5C2E0A 0%, #8B4513 40%, #A06330 75%, #C9A96E 100%);
}

/* 宣纸纹理 overlay */
.community-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.28 0 0 0 0 0.12 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* 装饰性光晕 */
.community-header::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,220,160,0.22) 0%, rgba(255,220,160,0.05) 55%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.community-header-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
  animation: heroIn 0.7s ease both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.community-title {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #FFF8E0 0%, #FFE9A8 60%, #D4AF37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 40px rgba(0,0,0,0.18);
  font-family: "STKaiti", "华文楷体", "KaiTi", system-ui, sans-serif;
}

.community-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.08em;
  line-height: 1.8;
}

/* ─────────────────────────────────────────────────────
   LAYOUT — Two-column, generous gutter
   ───────────────────────────────────────────────────── */
.community-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.community-main { min-width: 0; }

.community-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

/* ─────────────────────────────────────────────────────
   PUBLISH CARD — Premium input
   ───────────────────────────────────────────────────── */
.publish-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 28px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.publish-card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 169, 110, 0.4);
}

.publish-header {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.publish-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(139,69,19,0.08);
}

.publish-input-wrap { flex: 1; min-width: 0; }

.publish-input {
  width: 100%;
  min-height: 96px;
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  transition: all 0.3s ease;
  background: var(--bg-page);
  font-family: inherit;
  color: var(--text-primary);
}

.publish-input:focus {
  border-color: var(--primary-gold);
  background: var(--bg-white);
  outline: none;
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.12);
}

.publish-input::placeholder {
  color: var(--text-tertiary);
}

.preview-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px 68px;
}

.preview-img {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  position: relative;
  border: 1px solid var(--border-light);
}

.preview-img-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-white);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.publish-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.publish-tools { display: flex; gap: 8px; }

.tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid transparent;
  background: var(--bg-page);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  font-family: inherit;
  font-weight: 500;
}

.tool-btn:hover {
  background: var(--bg-warm);
  color: var(--primary-brown);
  border-color: var(--border-light);
}

.tool-btn img {
  width: 18px;
  height: 18px;
}

.publish-btn {
  padding: 10px 32px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-brown));
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(139,69,19,0.22);
}

.publish-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,69,19,0.3);
}

/* ─────────────────────────────────────────────────────
   FEED TABS — Clean underline indicator
   ───────────────────────────────────────────────────── */
.feed-tabs {
  display: flex;
  gap: 36px;
  margin-bottom: 20px;
  padding: 0 4px;
  position: relative;
}

.feed-tab {
  padding: 14px 0;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.25s ease;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.feed-tab:hover { color: var(--primary-brown); }

.feed-tab.active {
  color: var(--primary-brown);
  font-weight: 600;
}

.feed-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-gold), var(--primary-brown));
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────────
   FEED LIST — Premium cards with refined hover
   ───────────────────────────────────────────────────── */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-item {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation: feedIn 0.4s ease both;
}

@keyframes feedIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 69, 19, 0.12);
  border-color: rgba(201, 169, 110, 0.35);
}

.feed-header {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.feed-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}

.feed-user-info { flex: 1; min-width: 0; }

.feed-username {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0;
}

.feed-time {
  font-size: 14px;
  color: var(--text-tertiary);
}

.feed-content {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.85;
  margin-bottom: 18px;
  letter-spacing: 0;
}

.feed-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.feed-topic-tag {
  display: inline-block;
  font-size: 14px;
  color: var(--primary-brown);
  background: var(--bg-warm);
  padding: 2px 10px;
  border-radius: 12px;
  margin-right: 8px;
  font-weight: 500;
}

.feed-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 10px;
  max-width: 240px;
}

.feed-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.4s ease;
}

/* ── 主题色调滤镜（按 data-theme）── */
/* 默认：自然质感 */
.feed-image { filter: saturate(0.85) contrast(0.95); }

/* 祭祖：暖棕黄 sepia */
.feed-images[data-theme="祭祖"] .feed-image { filter: sepia(0.55) saturate(0.8) brightness(0.95); }
/* 祠堂：深棕古旧 */
.feed-images[data-theme="祠堂"] .feed-image { filter: sepia(0.7) contrast(1.1) brightness(0.88); }
/* 修谱：米黄书卷 */
.feed-images[data-theme="修谱"] .feed-image { filter: sepia(0.45) saturate(0.7) brightness(1.05); }
/* 教育：藏蓝冷调 */
.feed-images[data-theme="教育"] .feed-image { filter: saturate(0.4) contrast(1.15) hue-rotate(195deg) brightness(0.95); }
/* 村务：青绿自然 */
.feed-images[data-theme="村务"] .feed-image { filter: sepia(0.25) saturate(0.95) hue-rotate(55deg); }
/* 村子面貌：暖绿生机 */
.feed-images[data-theme="村子面貌"] .feed-image { filter: sepia(0.35) saturate(0.9) brightness(1.02); }
/* 家族故事：怀旧琥珀 */
.feed-images[data-theme="家族故事"] .feed-image { filter: sepia(0.6) contrast(1.05) brightness(0.98); }
/* 家族变化：现代明亮 */
.feed-images[data-theme="家族变化"] .feed-image { filter: saturate(0.85) brightness(1.05); }
/* 宗亲会：稳重低饱和 */
.feed-images[data-theme="宗亲会"] .feed-image { filter: sepia(0.35) saturate(0.65) contrast(1.05); }

/* hover 恢复本色 */
.feed-image:hover {
  filter: none !important;
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ── 主题 emoji 角标 ── */
.feed-images[data-theme] { position: relative; }
.feed-images[data-theme]::after {
  content: attr(data-emoji);
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 20px;
  line-height: 1;
  z-index: 99;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  animation: emojiPop 0.3s ease;
}

@keyframes emojiPop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.feed-images.single {
  grid-template-columns: 1fr;
  max-width: 210px;
}
.feed-images.single .feed-image { aspect-ratio: auto; max-height: 210px; object-fit: contain; }

.feed-images.double {
  grid-template-columns: repeat(2, 1fr);
  max-width: 260px;
}

/* Actions bar */
.feed-actions {
  display: flex;
  justify-content: space-around;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.feed-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 28px;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  user-select: none;
  font-weight: 500;
}

.feed-action:hover {
  background: var(--bg-warm);
  color: var(--primary-brown);
}

.feed-action.active { color: var(--primary-brown); }
.feed-action.like-action.active svg { fill: currentColor; }

.feed-action img,
.feed-action svg {
  width: 18px;
  height: 18px;
}

.feed-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 14px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 500;
}
.feed-badge.top { background: linear-gradient(135deg, #FF6B6B, #EE5A5A); color: #fff; }
.feed-badge.hot { background: linear-gradient(135deg, #FF9F43, #FECA57); color: #fff; }

/* ─────────────────────────────────────────────────────
   SIDEBAR — Cardless, clean sections
   ───────────────────────────────────────────────────── */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.sidebar-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary-gold);
  display: inline-block;
  letter-spacing: 0.06em;
}

.sidebar-card-title .title-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 8px;
  letter-spacing: 0;
}

/* ─────────────────────────────────────────────────────
   HOT POSTS — Ranking list with medals
   ───────────────────────────────────────────────────── */
.hot-posts-card { border: 1px solid rgba(196, 46, 42, 0.18); }
.hot-posts-card .sidebar-card-title { border-bottom-color: #C42E2A; }

.hot-posts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.hp-item:hover {
  background: var(--bg-warm);
  border-color: rgba(201, 169, 110, 0.25);
  transform: translateX(2px);
}

.hp-rank {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}

.hp-rank.hp-medal { font-size: 20px; line-height: 1; }

.hp-rank.hp-num {
  background: var(--border-light);
  color: var(--text-tertiary);
  border-radius: 6px;
}

.hp-body { flex: 1; min-width: 0; }

.hp-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}

.hp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.hp-name {
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-likes {
  flex-shrink: 0;
}

/* 第一名高亮背景 */
.hp-item:nth-child(1) {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(196, 46, 42, 0.06));
  border-color: rgba(212, 175, 55, 0.25);
}

/* Hot topics */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
}

.topic-item:hover {
  background: var(--bg-warm);
  padding-left: 18px;
}

.topic-rank {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--border-light);
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topic-item:nth-child(1) .topic-rank { background: linear-gradient(135deg, #FF6B6B, #EE5A5A); color: #fff; }
.topic-item:nth-child(2) .topic-rank { background: linear-gradient(135deg, #FF9F43, #FECA57); color: #fff; }
.topic-item:nth-child(3) .topic-rank { background: linear-gradient(135deg, #FECA57, #D4AF37); color: #fff; }

.topic-name {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.topic-count {
  font-size: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Active users */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.user-item:hover {
  background: var(--bg-warm);
}

.user-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.user-item-info { flex: 1; min-width: 0; }

.user-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-item-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-btn {
  padding: 6px 16px;
  font-size: 14px;
  border-radius: 16px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--primary-gold);
  background: var(--bg-white);
  color: var(--primary-brown);
  font-family: inherit;
  font-weight: 500;
}

.follow-btn:hover {
  background: var(--primary-gold);
  color: #fff;
}

.follow-btn.followed {
  background: var(--bg-warm);
  color: var(--text-tertiary);
  border-color: var(--border-light);
}

/* ─────────────────────────────────────────────────────
   LOAD MORE
   ───────────────────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  margin-top: 28px;
}

.load-more-btn {
  padding: 12px 44px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.load-more-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-brown);
  background: var(--bg-warm);
}

.loading, .empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-tertiary);
  font-size: 15px;
}

/* ─────────────────────────────────────────────────────
   COMMENT MODAL
   ───────────────────────────────────────────────────── */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 5, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  padding: 20px;
}

.modal-dialog {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  animation: modalIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-lg { width: 600px; }
.modal-xl { width: 800px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.modal-close {
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-warm);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.comment-post-info {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.comment-post-info .feed-content { margin-bottom: 0; }

.comment-input-section { margin-bottom: 24px; }

.comment-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-page);
  resize: vertical;
  min-height: 88px;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-bottom: 12px;
  line-height: 1.7;
}

.comment-input:focus {
  border-color: var(--primary-gold);
  background: var(--bg-white);
  outline: none;
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.12);
}

.comment-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comments-list-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  letter-spacing: 0.05em;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item { display: flex; gap: 14px; }

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.comment-content { flex: 1; min-width: 0; }

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-username {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   字号放大 — 专为年长用户（覆盖 beautify.css 压制）
   beautify.css 有 body * { font-size: max(14px, 1em) !important; }
   ============================================ */
body main.community-page { font-size: 18px !important; line-height: 1.75 !important; }

/* Feed 列表 */
body main.community-page .feed-content,
body main.community-page .feed-content * { font-size: 20px !important; line-height: 1.8 !important; }
body main.community-page .feed-title,
body main.community-page .feed-title * { font-size: 22px !important; font-weight: 700 !important; line-height: 1.5 !important; }
body main.community-page .feed-header,
body main.community-page .feed-header *,
body main.community-page .feed-user,
body main.community-page .feed-user *,
body main.community-page .feed-username,
body main.community-page .feed-username * { font-size: 18px !important; font-weight: 600 !important; }
body main.community-page .feed-meta,
body main.community-page .feed-meta *,
body main.community-page .feed-time,
body main.community-page .feed-time * { font-size: 16px !important; }

/* Feed 底部操作栏 */
body main.community-page .feed-actions,
body main.community-page .feed-actions *,
body main.community-page .action-btn,
body main.community-page .action-btn * { font-size: 17px !important; }

/* 热门榜 */
body main.community-page .hp-item,
body main.community-page .hp-item * { font-size: 18px !important; }
body main.community-page .hp-content,
body main.community-page .hp-content * { font-size: 18px !important; line-height: 1.6 !important; }
body main.community-page .hp-meta,
body main.community-page .hp-meta * { font-size: 16px !important; }

/* 侧边栏标题 */
body main.community-page .sidebar-card-title,
body main.community-page .sidebar-card-title * { font-size: 20px !important; font-weight: 700 !important; }
/* 热门帖子榜标题单独缩小 */
body main.community-page .hot-posts-card .sidebar-card-title,
body main.community-page .hot-posts-card .sidebar-card-title * { font-size: 16px !important; font-weight: 600 !important; letter-spacing: 1px !important; }
body main.community-page .guide-item,
body main.community-page .guide-item * { font-size: 18px !important; line-height: 1.7 !important; }
body main.community-page .guide-title,
body main.community-page .guide-title * { font-size: 19px !important; font-weight: 700 !important; }
body main.community-page .guide-desc,
body main.community-page .guide-desc * { font-size: 17px !important; }
body main.community-page .surname-tag,
body main.community-page .surname-tag * { font-size: 22px !important; }

/* 搜索/筛选 Tab */
body main.community-page .search-input,
body main.community-page .search-input * { font-size: 19px !important; }
body main.community-page .search-btn,
body main.community-page .search-btn * { font-size: 18px !important; font-weight: 600 !important; }
body main.community-page .search-tab,
body main.community-page .search-tab * { font-size: 18px !important; }

/* Hero */
body main.community-page .section-title,
body main.community-page .section-title * { font-size: 22px !important; font-weight: 700 !important; }
body main.community-page .section-subtitle,
body main.community-page .section-subtitle * { font-size: 17px !important; }

/* 评论区 */
body main.community-page .comment-content,
body main.community-page .comment-content * { font-size: 17px !important; line-height: 1.7 !important; }
body main.community-page .comment-username,
body main.community-page .comment-username * { font-size: 18px !important; font-weight: 600 !important; }

/* 弹窗 */
body main.community-page .modal-title,
body main.community-page .modal-title * { font-size: 22px !important; font-weight: 700 !important; }
body main.community-page .form-label,
body main.community-page .form-label * { font-size: 18px !important; font-weight: 600 !important; }
body main.community-page .form-input,
body main.community-page .form-input *,
body main.community-page .form-textarea,
body main.community-page .form-textarea * { font-size: 19px !important; }

/* 分页 */
body main.community-page .page-btn,
body main.community-page .page-btn * { font-size: 17px !important; }

.comment-time {
  font-size: 14px;
  color: var(--text-tertiary);
}

.comment-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.btn-sm {
  padding: 8px 22px;
  font-size: 15px;
  border-radius: 18px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-sidebar { display: none; }
}

@media (max-width: 768px) {
  .community-title { font-size: 42px; letter-spacing: 0.08em; }
  .community-subtitle { font-size: 15px; }
  .community-header { padding: 56px 0 44px; }
  .feed-images { grid-template-columns: repeat(2, 1fr); }
  .modal-lg, .modal-xl { width: 100%; }
  .feed-tabs { gap: 24px; padding: 0; }
  .publish-card, .feed-item { padding: 20px; }
  .community-layout { gap: 20px; }
  .feed-action { padding: 8px 16px; font-size: 14px; }
}

/* ─────────────────────────────────────────────────────
   LIGHTBOX — 图片灯箱
   ───────────────────────────────────────────────────── */
.lightbox-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: lbFade 0.2s ease;
  cursor: zoom-out;
}

@keyframes lbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  animation: lbZoom 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 44px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  border-radius: 50%;
  z-index: 10;
}

.lightbox-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
  transform: rotate(90deg);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  user-select: none;
  font-weight: 300;
}

.lightbox-arrow:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.lb-prev { left: 32px; }
.lb-next { right: 32px; }

.lightbox-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 16px;
  letter-spacing: 0.05em;
}
