/* community_v2.css — extracted 2026-05-07 from new_design/css/style.css.
 * Community-page-only selectors. Topbar/footer/chat-float dropped
 * (handled by AFKAR base.html). Global body/html/a/button resets dropped.
 * If you regenerate the new_design CSS, re-run tools/extract_community_v2_css.py.
 */

:root {
  --bg-primary: #1a1d20;
  --bg-secondary: #23272d;
  --bg-card: #2a2e35;
  --bg-card-soft: #353a42;
  --border: rgba(61, 220, 151, 0.15);
  --border-hover: rgba(61, 220, 151, 0.45);
  --text-primary: #f5f3ff;
  --text-secondary: #5eead4;
  --text-muted: #8b7faa;
  --accent-purple: #3DDC97;
  --accent-purple-2: #0d9488;
  --accent-green: #3DDC97;
  --accent-green-2: #0d9488;
  --accent-green-3: #5eead4;
  --accent-deep: #1a1d20;
  --accent-red: #ef4444;
  --accent-pink: #5eead4;
  --accent-cyan: #14b8a6;
  --accent-yellow: #5eead4;
  --shadow-glow: 0 8px 40px rgba(61, 220, 151, 0.4);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

/* === COMMUNITY PAGE === */
/* ===== Community Page ===== */
.comm-header {
  margin: 28px 28px 0;
  padding: 28px 32px;
  background: linear-gradient(135deg, #2a2e35 0%, #1a1d20 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 90;
}

.comm-pill-dd[data-open="true"] {
  z-index: 150;
}

.comm-pill-dd[data-open="true"] .comm-dd-menu {
  z-index: 200;
}

.comm-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle 320px at 12% -10%, rgba(61, 220, 151, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.comm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.comm-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.comm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comm-pill i {
  font-size: 12px;
}

.comm-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.comm-pill.active {
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border-color: transparent;
  box-shadow: 0 8px 22px -6px rgba(61, 220, 151, 0.5);
}

/* Filter dropdown pill */
.comm-pill-dd {
  position: relative;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.comm-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comm-pill-btn i {
  font-size: 12px;
}

.comm-pill-btn .dd-chev {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.comm-pill-btn strong {
  font-weight: 900;
  color: #fff;
}

.comm-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.comm-pill-dd[data-open="true"] .comm-pill-btn {
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border-color: transparent;
  box-shadow: 0 8px 22px -6px rgba(61, 220, 151, 0.5);
}

.comm-pill-dd[data-open="true"] .comm-pill-btn strong {
  color: #1a1d20;
}

.comm-pill-dd[data-open="true"] .dd-chev {
  transform: rotate(180deg);
  opacity: 1;
}

.comm-pill-dd.is-active .comm-pill-btn {
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border-color: transparent;
  box-shadow: 0 8px 22px -6px rgba(61, 220, 151, 0.5);
}

.comm-pill-dd.is-active .comm-pill-btn strong {
  color: #1a1d20;
}

.comm-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  background: rgba(31, 31, 31, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  list-style: none;
  display: none;
  z-index: 50;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(61, 220, 151, 0.08);
}

.comm-pill-dd[data-open="true"] .comm-dd-menu {
  display: block;
  animation: ddFadeIn 0.18s ease-out;
}

@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.comm-dd-menu li {
  list-style: none;
}

.comm-dd-menu button {
  display: block;
  width: 100%;
  text-align: right;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.comm-dd-menu button:hover {
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.22), rgba(61, 220, 151, 0.08));
  color: #fff;
  transform: translateX(-2px);
}

.comm-dd-menu button.active {
  background: linear-gradient(135deg, rgba(61, 220, 151, 0.28), rgba(13, 148, 136, 0.22));
  color: #5eead4;
}

.comm-dd-menu button.active:hover {
  background: linear-gradient(135deg, rgba(61, 220, 151, 0.4), rgba(13, 148, 136, 0.28));
  color: #fff;
}

.comm-title-wrap {
  text-align: right;
}

.comm-title {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  /* WB-179 (وحش بلال 2026-05-13): bumped line-height 1.1 → 1.35 + added
     padding-bottom so the italic "y" descender in "Community" stops getting
     clipped. Bilal: "بالمجتمع الy شوية مكصوصة". At 32 px the italic descender
     extends ~12 px below baseline; line-height 1.1 left only ~3 px of headroom
     and the gradient background-clip:text rendered transparent everywhere
     outside the line box. 1.35 gives 11 px of headroom; padding-bottom: 4px
     is a defensive buffer so the descender clears the header's bottom edge. */
  line-height: 1.35;
  padding-bottom: 4px;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.comm-dot {
  color: var(--text-muted);
  font-weight: 400;
}

.comm-title-en {
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  /* WB-179: inline-block so the gradient text-clip box wraps the italic
     descender of "y" correctly (instead of relying on the parent's line box
     which still clips italic descenders in some browsers). */
  display: inline-block;
  line-height: 1.35;
}

.comm-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Popular this week carousel */
.comm-popular {
  margin: 36px 28px 0;
  padding: 32px 24px;
  background: linear-gradient(180deg, #1f1f1f 0%, #1a1d20 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.comm-popular::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle 360px at 80% 20%, rgba(236, 72, 153, 0.18), transparent 65%),
    radial-gradient(circle 360px at 20% 80%, rgba(61, 220, 151, 0.18), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.comm-pop-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: stretch;
}

.comm-pop-left {
  min-width: 0;
}

.comm-pop-right {
  display: flex;
  flex-direction: column;
}

.comm-pop-side-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  justify-content: flex-start;
}

.comm-pop-fire {
  font-size: 18px;
}

.comm-pop-side-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.2px;
}

.comm-top-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.comm-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.comm-user-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--rank-tint, transparent) 100%);
  opacity: 0.18;
  pointer-events: none;
}

.comm-user-row.rank-1 { --rank-tint: rgba(251, 191, 36, 0.5); border-color: rgba(251, 191, 36, 0.35); }
.comm-user-row.rank-2 { --rank-tint: rgba(203, 213, 225, 0.45); border-color: rgba(203, 213, 225, 0.25); }
.comm-user-row.rank-3 { --rank-tint: rgba(217, 119, 6, 0.5); border-color: rgba(217, 119, 6, 0.3); }

.comm-user-row:hover {
  background: rgba(61, 220, 151, 0.08);
  border-color: rgba(61, 220, 151, 0.4);
  transform: translateX(-3px);
}

.comm-crown {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.comm-crown.gold { color: #fbbf24; }
.comm-crown.silver { color: #cbd5e1; }
.comm-crown.bronze { color: #d97706; }

.comm-rank-num {
  width: 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--text-muted);
  flex-shrink: 0;
}

.comm-rank-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.comm-user-row.rank-1 .comm-rank-avatar { border-color: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
.comm-user-row.rank-2 .comm-rank-avatar { border-color: #cbd5e1; }
.comm-user-row.rank-3 .comm-rank-avatar { border-color: #d97706; }

.comm-rank-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.comm-rank-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comm-rank-stat {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.comm-rank-stat i {
  color: #5eead4;
  font-size: 10px;
}

.comm-popular-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.comm-popular-fire {
  font-size: 22px;
}

.comm-popular-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.comm-popular-accent {
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comm-pop-stage {
  position: relative;
  z-index: 1;
  height: 480px;
  overflow: hidden;
}

.comm-pop-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.comm-pop-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 460px;
  margin: -230px 0 0 -160px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(61, 220, 151, 0.18);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateX(0) scale(0.4);
  transition:
    transform 0.7s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.6s ease,
    filter 0.6s ease,
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  pointer-events: none;
  filter: blur(2px);
  z-index: 0;
}

.comm-pop-card.pop-edge-l {
  transform: translateX(-410px) scale(0.5);
  opacity: 0.4;
  filter: blur(1px);
  z-index: 1;
}

.comm-pop-card.pop-mid-l {
  transform: translateX(-300px) scale(0.72);
  opacity: 0.85;
  filter: blur(0);
  z-index: 2;
}

.comm-pop-card.pop-center {
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: blur(0);
  border-color: rgba(61, 220, 151, 0.55);
  box-shadow: 0 0 36px rgba(61, 220, 151, 0.45), 0 28px 60px -14px rgba(0, 0, 0, 0.75);
  z-index: 3;
  pointer-events: auto;
}

.comm-pop-card.pop-mid-r {
  transform: translateX(300px) scale(0.72);
  opacity: 0.85;
  filter: blur(0);
  z-index: 2;
}

.comm-pop-card.pop-edge-r {
  transform: translateX(410px) scale(0.5);
  opacity: 0.4;
  filter: blur(1px);
  z-index: 1;
}

.comm-pop-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comm-pop-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #fff;
  text-align: right;
  direction: rtl;
}

.comm-pop-name {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 2px;
}

.comm-pop-meta {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.comm-pop-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #5eead4;
}

.comm-pop-views i {
  font-size: 10px;
}

@media (max-width: 900px) {
  .comm-pop-grid { grid-template-columns: 1fr; }
  .comm-pop-card { width: 200px; height: 280px; margin: -140px 0 0 -100px; }
  .comm-pop-card.pop-edge-l { transform: translateX(-220px) scale(0.5); }
  .comm-pop-card.pop-mid-l { transform: translateX(-160px) scale(0.7); }
  .comm-pop-card.pop-mid-r { transform: translateX(160px) scale(0.7); }
  .comm-pop-card.pop-edge-r { transform: translateX(220px) scale(0.5); }
  .comm-pop-stage { height: 300px; }
  .comm-popular { margin-left: 18px; margin-right: 18px; padding: 24px 16px; }
}

/* Category filters between popular and grid */
.comm-cats {
  margin: 28px 28px 0;
}

.comm-cats-head {
  margin-bottom: 14px;
}

.comm-cats-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.2px;
}

.comm-cats-accent {
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comm-cats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comm-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comm-cat-pill i {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.comm-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.comm-cat-pill:hover i {
  color: #5eead4;
}

.comm-cat-pill.active {
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border-color: transparent;
  box-shadow: 0 8px 22px -6px rgba(61, 220, 151, 0.5);
}

.comm-cat-pill.active i {
  color: #1a1d20;
}

.comm-section {
  margin: 24px 28px 0;
  padding-bottom: 40px;
}

.comm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.comm-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(61, 220, 151, 0.18);
  box-shadow: 0 6px 24px -10px rgba(61, 220, 151, 0.25);
  cursor: pointer;
  transition: all 0.35s ease;
}

.comm-card-media:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 220, 151, 0.55);
  box-shadow: 0 0 22px rgba(61, 220, 151, 0.4), 0 16px 40px -10px rgba(61, 220, 151, 0.3);
}

.comm-card-media img,
.comm-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.comm-card-media:hover img,
.comm-card-media:hover video {
  transform: scale(1.04);
}

.comm-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.comm-badge i {
  font-size: 10px;
  color: #5eead4;
}

.comm-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.comm-likes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.comm-likes:hover {
  color: #ec4899;
}

.comm-likes i {
  font-size: 14px;
}

.comm-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comm-username {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.comm-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.comm-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0 4px;
}

.comm-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.comm-loadmore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comm-loadmore:hover {
  background: rgba(61, 220, 151, 0.1);
  border-color: rgba(61, 220, 151, 0.4);
  transform: translateY(-2px);
}

.comm-loadmore i {
  color: #3DDC97;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .comm-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .comm-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .comm-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .comm-title-wrap {
    text-align: right;
  }
}

@media (max-width: 900px) {
  .comm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .comm-header,
  .comm-section {
    margin-left: 18px;
    margin-right: 18px;
  }
  .comm-header {
    padding: 22px 20px;
  }
  .comm-title {
    font-size: 26px;
  }
}

@media (max-width: 540px) {
  .comm-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Post Modal (image post detail) ===== */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.post-modal.is-open {
  display: flex;
  animation: pmFadeIn 0.18s ease-out;
}

@keyframes pmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.post-modal-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 380px;
  gap: 0;
  width: min(1080px, 100%);
  height: min(720px, 92vh);
  background: #1a1d20;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.7), 0 0 60px -20px rgba(61, 220, 151, 0.25);
  animation: pmSlideIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes pmSlideIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


.post-modal-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1010;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.post-modal-close:hover {
  background: rgba(239, 68, 68, 0.55);
  border-color: rgba(239, 68, 68, 0.7);
  transform: rotate(90deg) scale(1.05);
}

.post-modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1010;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.post-modal-nav.prev { right: 22px; }
.post-modal-nav.next { left: 22px; }

.post-modal-nav:hover {
  background: rgba(61, 220, 151, 0.2);
  border-color: rgba(61, 220, 151, 0.55);
  color: #5eead4;
}

.post-modal-nav.prev:hover { transform: translateY(-50%) translateX(4px); }
.post-modal-nav.next:hover { transform: translateY(-50%) translateX(-4px); }

.post-modal-image {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.post-modal-image img,
.post-modal-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-modal-side {
  display: flex;
  flex-direction: column;
  background: #1a1d20;
  border-left: 1px solid var(--border);
  /* CV2-MODAL-SCROLL-FIX (2026-05-07 Zain): was overflow:hidden which
     clipped long prompts and hid the like/comment/bookmark action bar
     below them. Switched to overflow-y:auto so the full sidebar scrolls
     when content exceeds viewport height. */
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.post-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.post-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3DDC97;
  color: #1a1d20;
  font-size: 16px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.post-modal-user-info {
  flex: 1;
  min-width: 0;
}

.post-modal-name {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-modal-bio {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-modal-follow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 900;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.post-modal-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(61, 220, 151, 0.5);
}

.post-modal-follow.is-following {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.post-modal-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.post-modal-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.55;
}

.post-modal-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.post-modal-label i {
  color: #5eead4;
  font-size: 10px;
}

.post-modal-prompt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Cairo', monospace;
  direction: ltr;
  text-align: left;
}

.post-modal-copy {
  position: absolute;
  top: 14px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-modal-copy:hover {
  background: rgba(61, 220, 151, 0.1);
  border-color: rgba(61, 220, 151, 0.4);
  color: #5eead4;
}

.post-modal-copy.copied {
  background: rgba(61, 220, 151, 0.18);
  color: #5eead4;
}

.post-modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.post-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-modal-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.post-modal-action[data-action="like"]:hover { color: #ec4899; }
.post-modal-action[data-action="like"].liked { color: #ec4899; }
.post-modal-action[data-action="like"].liked i::before { font-weight: 900; content: "\f004"; }
.post-modal-action[data-action="bookmark"]:hover { color: #fbbf24; }
.post-modal-action[data-action="bookmark"].bookmarked { color: #fbbf24; }

/* WB-197 (وحش بلال 2026-05-13): زر حذف منشور — لون أحمر واضح (danger)
   لما يكون hover، مرئي محايد بدون hover حتى ما يخلي البار كله أحمر. */
.post-modal-action[data-action="delete"] { color: rgba(248, 113, 113, 0.78); }
.post-modal-action[data-action="delete"]:hover {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}

/* WB-209 (وحش بلال 2026-05-13): repost button (data-action="repost").
   Hover purple to match the brand. WB-209c added .wb209-reposted active
   state — green/check to signal the user has already reposted; click
   again to undo. The inline "إعادة نشر" / "مُعاد نشره" label sits next
   to the icon and inherits the active color. */
.post-modal-action[data-action="repost"]:hover { color: #c4b5fd; }
.post-modal-action[data-action="repost"].wb209-reposted {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.10);
}
.post-modal-action[data-action="repost"].wb209-reposted:hover {
  background: rgba(74, 222, 128, 0.18);
}
.wb209-repost-label {
  font-size: 12.5px;
  font-weight: 700;
}

.post-modal-action i {
  font-size: 16px;
}

.post-modal-comments {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.post-modal-comments::-webkit-scrollbar { width: 6px; }
.post-modal-comments::-webkit-scrollbar-track { background: transparent; }
.post-modal-comments::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 6px; }

.post-comment {
  display: flex;
  gap: 10px;
}

.post-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-comment-body {
  flex: 1;
  min-width: 0;
}

.post-comment-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.post-comment-name {
  font-size: 12.5px;
  font-weight: 900;
  color: #fff;
}

.post-comment-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

.post-comment-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.post-modal-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.post-modal-input-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3DDC97;
  color: #1a1d20;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-modal-input input {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.post-modal-input input:focus {
  border-color: rgba(61, 220, 151, 0.45);
}

.post-modal-input input::placeholder {
  color: var(--text-muted);
}

.post-modal-input-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3DDC97, #0d9488);
  color: #1a1d20;
  border: none;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.post-modal-input-send:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px -4px rgba(61, 220, 151, 0.5);
}

.comm-card-media { cursor: pointer; }

/* Modal category tags */
.post-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px 0;
}

.post-modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(61, 220, 151, 0.1);
  border: 1px solid rgba(61, 220, 151, 0.3);
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50px;
  letter-spacing: 0.2px;
}

.post-modal-tag i {
  font-size: 9px;
}

/* Category filter — rise-up animation */
.comm-card.cat-hidden { display: none; }

@keyframes commCardRise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.comm-card.cat-rise {
  animation: commCardRise 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) backwards;
}

@media (max-width: 900px) {
  .post-modal { padding: 0; }
  .post-modal-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 45vh 1fr;
    height: 100vh;
    border-radius: 0;
  }
  .post-modal-image { aspect-ratio: auto; }
  .post-modal-side { border-left: none; border-top: 1px solid var(--border); }
}


/* === RESPONSIVE (community-relevant only) === */
/* ===== Responsive ===== */
@media (max-width: 1400px) {
  .topnav-link {
    padding: 8px 10px;
    font-size: 13px;
  }
  .topnav {
    gap: 2px;
  }
  .masonry {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1180px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .topnav {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 8px 0;
    margin-top: 6px;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .masonry {
    grid-template-columns: repeat(4, 1fr);
  }
  .row-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .qa-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-cards {
    grid-template-columns: 1fr;
    padding: 14px 18px 0;
  }
  .content-grid {
    grid-template-columns: 1fr;
    padding: 14px 18px 0;
  }
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
  .row-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 14px 18px 24px;
  }
  .grid-arrow { display: none; }
  .qa-panel {
    grid-template-columns: 1fr;
    margin: 14px 18px 0;
    padding: 22px;
  }
  .featured-model {
    grid-template-columns: 1fr;
    margin: 14px 18px 0;
    padding: 22px;
  }
  .fm-marquee {
    grid-template-columns: repeat(4, 1fr);
  }
  .fm-title {
    font-size: 30px;
  }
  .fm-highlight {
    font-size: 34px;
  }
  .sd-banner {
    height: auto;
    padding: 40px 0;
  }
  .sd-inner {
    padding: 0 22px;
  }
  .cat-section {
    margin: 14px 18px 0;
  }
  .cat-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .char-banner {
    padding: 36px 0;
    min-height: auto;
  }
  .char-inner {
    grid-template-columns: 1fr;
    padding: 0 22px;
    gap: 30px;
    text-align: center;
  }
  .char-content {
    align-items: center;
  }
  .char-title {
    font-size: 32px;
  }
  .char-highlight {
    font-size: 40px;
  }
  .char-gallery {
    flex-wrap: wrap;
  }
  .char-card {
    width: 140px;
    height: 200px;
  }
  .char-card-3 {
    width: 160px;
    height: 230px;
  }
  .sd-title {
    font-size: 32px;
  }
  .sd-highlight {
    font-size: 42px;
  }
  .sd-stats {
    gap: 18px;
  }
  .qa-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .qa-heading {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .row-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .promo-title {
    font-size: 32px;
  }
  .hero-card-title {
    font-size: 22px;
  }
  .lang-btn span,
  .brand-icon { display: none; }
}


/* === Layout safety overrides — added by Zain (CV2) === */
/* Make sure community CSS doesn't fight AFKAR base.html on body. */
.comm-header, .comm-popular, .comm-cats, .comm-section { font-family: inherit; }
