/* Feed cộng đồng đa chủ đề — dùng chung Chung Sức / Trao đổi thẻ / sự kiện sau */
.community-section {
  margin-top: 0;
}
.community-section .section-head {
  margin-bottom: 12px;
}
.community-section .section-head h2 {
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 900;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.community-section .section-head p {
  color: #9b97b0;
  font-size: 13px;
  margin: 0;
}
.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.topic-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #bbb;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  font-family: inherit;
}
.topic-tab:hover {
  border-color: rgba(0, 234, 255, 0.35);
  color: #fff;
}
.topic-tab.active {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.45), rgba(0, 180, 216, 0.25));
  border-color: rgba(0, 234, 255, 0.45);
  color: #fff;
}
.compose-card {
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.rep-tip {
  font-size: 12px;
  line-height: 1.5;
  color: #b8b4c8;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 234, 255, 0.06));
  border: 1px solid rgba(212, 175, 55, 0.25);
}
.rep-tip strong {
  color: #d4af37;
}
.rep-tip b {
  color: #00eaff;
}
.feed-avatar-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.feed-user-link {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.feed-user-link:hover {
  color: #00eaff;
  text-decoration: underline;
}
.compose-card h3 {
  font-size: 14px;
  color: #00eaff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compose-textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
}
.compose-textarea:focus {
  border-color: #00eaff;
}
.compose-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-img {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-post {
  padding: 10px 18px;
  background: linear-gradient(135deg, #8a2be2, #5e1db3);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-post:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.img-preview-wrap {
  margin-top: 10px;
  position: relative;
  display: none;
}
.img-preview-wrap.show {
  display: block;
}
.img-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}
.btn-remove-img {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 51, 102, 0.9);
  border: none;
  color: #fff;
  cursor: pointer;
}
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-item {
  background: #12101c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
}
/* Thông báo admin — nổi bật như notification */
.feed-item-announce {
  border: 1px solid rgba(255, 213, 74, 0.55) !important;
  background:
    linear-gradient(145deg, rgba(255, 213, 74, 0.14), rgba(138, 43, 226, 0.1) 55%, rgba(18, 16, 28, 0.98)) !important;
  box-shadow: 0 0 0 1px rgba(255, 213, 74, 0.12), 0 10px 36px rgba(255, 180, 0, 0.12);
  position: relative;
}
.announce-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #1a1400;
  background: linear-gradient(90deg, #ffd54a, #ffb300 60%, #ff9f43);
  box-shadow: 0 4px 14px rgba(255, 180, 0, 0.25);
}
.announce-bar i {
  font-size: 18px;
}
.announce-name {
  color: #ffd54a !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}
.announce-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffd54a, #ff9f43);
  border: 2px solid rgba(255, 213, 74, 0.6);
  flex-shrink: 0;
}
.announce-ico {
  font-size: 18px;
  line-height: 1;
}
.feed-badge-announce {
  background: rgba(255, 213, 74, 0.2) !important;
  color: #ffd54a !important;
  border-color: rgba(255, 213, 74, 0.5) !important;
  animation: annPulse 2.2s ease-in-out infinite;
}
@keyframes annPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 213, 74, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 213, 74, 0);
  }
}
.feed-content-announce {
  font-size: 14px !important;
  color: #fff !important;
  line-height: 1.6 !important;
  font-weight: 600;
}
.feed-content-announce strong,
.feed-content-announce b {
  color: #ffd54a;
  font-weight: 900;
}
.announce-cta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 900;
  color: #00eaff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.user-rank-badge.rank-announce {
  color: #ffd54a !important;
  border-color: rgba(255, 213, 74, 0.5) !important;
  background: rgba(255, 213, 74, 0.12) !important;
}
.feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.feed-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0, 234, 255, 0.3);
  object-fit: cover;
  flex-shrink: 0;
}
.feed-meta {
  min-width: 0;
  flex: 1 1 auto;
}
.feed-user {
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.feed-time {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}
/* Huy hiệu rank theo số kết bạn (follow) */
.user-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #bbb;
  white-space: nowrap;
  line-height: 1.3;
}
.user-rank-badge .user-rank-label {
  font-size: 10px;
}
.user-rank-badge .user-rank-count {
  opacity: 0.75;
  font-size: 9px;
}
.user-rank-badge.rank-newbie { color: #9b97b0; border-color: rgba(155, 151, 176, 0.35); }
.user-rank-badge.rank-friendly {
  color: #7dffa8;
  border-color: rgba(125, 255, 168, 0.4);
  background: rgba(125, 255, 168, 0.08);
}
.user-rank-badge.rank-known {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.1);
}
.user-rank-badge.rank-trusted {
  color: #00eaff;
  border-color: rgba(0, 234, 255, 0.45);
  background: rgba(0, 234, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.15);
}
.user-rank-badge.rank-star {
  color: #ff9f43;
  border-color: rgba(255, 159, 67, 0.5);
  background: rgba(255, 159, 67, 0.12);
}
.user-rank-badge.rank-legend {
  color: #d4af37;
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255, 215, 0, 0.08));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}
.btn-follow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 234, 255, 0.4);
  background: rgba(0, 234, 255, 0.1);
  color: #00eaff;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-follow:hover {
  background: rgba(0, 234, 255, 0.2);
  border-color: #00eaff;
}
.btn-follow.is-following {
  background: rgba(125, 255, 168, 0.1);
  border-color: rgba(125, 255, 168, 0.4);
  color: #7dffa8;
}
.btn-follow i { font-size: 14px; }
.cmt-rank {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.9;
}
.feed-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 800;
  background: rgba(255, 213, 74, 0.12);
  color: #ffd54a;
  border: 1px solid rgba(255, 213, 74, 0.3);
  white-space: nowrap;
}
/* SCAM: chỉ nhãn dán, không bọc khung đỏ cả bài */
.feed-badge.topic-scamwarn,
.feed-badge.scam-badge {
  background: #e53955 !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em;
  padding: 2px 7px !important;
  font-size: 10px !important;
}
.feed-badge.topic-chungsuc {
  background: rgba(0, 234, 255, 0.1);
  color: #7dd3fc;
  border-color: rgba(0, 234, 255, 0.35);
}
.feed-badge.topic-traodoi {
  background: rgba(255, 213, 74, 0.12);
  color: #ffd54a;
  border-color: rgba(255, 213, 74, 0.3);
}
.feed-content {
  font-size: 13px;
  line-height: 1.55;
  color: #ddd;
  white-space: pre-wrap;
  word-break: break-word;
}
.feed-images-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
}
.feed-images-grid.n2 { grid-template-columns: 1fr 1fr; }
.feed-images-grid.n3 { grid-template-columns: 1fr 1fr; }
.feed-images-grid.n3 .feed-image-multi:first-child { grid-column: 1 / -1; }
.feed-images-grid.n4 { grid-template-columns: 1fr 1fr; }
.feed-images-grid.n5 { grid-template-columns: 1fr 1fr; }
.feed-image-multi {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: #0a0914;
}
@media (min-width: 640px) {
  .feed-image-multi { height: 140px; }
}
.feed-image {
  margin-top: 10px;
  border-radius: 12px;
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.feed-stats {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #888;
}
.feed-stats i {
  color: #00eaff;
}
.btn-toggle-cmt {
  background: none;
  border: none;
  color: #00eaff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.comments-box {
  margin-top: 10px;
  display: none;
}
.comments-box.open {
  display: block;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.comment-item {
  display: flex;
  gap: 8px;
  font-size: 13px;
}
.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}
.comment-body {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: 10px;
  flex: 1;
}
.comment-name {
  font-weight: 800;
  color: #00eaff;
  font-size: 12px;
}
.comment-text {
  color: #ccc;
  margin-top: 2px;
  line-height: 1.4;
}
.comment-form {
  display: flex;
  gap: 8px;
}
.comment-input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.btn-comment {
  padding: 8px 14px;
  background: #8a2be2;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.quick-cmt {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.quick-cmt button {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #aaa;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.feed-empty {
  text-align: center;
  padding: 28px 12px;
  color: #666;
  font-size: 13px;
}
.feed-pager {
  margin-top: 14px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.feed-pager.show {
  display: flex;
}
.feed-pager-info {
  font-size: 12px;
  color: #999;
  font-weight: 700;
  text-align: center;
}
.feed-pager-info b {
  color: #00eaff;
}
.feed-pager-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.pg-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #ddd;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.pg-btn:hover:not(:disabled) {
  border-color: #00eaff;
  color: #fff;
}
.pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pg-btn.active {
  background: linear-gradient(135deg, #8a2be2, #5e1db3);
  border-color: transparent;
  color: #fff;
}
.pg-btn.nav {
  min-width: 72px;
  color: #00eaff;
}
.feed-new-banner {
  display: none;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.35);
  color: #9ff5c8;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.feed-new-banner.show {
  display: block;
}
.login-hint {
  text-align: center;
  padding: 12px;
  background: rgba(138, 43, 226, 0.1);
  border: 1px dashed #8a2be2;
  border-radius: 12px;
  color: #bbb;
  font-size: 13px;
  margin-bottom: 14px;
}
.login-hint a {
  color: #00eaff;
  font-weight: 800;
}
.feed-item.rt-flash {
  animation: commRtIn 0.45s ease;
  box-shadow: 0 0 0 1px rgba(0, 234, 255, 0.35);
}
@keyframes commRtIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.feed-seo-link {
  color: inherit;
  text-decoration: none;
}
.feed-seo-link:hover .feed-content {
  color: #fff;
}
