/* ==============================
   GLOBAL FEED PAGE
============================== */

.gf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 18px;
  max-width: 1010px;
  margin: 18px auto 0;
  padding: 0 14px 44px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* ── Page heading ── */
.gf-page-head {
  margin-bottom: 20px;
}

.gf-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gf-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* ── Main column ── */
.gf-main {
  min-width: 0;
  width: 100%;
}

.gf-main .card {
  margin-bottom: 8px;
}

.gf-main .card:last-child {
  margin-bottom: 0;
}

.gf-main .compose-box {
  padding: 10px 12px;
  gap: 10px;
  border-radius: 13px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.gf-main .compose-avatar {
  width: 38px;
  height: 38px;
}

.gf-main .compose-input {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.gf-main .post {
  margin-bottom: 8px;
  border-radius: 13px;
}

.gf-main .post-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.gf-main .post-head {
  padding: 8px 10px 4px;
}

.gf-main .post-meta {
  line-height: 1.14;
}

.gf-main .post-author {
  font-size: 13px;
  margin-bottom: 0;
}

.gf-main .post-time {
  font-size: 12px;
}

.gf-main .post-badge {
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 5px;
}

.gf-main #feedComposeMood {
  max-width: 128px;
}

.gf-main #feedComposeIntent {
  max-width: 134px;
}

.gf-main .post-body {
  padding: 0 10px 6px;
  font-size: 13px;
  line-height: 1.42;
}

.gf-main .post-mood-row {
  margin-bottom: 6px;
}

.gf-main .post-mood-badge {
  font-size: 10px;
  padding: 3px 8px;
}

.gf-main .post-intent-badge {
  font-size: 10px;
  padding: 3px 8px;
  margin-left: 6px;
}

.gf-main .post-reactions {
  padding: 1px 10px;
}

.gf-main .post-actions {
  padding: 3px 10px;
}

.gf-main .reaction-pill {
  padding: 2px 7px;
  font-size: 11.5px;
}

.gf-main .action-btn {
  padding: 6px 8px;
  font-size: 12.5px;
  gap: 5px;
}

.gf-main .post-tag {
  padding: 4px 8px;
  font-size: 12px;
  margin-right: 4px;
}

.gf-main .post-repost-banner {
  font-size: 12px;
  margin-bottom: 6px;
}

.gf-main .repost-preview-slot {
  margin-top: 6px;
  padding-left: 6px;
}

.gf-main .repost-preview-head {
  padding: 6px 8px 2px;
}

.gf-main .repost-preview-avatar {
  width: 30px;
  height: 30px;
}

.gf-main .repost-preview-body {
  padding: 0 8px 6px;
}

.gf-main .repost-preview-body .post-body-text {
  font-size: 13px;
  line-height: 1.32;
}

.gf-main .repost-preview-image-wrap {
  margin: 0 8px 8px;
}

.gf-main .link-preview-slot {
  margin-top: 6px;
}

.gf-main .link-preview-media {
  width: 96px;
  flex-basis: 96px;
}

.gf-main .link-preview-content {
  padding: 8px 10px;
  gap: 3px;
}

.gf-main .link-preview-title {
  font-size: 13px;
}

.gf-main .link-preview-desc {
  font-size: 11.5px;
}

.gf-main .ad-post {
  overflow: hidden;
}

.gf-main .ad-post-head {
  padding-bottom: 2px;
}

.gf-main .ad-post-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.10);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gf-main .ad-post-body {
  padding-top: 2px;
}

.gf-main .ad-post-body .adsbygoogle {
  min-height: 120px;
}

.gf-main .post-actions {
  display: flex;
  align-items: center;
}

.gf-main .post-actions .react-wrap,
.gf-main .post-actions > .action-btn {
  flex: 1 1 0;
}

.gf-main .post-actions .react-wrap {
  display: flex;
}

.gf-main .post-actions .react-wrap .action-btn,
.gf-main .post-actions > .action-btn {
  width: 100%;
  justify-content: center;
}

/* ── Sidebar ── */
.gf-sidebar {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gf-card {
  border-radius: 14px;
}

.gf-card .card-head {
  padding: 12px 14px;
}

.gf-card .card-body {
  padding: 12px 14px;
}

.gf-vibe-summary {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 12px;
}

.gf-vibe-label {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 10px 0 8px;
  text-transform: uppercase;
}

.gf-vibe-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gf-vibe-chip {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.gf-vibe-chip:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(139,92,246,0.28);
  transform: translateY(-1px);
}

.gf-vibe-chip.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.22), rgba(236,72,153,0.18));
  border-color: rgba(139,92,246,0.34);
  color: #f8fafc;
}

.gf-vibe-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.gf-vibe-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.gf-vibe-action.secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
}

/* Community stats */
.gf-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gf-stat-row:last-child {
  border-bottom: none;
}

.gf-stat-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.gf-stat-label {
  flex: 1;
  font-size: 13px;
  color: #9ca3af;
}

.gf-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

/* Profile mini card */
.gf-profile-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gf-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.gf-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.gf-profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gf-profile-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-profile-link {
  font-size: 12px;
  color: #8b5cf6;
  text-decoration: none;
  transition: color 0.2s;
}

.gf-profile-link:hover {
  color: #a78bfa;
}

.gf-card-link {
  font-size: 12px;
  font-weight: 600;
  color: #8b5cf6;
  text-decoration: none;
}

.gf-card-link:hover {
  color: #a78bfa;
}

.gf-communities-body {
  padding-top: 10px;
}

.gf-communities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gf-community-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gf-community-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gf-community-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.gf-community-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gf-community-meta {
  min-width: 0;
  flex: 1;
}

.gf-community-name {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-community-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-community-empty {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}

.gf-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gf-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #e5e7eb;
  font-size: 12px;
  text-decoration: none;
}

.gf-topic-count {
  color: #9ca3af;
  font-size: 11px;
}

html[data-theme="light"] .gf-community-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .gf-community-name {
  color: #0f172a;
}

html[data-theme="light"] .gf-community-sub,
html[data-theme="light"] .gf-community-empty {
  color: #64748b;
}

html[data-theme="light"] .gf-topic-pill {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .gf-topic-count {
  color: #64748b;
}

/* ── Responsive: hide sidebar on mobile ── */
@media (max-width: 760px) {
  .gf-layout {
    grid-template-columns: 1fr;
    margin-top: 8px;
    padding: 0 10px 32px;
    gap: 10px;
  }

  .gf-sidebar {
    display: none;
  }

  .gf-main {
    width: 100%;
    min-width: 0;
  }

  .gf-main .card,
  .gf-main .post,
  .gf-main #feedPosts,
  .gf-main #feedEmpty {
    width: 100%;
    min-width: 0;
  }

  .gf-main .compose-box {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    gap: 8px;
    align-items: flex-start;
    border-radius: 12px;
  }

  .gf-main .compose-avatar {
    width: 34px;
    height: 34px;
  }

  .gf-main .compose-box > div:last-child {
    min-width: 0;
    flex: 1;
  }

  .gf-main .compose-input {
    width: 100% !important;
    min-width: 0;
    min-height: 44px;
    padding: 10px 11px;
    font-size: 13px;
    white-space: normal;
  }

  .gf-main .post {
    border-radius: 12px;
  }

  .gf-main .post-head {
    padding: 8px 9px 4px;
  }

  .gf-main .post-body {
    padding: 0 9px 6px;
  }

  .gf-main .post-reactions,
  .gf-main .post-actions {
    padding-left: 9px;
    padding-right: 9px;
  }

  .gf-main #feedComposeActions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .gf-main #feedComposeActions > div {
    width: 100%;
    min-width: 0;
  }

  .gf-main #feedComposeActions > div:last-child {
    display: flex;
    justify-content: flex-end;
    margin-left: 0;
  }
}
