/* =========================
   Community Feed Page
   ========================= */

.community-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

/* =========================
   Header
   ========================= */

.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.community-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.community-header-subtitle {
  font-size: 13px;
  opacity: 0.7;
}

/* =========================
   Create Post Button
   ========================= */

.community-create-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.community-create-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.community-login-hint {
  font-size: 13px;
  opacity: 0.75;
}

/* =========================
   Sort Bar
   ========================= */

.community-sort-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Reuses .community-sort-tab from community.css */

/* =========================
   Feed List
   ========================= */

.community-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   Post Card (Feed)
   ========================= */

.community-post-card {
  transition: background 0.15s ease, border-color 0.15s ease;
}

.community-post-card:hover {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.16);
}

/* =========================
   Score Column
   ========================= */

.community-post-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.community-post-score .value {
  margin-top: 2px;
}

/* =========================
   Meta Line
   ========================= */

.community-post-meta {
  margin-bottom: 4px;
}

.community-post-meta span {
  white-space: nowrap;
}

/* =========================
   Title + Snippet
   ========================= */

.community-post-title {
  margin-top: 4px;
}

.community-post-body {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
}

/* subtle fade-out */
.community-post-body::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5em;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.16)
  );
}

/* =========================
   Empty / Loading States
   ========================= */

.community-feed-empty {
  padding: 24px;
  text-align: center;
  opacity: 0.7;
}

.community-feed-loading {
  padding: 12px 0;
  opacity: 0.8;
}

/* =========================
   Responsive tweaks
   ========================= */

@media (max-width: 640px) {
  .community-post-card {
    gap: 8px;
    padding: 10px;
  }

  .community-post-score {
    width: 44px;
  }

  .community-post-title {
    font-size: 16px;
  }
}
