.community-page {
  background: var(--white);
  min-height: 100vh;
  --community-sidebar-top: calc(var(--header-h, 80px) + 8px);
}

.community-page #shop-header {
  min-height: var(--header-h, 80px);
}

.community-page .home-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.community-page .account-main {
  padding: 0 0 72px;
  background: var(--white);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-800), var(--red));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(75, 31, 94, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, box-shadow 0.25s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 12px 32px rgba(75, 31, 94, 0.36);
}

.fb-group {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

/* Cover & header */
.fb-cover {
  height: 200px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background-size: cover;
  background-position: center 30%;
  position: relative;
  overflow: hidden;
}

.fb-cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(75, 31, 94, 0.8) 100%);
}

.fb-group-info {
  background: #ffffff;
  border: 1px solid rgba(75, 31, 94, 0.08);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0 20px 18px;
  margin-bottom: 16px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.fb-group-info__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--purple-950);
  line-height: 1.35;
  padding-top: 44px;
  margin-bottom: 6px;
}

.fb-group-info__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(75, 31, 94, 0.6);
}

.fb-group-info__meta i {
  color: var(--gold);
  font-size: 0.75rem;
}

.fb-group-info__dot {
  opacity: 0.4;
}

/* Composer */
.fb-composer {
  background: #ffffff;
  border: 1px solid rgba(75, 31, 94, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  animation: fb-slide-in 0.4s ease;
}

.fb-composer__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fb-composer__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-size: 0.9375rem;
}

.fb-composer__input {
  flex: 1;
  padding: 12px 18px;
  background: rgba(75, 31, 94, 0.04);
  border-radius: 999px;
  color: rgba(75, 31, 94, 0.6);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
  border: 1px solid transparent;
}

.fb-composer__input:hover {
  background: rgba(75, 31, 94, 0.08);
  box-shadow: inset 0 0 0 1px rgba(75, 31, 94, 0.15);
}

.fb-composer__actions {
  display: flex;
  justify-content: space-around;
  padding-top: 4px;
  border-top: 1px solid rgba(75, 31, 94, 0.08);
}

.fb-composer__action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(75, 31, 94, 0.7);
  transition: background 0.2s;
}

.fb-composer__action:hover {
  background: rgba(75, 31, 94, 0.04);
}

.fb-composer__action i {
  font-size: 1.125rem;
}

.fb-composer__action--photo i {
  color: #45bd62;
}

.fb-composer__action--tag i {
  color: var(--gold);
}

.fb-composer__action--feel i {
  color: var(--red);
}

/* Feed cards */
.fb-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fb-post {
  background: #ffffff;
  border: 1px solid rgba(75, 31, 94, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fb-slide-in 0.45s ease backwards;
}

.fb-post:nth-child(1) {
  animation-delay: 0.05s;
}

.fb-post:nth-child(2) {
  animation-delay: 0.1s;
}

.fb-post:nth-child(3) {
  animation-delay: 0.15s;
}

@keyframes fb-slide-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fb-post__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 0;
}

.fb-post__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-800), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.fb-post__meta {
  flex: 1;
  min-width: 0;
}

.fb-post__author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--purple-950);
  line-height: 1.3;
}

.fb-post__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(75, 31, 94, 0.5);
  margin-top: 2px;
}

.fb-post__sub i {
  font-size: 0.625rem;
}

.fb-post__menu {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: rgba(75, 31, 94, 0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.fb-post__menu:hover {
  background: rgba(75, 31, 94, 0.05);
  color: rgba(75, 31, 94, 0.7);
}

.fb-post__options-wrap {
  position: relative;
}

.fb-post__options-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid rgba(75, 31, 94, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  min-width: 160px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.fb-post__options-dropdown button {
  background: transparent;
  border: none;
  padding: 10px 16px;
  text-align: left;
  font-size: 0.9375rem;
  color: var(--purple-950);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

.fb-post__options-dropdown button:hover {
  background: rgba(75, 31, 94, 0.05);
}

.fb-post__options-dropdown button.text-danger {
  color: #e1090a;
}

.fb-post__options-dropdown button.text-danger i {
  color: #e1090a;
}

.fb-post__text {
  padding: 10px 16px 12px;
  color: rgba(75, 31, 94, 0.85);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Media layouts */
.fb-post__media {
  position: relative;
  background: #000;
}

.fb-post__media--single img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.fb-post__grid {
  display: grid;
  gap: 3px;
  background: #000;
}

.fb-post__grid--2 {
  grid-template-columns: 1fr 1fr;
}

.fb-post__grid--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.fb-post__grid--3 img:first-child {
  grid-row: span 2;
}

.fb-post__grid--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.fb-post__grid img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  display: block;
}

.fb-post__grid-cell {
  position: relative;
  overflow: hidden;
}

.fb-post__grid-cell--more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.fb-post__video {
  width: 100%;
  display: block;
  max-height: 480px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Engagement */
.fb-post__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 0.8125rem;
  color: rgba(75, 31, 94, 0.6);
}

.fb-post__reactions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-post__reaction-icons {
  display: flex;
}

.fb-post__reaction-icons span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  margin-left: -4px;
  border: 2px solid #ffffff;
}

.fb-post__reaction-icons span:first-child {
  margin-left: 0;
}

.fb-post__reaction-icons .r-heart {
  background: var(--red);
  color: #fff;
}

.fb-post__reaction-icons .r-like {
  background: #3b82f6;
  color: #fff;
}

.fb-post__actions {
  display: flex;
  border-top: 1px solid rgba(75, 31, 94, 0.08);
  border-bottom: 1px solid rgba(75, 31, 94, 0.08);
  padding: 2px 4px;
}

.fb-post__action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(75, 31, 94, 0.7);
  transition: background 0.2s, color 0.2s;
}

.fb-post__action:hover {
  background: rgba(75, 31, 94, 0.04);
}

.fb-post__action--liked {
  color: var(--red);
}

.fb-post__action--liked i {
  color: var(--red);
  animation: heart-pop 0.4s ease;
}

@keyframes heart-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.35);
  }

  100% {
    transform: scale(1);
  }
}

/* Comments */
.fb-post__comments {
  padding: 8px 16px 12px;
}

.fb-post__comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.fb-post__comments-list.is-collapsed {
  max-height: 0;
  overflow: hidden;
  margin: 0;
  opacity: 0;
}

.fb-comment {
  display: flex;
  gap: 8px;
  animation: fb-comment-in 0.35s ease;
}

@keyframes fb-comment-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fb-comment__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.fb-comment__bubble {
  background: rgba(75, 31, 94, 0.04);
  border-radius: 14px;
  padding: 8px 12px;
  flex: 1;
}

.fb-comment__author {
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--purple-950);
  margin-bottom: 2px;
}

.fb-comment__text {
  font-size: 0.875rem;
  color: rgba(75, 31, 94, 0.85);
  line-height: 1.45;
}

.fb-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-comment-form__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.fb-comment-form__wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(75, 31, 94, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(75, 31, 94, 0.1);
  padding: 4px 4px 4px 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.fb-comment-form__wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 163, 78, 0.15);
}

.fb-comment-form__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--purple-950);
  font-size: 0.875rem;
  padding: 8px 0;
}

.fb-comment-form__input::placeholder {
  color: rgba(75, 31, 94, 0.4);
}

.fb-comment-form__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fb-comment-form__send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(198, 40, 57, 0.25);
}

/* Create post modal */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  pointer-events: none;
}

.fb-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.fb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s;
}

.fb-modal.is-open .fb-modal__backdrop {
  opacity: 1;
}

.fb-modal__box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(75, 31, 94, 0.1);
  border-radius: var(--radius-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.fb-modal.is-open .fb-modal__box {
  transform: scale(1) translateY(0);
}

.fb-modal__head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 48px;
  border-bottom: 1px solid rgba(75, 31, 94, 0.08);
  position: relative;
}

.fb-modal__title {
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--purple-950);
}

.fb-modal__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(75, 31, 94, 0.05);
  color: rgba(75, 31, 94, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.fb-modal__close:hover {
  background: rgba(198, 40, 57, 0.15);
  color: var(--red);
}

.fb-modal__body {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.fb-modal__scrollable {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(90vh - 160px);
}

.fb-modal__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.fb-modal__user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}

.fb-modal__user-info {
  display: flex;
  flex-direction: column;
}

.fb-modal__user-name-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.fb-modal__user-name {
  font-weight: 700;
  color: var(--purple-950);
  font-size: 0.9375rem;
}

.fb-modal__user-location {
  font-size: 0.9375rem;
  color: rgba(75, 31, 94, 0.7);
}

.fb-modal__user-location strong {
  color: var(--purple-950);
  font-weight: 600;
}

.fb-modal__privacy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  background: rgba(75, 31, 94, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--purple-950);
  font-weight: 600;
  margin-top: 2px;
  cursor: pointer;
}

.fb-modal__textarea {
  width: 100%;
  min-height: 80px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--purple-950);
  font-size: 1.25rem;
  resize: none;
  outline: none;
  margin-bottom: 16px;
  line-height: 1.4;
}

.fb-modal__textarea::placeholder {
  color: rgba(75, 31, 94, 0.4);
}

.fb-modal__preview-wrapper {
  border: 1px solid rgba(75, 31, 94, 0.1);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 16px;
  position: relative;
  display: none;
}

.fb-modal__preview-wrapper.is-visible {
  display: block;
}

.fb-modal__preview {
  display: grid;
  gap: 2px;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}

.fb-modal__preview--1 {
  grid-template-columns: 1fr;
}

.fb-modal__preview--2 {
  grid-template-columns: 1fr 1fr;
}

.fb-modal__preview img,
.fb-modal__preview video {
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

/* Per-image remove button */
.fb-preview-item {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.fb-preview-item img,
.fb-preview-item video {
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.fb-preview-item__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
  z-index: 10;
}

.fb-preview-item:hover .fb-preview-item__remove {
  opacity: 1;
  transform: scale(1);
}

.fb-preview-item__remove:hover {
  background: rgba(225, 9, 10, 0.85);
}

@media (hover: none) {
  .fb-preview-item__remove {
    opacity: 1;
    transform: scale(1);
  }
}

.fb-modal__media-clear {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fb-modal__upload {
  border: 2px dashed rgba(75, 31, 94, 0.2);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: rgba(75, 31, 94, 0.5);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.fb-modal__upload.is-hidden {
  display: none;
}

.fb-modal__upload:hover,
.fb-modal__upload--drag {
  border-color: var(--gold);
  background: rgba(75, 31, 94, 0.04);
}

.fb-modal__upload i {
  font-size: 2.25rem;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.fb-modal__location-custom {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(75, 31, 94, 0.15);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.fb-modal__location-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(75, 31, 94, 0.08);
}

.fb-modal__location-search-wrap i {
  color: #f5533d;
  font-size: 1.1rem;
}

.fb-modal__location-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--purple-950);
}

.fb-modal__location-search-wrap button {
  background: transparent;
  border: none;
  color: rgba(75, 31, 94, 0.5);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.fb-modal__location-search-wrap button:hover {
  background: rgba(75, 31, 94, 0.08);
  color: var(--purple-950);
}

.fb-modal__location-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.fb-modal__location-list::-webkit-scrollbar {
  width: 6px;
}

.fb-modal__location-list::-webkit-scrollbar-track {
  background: transparent;
}

.fb-modal__location-list::-webkit-scrollbar-thumb {
  background: rgba(75, 31, 94, 0.15);
  border-radius: 10px;
}

.fb-modal__location-list li {
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--purple-950);
  cursor: pointer;
  transition: background 0.2s, padding-left 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fb-modal__location-list li:hover {
  background: rgba(75, 31, 94, 0.05);
  padding-left: 20px;
}

.fb-modal__location-list li i {
  color: rgba(75, 31, 94, 0.25);
  font-size: 0.9rem;
}

.fb-modal__footer-fixed {
  padding: 16px;
  border-top: 1px solid rgba(75, 31, 94, 0.08);
}

.fb-modal__addons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border: 1px solid rgba(75, 31, 94, 0.15);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fb-modal__addons-text {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--purple-950);
}

.fb-modal__addons-icons {
  display: flex;
  gap: 4px;
}

.addon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.addon-btn:hover {
  background: rgba(75, 31, 94, 0.05);
}

.addon-btn--image i {
  color: #45bd62;
}

.fb-modal__post-btn {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  background: var(--red);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.fb-modal__post-btn:hover:not(:disabled) {
  background: #b01b2c;
}

.fb-modal__post-btn:disabled {
  background: #e4e6eb;
  color: #bcc0c4;
  cursor: not-allowed;
}

/* ============================================================
   3-COLUMN LAYOUT
   ============================================================ */

/* Cover banner (full-width) */
.fb-cover-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.fb-cover-wrapper .fb-cover {
  height: 220px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center 30%;
  position: relative;
  overflow: hidden;
}

.fb-cover__title-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px 20px;
  background: linear-gradient(to top, rgba(30, 5, 50, 0.85) 0%, transparent 100%);
}

.fb-cover__group-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.fb-cover__group-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.fb-cover__group-meta i {
  color: var(--gold);
  font-size: 0.75rem;
}

/* Layout grid */
.fb-layout {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* Sidebar shared */
.fb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: var(--community-sidebar-top);
  max-height: calc(100vh - var(--community-sidebar-top) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.fb-sidebar__card {
  background: #fff;
  border: 1px solid rgba(75, 31, 94, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.fb-sidebar__heading {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--purple-950);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-sidebar__heading i {
  color: var(--gold);
}

/* "See more" button */
.fb-sidebar__see-more {
  width: 100%;
  margin-top: 10px;
  padding: 9px 0;
  border-radius: var(--radius);
  background: rgba(75, 31, 94, 0.04);
  color: rgba(75, 31, 94, 0.7);
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fb-sidebar__see-more:hover {
  background: rgba(75, 31, 94, 0.08);
}

/* ============================================================
   LEFT SIDEBAR — Group list
   ============================================================ */

/* ============================================================
   LEFT SIDEBAR — Featured Posts & Active Members
   ============================================================ */

.fb-featured-posts,
.fb-active-members {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-featured-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

.fb-featured-item:hover {
  background: rgba(75, 31, 94, 0.05);
  transform: translateX(4px);
}

.fb-featured-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.fb-featured-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(75, 31, 94, 0.06);
  color: var(--purple-800);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fb-featured-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.fb-featured-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--purple-950);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-featured-meta {
  font-size: 0.75rem;
  color: rgba(75, 31, 94, 0.5);
  display: flex;
  gap: 6px;
  align-items: center;
}

.fb-featured-meta i {
  font-size: 0.6875rem;
}

/* Active members card */
.fb-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.fb-member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.fb-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold), var(--purple-800));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.fb-member-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  position: absolute;
  bottom: 0;
  right: 0;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse-status 2s infinite;
}

.fb-member-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.fb-member-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--purple-950);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-member-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 1px;
}

.fb-member-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.7rem;
  color: rgba(75, 31, 94, 0.5);
  flex-shrink: 0;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(75, 31, 94, 0.04);
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 500;
}

@keyframes pulse-status {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* ============================================================
   CENTER — Feed column
   ============================================================ */

.fb-group--center {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Reset old .fb-group centering when inside the grid */
.fb-layout .fb-group {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ============================================================
   RIGHT SIDEBAR — Intro + Media
   ============================================================ */

/* Intro description */
.fb-intro__desc {
  font-size: 0.875rem;
  color: rgba(75, 31, 94, 0.75);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Stats list */
.fb-intro__stats {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fb-intro__stats li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(75, 31, 94, 0.8);
}

.fb-intro__stats li i {
  width: 20px;
  text-align: center;
  color: var(--gold);
  font-size: 0.9rem;
}

/* Join button */
.fb-intro__join-btn {
  width: 100%;
  padding: 11px 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--purple-800), var(--red));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(75, 31, 94, 0.25);
}

.fb-intro__join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(75, 31, 94, 0.35);
}

/* Media header row */
.fb-media__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fb-media__see-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.fb-media__see-all:hover {
  color: var(--red);
}

/* 3×3 media grid */
.fb-media__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
}

.fb-media__cell {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-color: rgba(75, 31, 94, 0.08);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  position: relative;
}

.fb-media__cell:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

/* "+N more" overlay cell */
.fb-media__cell--more {
  background: linear-gradient(135deg, var(--purple-800), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-media__cell--more::after {
  content: attr(data-count);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .fb-layout {
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto auto;
  }

  .fb-sidebar--right {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .community-page {
    overflow-x: hidden;
  }

  .fb-cover-wrapper,
  .fb-layout {
    width: 100%;
    max-width: 100%;
  }

  .fb-cover-wrapper {
    padding: 0 12px;
  }

  .fb-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: hidden;
  }

  .fb-sidebar--right {
    order: 1;
  }

  .fb-sidebar--left {
    order: 2;
  }

  .fb-group--center {
    order: 3;
  }

  .fb-sidebar,
  .fb-group--center,
  .fb-sidebar__card,
  .fb-composer,
  .fb-post {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .fb-sidebar--left,
  .fb-sidebar--right {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .fb-sidebar--right {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .fb-sidebar--right .fb-sidebar__card {
    padding: 12px;
    border-radius: 14px;
  }

  .fb-sidebar--right .fb-sidebar__heading {
    font-size: 0.875rem;
    margin-bottom: 8px;
  }

  .fb-intro__desc {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .fb-intro__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-bottom: 10px;
  }

  .fb-intro__stats li {
    gap: 6px;
    font-size: 0.75rem;
    line-height: 1.35;
    min-width: 0;
  }

  .fb-intro__stats li i {
    width: 16px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .fb-intro__stats li span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fb-intro__join-btn {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 0.8125rem;
    border-radius: 10px;
  }

  .fb-media__header {
    margin-bottom: 8px;
  }

  .fb-media__see-all {
    font-size: 0.75rem;
  }

  .fb-media__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    overflow: hidden;
    border-radius: 8px;
  }

  .fb-media__cell {
    min-width: 0;
  }

  .fb-sidebar--left .fb-sidebar__card {
    padding: 14px 12px;
  }

  .fb-sidebar--left .fb-sidebar__heading {
    margin-bottom: 10px;
  }

  .fb-sidebar--left .fb-featured-posts,
  .fb-sidebar--left .fb-active-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

  .fb-cover-wrapper .fb-cover {
    height: 160px;
  }

  .fb-cover__group-name {
    font-size: 1.0625rem;
  }

  .fb-composer__action span {
    display: none;
  }

  .fb-post__action span {
    display: none;
  }

  .fb-post__grid img {
    min-height: 100px;
  }

  .fb-layout {
    padding: 0 12px;
  }
}

/* ============================================================
   FEED LOADER & HIGHLIGHT ANIMATIONS
   ============================================================ */

.fb-feed__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: rgba(75, 31, 94, 0.6);
  font-size: 0.875rem;
  font-weight: 600;
}

.spinner-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(75, 31, 94, 0.1);
  border-top-color: var(--red);
  animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
  to {
    transform: rotate(360deg);
  }
}

.post-highlight {
  border-color: var(--gold) !important;
  box-shadow: 0 0 16px rgba(201, 163, 78, 0.35) !important;
  animation: post-flash 2.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes post-flash {
  0% {
    background-color: rgba(201, 163, 78, 0.08);
  }
  30% {
    background-color: rgba(201, 163, 78, 0.08);
  }
  100% {
    background-color: #ffffff;
  }
}

/* ── Mobile Responsiveness (Professional UI) ── */
@media (max-width: 600px) {
  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 8px;
  }
  
  .post-card__head {
    padding: 12px 12px 0;
  }
  
  .post-card__text {
    padding: 10px 12px;
  }
  
  .composer {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 8px;
    padding: 12px;
  }
}