/* ==========================================================================
   SHROOMS SOCIAL - FULL-WIDTH, MULTI-THEME & APP-STYLED (NO WINDOW SCROLL)
   ========================================================================== */

/* --- Light Theme Variables (Default) --- */
:root, [data-theme="light"] {
  --bg-app: #f6f8f6;
  --bg-card: #ffffff;
  --bg-subtle: #f0f4f0;
  --bg-hover: #eaf1eb;
  --bg-active-pill: #e6f3eb;
  --bg-input: #f1f5f2;
  
  --primary: #1b4332;
  --primary-hover: #143326;
  --primary-light: #2d6a4f;
  --primary-tint: #eaf4ee;
  
  --accent-orange: #f26430;
  --accent-orange-bg: #fff1eb;
  --accent-blue: #0284c7;
  --accent-cyan: #0d9488;
  --accent-purple: #7c3aed;
  
  --text-main: #18221b;
  --text-secondary: #57655c;
  --text-muted: #7d8c82;
  --text-light: #9cb0a3;
  
  --border-light: #e5ece6;
  --border-card: #e8eee8;
  --border-focus: #52b788;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 2px 8px rgba(22, 38, 26, 0.03), 0 1px 3px rgba(22, 38, 26, 0.02);
  --shadow-hover: 0 6px 18px rgba(22, 38, 26, 0.06), 0 2px 5px rgba(22, 38, 26, 0.03);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.16), 0 8px 20px rgba(0, 0, 0, 0.08);

  --nav-backdrop: rgba(255, 255, 255, 0.94);
  --bottom-bar-bg: rgba(255, 255, 255, 0.97);

  --brand-cap-color: #1b4332;
  --brand-stem-color: #1b4332;
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
  --bg-app: #0e1410;
  --bg-card: #151d17;
  --bg-subtle: #1c261f;
  --bg-hover: #223026;
  --bg-active-pill: #1f3d2b;
  --bg-input: #1a241c;
  
  --primary: #40916c;
  --primary-hover: #52b788;
  --primary-light: #74c69d;
  --primary-tint: #173824;
  
  --accent-orange: #ff7849;
  --accent-orange-bg: #2d1b14;
  --accent-blue: #38bdf8;
  --accent-cyan: #2dd4bf;
  --accent-purple: #a78bfa;
  
  --text-main: #eff4f0;
  --text-secondary: #a3b5a8;
  --text-muted: #798c7f;
  --text-light: #526357;
  
  --border-light: #233126;
  --border-card: #1f2c22;
  --border-focus: #52b788;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4);

  --nav-backdrop: rgba(21, 29, 23, 0.94);
  --bottom-bar-bg: rgba(21, 29, 23, 0.97);

  --brand-cap-color: #52b788;
  --brand-stem-color: #74c69d;
}

/* --- Dimensions & Constants --- */
:root {
  --header-height: 64px;
  --sidebar-left-width: 270px;
  --sidebar-right-width: 350px;
  --bottom-bar-height: 60px;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-theme: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* --- Base & Reset (No Main Window Scroll) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* LOCK MAIN WINDOW SCROLL */
html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* No main window scroll! */
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-theme);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Custom Sleek Scrollbars for Inner Containers */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ================= FULL WIDTH CONTAINERS ================= */
.full-width-container {
  width: 100%;
  max-width: 100%;
  padding: 0 24px;
}

/* ================= TOP HEADER NAVIGATION ================= */
.top-nav,
.app-header {
  flex-shrink: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--nav-backdrop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: var(--transition-theme);
  box-sizing: border-box;
}

.nav-container,
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  padding: 0 24px;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mobile-drawer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

.mobile-drawer-toggle svg {
  width: 22px;
  height: 22px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.brand-logo:hover .brand-icon {
  transform: rotate(-6deg) scale(1.05);
}

.brand-svg-cap {
  fill: var(--brand-cap-color);
  transition: fill 0.25s ease;
}

.brand-svg-stem {
  stroke: var(--brand-stem-color);
  transition: stroke 0.25s ease;
}

.brand-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.brand-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52b788;
  margin-left: 2px;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 680px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-wrapper input:focus {
  background-color: var(--bg-card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
}

.search-quick-tags {
  position: absolute;
  right: 14px;
  pointer-events: none;
  font-size: 11px;
  color: var(--text-muted);
}

.search-quick-tags kbd {
  background: var(--bg-hover);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: monospace;
}

/* Nav Actions Right */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 19px;
  height: 19px;
}

[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* === GUEST VS LOGGED IN STATE CONTROLS === */
.header-guest-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-user-box {
  display: none;
  align-items: center;
  gap: 12px;
}

body.logged-in .header-guest-box { display: none !important; }
body.logged-in .header-user-box { display: flex; }
body.logged-in .guest-only { display: none !important; }
body.guest-mode .logged-in-only { display: none !important; }
body.guest-mode #headerNewPostBtn,
body:not(.logged-in) #headerNewPostBtn { display: none !important; }
@media (min-width: 901px) {
  body.logged-in #headerNewPostBtn { display: inline-flex !important; }
}
@media (max-width: 900px) {
  #headerNewPostBtn,
  .btn-new-post,
  body #headerNewPostBtn,
  body.logged-in #headerNewPostBtn,
  body.logged-in .btn-new-post {
    display: none !important;
  }
}

/* ================= GUEST BLURRED SIDEBARS ================= */
@media (min-width: 901px) {
  body.guest-mode .left-sidebar,
  body.guest-mode .right-sidebar {
    position: relative;
  }
}

body.guest-mode .left-sidebar .sidebar-scrollable,
body.guest-mode .right-sidebar .sidebar-scrollable {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.72;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Sidebar Guest Unlock Overlay */
.sidebar-guest-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 15;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  animation: fadeIn 0.25s ease;
}

[data-theme="dark"] .sidebar-guest-overlay {
  background: rgba(15, 23, 20, 0.48);
}

body.guest-mode .sidebar-guest-overlay {
  display: flex;
}

body.logged-in .sidebar-guest-overlay {
  display: none !important;
}

.sidebar-guest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  max-width: 240px;
  width: 100%;
  pointer-events: auto;
  gap: 8px;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-guest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  border-color: var(--primary-light);
}

.sidebar-guest-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 2px;
}

.sidebar-guest-card strong {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-guest-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.sidebar-guest-card .sidebar-lock-login-btn {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  height: 32px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-guest-card .sidebar-lock-login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Guest Locked Post Launcher */
body.guest-mode .create-post-launcher .composer-launch-prompt {
  color: var(--text-muted);
}

body.guest-mode .create-post-launcher .composer-launch-prompt::before {
  content: '🔒 ';
  font-size: 13px;
  margin-right: 4px;
}

body.guest-mode .create-post-launcher {
  cursor: pointer;
}

body.guest-mode .create-post-card.composer-dialog {
  display: none !important;
}

/* Guest Top Welcome Callout removed */
.guest-welcome-strip {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  padding: 8px 20px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
}

.btn-outline {
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 7px 18px;
  font-size: 13.5px;
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary-light);
}

.btn-login-nav,
.btn-signup-nav {
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  box-sizing: border-box;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login-nav {
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
}

.btn-login-nav:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-signup-nav {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-signup-nav:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
}

/* Header New Post Button (Logged In) */
.btn-new-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(27, 67, 50, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.btn-new-post:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.32);
}

.btn-new-post:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.2);
}

.btn-new-post svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  flex-shrink: 0;
  display: block;
  margin: 0;
  transition: transform 0.2s ease;
}

.btn-new-post:hover svg {
  transform: rotate(90deg);
}

.btn-new-post span {
  display: inline-block;
  line-height: 1;
  font-size: 13.5px;
  font-weight: 700;
  color: inherit;
}

/* Dark Theme variant */
[data-theme="dark"] .btn-new-post {
  background-color: var(--primary);
  color: #0d1610;
  box-shadow: 0 2px 8px rgba(64, 145, 108, 0.35);
}

[data-theme="dark"] .btn-new-post:hover {
  background-color: var(--primary-hover);
  color: #0d1610;
  box-shadow: 0 4px 14px rgba(82, 183, 136, 0.5);
}

[data-theme="dark"] .btn-new-post svg {
  stroke: #0d1610;
}

/* User Profile Menu */
.user-profile-menu {
  position: relative;
}

.profile-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.profile-pill-btn:hover {
  background-color: var(--bg-hover);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.chevron-down {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.profile-dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 120;
}

.profile-dropdown-content.show { display: flex; }

.dropdown-user-header { padding: 8px 10px; }
.dropdown-user-header strong { display: block; font-size: 14px; }
.dropdown-user-header span { font-size: 12px; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 6px 0; }

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.dropdown-item.text-danger { color: #ef4444; }
.dropdown-item.text-danger:hover { background-color: rgba(239, 68, 68, 0.1); }

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.icon-button:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.icon-button svg { width: 19px; height: 19px; }

.notification-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  border: 2px solid var(--bg-card);
}

/* ================= FULL WIDTH APP LAYOUT (FITS EXACT VIEWPORT) ================= */
.full-width-layout,
.app-layout {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  overflow: hidden; /* Contains individual scrolling inside columns */
  box-sizing: border-box;
}

/* Card Component (Used inside Feed posts) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-theme);
}

/* ================= LEFT SIDEBAR (PINNED LEFT WITH VERTICAL LINE) ================= */
.left-sidebar {
  width: var(--sidebar-left-width);
  height: 100%;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light); /* VERTICAL LINE ON RIGHT OF LEFT SIDEBAR */
  overflow-y: auto;
  padding: 16px 14px 30px 24px;
}

.primary-nav ul {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.nav-link.active {
  background-color: var(--bg-active-pill);
  color: var(--primary-light);
  font-weight: 700;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Dividers (Shared between left and right sidebars) */
.sidebar-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 14px 4px;
}

/* Section Header (Shared between left and right sidebars) */
.sidebar-section {
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
}

.section-header h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.see-all-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-light);
}

.see-all-link:hover { text-decoration: underline; }

/* My Communities List */
.community-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.community-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.community-item:hover { background-color: var(--bg-hover); }

.community-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.community-name {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Categories List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color 0.15s ease;
}

.category-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.category-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg { width: 16px; height: 16px; }

/* ================= MAIN FEED (INDEPENDENT INNER SCROLL & CENTERED CONTENT) ================= */
.feed-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 18px 24px 40px;
  display: flex;
  justify-content: center; /* Centers the content block in the middle column */
  align-items: flex-start; /* CRITICAL: Allows natural content height and prevents flex compression */
}

/* Reddit-Style Centered Container for Middle Column Content */
.feed-container {
  width: 100%;
  max-width: 680px; /* Reduced optimal size centered like Reddit */
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feed-container > * {
  flex-shrink: 0; /* Prevents any card or widget from being squashed */
}

.feed-container-wide,
.feed-container.feed-wide {
  max-width: 860px;
}

/* Home Feed Layout Customization:
   1. Top story widget spans edge-to-edge covering the space between left and right sidebars.
   2. Clean borderless design: no card border, no cut-out box, completely seamless professional presentation.
   3. Rest of container below stories centered at optimal reading width (max-width: 530px).
*/
.home-page .feed-main {
  padding: 10px 0 40px;
}

.home-page .feed-container {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.home-page .stories-section {
  width: 100%;
  max-width: 100%;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 6px 36px 8px;
  margin-bottom: 2px;
}

.home-page .feed-container > :not(.stories-section) {
  width: 100%;
  max-width: min(530px, calc(100% - 24px));
  margin-inline: auto;
  box-sizing: border-box;
}

/* Stories / Reel Section (Status Row) */
.stories-section {
  width: 100%;
  min-height: 110px;
  background: transparent;
  border: none !important;
  border-radius: 0 !important;
  padding: 6px 36px 8px;
  box-shadow: none !important;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.stories-track {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.stories-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.stories-track.is-dragging .story-item {
  pointer-events: none;
}

.stories-track::-webkit-scrollbar { display: none; }

.stories-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e2e8f0);
  color: var(--text-main, #0f172a);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.18s ease, background-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
  opacity: 0.95;
}

.stories-scroll-btn:hover {
  opacity: 1;
  background: var(--bg-hover, #f8fafc);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.stories-scroll-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.stories-scroll-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.stories-scroll-prev {
  left: 8px;
}

.stories-scroll-next {
  right: 8px;
}

.stories-scroll-btn[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .stories-scroll-btn {
    display: none !important;
  }
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  width: 72px;
  transition: transform 0.2s ease;
}

.story-item:hover { transform: translateY(-2px); }

.story-avatar-wrap {
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gradient-ring-1 { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.gradient-ring-2 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.gradient-ring-3 { background: linear-gradient(135deg, #667eea, #764ba2); }
.gradient-ring-4 { background: linear-gradient(135deg, #f77062, #fe5196); }
.gradient-ring-5 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gradient-ring-6 { background: linear-gradient(135deg, #fa709a, #fee140); }
.gradient-ring-7 { background: linear-gradient(135deg, #30cfd0, #330867); }
.gradient-ring-8 { background: linear-gradient(135deg, #b224ef, #7579ff); }
.gradient-ring-9 { background: linear-gradient(135deg, #ff0844, #ffb199); }

.add-story-wrap {
  background: transparent;
  border: 1.5px dashed var(--primary-light);
}

.add-story-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.add-story-icon svg { width: 22px; height: 22px; }

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-card);
  display: block;
}

.story-username {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Create Post Card */
.create-post-card {
  padding: 16px 20px;
  width: 100%;
}

.create-post-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.guest-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.guest-avatar-placeholder svg { width: 20px; height: 20px; }

.input-fake {
  flex: 1;
  background-color: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border-light);
}

.input-fake:hover {
  background-color: var(--bg-hover);
  color: var(--text-secondary);
}

.create-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.media-type-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.post-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.post-type-btn svg { width: 17px; height: 17px; }

.post-type-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.btn-post-submit {
  padding: 8px 24px;
  font-size: 14px;
}

/* Feed Tabs & Filter */
.feed-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding: 0 4px;
}

.feed-tabs {
  display: flex;
  gap: 24px;
}

.feed-tab {
  padding: 10px 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  transition: color 0.15s ease;
}

.feed-tab:hover { color: var(--text-main); }

.feed-tab.active {
  color: var(--primary-light);
  font-weight: 700;
}

.feed-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: var(--primary-light);
  border-radius: 2px 2px 0 0;
}

.filter-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.filter-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.filter-btn svg { width: 18px; height: 18px; }

/* Posts Stream */
.posts-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.feed-post {
  padding: 0;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, var(--transition-theme);
}

.feed-post:hover { box-shadow: var(--shadow-hover); }

/* Post Header */
.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.author-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.author-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
}

.verified-badge {
  width: 15px;
  height: 15px;
  color: var(--primary-light);
  display: flex;
  align-items: center;
}

.verified-badge svg { width: 100%; height: 100%; }

.author-handle {
  font-size: 13.5px;
  color: var(--text-muted);
}

.dot-separator {
  color: var(--text-light);
  font-size: 13px;
}

.post-time {
  font-size: 13px;
  color: var(--text-muted);
}

.author-bio {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-category-pill {
  background-color: var(--bg-active-pill);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.post-options-btn {
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.post-options-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.post-options-btn svg { width: 18px; height: 18px; }

/* Post Content */
.post-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text-main);
  margin-bottom: 8px;
}

.post-description {
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  background-color: var(--bg-active-pill);
  color: var(--primary-light);
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tag:hover { background-color: var(--bg-hover); }

/* Post Media Gallery */
.post-gallery-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  width: 100%;
}

.gallery-main {
  position: relative;
  height: 270px;
  background-color: #0d1310;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.featured-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.08);
}

.gallery-arrow svg { width: 18px; height: 18px; }
.prev-arrow { left: 10px; }
.next-arrow { right: 10px; }

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 270px;
}

.thumb-box {
  flex: 1;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.thumb-box:hover img { transform: scale(1.05); }

.thumb-overlay-box { position: relative; }

.overlay-count {
  position: absolute;
  inset: 0;
  background: rgba(18, 30, 22, 0.65);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Post 2 Image Strip */
.post-image-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  width: 100%;
}

.strip-item {
  height: 140px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.strip-item:hover img { transform: scale(1.05); }

/* Post Footer / Actions */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.left-actions, .right-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.post-action-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.post-action-btn svg { width: 18px; height: 18px; }

.upvote-btn .action-icon svg {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.upvote-btn:hover .action-icon svg {
  transform: scale(1.15) translateY(-1px);
}

.upvote-btn.active {
  color: #d9480f;
  background-color: var(--accent-orange-bg);
}

.upvote-btn.active .action-icon svg {
  fill: #d9480f;
  transform: scale(1.15) translateY(-1px);
}

.save-btn.active { color: var(--primary-light); }
.save-btn.active svg { fill: var(--primary-light); }

/* Single Image Post Wrapper */
.single-image-wrapper {
  position: relative;
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background-color: var(--bg-subtle);
  cursor: pointer;
}

.single-image-wrapper img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.single-image-wrapper:hover img {
  transform: scale(1.02);
}

.ad-domain-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ================= SPECIALIZED POST TYPES & IN-FEED WIDGETS ================= */

/* 1. Multi-Image Slider Carousel */
.post-slider-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background-color: #0b110e;
}

.slider-track-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-slide-item {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.slider-slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-badge-counter {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  z-index: 5;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  transition: all 0.2s ease;
}

.slider-nav-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.slider-prev-btn { left: 10px; }
.slider-next-btn { right: 10px; }

.slider-dots-row {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
}

.slider-dot.active {
  width: 18px;
  border-radius: 4px;
  background: #ffffff;
}

/* 2. Single Video / Media Player Card */
.video-media-card {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background-color: #0b110e;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background 0.2s ease;
}

.video-play-overlay:hover {
  background: rgba(0, 0, 0, 0.38);
}

.video-big-play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(27, 67, 50, 0.9);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-play-overlay:hover .video-big-play-btn {
  transform: scale(1.1);
  background: var(--primary-light);
}

.video-big-play-btn svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.video-bottom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.video-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  letter-spacing: 0.5px;
}

.video-sound-btn {
  color: #ffffff;
  display: flex;
  align-items: center;
}

.video-sound-btn svg {
  width: 18px;
  height: 18px;
}

/* 3. Rich Text Content Post (Expandable) */
.rich-content-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 12px;
}

.callout-quote-box {
  border-left: 3px solid var(--primary-light);
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-secondary);
}

.content-guide-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.guide-point {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
}

.point-number {
  color: var(--primary-light);
  font-weight: 800;
}

.content-expand-trigger {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-light);
  cursor: pointer;
  display: inline-block;
  margin-top: 4px;
}

.content-expand-trigger:hover {
  text-decoration: underline;
}

.expandable-details {
  display: none;
  margin-top: 8px;
}

.expandable-details.show {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 4. Rich Link / Article Preview Card */
.link-preview-box {
  display: flex;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-subtle);
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.link-preview-box:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.link-thumb-wrap {
  width: 170px;
  min-height: 110px;
  flex-shrink: 0;
}

.link-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-details-wrap {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.link-domain-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.link-domain-row svg {
  width: 13px;
  height: 13px;
}

.link-preview-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-preview-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 5. In-Feed Interstitial Suggestion Widgets */
.infeed-suggestion-widget {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

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

.infeed-widget-header h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.infeed-grid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.infeed-comm-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.infeed-comm-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.infeed-comm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.infeed-comm-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.infeed-comm-members {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.infeed-comm-card .btn-join {
  width: 100%;
}

.infeed-people-row .btn-follow {
  width: auto;
  min-width: 80px;
  flex-shrink: 0;
  text-align: center;
  padding: 5px 14px;
}

/* 6. In-Feed People Row */
.infeed-people-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.infeed-people-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  gap: 12px;
}

.infeed-user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.infeed-user-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.infeed-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.infeed-user-bio {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 7. Sponsored / Promoted Ad Card */
.sponsored-ad-card {
  border: 1.5px dashed var(--border-light);
  background: var(--bg-card);
  padding: 16px 20px;
}

.ad-sponsor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.promoted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.ad-sponsor-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sponsor-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

.sponsor-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ad-banner-box {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 10px 0;
  position: relative;
}

.ad-banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.ad-headline {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  padding-right: 12px;
}

.btn-ad-cta {
  background: var(--primary);
  color: #ffffff;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.btn-ad-cta:hover {
  background: var(--primary-hover);
}

/* ================= RIGHT SIDEBAR (MATCHES LEFT SIDEBAR WITH VERTICAL LINE) ================= */
.right-sidebar {
  width: var(--sidebar-right-width);
  height: 100%;
  flex-shrink: 0;
  border-left: 1px solid var(--border-light); /* VERTICAL LINE ON LEFT OF RIGHT SIDEBAR */
  overflow-y: auto;
  padding: 16px 24px 30px 18px;
  display: flex;
  flex-direction: column;
}

.right-sidebar .sidebar-scrollable {
  display: flex;
  flex-direction: column;
}

/* Trending Topics List (Matches Left Sidebar Items Style) */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.trending-item:hover {
  background-color: var(--bg-hover);
}

.trend-rank {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.trend-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.trend-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.trend-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.trending-item:hover .trend-title { color: var(--primary-light); }
.trend-count { font-size: 12px; color: var(--text-muted); }

/* Popular Communities List (Matches Left Sidebar Community Item Style) */
.popular-communities-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.community-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.community-row:hover {
  background-color: var(--bg-hover);
}

.comm-thumb {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comm-details { flex: 1; min-width: 0; }
.comm-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comm-stats { font-size: 12px; color: var(--text-muted); }

.btn-join {
  padding: 4px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  width: auto;
}

.btn-join.joined {
  background-color: var(--bg-active-pill);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* Suggested People List (Matches Left Sidebar Style) */
.suggested-people-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.person-row:hover {
  background-color: var(--bg-hover);
}

.person-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.person-details { flex: 1; min-width: 0; }
.person-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-handle { font-size: 12px; color: var(--text-muted); }

.btn-follow {
  padding: 4px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  width: auto;
}

.btn-follow.following {
  background-color: var(--bg-active-pill);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* ================= MOBILE BOTTOM APP NAVIGATION BAR ================= */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: var(--bottom-bar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-light);
  z-index: 105;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  height: 100%;
}

.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item.active { color: var(--primary-light); }

.mobile-post-trigger { position: relative; }

.mobile-post-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.35);
  transform: translateY(-6px);
}

.mobile-post-icon svg { width: 22px; height: 22px; }

.mobile-user-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mobile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= AUTH POPUP MODAL (FOR GUESTS) ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover { color: var(--text-main); }

#authPromptModal.modal-backdrop,
.modal-backdrop#authPromptModal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  box-sizing: border-box;
}

#authPromptModal .auth-modal-card,
.modal-backdrop#authPromptModal .auth-modal-card,
.auth-modal-card {
  position: relative;
  width: 100% !important;
  max-width: 440px !important;
  min-width: 0 !important;
  margin: auto !important;
  padding: 28px 24px !important;
  text-align: center;
  box-sizing: border-box !important;
  border-radius: 20px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#authPromptModal .modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: all 0.2s ease;
}

#authPromptModal .modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.auth-modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-tint);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.auth-modal-icon-badge svg { width: 24px; height: 24px; }

.auth-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-modal-subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.auth-modal-tabs {
  display: flex;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.auth-tab-btn {
  flex: 1;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-demo-auth,
.btn-demo-login {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--primary-tint);
  border: 1px solid var(--border-focus);
  color: var(--primary-light);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.btn-demo-auth:hover,
.btn-demo-login:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-demo-auth svg,
.btn-demo-login svg { width: 18px; height: 18px; }

.auth-divider,
.auth-modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
  color: var(--text-light);
  font-size: 11.5px;
}

.auth-divider::before, .auth-divider::after,
.auth-modal-divider::before, .auth-modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.auth-divider span,
.auth-modal-divider span { padding: 0 10px; }

.auth-form,
.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.auth-form .form-group,
.auth-modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.form-group input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: var(--border-focus);
  background-color: var(--bg-card);
}

.btn-auth-submit,
.btn-submit-auth {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
}

.auth-footer-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.4;
}

/* ================= STORY & CREATE POST MODALS ================= */
.story-modal-content {
  position: relative;
  width: 90%;
  max-width: 420px;
  height: 680px;
  max-height: 90vh;
  background: #111;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
}

.story-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.1s linear;
}

.story-header {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.modal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ffffff;
}

.story-header h4 { font-size: 14px; font-weight: 700; }
.story-header span { font-size: 12px; opacity: 0.8; }

.story-modal-content .modal-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #ffffff;
  z-index: 10;
}

.story-media-view {
  flex: 1;
  width: 100%;
  height: 100%;
}

.story-media-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Create Post Modal Specific */
.post-modal-content {
  width: 90%;
  max-width: 580px;
  padding: 24px;
  box-shadow: var(--shadow-modal);
}

.post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.post-modal-header h3 { font-size: 18px; font-weight: 700; }

.modal-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-user-info strong { display: block; font-size: 14px; }

.post-audience {
  font-size: 12px;
  color: var(--primary-light);
  background: var(--bg-active-pill);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.modal-title-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  margin-bottom: 10px;
  outline: none;
}

.modal-body-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  margin-bottom: 10px;
}

.modal-tags-input {
  width: 100%;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 16px;
}

.modal-title-input:focus,
.modal-body-textarea:focus,
.modal-tags-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.post-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.modal-tools { display: flex; gap: 8px; }

.tool-btn {
  font-size: 18px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.tool-btn:hover { background: var(--bg-hover); }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  background: var(--primary);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE & MOBILE-APP VIEW ================= */
@media (max-width: 1100px) {
  .right-sidebar { display: none; }
}

@media (max-width: 900px) {
  html, body {
    height: auto;
    overflow-y: auto; /* Fallback scroll for mobile touch screens */
  }

  body {
    padding-bottom: 70px;
  }

  .full-width-container { padding: 0 14px; }

  .full-width-layout {
    height: auto;
    overflow: visible;
  }

  .feed-main,
  body.guest-mode .feed-main {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto;
    overflow-y: visible;
    padding: 12px 14px 80px;
    margin: 0 !important;
  }

  .header-left .mobile-drawer-toggle { display: flex; }

  /* Left Sidebar converts to a mobile drawer */
  .left-sidebar,
  body.guest-mode .left-sidebar {
    position: fixed !important;
    top: var(--header-height);
    left: -280px;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-card);
    padding: 16px;
    box-shadow: var(--shadow-modal);
    z-index: 1090 !important;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: none;
    margin: 0 !important;
  }

  .left-sidebar.open,
  body.guest-mode .left-sidebar.open { left: 0 !important; }

  .right-sidebar,
  body.guest-mode .right-sidebar {
    display: none !important;
  }

  .search-wrapper { max-width: none; }
  .search-quick-tags { display: none; }

  .mobile-bottom-bar { display: flex; }

  .post-gallery-layout {
    grid-template-columns: 1fr;
  }

  .gallery-main { height: 260px; }

  .gallery-thumbs {
    flex-direction: row;
    height: 85px;
  }

  .create-post-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .media-type-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 58px;
  }

  .brand-text { font-size: 18px; }
  .brand-icon { width: 28px; height: 28px; }
  .profile-name { display: none; }
  .btn-new-post,
  #headerNewPostBtn {
    display: none !important;
  }

  .btn-login-nav {
    padding: 5px 12px;
    font-size: 12.5px;
  }

  .btn-signup-nav {
    padding: 5px 14px;
    font-size: 12.5px;
  }

  .post-title { font-size: 15px; }
  .feed-post {
    padding: 0;
  }
  .post-image-strip {
    grid-template-columns: 1fr;
  }
  .strip-item {
    height: 140px;
  }
}

/* ==========================================================================
   MULTI-PAGE APPLICATION SPECIFIC STYLES
   Explore, Communities, Topics, People, Saved, Messages, Notifications, Profile, Settings
   ========================================================================== */

/* Universal Page Header Card */
.page-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.page-header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, #40916c 100%);
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.page-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-title-icon svg { width: 22px; height: 22px; }

.page-main-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.page-subtitle-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Page Filter Pills */
.page-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ================= 1. COMMUNITIES DIRECTORY ================= */
.communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.community-card-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.community-card-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-dropdown);
  border-color: var(--border-focus);
}

.community-card-banner {
  height: 80px;
  position: relative;
  overflow: hidden;
}

.community-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card-content {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.comm-avatar-overlap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  margin-top: -26px;
  margin-bottom: 8px;
  object-fit: cover;
  background: var(--bg-card);
}

.comm-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comm-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.comm-card-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-light);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.comm-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.comm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  margin-top: auto;
}

.comm-member-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ================= 2. TOPICS DIRECTORY ================= */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.topic-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.topic-card-large:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.topic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topic-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-badge-icon svg { width: 22px; height: 22px; }

.topic-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.topic-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.topic-stats-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

/* ================= 3. PEOPLE DIRECTORY ================= */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.person-card-full {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.person-card-full:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.person-card-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid var(--primary-light);
}

.person-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.person-card-handle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.person-card-specialty {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-light);
  background: var(--bg-subtle);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.person-card-bio {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
  flex: 1;
}

.person-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  border-top: 1px solid var(--border-light);
  padding: 10px 0;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.person-card-stats strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

/* ================= 4. EXPLORE MASONRY & DISCOVERY ================= */
.explore-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.explore-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
  cursor: pointer;
}

.explore-tag-chip:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.explore-tag-count {
  font-size: 11px;
  color: var(--text-muted);
}

.explore-grid-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.explore-tile {
  position: relative;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.explore-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.explore-tile:hover img {
  transform: scale(1.06);
}

.explore-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  color: #ffffff;
  transition: background 0.2s ease;
}

.explore-tile-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.explore-tile-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= 5. DIRECT MESSAGES / CHAT INTERFACE ================= */
.chat-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  height: calc(100vh - var(--header-height) - 40px);
  min-height: 520px;
  display: flex;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.chat-thread-list-sidebar {
  width: 280px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--bg-card);
}

.chat-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sidebar-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.chat-threads-scroll {
  flex: 1;
  overflow-y: auto;
}

.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
}

.chat-thread-item:hover { background: var(--bg-hover); }

.chat-thread-item.active {
  background: var(--bg-subtle);
  border-left: 3px solid var(--primary-light);
}

.chat-thread-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.chat-thread-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b9348;
  border: 2px solid var(--bg-card);
}

.chat-thread-info {
  flex: 1;
  min-width: 0;
}

.chat-thread-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.chat-thread-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-thread-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-main-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

.chat-active-header {
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-active-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-active-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-active-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.chat-active-status {
  font-size: 11.5px;
  color: #2b9348;
  font-weight: 600;
}

.chat-messages-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg-row {
  display: flex;
  max-width: 75%;
}

.chat-msg-row.theirs {
  align-self: flex-start;
}

.chat-msg-row.mine {
  align-self: flex-end;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chat-msg-row.theirs .chat-msg-bubble {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-top-left-radius: 2px;
}

.chat-msg-row.mine .chat-msg-bubble {
  background: var(--primary);
  color: #ffffff;
  border-top-right-radius: 2px;
}

.chat-msg-timestamp {
  font-size: 10.5px;
  margin-top: 4px;
  opacity: 0.75;
  text-align: right;
}

.chat-input-bar {
  padding: 12px 18px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-text-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text-main);
}

.chat-text-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--bg-card);
}

/* ================= 6. NOTIFICATIONS ACTIVITY CENTER ================= */
.notifications-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.notification-row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
  cursor: pointer;
}

.notification-row-item:hover { background: var(--bg-hover); }

.notification-row-item.unread {
  background: var(--bg-subtle);
}

.notif-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.notif-icon-badge.upvote { background: #d9480f; }
.notif-icon-badge.comment { background: #0ea5e9; }
.notif-icon-badge.follow { background: var(--primary-light); }
.notif-icon-badge.community { background: #8b5cf6; }

.notif-icon-badge svg { width: 18px; height: 18px; }

.notif-content-wrap {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 2px;
}

.notif-text strong { font-weight: 700; }

.notif-time-ago {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ================= 7. USER PROFILE PAGE ================= */
.profile-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.profile-cover-wrap {
  height: 160px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.profile-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-body {
  padding: 0 24px 20px;
  position: relative;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -45px;
  margin-bottom: 12px;
}

.profile-avatar-xl {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  object-fit: cover;
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
}

.profile-bio-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-bio-handle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-bio-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.profile-stats-bar {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.profile-stats-bar strong {
  color: var(--text-main);
}

/* ================= 8. SETTINGS & PREFERENCES ================= */
.settings-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.settings-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.settings-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-item-row:last-child {
  border-bottom: none;
}

.settings-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.settings-item-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-card);
  transition: .3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--primary-light);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   9. INNER PAGE HEADER CARDS & NAVIGATION PILLS
   ========================================================================== */
.page-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  width: 100%;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.page-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-title-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  border-radius: 12px;
  background: var(--primary-tint);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-title-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
}

.page-main-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
}

.page-subtitle-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 16px 0;
  max-width: 720px;
}

.badge-category-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-light);
  border: 1px solid rgba(46, 125, 82, 0.2);
  white-space: nowrap;
}

.page-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.page-nav-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.pill-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-card);
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(46, 125, 82, 0.25);
}

/* ==========================================================================
   10. IN-FEED SUGGESTION WIDGETS (RESEARCHERS TO FOLLOW & COMMUNITIES)
   ========================================================================== */
.infeed-suggestion-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  margin: 8px 0;
  width: 100%;
}

.infeed-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.infeed-widget-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.infeed-widget-header h4 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.see-all-link,
.widget-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

.see-all-link:hover,
.widget-see-all:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* People List (Researchers & Cultivators to Follow) */
.infeed-people-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.infeed-people-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
}

.infeed-people-row:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.infeed-user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.infeed-user-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border-light);
}

.infeed-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.infeed-user-bio {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.btn-follow {
  flex-shrink: 0;
  min-width: 82px;
  text-align: center;
}

.btn-follow.following {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-color: var(--border-light);
}

/* Suggested Communities Grid Row */
.infeed-grid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .infeed-grid-row {
    grid-template-columns: 1fr;
  }
}

.infeed-comm-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.infeed-comm-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.infeed-comm-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.infeed-comm-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.infeed-comm-members {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: -4px;
}

.infeed-comm-card .btn-join {
  width: 100%;
  margin-top: 4px;
}

.infeed-comm-card .btn-join.joined {
  background: var(--bg-hover);
  color: var(--text-muted);
  border-color: var(--border-card);
}

/* ==========================================================================
   11. IN-FEED MEDIA PLAYERS, ADS, AND LINK CARDS
   ========================================================================== */
.video-media-card {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0b0f0d;
  margin-bottom: 14px;
  cursor: pointer;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-media-card:hover .video-poster-img {
  transform: scale(1.02);
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s ease;
}

.video-big-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(46, 125, 82, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-big-play-btn svg {
  width: 26px;
  height: 26px;
  margin-left: 4px;
}

.video-big-play-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
}

.video-bottom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.video-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.video-timestamp {
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.video-sound-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.video-sound-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.video-sound-btn svg {
  width: 16px;
  height: 16px;
}

/* Sponsored Spotlight Ad */
.sponsored-ad-card {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 0 !important;
}

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

.ad-sponsor-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sponsor-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.sponsor-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.promoted-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.ad-banner-box {
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.ad-banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
}

.ad-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ad-headline {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 2px;
}

.ad-domain-tag {
  font-size: 12px;
  color: var(--primary-light);
  font-weight: 600;
}

.btn-ad-cta {
  background: var(--primary);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-ad-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Link Preview Box */
.link-preview-box {
  display: flex;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background: var(--bg-subtle);
  margin-bottom: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-preview-box:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.link-thumb-wrap {
  width: 180px;
  min-width: 180px;
  height: 130px;
  overflow: hidden;
}

.link-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-details-wrap {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.link-domain-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-domain-row svg {
  width: 13px;
  height: 13px;
}

.link-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-preview-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 580px) {
  .link-preview-box {
    flex-direction: column;
  }
  .link-thumb-wrap {
    width: 100%;
    height: 160px;
  }
}

/* ==========================================================================
   12. MODALS & POPUPS (STORY VIEWER, POST CREATOR, AUTH PROMPT & TOASTS)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: scale(1.08);
}

/* Story Modal */
.story-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 82vh;
  max-height: 720px;
  background: #000000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.story-progress-bar {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 50px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
  z-index: 12;
}

.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
}

.story-header {
  position: absolute;
  top: 24px;
  left: 14px;
  right: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 12;
  color: #ffffff;
}

.story-header .modal-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.story-header h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.story-header span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.story-media-view {
  width: 100%;
  height: 100%;
}

.story-media-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post Modal */
.post-modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.post-modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.modal-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.modal-user-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.post-audience {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-title-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  outline: none;
}

.modal-title-input:focus {
  border-color: var(--primary-light);
}

.modal-body-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
  font-family: inherit;
}

.modal-body-textarea:focus {
  border-color: var(--primary-light);
}

.post-modal-tag-row {
  margin-bottom: 18px;
}

.modal-tags-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.modal-tags-input:focus {
  border-color: var(--primary-light);
}

.post-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.modal-tools {
  display: flex;
  gap: 8px;
}

.tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

/* Auth Modal */
.auth-modal-card,
.auth-modal-content {
  position: relative;
  width: 100% !important;
  max-width: 440px !important;
  min-width: 0 !important;
  margin: auto !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 20px !important;
  padding: 28px 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
  box-sizing: border-box !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  text-align: center;
}

.auth-modal-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 16px 0;
}

.auth-modal-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 3px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.auth-tab-btn {
  flex: 1;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-demo-auth,
.btn-demo-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  border: 1px solid rgba(46, 125, 82, 0.25);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.btn-demo-auth:hover,
.btn-demo-login:hover {
  background: var(--primary-light);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-demo-auth svg,
.btn-demo-login svg {
  width: 18px;
  height: 18px;
}

.auth-divider,
.auth-modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 11.5px;
}

.auth-divider::before,
.auth-divider::after,
.auth-modal-divider::before,
.auth-modal-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.auth-divider span,
.auth-modal-divider span {
  padding: 0 10px;
}

.auth-form,
.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.auth-form .form-group,
.auth-modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.auth-form label,
.auth-modal-form label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-form input,
.auth-modal-form input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm, 8px);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-form input:focus,
.auth-modal-form input:focus {
  border-color: var(--primary-light);
  background-color: var(--bg-card);
}

.btn-auth-submit,
.btn-submit-auth {
  margin-top: 4px;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
}

.auth-footer-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: rgba(18, 25, 20, 0.94);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   INTERACTIVE POST FEATURES: LIKE ANIMATION, COMMENTS, REPOST, SHARE, 
   3-DOT EDIT/DELETE DROPDOWN, & ANALYTICS / BOOST POST TOOLBAR
   ========================================================================== */

/* 1. SHROOM LIKE BUTTON ANIMATION & SPORE BURST */
.upvote-btn {
  position: relative;
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease, background-color 0.2s ease;
}

.upvote-btn .action-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.upvote-btn.active {
  color: #ff6b35 !important;
  background-color: var(--accent-orange-bg) !important;
}

.upvote-btn.active .action-icon svg {
  fill: #ff6b35 !important;
  color: #ff6b35 !important;
  filter: drop-shadow(0 2px 8px rgba(255, 107, 53, 0.5));
  animation: shroomCapPop 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes shroomCapPop {
  0% { transform: scale(1); }
  25% { transform: scale(0.7) rotate(-14deg); }
  50% { transform: scale(1.48) rotate(12deg); }
  75% { transform: scale(0.92) rotate(-4deg); }
  100% { transform: scale(1.15) rotate(0deg); }
}

/* Ring pulse explosion on like */
.shroom-ring-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ff7849;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
  opacity: 1;
  animation: ringBurstAnim 0.6s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
  z-index: 10;
}

@keyframes ringBurstAnim {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; border-color: #ff7849; }
  60% { opacity: 0.85; border-color: #ffbe3d; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; border-color: #52b788; }
}

/* Radial Spore Particles */
.shroom-spore-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  animation: sporeParticleFly 0.65s cubic-bezier(0.15, 0.9, 0.3, 1) forwards;
}

@keyframes sporeParticleFly {
  0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}

/* Number counter bump */
.counter-bump {
  animation: counterBump 0.3s ease;
}

@keyframes counterBump {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px) scale(1.15); color: #ff6b35; }
  100% { transform: translateY(0) scale(1); }
}

/* Instagram-style double-tap pop over post images */
.media-doubletap-shroom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100px;
  height: 100px;
  color: #ff6b35;
  filter: drop-shadow(0 4px 20px rgba(255, 107, 53, 0.7));
  pointer-events: none;
  z-index: 30;
  animation: igDoubleTapPop 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.media-doubletap-shroom svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@keyframes igDoubleTapPop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.3) rotate(8deg); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1.1) rotate(0deg); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(10deg); opacity: 0; }
}

/* Action button click effects */
.btn-pop-effect {
  animation: actionBtnPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes actionBtnPop {
  0% { transform: scale(1); }
  40% { transform: scale(0.84); }
  75% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.repost-spin-effect {
  animation: repostSpinPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes repostSpinPop {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.repost-btn.active {
  color: #0d9488 !important;
  background-color: rgba(13, 148, 136, 0.12) !important;
}

.repost-btn.active svg {
  stroke: #0d9488 !important;
}

/* ================= 2. POST TOP LEFT 3-DOT DROPDOWN (LOGGED USER POSTS) ================= */
.post-dropdown-container {
  position: relative;
  display: inline-block;
}

/* Position on post top left or inside header */
.post-options-top-left {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.post-options-top-left:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
  transform: scale(1.05);
}

.post-options-top-left svg {
  width: 18px;
  height: 18px;
}

/* Post owner badge next to 3 dots */
.post-owner-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--primary-tint);
  color: var(--primary-light);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Dropdown Menu */
.post-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  pointer-events: none;
}

.post-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.post-dropdown-menu.align-right {
  left: auto;
  right: 0;
}

.dropdown-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.dropdown-item-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dropdown-item-btn.item-danger {
  color: #dc2626;
}

.dropdown-item-btn.item-danger svg {
  color: #dc2626;
}

.dropdown-item-btn.item-danger:hover {
  background-color: rgba(220, 38, 38, 0.08);
  color: #ef4444;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 5px 0;
}

/* Visibility Guard: Edit, Delete, Top-left 3-dot, and Insights/Boost ONLY on Logged User Posts */
body.guest-mode .logged-user-own-post .post-owner-insights-bar,
body.guest-mode .logged-user-own-post .post-options-top-left,
body.guest-mode .logged-user-own-post .post-owner-badge {
  display: none !important;
}

.feed-post:not(.logged-user-own-post) .post-owner-insights-bar,
.feed-post:not(.logged-user-own-post) .post-options-top-left,
.feed-post:not(.logged-user-own-post) .post-owner-badge,
.feed-post:not(.logged-user-own-post) .btn-edit-post,
.feed-post:not(.logged-user-own-post) .btn-delete-post {
  display: none !important;
}

/* ================= 3. LOGGED USER POST ANALYTICS & BOOST BAR (FB/IG STYLE) ================= */
.post-owner-insights-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin: 12px 0 14px;
  background: linear-gradient(135deg, var(--bg-subtle), var(--bg-card));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  gap: 12px;
  flex-wrap: wrap;
}

.insights-preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.insights-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.insights-badge-chip svg {
  width: 16px;
  height: 16px;
  color: var(--primary-light);
}

.insights-growth-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.insights-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-owner-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-owner-tool svg {
  width: 15px;
  height: 15px;
}

.btn-insights-trigger {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-insights-trigger:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-focus);
  color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-boost-trigger {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.25);
}

[data-theme="dark"] .btn-boost-trigger {
  background: linear-gradient(135deg, #40916c, #52b788);
  color: #0c150f;
}

.btn-boost-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.35);
  filter: brightness(1.08);
}

/* ================= 4. INSTAGRAM STYLE COMMENT THREAD POPUP MODAL ================= */
.comment-modal-dialog {
  width: 100%;
  max-width: 980px;
  height: 86vh;
  max-height: 820px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 860px) {
  .comment-modal-dialog {
    flex-direction: column;
    height: 92vh;
    max-width: 560px;
  }
}

/* Left Media Column */
.comment-media-column {
  flex: 1.15;
  background-color: var(--bg-card);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.comment-media-column img,
.comment-media-column video {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
}

.comment-media-placeholder {
  padding: 30px;
  text-align: center;
  color: #eff4f0;
}

.comment-media-placeholder h3 {
  font-size: 19px;
  margin-bottom: 12px;
  color: #ffffff;
}

.comment-media-placeholder p {
  color: #9cb0a3;
  font-size: 14px;
  line-height: 1.6;
}

/* Right Comments Column */
.comment-thread-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-width: 320px;
  border-left: 1px solid var(--border-card);
}

@media (max-width: 860px) {
  .comment-media-column {
    max-height: 200px;
  }
  .comment-thread-column {
    border-left: none;
    border-top: 1px solid var(--border-card);
  }
}

/* Thread Header */
.comment-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-card);
}

.comment-author-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-author-meta h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.comment-author-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Scrollable Comments Stream */
.comment-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-post-caption-row {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.comment-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  transition: background-color 0.15s ease;
}

.comment-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content-wrap {
  flex: 1;
}

.comment-text-box {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-main);
}

.comment-text-box strong {
  font-weight: 700;
  margin-right: 6px;
  color: var(--text-main);
}

.comment-meta-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.comment-meta-actions button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.comment-meta-actions button:hover {
  color: var(--text-main);
}

.comment-meta-actions .btn-delete-comment {
  color: #dc2626;
}

.comment-like-heart-btn {
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.comment-like-heart-btn:hover {
  color: #e11d48;
  transform: scale(1.15);
}

.comment-like-heart-btn.liked {
  color: #e11d48;
}

.comment-like-heart-btn.liked svg {
  fill: #e11d48;
  animation: heartBurst 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBurst {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.comment-like-heart-btn svg {
  width: 14px;
  height: 14px;
}

/* Nested reply indentation */
.nested-replies-list {
  margin-left: 44px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--border-light);
}

/* Post Actions Summary Row */
.comment-thread-footer-summary {
  padding: 12px 18px;
  border-top: 1px solid var(--border-card);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-likes-preview {
  font-size: 13px;
  color: var(--text-secondary);
}

.comment-likes-preview strong {
  color: var(--text-main);
}

/* Quick Emoji Bar */
.comment-emoji-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
  background: var(--bg-card);
}

.emoji-pill-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.emoji-pill-btn:hover {
  transform: scale(1.25);
  background: var(--bg-hover);
}

/* Sticky Input Bar */
.comment-input-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-card);
  background: var(--bg-card);
}

.comment-input-form input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  padding: 6px 0;
}

.comment-input-form input::placeholder {
  color: var(--text-light);
}

.comment-submit-post-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-light);
  cursor: pointer;
  padding: 6px 8px;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.comment-submit-post-btn.can-submit {
  opacity: 1;
  pointer-events: auto;
}

.comment-submit-post-btn.can-submit:hover {
  transform: scale(1.05);
}

/* ================= 5. INSTAGRAM / THREADS STYLE REPOST POPUP ================= */
.repost-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.repost-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.repost-modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.repost-modal-header svg {
  width: 20px;
  height: 20px;
  color: var(--primary-light);
}

.repost-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repost-choice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background-color: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
}

.repost-choice-item:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.repost-choice-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-tint);
  color: var(--primary-light);
}

.repost-choice-icon-wrap.quote-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.repost-choice-icon-wrap.story-icon {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.repost-choice-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.repost-choice-texts h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.repost-choice-texts p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Quote Composer view inside repost modal */
.quote-composer-view {
  display: none;
  animation: fadeIn 0.2s ease;
}

.quote-composer-view.show {
  display: block;
}

.quote-composer-view textarea {
  width: 100%;
  height: 90px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  resize: none;
  outline: none;
  margin-bottom: 12px;
}

.quote-composer-view textarea:focus {
  border-color: var(--border-focus);
}

.quote-original-preview-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-original-preview-card img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.quote-original-info h5 {
  font-size: 13.5px;
  color: var(--text-main);
  font-weight: 700;
}

.quote-original-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= 6. CENTERED SHARE MODAL POPUP (MIDDLE POPUP) ================= */
.share-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.share-drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.share-bottom-drawer {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-card);
  padding: 22px 24px 26px;
  margin: auto;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  max-height: min(90vh, 620px);
  overflow-y: auto;
  box-sizing: border-box;
}

.share-drawer-backdrop.show .share-bottom-drawer {
  transform: scale(1);
  opacity: 1;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-drag-pill {
  display: none !important;
}

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

.drawer-header-row h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
}

/* Contacts search in drawer */
.drawer-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.drawer-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.drawer-search-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 36px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
}

.drawer-search-wrap input:focus {
  border-color: var(--border-focus);
}

/* Contacts Horizontal Tray */
.drawer-contacts-tray {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 68px;
  cursor: pointer;
}

.contact-avatar-bubble {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
}

.contact-avatar-bubble img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.contact-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
}

.contact-user-label {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.btn-send-contact-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--primary-tint);
  color: var(--primary-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-send-contact-pill.sent {
  background: #10b981;
  color: #ffffff;
}

/* Sharing Channels Grid */
.share-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.share-channel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.share-channel-btn:hover {
  background-color: transparent;
  transform: translateY(-2px);
}

.channel-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.channel-icon-circle svg {
  width: 22px;
  height: 22px;
}

.channel-icon-copy { background: linear-gradient(135deg, #4b5563, #374151); }
.channel-icon-wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.channel-icon-x { background: #000000; }
.channel-icon-fb { background: linear-gradient(135deg, #1877f2, #0d65d9); }
.channel-icon-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.channel-icon-chat { background: linear-gradient(135deg, #2d6a4f, #1b4332); }
.channel-icon-qr { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.channel-icon-more { background: linear-gradient(135deg, #0284c7, #0369a1); }

.share-channel-btn span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ================= 7. POST ANALYTICS & INSIGHTS MODAL ================= */
.analytics-modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.analytics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-card);
}

.analytics-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-header-pill {
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-tint);
  color: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.analytics-overview-banner {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bg-subtle), var(--bg-hover));
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-light);
}

.analytics-overview-banner h4 {
  font-size: 14.5px;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 4px;
}

.analytics-overview-banner p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 520px) {
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-kpi-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
}

.kpi-title-line {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kpi-number-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.kpi-sub-line {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* SVG Chart Section */
.analytics-chart-section {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
  border: 1px solid var(--border-card);
}

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

.chart-header-line h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.chart-header-line span {
  font-size: 12px;
  color: var(--text-muted);
}

.analytics-svg-wrap {
  width: 100%;
  height: 120px;
}

.analytics-svg-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Demographics */
.demographics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 520px) {
  .demographics-row {
    grid-template-columns: 1fr;
  }
}

.demo-box h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.demo-bar-item {
  margin-bottom: 8px;
}

.demo-label-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.demo-progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  background: var(--primary-light);
  border-radius: var(--radius-pill);
}

/* ================= 8. BOOST POST MODAL (META/FB/IG STYLE ADS) ================= */
.boost-modal-card {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.boost-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-card);
}

.boost-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.boost-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.boost-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.boost-header-icon svg {
  width: 20px;
  height: 20px;
}

.boost-modal-header h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}

.boost-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 600;
  margin-top: 2px;
}

.boost-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
  display: inline-block;
  box-shadow: 0 0 0 2px var(--primary-tint);
}

/* Tab Navigation for Boost Modal */
.boost-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 18px;
}

.boost-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.boost-tab-btn svg {
  width: 14px;
  height: 14px;
}

.boost-tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.boost-tab-btn.active {
  color: var(--text-main);
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.boost-tab-pane {
  display: none;
}

.boost-tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ================= LIVE AD PREVIEW SECTION ================= */
.boost-preview-section {
  margin-bottom: 18px;
}

.boost-section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boost-preview-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-light);
  background: var(--primary-tint);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.boost-live-ad-card {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ad-sponsored-label {
  font-size: 10.5px;
  color: var(--text-muted);
}

.boost-ad-media-wrap {
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin: 10px 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
}

.boost-ad-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
  transition: filter 0.25s ease;
}

.boost-img-overlay-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(12, 22, 16, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.boost-img-overlay-btn:hover {
  background: rgba(12, 22, 16, 0.95);
  transform: translateY(-1px);
}

.boost-ad-info-box {
  padding-top: 4px;
}

.boost-preview-headline {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0 0 6px 0;
}

.boost-preview-caption {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.boost-ad-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ================= AD CREATIVE EDITOR FORM ================= */
.boost-editor-form {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.boost-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.boost-editor-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.boost-editor-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.boost-field-group {
  margin-bottom: 14px;
}

.boost-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.boost-label-with-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.boost-char-count {
  font-size: 11px;
  color: var(--text-muted);
}

.boost-input,
.boost-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
}

.boost-input:focus,
.boost-textarea:focus {
  border-color: var(--border-focus);
}

.boost-textarea {
  resize: vertical;
}

/* Image Control Row */
.boost-image-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 8px;
}

.boost-image-mini-thumb {
  width: 52px;
  height: 52px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
}

.boost-image-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
}

.boost-image-button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.boost-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Filter Presets */
.boost-filter-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.boost-filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

.boost-filter-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.boost-filter-pill:hover,
.boost-filter-pill.active {
  background: var(--bg-active-pill);
  color: var(--primary-light);
  border-color: var(--border-focus);
  font-weight: 700;
}

/* Image filter visual effects */
.filter-vibrant { filter: saturate(1.4) contrast(1.08) brightness(1.02); }
.filter-warm { filter: sepia(0.2) saturate(1.25) contrast(1.05); }
.filter-contrast { filter: contrast(1.25) brightness(0.98); }
.filter-cinema { filter: contrast(1.15) saturate(1.2) hue-rotate(-5deg); }

/* CTA Button Pills */
.boost-cta-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.boost-cta-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.boost-cta-pill:hover,
.boost-cta-pill.active {
  background: var(--primary-light);
  color: #ffffff;
  border-color: var(--primary-light);
  font-weight: 700;
}

/* ================= TARGETING & BUDGET STEP STYLING ================= */
.boost-step-box {
  margin-bottom: 18px;
}

.boost-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.boost-step-number {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-light);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.boost-goals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.boost-goal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.18s ease;
}

.boost-goal-card:hover,
.boost-goal-card.active {
  background: var(--bg-active-pill);
  border-color: var(--border-focus);
}

.boost-goal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.boost-goal-icon-badge svg {
  width: 16px;
  height: 16px;
}

.boost-goal-info {
  flex: 1;
  min-width: 0;
}

.boost-goal-info h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 2px 0;
}

.boost-goal-info p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.boost-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.boost-goal-card.active .boost-radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-light);
}

.boost-slider-row {
  margin-bottom: 14px;
}

.boost-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.boost-slider-input {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  outline: none;
  background: var(--border-light);
  accent-color: var(--primary-light);
}

/* Reach Estimator Widget */
.boost-reach-meter-card {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.boost-reach-header {
  margin-bottom: 12px;
}

.boost-reach-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boost-reach-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-light);
  margin-top: 2px;
}

.boost-reach-gauge {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.boost-gauge-bar {
  height: 100%;
  background: linear-gradient(90deg, #52b788, #2d6a4f);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.boost-reach-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.boost-metric-tile {
  display: flex;
  flex-direction: column;
}

.boost-metric-tile .metric-label {
  font-size: 10.5px;
  color: var(--text-muted);
}

.boost-metric-tile .metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.boost-summary-box {
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 16px;
}

.boost-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.boost-summary-line.total {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14.5px;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 8px;
}

.boost-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ================= 9. EDIT POST MODAL & DELETE CONFIRMATION ================= */
.edit-modal-card,
#editPostModal .edit-modal-card {
  width: 100% !important;
  max-width: 560px !important;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.edit-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-image-preview-container {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.edit-image-preview-box {
  width: 70px;
  height: 70px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  position: relative;
}

.edit-image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
}

.edit-image-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-image-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.edit-modal-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-input-group {
  margin-bottom: 14px;
}

.edit-input-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.edit-input-group input,
.edit-input-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
}

.edit-input-group textarea {
  height: 100px;
  resize: vertical;
}

.edit-input-group input:focus,
.edit-input-group textarea:focus {
  border-color: var(--border-focus);
}

.modal-actions-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ================= REPORT POST MODAL ================= */
#reportPostModal .report-modal-card {
  width: 100% !important;
  max-width: 480px !important;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
}

.report-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
  padding-right: 42px;
}

.report-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.report-icon-circle svg {
  width: 22px;
  height: 22px;
  stroke: #ef4444;
  fill: rgba(239, 68, 68, 0.18);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.report-header-text {
  flex: 1;
  min-width: 0;
}

.report-header-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

#reportPostModal .modal-close-btn,
.report-modal-card .modal-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: var(--bg-subtle, #f0f4f1) !important;
  border: 1px solid var(--border-light, #e2e8e4) !important;
  color: var(--text-muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

#reportPostModal .modal-close-btn:hover,
.report-modal-card .modal-close-btn:hover {
  background: var(--bg-hover, #e5ece7) !important;
  color: var(--text-main) !important;
  transform: scale(1.08) !important;
}

.report-modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.report-field-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.report-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.report-reason-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.report-reason-option:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.report-reason-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary-light);
  cursor: pointer;
}

.report-reason-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-reason-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.report-reason-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.report-details-group {
  margin-bottom: 18px;
}

.report-details-group textarea {
  width: 100%;
  height: 72px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  resize: vertical;
  outline: none;
}

.report-details-group textarea:focus {
  border-color: var(--border-focus);
}

.report-actions-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ================= SIDEBAR SPONSORED SECTION (HOME) ================= */
.sidebar-sponsored-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-sponsored-section .section-header {
  padding: 2px 4px 6px;
}

.sidebar-sponsored-section .section-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.sponsored-sidebar-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1.5px 6px;
  border-radius: var(--radius-pill);
}

.sidebar-sponsored-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-sponsored-item {
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.sidebar-sponsored-item:hover {
  background-color: var(--bg-hover);
}

.sponsored-item-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  padding: 5px 6px;
  border-radius: var(--radius-md);
  color: inherit;
}

.sponsored-thumb {
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
}

.sponsored-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.sponsored-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 2px;
}

.sponsored-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 0 0 3px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sponsored-domain {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* White background around and outside reel comments */
.right-sidebar.reel-comment-sidebar,
.watch-page .reel-comment-sidebar {
  background: var(--bg-card) !important;
}

.confirm-delete-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.delete-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.delete-icon-circle svg {
  width: 26px;
  height: 26px;
}

.confirm-delete-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.confirm-delete-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Post deletion collapse animation */
.post-collapsing {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  opacity: 0 !important;
  transform: scale(0.9) !important;
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

/* QR Code Card Modal */
.qr-modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-card);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-code-graphic {
  width: 180px;
  height: 180px;
  margin: 16px auto;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-graphic svg {
  width: 100%;
  height: 100%;
}

/* ================= INFINITE SCROLL LOADER & CAUGHT-UP NOTICE ================= */
.feed-scroll-sentinel {
  width: 100%;
  padding: 24px 16px 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  position: relative;
  isolation: isolate;
  text-align: center;
}

.infinite-scroll-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e2e8f0);
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--text-secondary, #64748b);
  font-size: 13.5px;
  font-weight: 500;
  animation: infiniteFadeIn 0.25s ease-out;
}

[data-theme="dark"] .infinite-scroll-loader {
  background: var(--bg-card, #1e293b);
  border-color: var(--border-card, #334155);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  color: #94a3b8;
}

.infinite-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(82, 183, 136, 0.22);
  border-top-color: var(--primary, #2d6a4f);
  animation: infiniteSpinner 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes infiniteSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes infiniteFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-caught-up-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 20px 24px;
  animation: infiniteFadeIn 0.35s ease-out;
}

.caught-up-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: rgba(82, 183, 136, 0.12);
  border: 1px solid rgba(82, 183, 136, 0.28);
  border-radius: 9999px;
  color: var(--primary, #2d6a4f);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(82, 183, 136, 0.08);
}

[data-theme="dark"] .caught-up-badge {
  background: rgba(116, 198, 157, 0.14);
  border-color: rgba(116, 198, 157, 0.3);
  color: #74c69d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.caught-up-badge svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.caught-up-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-tertiary, #94a3b8);
}

.feed-post-entering {
  animation: postEntrySlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes postEntrySlide {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= IMAGE & VIDEO POST COMPACT 2-LINE CLAMP & FIT ================= */
.feed-post.has-media-post,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) {
  max-height: none;
}

.feed-post.has-media-post > .post-content,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) > .post-content {
  overflow: visible !important;
}

.feed-post.has-media-post .post-description:not(.description-expanded),
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-description:not(.description-expanded) {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.45 !important;
  font-size: 13.5px !important;
  margin-bottom: 2px !important;
  max-height: calc(1.45em * 2) !important;
}

.feed-post.has-media-post .post-description.description-expanded,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-description.description-expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  max-height: none !important;
  margin-bottom: 6px !important;
}

.feed-post.has-media-post .post-description-toggle:not([hidden]),
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-description-toggle:not([hidden]) {
  display: inline-block !important;
  min-height: 18px;
  margin: 0 0 6px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  line-height: 18px;
  font-weight: 700;
  color: var(--primary-light, #52b788);
  cursor: pointer;
  text-align: left;
}

.feed-post.has-media-post .post-title,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15.5px;
  line-height: 1.32;
  margin-bottom: 6px;
}

.feed-post.has-media-post .single-image-wrapper,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .single-image-wrapper,
.feed-post.has-media-post .video-media-card,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .video-media-card,
.feed-post.has-media-post .post-slider-wrapper,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-slider-wrapper {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.feed-post.has-media-post .single-image-wrapper,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .single-image-wrapper {
  max-height: 540px !important;
  min-height: 280px !important;
  height: auto !important;
  background: #000000 !important;
}

.feed-post.has-media-post .single-image-wrapper img,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .single-image-wrapper img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-height: 540px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

.feed-post.has-media-post .post-slider-wrapper,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .post-slider-wrapper {
  height: 420px !important;
  max-height: 440px !important;
  background: #050505 !important;
}

.feed-post.has-media-post .video-media-card,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .video-media-card {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: 520px !important;
  min-height: 280px !important;
  background: #000000 !important;
}

.feed-post.has-media-post .video-media-card video,
.feed-post:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-media, video) .video-media-card video {
  position: static !important;
  max-height: 520px !important;
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

/* Ensure all left sidebar items are visible by default and more/less toggles are removed */
.more-toggle,
.category-list-toggle {
  display: none !important;
}

.left-sidebar .primary-nav li[hidden],
.left-sidebar .category-list li[hidden] {
  display: list-item !important;
}

/* ==========================================================================
   FACEBOOK & INSTAGRAM STYLE POST CARDS (SIZE-WISE & STYLE-WISE)
   ========================================================================== */

/* 1. Feed Post Card Container */
.feed-post {
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid var(--border-card, #e4e6eb) !important;
  background: var(--bg-card, #ffffff) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  overflow: hidden !important;
  margin-bottom: 16px !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.feed-post:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* 2. FB/Instagram Post Header */
.feed-post .post-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 16px 8px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
  gap: 12px !important;
}

.feed-post .author-info-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

/* Hide awkward top-left dropdown before avatar if present */
.feed-post .post-options-top-left {
  display: none !important;
}

.feed-post .author-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

.feed-post .author-details {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  gap: 1px !important;
}

.feed-post .author-name-line {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.feed-post .author-name {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: var(--text-main, #050505) !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  cursor: pointer;
}

.feed-post .author-name:hover {
  text-decoration: underline !important;
}

.feed-post .post-owner-badge {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  background: var(--primary-tint, #eaf4ee) !important;
  color: var(--primary-light, #2d6a4f) !important;
}

.feed-post .author-handle,
.feed-post .post-time {
  font-size: 12.5px !important;
  color: var(--text-muted, #65676b) !important;
  font-weight: 400 !important;
}

.feed-post .dot-separator {
  color: var(--text-muted, #8a8d91) !important;
  font-size: 12px !important;
}

.feed-post .author-bio {
  font-size: 12px !important;
  color: var(--text-muted, #65676b) !important;
  margin-top: 1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
}

.feed-post .post-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.feed-post .badge-category-pill {
  background-color: var(--bg-hover, #f0f2f5) !important;
  color: var(--text-secondary, #65676b) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  border: 1px solid var(--border-light, #e4e6eb) !important;
}

.feed-post .post-options-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  color: var(--text-secondary, #65676b) !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.feed-post .post-options-btn:hover {
  background-color: var(--bg-hover, rgba(0, 0, 0, 0.05)) !important;
  color: var(--text-main, #050505) !important;
}

/* 3. Post Caption & Content */
.feed-post > .post-content {
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}

.feed-post .post-title {
  padding: 4px 16px 2px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--text-main, #050505) !important;
  margin: 0 0 4px 0 !important;
}

.feed-post .post-description {
  padding: 0 16px !important;
  font-size: 14px !important;
  line-height: 1.48 !important;
  color: var(--text-main, #1c1e21) !important;
  margin: 0 0 6px 0 !important;
}

.feed-post .post-description-toggle {
  margin: 0 16px 8px !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-muted, #65676b) !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
}

.feed-post .post-description-toggle:hover {
  text-decoration: underline !important;
}

.feed-post .post-tags {
  padding: 0 16px !important;
  margin: 0 0 10px 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.feed-post .post-tags .tag {
  background: transparent !important;
  color: var(--primary-light, #2d6a4f) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
}

.feed-post .post-tags .tag:hover {
  text-decoration: underline !important;
}

.feed-post .rich-content-body {
  padding: 0 16px !important;
}

.feed-post .link-preview-box {
  margin: 0 16px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-light, #e4e6eb) !important;
}

/* Text-only posts retain comfortable padding */
.feed-post:not(.has-media-post):not(:has(.single-image-wrapper, .post-slider-wrapper, .video-media-card, .video-post-media, .post-gallery-layout, .post-image-strip, .link-preview-box)) > .post-content {
  padding: 0 16px 14px !important;
}

/* 4. Flush Edge-to-Edge Media & FB/IG Dimensions */
.feed-post .single-image-wrapper,
.feed-post .post-slider-wrapper,
.feed-post .video-media-card,
.feed-post .video-post-media,
.feed-post #videoPostMedia,
.feed-post .post-gallery-layout,
.feed-post .post-image-strip {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

/* Single Image Post */
.feed-post .single-image-wrapper {
  max-height: 540px !important;
  min-height: 280px !important;
  height: auto !important;
  background: #000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.feed-post .single-image-wrapper > img {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-height: 540px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  transition: transform 0.3s ease !important;
}

.feed-post .single-image-wrapper:hover > img {
  transform: scale(1.015) !important;
}

/* Instagram-style Carousel Slider */
.feed-post .post-slider-wrapper {
  height: 420px !important;
  max-height: 440px !important;
  background: #050505 !important;
}

.feed-post .post-slider-wrapper .slider-track-wrap {
  position: relative !important;
  height: 100% !important;
}

.feed-post .slider-slide-item {
  height: 100% !important;
  min-width: 100% !important;
}

.feed-post .slider-slide-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}

/* Video Post */
.feed-post .video-media-card,
.feed-post .video-post-media,
.feed-post #videoPostMedia {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: 520px !important;
  min-height: 280px !important;
  background: #000000 !important;
}

.feed-post .video-media-card video,
.feed-post .video-post-media video,
.feed-post #videoPostMedia video {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

/* Gallery & Strip: 2px clean gap, flush */
.feed-post .post-gallery-layout {
  height: 320px !important;
  gap: 2px !important;
  border-radius: 0 !important;
  background: #000 !important;
}

.feed-post .gallery-main,
.feed-post .gallery-thumbs,
.feed-post .thumb-box,
.feed-post .strip-item {
  border-radius: 0 !important;
}

.feed-post .post-image-strip {
  gap: 2px !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

.feed-post .strip-item {
  height: 160px !important;
}

/* 5. Post Owner Insights Bar (Single Row, Inset with Gap from Left & Right Lines) */
.feed-post .post-owner-insights-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 10px 16px 12px !important;
  padding: 8px 12px !important;
  background: var(--bg-subtle, #f7f9fa) !important;
  border: 1px solid var(--border-light, #e4e6eb) !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.feed-post .post-owner-insights-bar .insights-preview-info {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 0 auto !important;
}

.feed-post .post-owner-insights-bar .insights-badge-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-main, #050505) !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

.feed-post .post-owner-insights-bar .insights-badge-chip svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  color: #10b981 !important;
}

.feed-post .post-owner-insights-bar .insights-growth-pill {
  display: inline-flex !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #059669 !important;
  background: rgba(5, 150, 105, 0.12) !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.feed-post .post-owner-insights-bar .insights-actions-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.feed-post .post-owner-insights-bar .btn-owner-tool {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  min-height: 32px !important;
  transition: all 0.15s ease !important;
}

.feed-post .post-owner-insights-bar .btn-insights-trigger {
  background: var(--bg-card, #ffffff) !important;
  color: var(--text-main, #050505) !important;
  border: 1px solid var(--border-light, #e4e6eb) !important;
}

.feed-post .post-owner-insights-bar .btn-insights-trigger:hover {
  background: var(--bg-hover, #f0f2f5) !important;
}

.feed-post .post-owner-insights-bar .btn-boost-trigger {
  background: #1b4332 !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
}

.feed-post .post-owner-insights-bar .btn-boost-trigger:hover {
  background: #2d6a4f !important;
}

@media (max-width: 500px) {
  .feed-post .post-owner-insights-bar {
    margin: 8px 12px 10px !important;
    padding: 6px 10px !important;
    gap: 6px !important;
  }

  .feed-post .post-owner-insights-bar .btn-owner-tool {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    min-height: 30px !important;
    gap: 4px !important;
  }
}

/* 6. FB/Instagram Post Footer & Action Buttons */
.feed-post .post-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 4px 12px 6px !important;
  border-top: 1px solid var(--border-light, #e4e6eb) !important;
  margin-top: 0 !important;
  background: var(--bg-card, #ffffff) !important;
  flex-shrink: 0 !important;
}

.feed-post .left-actions,
.feed-post .right-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.feed-post .post-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-secondary, #65676b) !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease !important;
  user-select: none !important;
}

.feed-post .post-action-btn:hover {
  background-color: var(--bg-hover, rgba(0, 0, 0, 0.05)) !important;
  color: var(--text-main, #050505) !important;
}

.feed-post .post-action-btn:active {
  transform: scale(0.96) !important;
}

.feed-post .post-action-btn svg {
  width: 19px !important;
  height: 19px !important;
}

/* Like / Upvote Active State */
.feed-post .upvote-btn.active {
  color: #208b58 !important;
  background-color: rgba(45, 106, 79, 0.08) !important;
}

.feed-post .upvote-btn.active svg {
  fill: currentColor !important;
}

/* Save Active State */
.feed-post .save-btn.active {
  color: var(--primary-light, #2d6a4f) !important;
}

.feed-post .save-btn.active svg {
  fill: currentColor !important;
}

/* Mobile Stories Carousel: remove left and right space on mobile view */
@media (max-width: 900px) {
  .home-page .feed-main,
  .feed-main:has(.stories-section) {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .stories-section,
  .home-page .stories-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .stories-track,
  .home-page .stories-track {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    gap: 12px !important;
  }
}

/* ==========================================================================
   CENTERED MIDDLE SHARE POST & REPOST MODAL POPUP (NOT A DRAWER)
   ========================================================================== */

/* 1. Backdrop centered vertically and horizontally */
.share-drawer-backdrop,
#shareBottomDrawer,
#repostModal.modal-backdrop,
#repostModal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(8, 14, 10, 0.68) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 2100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.22s ease, visibility 0.22s ease !important;
}

.share-drawer-backdrop.show,
#shareBottomDrawer.show,
#repostModal.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* 2. Middle Popup Modal Card */
.share-bottom-drawer,
.repost-modal-card {
  width: 100% !important;
  max-width: 480px !important;
  max-height: min(88vh, 620px) !important;
  background: var(--bg-card, #ffffff) !important;
  border-radius: 20px !important;
  border: 1px solid var(--border-card, #e4e6eb) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.1) !important;
  padding: 22px 24px 26px !important;
  margin: auto !important;
  position: relative !important;
  overflow-y: auto !important;
  transform: scale(0.92) !important;
  opacity: 0 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  box-sizing: border-box !important;
}

.share-drawer-backdrop.show .share-bottom-drawer,
#shareBottomDrawer.show .share-bottom-drawer,
#repostModal.show .repost-modal-card {
  transform: scale(1) !important;
  opacity: 1 !important;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Hide drawer pull handle / drag pill */
.drawer-drag-pill {
  display: none !important;
}

/* Header */
.drawer-header-row,
.repost-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.drawer-header-row h3,
.repost-modal-header h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--text-main, #050505) !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Close Button */
#closeShareDrawerBtn,
#closeRepostModal {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  background: var(--bg-hover, rgba(0, 0, 0, 0.05)) !important;
  color: var(--text-secondary, #65676b) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 20px !important;
  line-height: 1 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

#closeShareDrawerBtn:hover,
#closeRepostModal:hover {
  background: var(--bg-active-pill, rgba(0, 0, 0, 0.1)) !important;
  color: var(--text-main, #050505) !important;
}





