/* ==========================================================================
   Bitchat Custom UI — Modern & Clean Redesign
   Version: 1.0
   Loads after dark.css for highest override priority.
   Fully reversible: remove the <link> tag in container.phtml to revert.
   ========================================================================== */

/* ==========================================================================
   Phase 0: Design Tokens
   ========================================================================== */

:root {
  /* Spacing scale */
  --bc-space-xs: 4px;
  --bc-space-sm: 8px;
  --bc-space-md: 16px;
  --bc-space-lg: 24px;
  --bc-space-xl: 32px;
  --bc-space-2xl: 48px;

  /* Border radius */
  --bc-radius-sm: 8px;
  --bc-radius-md: 12px;
  --bc-radius-lg: 16px;
  --bc-radius-xl: 20px;
  --bc-radius-full: 9999px;

  /* Shadows — subtle, Twitter/X-like */
  --bc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --bc-shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --bc-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --bc-shadow-dropdown: 0 4px 24px rgba(0, 0, 0, 0.12);

  /* Borders */
  --bc-border-color: rgba(0, 0, 0, 0.08);
  --bc-border-light: 1px solid rgba(0, 0, 0, 0.08);
  --bc-border-default: 1px solid rgba(0, 0, 0, 0.12);

  /* Typography */
  --bc-font-sans: 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bc-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Surface colors */
  --bc-surface-primary: #ffffff;
  --bc-surface-secondary: #f7f9fa;
  --bc-surface-hover: rgba(0, 0, 0, 0.03);
  --bc-text-primary: #0f1419;
  --bc-text-secondary: #536471;
  --bc-text-tertiary: #8899a6;

  /* Transitions */
  --bc-transition-fast: 150ms ease;
  --bc-transition-normal: 200ms ease;
  --bc-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Missing vars (referenced elsewhere) */
  --bc-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.10);
  --bc-shadow-soft: 0 1px 4px rgba(0, 0, 0, 0.05);
  --bc-bg: var(--bc-surface-secondary);
  --bc-card: var(--bc-surface-primary);
  --bc-container-md: 950px;
}

/* Dark mode overrides — uses :has() for modern browsers, .bc-dark-mode class as JS fallback */
html:has(link#night-mode-css),
html.bc-dark-mode,
body.night_mode {
  --bc-surface-primary: #212121;
  --bc-surface-secondary: #181818;
  --bc-surface-hover: rgba(255, 255, 255, 0.05);
  --bc-text-primary: #e7e9ea;
  --bc-text-secondary: #8899a6;
  --bc-text-tertiary: #6e7a85;
  --bc-border-color: rgba(255, 255, 255, 0.08);
  --bc-border-light: 1px solid rgba(255, 255, 255, 0.08);
  --bc-border-default: 1px solid rgba(255, 255, 255, 0.12);
  --bc-border: rgba(255, 255, 255, 0.08);
  --bc-bg-tertiary: #2a2a2a;
  --bc-bg-hover: rgba(255, 255, 255, 0.06);
  --bc-shadow-sm: none;
  --bc-shadow-md: 0 1px 3px rgba(0, 0, 0, 0.3);
  --bc-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
  --bc-shadow-dropdown: 0 4px 24px rgba(0, 0, 0, 0.5);
  --bc-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
  --bc-shadow-soft: 0 1px 4px rgba(0, 0, 0, 0.3);
}


/* ==========================================================================
   Phase 1: Welcome / Login Page
   ========================================================================== */

/* Subtle the SVG blob decoration */
.tag_auth_effect {
  opacity: 0.03;
}

/* Welcome page background */
.tag_welcome {
  background: linear-gradient(160deg, var(--bc-surface-secondary) 0%, var(--bc-surface-primary) 60%);
}

/* Welcome title — bigger, bolder */
.tag_wel_title {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-weight: 500;
  color: var(--bc-text-primary);
  margin: 40px 0 28px;
}

/* Trending hashtag pills */
.tag_wel_trend .btn {
  border-radius: var(--bc-radius-full);
  background: rgba(0, 0, 0, 0.04);
  border: var(--bc-border-light);
  padding: 0 14px;
  line-height: 32px;
  font-size: 13px;
  color: var(--bc-text-secondary);
  transition: all var(--bc-transition-fast);
}
.tag_wel_trend .btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--bc-text-primary);
}

/* Widget section titles */
.tag_wel_widget > p {
  font-size: 15px;
  font-weight: 600;
  color: var(--bc-text-secondary);
  letter-spacing: 0.2px;
}

/* Login card — cleaner shadow, more spacious */
.tag_auth_box {
  border-radius: var(--bc-radius-lg);
  padding: 32px 40px;
  box-shadow: var(--bc-shadow-lg);
  border: var(--bc-border-light);
  background: var(--bc-surface-primary);
}

/* Login form title */
.tag_auth_box > form > p.title,
.regest_frst_step > p.title,
.regest_sec_step > p.title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--bc-text-primary);
}

/* Material form fields — smoother */
.tag_field > input,
.tag_field > textarea,
.tag_field > select {
  border-radius: var(--bc-radius-sm) var(--bc-radius-sm) 0 0;
  background-color: var(--bc-surface-secondary);
  transition: border-color var(--bc-transition-fast), background-color var(--bc-transition-fast);
}
.tag_field > input:focus,
.tag_field > textarea:focus,
.tag_field > select:focus {
  background-color: var(--bc-surface-primary);
}

/* Chat send button — same size and position style as .tag_chat_emoji */
.bc-chat-send-btn {
  position: absolute;
  right: 13px;
  bottom: 14px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--main);
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
}
.bc-chat-send-btn svg {
  width: 18px;
  height: 18px;
}
.bc-chat-send-btn:hover,
.bc-chat-send-btn:active {
  opacity: 1;
}
/* Shift emoji picker left to make room for send button */
.chat-textarea .tag_chat_emoji {
  right: 40px !important;
}
/* Increase textarea right padding for both buttons */
.chat-textarea textarea {
  padding-right: 62px !important;
}

/* Fix floating label overlap on pre-filled inputs.
   Increase border-top to create clear gap between floated label and input text.
   Also ensure the "sunk" label (empty input) moves down enough to not clash. */
.tag_field > input,
.tag_field > textarea {
  border-top: solid 26px transparent !important;
  padding-top: 2px;
}
.tag_field > input,
.tag_field > select {
  height: 60px;
}
/* Floated label (input has value or is focused): small, clearly above text */
.tag_field > input + span,
.tag_field > textarea + span,
.tag_field > select + span {
  padding: 5px 16px 0;
  font-size: 12px;
}
/* Sunk label (empty input, unfocused): larger, centered in input */
.tag_field > input:not(:focus):placeholder-shown + span,
.tag_field > textarea:not(:focus):placeholder-shown + span {
  font-size: 15px;
  padding: 18px 16px;
}

/* Login button — pill shaped, full width */
.tag_wel_btn {
  border-radius: var(--bc-radius-full);
  line-height: 48px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all var(--bc-transition-fast);
}
.tag_wel_btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--bc-shadow-md);
}

/* OR divider */
.u_divider {
  margin: 24px 0;
  font-size: 12px;
  color: var(--bc-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}
.u_divider:before,
.u_divider:after {
  background: var(--bc-border-color);
}

/* Social login buttons — circular with border */
.social_btns .btn {
  border-radius: var(--bc-radius-full);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--bc-border-light);
  transition: all var(--bc-transition-fast);
  background: var(--bc-surface-secondary);
  padding: 0;
}
.social_btns .btn:hover {
  background: var(--bc-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-sm);
}
.social_btns .btn svg {
  width: 24px;
  height: 24px;
}

/* Register link below form */
.tag_wel_register {
  margin: 24px 0 0 auto;
  font-size: 15px;
  color: var(--bc-text-secondary);
}

/* Auth animation overlay */
.tag_auth_animation {
  border-radius: var(--bc-radius-lg);
}

/* Remember/Forgot row */
.remember-forgot-wrap {
  font-size: 13px;
  color: var(--bc-text-secondary);
  margin-bottom: 20px;
}
.forgot-link {
  color: var(--main);
  text-decoration: none;
  font-weight: 500;
}
.forgot-link:hover {
  text-decoration: underline;
  color: var(--main-hover);
}

/* Welcome header nav buttons */
.tag_wel_upper .navbar-default .btn-main {
  border-radius: var(--bc-radius-full);
  padding: 0 24px;
  line-height: 40px;
  font-weight: 500;
}

/* Welcome page responsive */
@media (max-width: 768px) {
  .tag_wel_title {
    font-size: 26px;
    margin: 24px 0 20px;
  }
  .tag_auth_box {
    padding: 24px;
    margin: 24px auto 0;
  }
}


/* ==========================================================================
   Phase 2: Header & Navigation
   ========================================================================== */

/* Top navigation bar — frosted glass */
.tag_navbar_top {
  box-shadow: none;
  border-bottom: var(--bc-border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Search bar — rounder, clean focus ring */
.tag_header .search-input {
  border-radius: var(--bc-radius-full);
  height: 42px;
  padding: 10px 10px 10px 40px;
  background: var(--header-search-color);
  border: 2px solid transparent;
  transition: all var(--bc-transition-fast);
}
.tag_header .search-input:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.1);
}

/* Header icon buttons */
.tag_hdr_droptoggle {
  border-radius: var(--bc-radius-full);
  padding: 8px;
  transition: background var(--bc-transition-fast);
}
.tag_hdr_droptoggle:hover {
  background: var(--bc-surface-hover);
}
.show > .tag_hdr_droptoggle {
  background: var(--bc-surface-hover);
}

/* Notification count badge — pill */
.new-update-alert {
  border-radius: var(--bc-radius-full);
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
}

/* User avatar in header */
.tag_hdr_user_droptoggle img {
  border: 2px solid transparent;
  transition: border-color var(--bc-transition-fast);
}
.tag_hdr_user_droptoggle:hover img {
  border-color: var(--bc-border-color);
}

/* Dropdown menus — cleaner, animated */
.dropdown-menu {
  border-radius: var(--bc-radius-md);
  box-shadow: var(--bc-shadow-dropdown);
  border: var(--bc-border-light);
  padding: var(--bc-space-sm);
  animation: bc-dropdown-enter 150ms ease;
}
@keyframes bc-dropdown-enter {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dropdown items */
.tag_hdr_user_dropdown > li > a,
.tag_create_menu > li > a {
  border-radius: var(--bc-radius-sm);
  padding: 8px 12px;
  transition: background var(--bc-transition-fast);
}
.tag_hdr_user_dropdown > li > a:hover,
.tag_create_menu > li > a:hover {
  background: var(--bc-surface-hover);
}

/* Notification panel header */
.tag_page_title.m5 {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--bc-font-sans);
}

/* Left sidebar */
.tag_navbar_top_side {
  border-right: var(--bc-border-light);
}

/* Sidebar nav buttons */
.tag_navbar_top_side .sidebar_innr > .btn,
.tag_side_btn {
  border-radius: var(--bc-radius-sm);
  transition: background var(--bc-transition-fast);
}
.tag_navbar_top_side .sidebar_innr > .btn:hover,
.tag_side_btn:hover {
  background: var(--bc-surface-hover);
}

/* Sidebar icon containers */
.tag_side_btn svg {
  border-radius: var(--bc-radius-md);
}

/* Mobile sidebar overlay */
@media (max-width: 1150px) {
  .tag_navbar_top_side {
    border-radius: 0 var(--bc-radius-lg) var(--bc-radius-lg) 0;
  }
}


/* ==========================================================================
   Phase 3: Feed & Post Cards
   ========================================================================== */

/* Card wrapper — thin border instead of heavy shadow */
.wow_content {
  border-radius: var(--bc-radius-md);
  box-shadow: none;
  border: var(--bc-border-light);
  transition: box-shadow var(--bc-transition-normal);
}

/* Post heading — tighter, cleaner */
.post .post-heading {
  padding: var(--bc-space-md);
}
.post .post-heading .meta .title a {
  font-size: 15px;
  font-weight: 600;
  color: var(--bc-text-primary);
}
.post .post-heading .meta .time,
.post .post-heading .meta .time a {
  font-size: 13px;
  color: var(--bc-text-tertiary);
}

/* Post content text */
.post .post-description,
.post .post-description p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--bc-text-primary);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Post footer separator */
.post .post-footer {
  border-top-color: var(--bc-border-color);
}

/* Post action buttons (like, comment, share) — transparent hover circles */
.tag_post_actions .stat-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--bc-text-secondary);
  transition: color var(--bc-transition-fast);
}
.tag_post_actions .stat-item:hover {
  color: var(--bc-text-primary);
}
.tag_post_actions .stat-item .icoo {
  border-radius: var(--bc-radius-full);
  transition: background var(--bc-transition-fast);
}
.tag_post_actions .stat-item:hover .icoo {
  background-color: var(--bc-surface-hover);
}

/* Comment bubbles — rounder */
.comment .tag_comm_body .comment-text {
  border-radius: var(--bc-radius-lg);
  background-color: var(--bc-surface-secondary);
}

/* Comment input */
.wo_comment_combo > .valign {
  border-radius: var(--bc-radius-full);
  background-color: var(--bc-surface-secondary);
}

/* Feed filter bar */
.tag_home_filters {
  padding: 12px 0;
}

/* Feed filter tabs — pill style */
.tag_page_nav li a {
  border-radius: var(--bc-radius-full);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  line-height: 34px;
  border: var(--bc-border-light);
  transition: all var(--bc-transition-fast);
}
.tag_page_nav li.active a,
.tag_page_nav li a:hover {
  border-color: var(--main);
  color: var(--main);
}

/* Stories carousel */
.tag_stories_on_home {
  margin-bottom: 24px;
}
.tag_stories_on_home .tag_stories_mobi .status-list li a img {
  border: 3px solid var(--main);
  padding: 2px;
  border-radius: var(--bc-radius-full);
}

/* Shared link previews */
.post .fetched-url {
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  border: var(--bc-border-light);
}

/* Post image containers */
.tag_post_full_img,
.post_img {
  border-radius: var(--bc-radius-sm);
  overflow: hidden;
}

/* Load more button */
.load-more .btn {
  border-radius: var(--bc-radius-full);
  border: var(--bc-border-default);
  font-weight: 500;
  transition: all var(--bc-transition-fast);
}
.load-more .btn:hover {
  background-color: var(--bc-surface-hover);
}

/* Skeleton loaders */
.skel {
  border-radius: var(--bc-radius-sm);
}
.skel.skel_avatar,
.skel_avatar {
  border-radius: var(--bc-radius-full);
}

/* Greeting alert bar - 60% smaller */
.greetalert {
  border-radius: var(--bc-radius-md);
  border: var(--bc-border-light);
  padding: 8px 12px !important;
  margin-bottom: 16px !important;
}
.greetalert .small-texts {
  font-size: 11px !important;
  letter-spacing: -0.2px !important;
  line-height: 1.2 !important;
  margin: 0 0 2px !important;
}
.greetalert p {
  font-size: 10px !important;
  letter-spacing: 0.1px !important;
  margin: 0 !important;
}
/* Larger screens - also 60% smaller */
@media (min-width: 768px) {
  .greetalert .small-texts {
    font-size: 11px !important;
  }
}

/* Announcement banner */
.tag_announce {
  border-radius: var(--bc-radius-md);
}

/* Post responsive */
@media (max-width: 768px) {
  .post .post-heading {
    padding: 12px;
  }
  .wow_content {
    border-radius: var(--bc-radius-sm);
  }
}


/* ==========================================================================
   Phase 4: Profile / Timeline
   ========================================================================== */

/* Cover photo container */
.tag_cover_bg .card.hovercard {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
}
.wo_event_profile .cardheader,
.wo_user_profile .cardheader {
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
}

/* Cover photo gradient overlay */
.tag_cover_bg_grad {
  background: linear-gradient(rgba(0, 0, 0, 0) 40%, var(--body-bg) 100%);
}

/* Profile info card */
.tag_page_name_hdr {
  border-radius: 0 0 var(--bc-radius-md) var(--bc-radius-md);
  border: var(--bc-border-light);
  border-top: none;
  box-shadow: none;
}

/* Profile avatar */
.tag_page_name_hdr .user-avatar img,
.wo_user_profile .user-avatar img {
  padding: 4px;
  background-color: var(--bc-surface-primary);
  border-radius: var(--bc-radius-full);
  box-shadow: var(--bc-shadow-md);
}

/* Profile name */
.tag_page_name_hdr .event-info-cont-small h3 {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--bc-font-sans);
  color: var(--bc-text-primary);
  margin-bottom: 2px;
}

/* Profile username / subtitle */
.tag_page_name_hdr .event-info-cont-small .event_cdown,
.tag_page_name_hdr .event-info-cont-small p {
  color: var(--bc-text-tertiary);
  font-size: 15px;
}

/* Follow / Message buttons — pill shaped */
.tag_page_name_hdr .btn-main {
  border-radius: var(--bc-radius-full);
  padding: 0 24px;
  line-height: 38px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--bc-transition-fast);
}
.tag_page_name_hdr .btn-main:hover {
  transform: translateY(-1px);
  box-shadow: var(--bc-shadow-md);
}
.tag_page_name_hdr .btn-default,
.tag_page_name_hdr .btn-mat:not(.btn-main) {
  border-radius: var(--bc-radius-full);
  border: var(--bc-border-default);
  padding: 0 20px;
  line-height: 36px;
  font-weight: 500;
  transition: all var(--bc-transition-fast);
}
.tag_page_name_hdr .btn-default:hover {
  background: var(--bc-surface-hover);
}

/* Profile tabs */
.user-bottom-nav {
  border-top-color: var(--bc-border-color);
}
.user-bottom-nav li a {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bc-text-secondary);
  transition: color var(--bc-transition-fast), background var(--bc-transition-fast);
}
.user-bottom-nav li a:hover {
  color: var(--bc-text-primary);
  background: var(--bc-surface-hover);
}
.user-bottom-nav li .menuactive {
  color: var(--main);
  font-weight: 600;
}
.user-bottom-nav li .menuactive:after {
  height: 3px;
  border-radius: 3px 3px 0 0;
}

/* Cover photo action buttons — frosted glass */
.profile_cover .btn,
.tag_cover_bg .cardheader > .btn,
.tag_cover_bg .cardheader > span > .btn {
  border-radius: var(--bc-radius-full);
  padding: 0 16px;
  line-height: 36px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  transition: background var(--bc-transition-fast);
}
.profile_cover .btn:hover,
.tag_cover_bg .cardheader > .btn:hover,
.tag_cover_bg .cardheader > span > .btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* Go back button */
.btn_goback {
  border-radius: var(--bc-radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.3);
  transition: background var(--bc-transition-fast);
}
.btn_goback:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Pro badge */
.pro-badge {
  border-radius: var(--bc-radius-sm);
  font-size: 10px;
  padding: 2px 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Profile media grid */
.user_media_list_section .photo-data a,
.user_media_list_section .video-data a {
  border-radius: var(--bc-radius-sm);
  overflow: hidden;
  transition: opacity var(--bc-transition-fast);
}
.user_media_list_section .photo-data a:hover,
.user_media_list_section .video-data a:hover {
  opacity: 0.85;
}

/* Profile responsive */
@media (max-width: 768px) {
  .tag_page_name_hdr .event-info-cont-small h3 {
    font-size: 18px;
  }
  .wo_event_profile .cardheader,
  .wo_user_profile .cardheader {
    border-radius: var(--bc-radius-sm);
  }
  .user-bottom-nav li a {
    padding: 12px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .tag_page_name_hdr .btn-main {
    padding: 0 16px;
    line-height: 34px;
    font-size: 13px;
  }
  .tag_page_name_hdr .btn-default,
  .tag_page_name_hdr .btn-mat:not(.btn-main) {
    padding: 0 14px;
    line-height: 32px;
    font-size: 13px;
  }
}


/* ==========================================================================
   Global Utility Overrides
   ========================================================================== */

/* TC_022: removing scroll-behavior:smooth from html — conflicts with
   jQuery animate({scrollTop:0}) causing double-scroll stutter on profile pages */
html {
  scroll-behavior: auto;
}

/* All buttons — consistent transitions */
.btn {
  transition: all var(--bc-transition-fast);
}

/* Primary action buttons globally — pill shape */
.btn-main {
  border-radius: var(--bc-radius-full);
}

/* Modal dialogs — cleaner */
.modal-content {
  border-radius: var(--bc-radius-lg);
  border: var(--bc-border-light);
  box-shadow: var(--bc-shadow-dropdown);
  overflow: hidden;
}
.modal-header {
  border-bottom-color: var(--bc-border-color);
}
.modal-footer {
  border-top-color: var(--bc-border-color);
}

/* Tooltips */
.tooltip-inner {
  border-radius: var(--bc-radius-sm);
}

/* Badge/label consistency */
.badge {
  border-radius: var(--bc-radius-full);
}

/* Image containers — subtle rounding */
.tag_post_full_img img,
.wo_post_img img {
  border-radius: var(--bc-radius-sm);
}

/* ==========================================================================
   "Today on Bitchat" Trending Section
   ========================================================================== */

.bc-trending-section {
  margin: var(--bc-space-md) 0;
  padding: 0;
}
.bc-trending-header {
  display: flex;
  align-items: center;
  gap: var(--bc-space-sm);
  margin-bottom: var(--bc-space-sm);
  padding: 0 var(--bc-space-xs);
}
.bc-trending-header svg {
  color: #f59e0b;
  flex-shrink: 0;
}
.bc-trending-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--bc-text, #1a1a2e);
}
.bc-trending-strip {
  display: flex;
  gap: var(--bc-space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--bc-space-xs);
  scrollbar-width: none;
}
.bc-trending-strip::-webkit-scrollbar {
  display: none;
}
.bc-trending-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--bc-shadow-md);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bc-trending-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
}
.bc-trending-thumb {
  width: 100%;
  height: 100px;
  background-size: cover;
  background-position: center;
  background-color: #e5e7eb;
}
.bc-trending-thumb-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--bc-space-sm);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}
.bc-trending-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
}
.bc-trending-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.bc-trending-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.bc-trending-reactions {
  font-size: 11px;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Hide trending on small mobile screens */
@media (max-width: 480px) {
  .bc-trending-card {
    flex: 0 0 150px;
  }
  .bc-trending-thumb {
    height: 80px;
  }
}

/* ==========================================================================
   Story Creation Prompt
   ========================================================================== */

.bc-story-prompt {
  margin: var(--bc-space-sm) 0;
}
.bc-story-prompt-inner {
  display: flex;
  align-items: center;
  gap: var(--bc-space-sm);
  padding: 10px var(--bc-space-md);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--bc-radius-md);
  font-size: 13px;
  color: #92400e;
}
.bc-story-prompt-inner svg {
  flex-shrink: 0;
  color: #d97706;
}
.bc-story-prompt-inner span {
  flex: 1;
}
.bc-story-prompt-btn {
  flex-shrink: 0;
  padding: 5px 14px;
  background: #d97706;
  color: #fff !important;
  border-radius: var(--bc-radius-full);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.bc-story-prompt-btn:hover {
  background: #b45309;
}
.bc-story-prompt-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #92400e;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.6;
}
.bc-story-prompt-close:hover {
  opacity: 1;
}

/* ==========================================================================
   Anti-Flood Cooldown Notice
   ========================================================================== */

#posting-cooldown-notice {
  display: none;
  padding: 10px var(--bc-space-md);
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: var(--bc-radius-sm);
  margin-top: var(--bc-space-sm);
  font-size: 13px;
  color: #854d0e;
  animation: bc-fadeIn 0.3s ease;
}
#posting-cooldown-notice.visible {
  display: block;
}
@keyframes bc-fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dark mode overrides */
body.night_mode .bc-trending-card {
  background: #1e1e2e;
}
body.night_mode .bc-trending-header h4 {
  color: #e0e0e0;
}
body.night_mode .bc-trending-thumb-text {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}
body.night_mode .bc-story-prompt-inner {
  background: linear-gradient(135deg, #422006 0%, #713f12 100%);
  color: #fde68a;
}
body.night_mode .bc-story-prompt-inner svg {
  color: #fbbf24;
}
body.night_mode .bc-story-prompt-close {
  color: #fde68a;
}
body.night_mode #posting-cooldown-notice {
  background: #422006;
  border-color: #713f12;
  color: #fde68a;
}

/* ==========================================================================
   Creator Dashboard — Redesigned
   ========================================================================== */

/* CTA — "Become a Creator" */
.bc-cd-cta { position: relative; max-width: 520px; margin: 40px auto; text-align: center; }
.bc-cd-cta-glow { position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.bc-cd-cta-inner { position: relative; background: var(--bc-surface-primary, #fff); border-radius: var(--bc-radius-lg); padding: 48px 32px 40px; box-shadow: var(--bc-shadow-md); }
.bc-cd-cta-icon { margin-bottom: 16px; }
.bc-cd-cta-title { margin: 0 0 8px; font-size: 24px; font-weight: 700; color: var(--bc-text-primary, #0f1419); }
.bc-cd-cta-desc { margin: 0 0 28px; font-size: 14px; color: var(--bc-text-secondary, #536471); }
.bc-cd-cta-features { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-bottom: 32px; padding: 0 16px; }
.bc-cd-cta-feat { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--bc-text-primary, #0f1419); }
.bc-cd-cta-feat svg { flex-shrink: 0; }
.bc-cd-cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border: none; border-radius: var(--bc-radius-full, 9999px); background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 14px rgba(245,158,11,0.35); }
.bc-cd-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.45); }
.bc-cd-cta-btn:disabled { opacity: 0.7; cursor: default; transform: none; }

/* Dashboard Wrapper */
.bc-cd-wrap { max-width: 900px; margin: 0 auto; padding: 20px 0; }

/* Header */
.bc-cd-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.bc-cd-header-left { display: flex; align-items: center; gap: 14px; }
.bc-cd-header-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #f59e0b; }
.bc-cd-header-name { margin: 0; font-size: 20px; font-weight: 700; color: var(--bc-text-primary, #0f1419); line-height: 1.2; }
.bc-cd-header-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; background: #fef3c7; color: #b45309; }
.bc-cd-rank-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; margin-left: 4px; }
.bc-cd-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bc-cd-invite-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--bc-radius-full, 9999px); background: linear-gradient(135deg, #059669, #10b981); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: opacity 0.2s; }
.bc-cd-invite-btn:hover { opacity: 0.9; color: #fff !important; }
.bc-cd-wallet-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--bc-radius-full, 9999px); background: linear-gradient(135deg, #1e3a5f, #2563eb); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: opacity 0.2s; }
.bc-cd-wallet-btn:hover { opacity: 0.9; color: #fff !important; }

/* Stats Grid */
.bc-cd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.bc-cd-stat { background: var(--bc-surface-primary, #fff); border-radius: var(--bc-radius-md); padding: 18px 16px; box-shadow: var(--bc-shadow-sm); text-align: center; position: relative; overflow: hidden; }
.bc-cd-stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.bc-cd-stat-blue::before { background: #3b82f6; }
.bc-cd-stat-blue .bc-cd-stat-icon { color: #3b82f6; }
.bc-cd-stat-rose::before { background: #f43f5e; }
.bc-cd-stat-rose .bc-cd-stat-icon { color: #f43f5e; }
.bc-cd-stat-cyan::before { background: #06b6d4; }
.bc-cd-stat-cyan .bc-cd-stat-icon { color: #06b6d4; }
.bc-cd-stat-amber::before { background: #f59e0b; }
.bc-cd-stat-amber .bc-cd-stat-icon { color: #f59e0b; }
.bc-cd-stat-violet::before { background: #8b5cf6; }
.bc-cd-stat-violet .bc-cd-stat-icon { color: #8b5cf6; }
.bc-cd-stat-green::before { background: #22c55e; }
.bc-cd-stat-green .bc-cd-stat-icon { color: #22c55e; }
.bc-cd-stat-icon { margin-bottom: 8px; }
.bc-cd-stat h3 { margin: 0 0 2px; font-size: 22px; font-weight: 700; color: var(--bc-text-primary, #0f1419); }
.bc-cd-stat p { margin: 0; font-size: 12px; color: var(--bc-text-secondary, #536471); text-transform: uppercase; letter-spacing: 0.3px; }

/* Wallet + This Week Row */
.bc-cd-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.bc-cd-wallet-card { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); color: #fff; border-radius: var(--bc-radius-md); padding: 24px; }
.bc-cd-wallet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bc-cd-wallet-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.bc-cd-wallet-amount { font-size: 28px; font-weight: 700; line-height: 1.2; }
.bc-cd-wallet-amount small { font-size: 14px; opacity: 0.6; }
.bc-cd-wallet-divider { height: 1px; background: rgba(255,255,255,0.15); margin: 14px 0; }
.bc-cd-wallet-row { display: flex; justify-content: space-between; font-size: 13px; opacity: 0.85; }
.bc-cd-wallet-link { display: inline-block; margin-top: 14px; font-size: 13px; color: #93c5fd !important; text-decoration: none !important; font-weight: 500; }
.bc-cd-wallet-link:hover { color: #fff !important; }
.bc-cd-thisweek { background: var(--bc-surface-primary, #fff); border-radius: var(--bc-radius-md); padding: 24px; box-shadow: var(--bc-shadow-sm); display: flex; flex-direction: column; }
.bc-cd-thisweek-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.bc-cd-tw-item { text-align: center; padding: 12px; background: var(--bc-surface-secondary, #f7f9fa); border-radius: var(--bc-radius-sm); }
.bc-cd-tw-num { display: block; font-size: 24px; font-weight: 700; color: var(--bc-text-primary, #0f1419); }
.bc-cd-tw-label { font-size: 12px; color: var(--bc-text-secondary, #536471); }

/* Cards */
.bc-cd-card { background: var(--bc-surface-primary, #fff); border-radius: var(--bc-radius-md); padding: 24px; box-shadow: var(--bc-shadow-sm); margin-bottom: 20px; }
.bc-cd-section-title { font-size: 15px; font-weight: 600; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; color: var(--bc-text-primary, #0f1419); }

/* Chart */
.bc-cd-chart { display: flex; align-items: flex-end; justify-content: space-between; height: 140px; gap: 8px; padding-top: 20px; }
.bc-cd-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bc-cd-chart-val { font-size: 11px; font-weight: 600; color: var(--bc-text-secondary, #536471); margin-bottom: 4px; }
.bc-cd-chart-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #93c5fd, #3b82f6); border-radius: 6px 6px 0 0; min-height: 6px; transition: height 0.4s ease; }
.bc-cd-chart-bar-today { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.bc-cd-chart-day { margin-top: 8px; font-size: 11px; color: var(--bc-text-tertiary, #8899a6); font-weight: 500; }
.bc-cd-chart-day-today { color: #f59e0b; font-weight: 700; }

/* Milestones */
.bc-cd-milestone { padding: 14px 0; border-bottom: 1px solid #f3f4f6; }
.bc-cd-milestone:last-child { border-bottom: none; }
.bc-cd-milestone-done { opacity: 0.65; }
.bc-cd-ms-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bc-cd-ms-label { font-size: 14px; font-weight: 500; color: var(--bc-text-primary, #0f1419); display: flex; align-items: center; gap: 6px; }
.bc-cd-ms-check { display: inline-flex; }
.bc-cd-ms-reward { font-size: 13px; font-weight: 700; color: #f59e0b; }
.bc-cd-ms-bar { height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.bc-cd-ms-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 4px; transition: width 0.4s ease; }
.bc-cd-ms-bar-done { background: linear-gradient(90deg, #22c55e, #4ade80); }
.bc-cd-ms-bottom { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--bc-text-tertiary, #8899a6); }

/* Reward History */
.bc-cd-history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.bc-cd-history-item:last-child { border-bottom: none; }
.bc-cd-hi-left { display: flex; flex-direction: column; gap: 2px; }
.bc-cd-hi-amount { font-size: 14px; font-weight: 700; color: #22c55e; }
.bc-cd-hi-reason { font-size: 12px; color: var(--bc-text-secondary, #536471); }
.bc-cd-hi-date { font-size: 12px; color: var(--bc-text-tertiary, #8899a6); white-space: nowrap; }

/* Growth Stats Section */
.bc-cd-growth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bc-cd-growth-item { text-align: center; padding: 20px 12px; border-radius: var(--bc-radius-lg, 16px); position: relative; overflow: hidden; }
.bc-cd-growth-reach { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }
.bc-cd-growth-invited { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.bc-cd-growth-engagement { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.bc-cd-growth-icon { margin-bottom: 8px; }
.bc-cd-growth-reach .bc-cd-growth-icon { color: #059669; }
.bc-cd-growth-invited .bc-cd-growth-icon { color: #2563eb; }
.bc-cd-growth-engagement .bc-cd-growth-icon { color: #d97706; }
.bc-cd-growth-value { font-size: 28px; font-weight: 800; line-height: 1.1; }
.bc-cd-growth-reach .bc-cd-growth-value { color: #059669; }
.bc-cd-growth-invited .bc-cd-growth-value { color: #2563eb; }
.bc-cd-growth-engagement .bc-cd-growth-value { color: #d97706; }
.bc-cd-growth-label { font-size: 13px; font-weight: 600; color: var(--bc-text-secondary, #536471); margin-top: 4px; }
.bc-cd-growth-hint { font-size: 11px; color: var(--bc-text-tertiary, #8899a6); margin-top: 2px; }

/* Footer */
.bc-cd-footer { text-align: center; padding: 20px 0 10px; }
.bc-cd-disable-btn { padding: 10px 24px; border: 1px solid #e5e7eb; border-radius: var(--bc-radius-full, 9999px); background: transparent; color: var(--bc-text-tertiary, #8899a6); font-size: 13px; cursor: pointer; transition: all 0.2s; }
.bc-cd-disable-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* Creators Sidebar Widget */
.bc-creators-widget .tag_sidebar_widget_title b svg { vertical-align: -2px; margin-right: 4px; }

/* Spinner keyframe */
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .bc-cd-stats { grid-template-columns: repeat(2, 1fr); }
  .bc-cd-row-2 { grid-template-columns: 1fr; }
  .bc-cd-chart { height: 110px; }
  .bc-cd-growth-stats { grid-template-columns: 1fr; }
  .bc-cd-growth-value { font-size: 24px; }
}
@media (max-width: 480px) {
  .bc-cd-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bc-cd-stat { padding: 14px 10px; }
  .bc-cd-stat h3 { font-size: 18px; }
  .bc-cd-cta-inner { padding: 32px 20px; }
  .bc-cd-wallet-amount { font-size: 22px; }
}

/* Dark mode */
body.night_mode .bc-cd-cta-inner { background: #1e1e2e; }
body.night_mode .bc-cd-cta-title { color: #e0e0e0; }
body.night_mode .bc-cd-cta-desc { color: #9ca3af; }
body.night_mode .bc-cd-cta-feat { color: #e0e0e0; }
body.night_mode .bc-cd-header-name { color: #e0e0e0; }
body.night_mode .bc-cd-stat { background: #1e1e2e; }
body.night_mode .bc-cd-stat h3 { color: #e0e0e0; }
body.night_mode .bc-cd-stat p { color: #9ca3af; }
body.night_mode .bc-cd-card { background: #1e1e2e; }
body.night_mode .bc-cd-section-title { border-bottom-color: #2d2d3d; color: #e0e0e0; }
body.night_mode .bc-cd-thisweek { background: #1e1e2e; }
body.night_mode .bc-cd-tw-item { background: #2a2a3a; }
body.night_mode .bc-cd-tw-num { color: #e0e0e0; }
body.night_mode .bc-cd-wallet-card { background: linear-gradient(135deg, #1e1e2e 0%, #1d4ed8 100%); }
body.night_mode .bc-cd-chart-val { color: #9ca3af; }
body.night_mode .bc-cd-chart-day { color: #6b7280; }
body.night_mode .bc-cd-milestone { border-bottom-color: #2d2d3d; }
body.night_mode .bc-cd-ms-label { color: #e0e0e0; }
body.night_mode .bc-cd-ms-bar { background: #2d2d3d; }
body.night_mode .bc-cd-ms-bottom { color: #6b7280; }
body.night_mode .bc-cd-history-item { border-bottom-color: #2d2d3d; }
body.night_mode .bc-cd-hi-reason { color: #9ca3af; }
body.night_mode .bc-cd-disable-btn { border-color: #2d2d3d; color: #6b7280; }
body.night_mode .bc-cd-disable-btn:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }


/* ==========================================================================
   Phase 4: Discover Page
   ========================================================================== */
.bc-discover-header {
  padding: 20px 0 10px;
}
.bc-discover-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bc-discover-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.bc-discover-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.bc-discover-section-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.bc-discover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bc-discover-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eee;
  transition: transform .15s, box-shadow .15s;
}
.bc-discover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  text-decoration: none;
  color: inherit;
}
.bc-discover-card-thumb {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #f0f2f5;
}
.bc-discover-card-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: .85rem;
  color: #555;
  text-align: center;
}
.bc-discover-card-info {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
}
.bc-discover-card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.bc-discover-card-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-discover-card-reactions {
  color: #e91e63;
  font-size: .75rem;
  display: flex;
  align-items: center;
  gap: 2px;
}
.bc-discover-creators {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.bc-discover-creator-card {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
}
.bc-discover-creator-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f59e0b;
}
.bc-discover-creator-name {
  margin: 6px 0 4px;
  font-size: .82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-discover-follow-btn {
  font-size: .75rem;
  padding: 3px 14px;
  border-radius: 20px;
}
.bc-discover-follow-btn.bc-followed {
  background: #e8e8e8;
  color: #888;
  border-color: #e8e8e8;
}
.bc-discover-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bc-discover-hashtag-pill {
  display: inline-block;
  padding: 6px 14px;
  background: #f0f4ff;
  color: #1d4ed8;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.bc-discover-hashtag-pill:hover {
  background: #dbeafe;
  text-decoration: none;
  color: #1d4ed8;
}
.bc-discover-people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bc-discover-person-card {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid #eee;
}
.bc-discover-person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.bc-discover-person-name {
  margin: 6px 0;
  font-size: .82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-discover-empty {
  text-align: center;
  padding: 20px;
  color: #999;
}

/* Discover page responsive */
@media (max-width: 768px) {
  .bc-discover-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bc-discover-people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .bc-discover-grid {
    grid-template-columns: 1fr;
  }
  .bc-discover-people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Discover dark mode */
body.night_mode .bc-discover-section {
  background: #1e1e2e;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  border-color: #2d2d3d;
}
body.night_mode .bc-discover-card {
  border-color: #2d2d3d;
}
body.night_mode .bc-discover-card-text {
  color: #aaa;
}
body.night_mode .bc-discover-hashtag-pill {
  background: #2d2d3d;
  color: #60a5fa;
}
body.night_mode .bc-discover-hashtag-pill:hover {
  background: #3d3d4d;
  color: #60a5fa;
}
body.night_mode .bc-discover-person-card {
  border-color: #2d2d3d;
}
body.night_mode .bc-discover-follow-btn.bc-followed {
  background: #2d2d3d;
  color: #888;
  border-color: #2d2d3d;
}

/* ==========================================================================
   Phase 4: Welcome / Onboarding Flow
   ========================================================================== */
.bc-welcome-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 20px;
}
.bc-welcome-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  text-align: center;
}
.bc-welcome-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 30px;
}
.bc-welcome-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.bc-welcome-step.active {
  background: var(--bc-accent, #2196F3);
  color: #fff;
}
.bc-welcome-step.done {
  background: #22c55e;
  color: #fff;
}
.bc-welcome-step-line {
  width: 40px;
  height: 2px;
  background: #e8e8e8;
}
.bc-welcome-panel h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.bc-welcome-panel p {
  color: #666;
  margin-bottom: 20px;
}
.bc-welcome-avatar-area {
  margin: 20px 0;
}
.bc-welcome-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  position: relative;
  cursor: pointer;
  border: 3px solid #eee;
}
.bc-welcome-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bc-welcome-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  color: #fff;
}
.bc-welcome-avatar-preview:hover .bc-welcome-avatar-overlay {
  opacity: 1;
}
.bc-welcome-upload-btn {
  border-radius: 20px;
  padding: 6px 20px;
}
.bc-welcome-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.bc-welcome-skip {
  border-radius: 20px;
  padding: 6px 20px;
}
.bc-welcome-next {
  border-radius: 20px;
  padding: 6px 24px;
}
.bc-welcome-people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.bc-welcome-person {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid #eee;
}
.bc-welcome-person-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.bc-welcome-person-name {
  margin: 4px 0;
  font-size: .8rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-welcome-follow-all {
  border-radius: 20px;
  font-size: .85rem;
}
.bc-welcome-done-icon {
  margin-bottom: 16px;
}
.bc-welcome-start {
  border-radius: 24px;
  padding: 10px 36px;
  font-size: 1rem;
}

/* Welcome dark mode */
body.night_mode .bc-welcome-card {
  background: #1e1e2e;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
body.night_mode .bc-welcome-panel p {
  color: #aaa;
}
body.night_mode .bc-welcome-step {
  background: #2d2d3d;
  color: #888;
}
body.night_mode .bc-welcome-avatar-preview {
  border-color: #2d2d3d;
}
body.night_mode .bc-welcome-person {
  border-color: #2d2d3d;
}
body.night_mode .bc-welcome-step-line {
  background: #2d2d3d;
}

/* Welcome responsive */
@media (max-width: 480px) {
  .bc-welcome-card {
    padding: 24px 16px;
  }
  .bc-welcome-people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ====== Leaderboard ====== */
.bc-lb-wrap { max-width: 680px; margin: 0 auto; padding: 20px 0; }
.bc-lb-header { margin-bottom: 16px; }
.bc-lb-title { font-size: 22px; font-weight: 800; color: var(--bc-text-primary, #0f1419); }
.bc-lb-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--bc-border, #eff3f4); padding-bottom: 12px; }
.bc-lb-tab { padding: 8px 18px; border: none; background: var(--bc-bg-tertiary, #f7f9f9); border-radius: var(--bc-radius-full, 9999px); font-size: 14px; font-weight: 600; color: var(--bc-text-secondary, #536471); cursor: pointer; transition: all 0.2s; }
.bc-lb-tab:hover { background: var(--bc-bg-hover, #e7e9ea); }
.bc-lb-tab-active { background: var(--bc-primary, #1d9bf0); color: #fff; }
.bc-lb-tab-active:hover { background: var(--bc-primary-hover, #1a8cd8); }
.bc-lb-panel { display: none; }
.bc-lb-panel-active { display: block; }
.bc-lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--bc-radius-lg, 16px); transition: background 0.15s; }
.bc-lb-row:hover { background: var(--bc-bg-hover, #f7f9f9); }
.bc-lb-rank { width: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bc-lb-rank-num { font-size: 16px; font-weight: 700; color: var(--bc-text-tertiary, #8899a6); }
.bc-lb-rank-1 .bc-lb-rank-num { color: #f59e0b; }
.bc-lb-rank-2 .bc-lb-rank-num { color: #94a3b8; }
.bc-lb-rank-3 .bc-lb-rank-num { color: #cd7f32; }
.bc-lb-user { display: flex; align-items: center; gap: 10px; flex: 1; text-decoration: none; min-width: 0; }
.bc-lb-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bc-lb-info { display: flex; flex-direction: column; min-width: 0; }
.bc-lb-name { font-size: 14px; font-weight: 700; color: var(--bc-text-primary, #0f1419); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-lb-username { font-size: 13px; color: var(--bc-text-secondary, #536471); }
.bc-lb-metric { text-align: right; flex-shrink: 0; }
.bc-lb-metric-val { display: block; font-size: 16px; font-weight: 800; color: var(--bc-primary, #1d9bf0); }
.bc-lb-metric-label { font-size: 11px; color: var(--bc-text-tertiary, #8899a6); text-transform: uppercase; letter-spacing: 0.5px; }
.bc-lb-empty { text-align: center; padding: 40px 20px; color: var(--bc-text-tertiary, #8899a6); font-size: 14px; }
@media (max-width: 600px) {
  .bc-lb-wrap { padding: 12px 0; }
  .bc-lb-tabs { gap: 4px; }
  .bc-lb-tab { padding: 6px 12px; font-size: 13px; }
  .bc-lb-row { padding: 10px 8px; gap: 8px; }
  .bc-lb-avatar { width: 36px; height: 36px; }
}

/* ====== Announcement Banner ====== */
.bc-announce-banner { display: flex; align-items: center; justify-content: center; padding: 8px 40px 8px 20px; font-size: 14px; font-weight: 600; text-align: center; position: relative; z-index: 99; }
.bc-announce-link { text-decoration: underline; }
.bc-announce-link:hover { opacity: 0.85; }
.bc-announce-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 20px; cursor: pointer; opacity: 0.7; line-height: 1; padding: 0 4px; }
.bc-announce-close:hover { opacity: 1; }

/* ====== Comment Send Button (main post) — always visible ====== */
.btn-reg-comm-mobi { display: inline-block !important; cursor: pointer; touch-action: manipulation; }

/* ====== Comment Reply Send Button ====== */
.bc-reply-send-btn { background: none !important; border: none !important; padding: 2px 4px !important; cursor: pointer; display: flex; align-items: center; opacity: 0.85; transition: opacity 0.2s, transform 0.15s; touch-action: manipulation; }
.bc-reply-send-btn:hover { opacity: 1; transform: scale(1.15); }

/* ====== Invite Widget (Sidebar) ====== */
.bc-invite-widget-inner { display: flex; align-items: center; gap: 10px; padding: 12px; }
.bc-invite-widget-inner strong { font-size: 13px; color: var(--bc-text-primary, #0f1419); }
.bc-invite-widget-inner p { margin: 0; font-size: 11px; color: var(--bc-text-tertiary, #8899a6); }
.bc-invite-widget-inner > div { flex: 1; min-width: 0; }
.bc-invite-widget-btn { padding: 6px 14px; border-radius: var(--bc-radius-full, 9999px); background: #10b981; color: #fff !important; font-size: 12px; font-weight: 600; text-decoration: none !important; white-space: nowrap; transition: opacity 0.2s; }
.bc-invite-widget-btn:hover { opacity: 0.85; }


/* ==========================================================================
   UI MASTER PLAN — Parts 1–11
   All sections below are additive and reversible.
   ========================================================================== */

/* ============================================================
   Part 1: Landing Hero
   ============================================================ */
.bc-hero {
  margin: 0 0 24px;
}
.bc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #f59e0b22 0%, #10b98122 100%);
  border: 1px solid #f59e0b44;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.bc-hero-badge .bc-hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: bc-pulse 1.8s infinite;
}
@keyframes bc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.bc-hero-headline {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: var(--bc-text-primary);
  margin: 0 0 14px;
  background: linear-gradient(120deg, var(--bc-text-primary) 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bc-hero-sub {
  font-size: 15px;
  color: var(--bc-text-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
  max-width: 420px;
}
.bc-hero-stats {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.bc-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 20px 10px 0;
  margin-right: 20px;
  border-right: 1px solid var(--bc-border-color);
}
.bc-hero-stat:last-child { border-right: none; margin-right: 0; }
.bc-hero-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--bc-text-primary);
}
.bc-hero-stat-label {
  font-size: 11px;
  color: var(--bc-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Hide the old generic WoWonder tagline on welcome page */
.tag_welcome .tag_wel_title { display: none; }

@media (max-width: 768px) {
  .bc-hero-headline { font-size: 28px; letter-spacing: -0.8px; }
  .bc-hero-sub { font-size: 14px; }
  .bc-hero-stat-val { font-size: 15px; }
}

/* ============================================================
   Part 2: Market Strip Ticker
   ============================================================ */
#bc-market-strip {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  height: 39px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0;
  font-size: 16px;
  font-family: var(--bc-font-body);
  white-space: nowrap;
  z-index: 100;
  position: relative;
}
html:has(link#night-mode-css) #bc-market-strip,
html.bc-dark-mode #bc-market-strip,
body.night_mode #bc-market-strip {
  background: #000;
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Marquee animation wrapper */
.bc-ticker-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: bc-ticker-scroll 17.5s linear infinite;
  white-space: nowrap;
  padding: 0 20px;
}
.bc-ticker-wrapper[aria-hidden="true"] {
  padding-left: 0;
}
#bc-market-strip:hover .bc-ticker-wrapper {
  animation-play-state: paused;
}
@keyframes bc-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.bc-ticker-label {
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  margin-right: 4px;
  font-size: 14px;
  text-transform: uppercase;
}
.bc-ticker-price {
  color: #1a1a1a;
  font-weight: 600;
  margin-right: 4px;
}
.bc-ticker-change {
  font-weight: 600;
  margin-right: 20px;
  font-size: 14px;
}
.bc-ticker-up { color: #00c853; }
.bc-ticker-down { color: #ff5252; }
.bc-ticker-flat { color: #8899a6; }
.bc-ticker-sep {
  color: rgba(0,0,0,0.12);
  margin-right: 20px;
  font-size: 18px;
  line-height: 1;
}
.bc-ticker-loading { display: none; }
@media (max-width: 768px) {
  .bc-ticker-wrapper {
    animation-duration: 30s;
  }
}
@media (max-width: 500px) {
  #bc-market-strip { font-size: 14px; height: 36px; }
  .bc-ticker-wrapper {
    animation-duration: 35s;
  }
  .bc-ticker-sep { margin-right: 12px; font-size: 16px; }
  .bc-ticker-change { margin-right: 12px; font-size: 13px; }
  .bc-ticker-label { font-size: 12px; }
}
/* Safari: smooth ticker animation (prevent blinking/jank) */
@supports (-webkit-touch-callout: none) {
  .bc-ticker-wrapper {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation-duration: 40s !important;
  }
  #bc-market-strip {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* ============================================================
   Part 3: Native Notification Popup
   ============================================================ */
/* ---- Part 3: Install App Popup ---- */
#bc-install-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  max-width: 480px;
  width: calc(100% - 32px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#bc-install-popup.bc-install-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bc-install-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.35);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.bc-install-close:hover { background: rgba(0,0,0,.55); }
.bc-install-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.bc-install-icon {
  flex-shrink: 0;
}
.bc-install-text {
  font-size: 13px;
  line-height: 1.4;
}
.bc-install-text b {
  font-weight: 700;
}
.bc-install-btn {
  flex-shrink: 0;
  padding: 7px 18px;
  border: none;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.bc-install-btn:hover { opacity: 0.85; }
@media (max-width: 480px) {
  #bc-install-popup { bottom: 70px; gap: 8px; padding: 10px 12px; }
  .bc-install-text { font-size: 12px; }
}

/* ---- Part 3b: Install Guide Modal (non-PWA fallback) ---- */
#bc-install-guide-modal,
#bc-android-install-modal,
#bc-apk-warn {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 0.25s ease;
}
#bc-install-guide-modal.bc-ig-in,
#bc-android-install-modal.bc-ig-in,
#bc-apk-warn.bc-ig-in {
  background: rgba(0,0,0,0.6);
}
#bc-install-guide-modal.bc-ig-out,
#bc-android-install-modal.bc-ig-out,
#bc-apk-warn.bc-ig-out {
  background: rgba(0,0,0,0);
}
.bc-ig-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: calc(100% - 40px);
  text-align: center;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.bc-ig-in .bc-ig-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.bc-ig-out .bc-ig-card {
  transform: scale(0.9) translateY(20px);
  opacity: 0;
}
.bc-ig-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.bc-ig-close:hover { color: #333; }
.bc-ig-icon {
  color: #6C5CFF;
  margin-bottom: 12px;
}
.bc-ig-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a2e;
}
.bc-ig-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px;
  line-height: 1.4;
}
.bc-ig-steps {
  text-align: left;
  margin-bottom: 22px;
}
.bc-ig-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}
.bc-ig-step:last-child { margin-bottom: 0; }
.bc-ig-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #6C5CFF;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-ig-done {
  display: inline-block;
  padding: 10px 36px;
  border: none;
  border-radius: 9999px;
  background: #6C5CFF;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.bc-ig-done:hover { opacity: 0.85; }

/* Dark mode */
html:has(link#night-mode-css) .bc-ig-card,
html.bc-dark-mode .bc-ig-card {
  background: #1e1e2e;
}
html:has(link#night-mode-css) .bc-ig-title,
html.bc-dark-mode .bc-ig-title {
  color: #e7e9ea;
}
html:has(link#night-mode-css) .bc-ig-subtitle,
html.bc-dark-mode .bc-ig-subtitle {
  color: #8899a6;
}
html:has(link#night-mode-css) .bc-ig-step,
html.bc-dark-mode .bc-ig-step {
  color: #ccc;
}
html:has(link#night-mode-css) .bc-ig-close,
html.bc-dark-mode .bc-ig-close {
  color: #666;
}

/* ---- App Update Banner ---- */
#bc-update-banner { position:fixed; bottom:0; left:0; right:0; z-index:1070; transform:translateY(100%); transition:transform 0.3s ease; padding-bottom: env(safe-area-inset-bottom, 0px); }
#bc-update-banner.bc-upd-visible { transform:translateY(0); }
.bc-upd-content { display:flex; align-items:center; gap:10px; padding:12px 16px; background:#1a1a2e; color:#fff; }
.bc-upd-icon { flex-shrink:0; color:#4ECDC4; }
.bc-upd-text { flex:1; min-width:0; display:flex; flex-direction:column; font-size:13px; line-height:1.3; }
.bc-upd-text strong { font-size:14px; }
.bc-upd-text span { color:rgba(255,255,255,0.7); font-size:12px; }
.bc-upd-btn { flex-shrink:0; padding:8px 20px; border:none; border-radius:8px; background:#4ECDC4; color:#1a1a2e; font-size:13px; font-weight:700; cursor:pointer; }
.bc-upd-btn:hover { background:#3dbdb5; }
.bc-upd-close { flex-shrink:0; background:none; border:none; color:rgba(255,255,255,0.5); font-size:22px; line-height:1; cursor:pointer; padding:0 4px; }
.bc-upd-close:hover { color:#fff; }
@media (max-width:480px) {
  .bc-upd-content { padding:10px 12px; gap:8px; }
  .bc-upd-text strong { font-size:13px; }
  .bc-upd-btn { padding:7px 14px; font-size:12px; }
}
html:has(link#night-mode-css) .bc-ig-close:hover,
html.bc-dark-mode .bc-ig-close:hover {
  color: #ccc;
}

/* ============================================================
   Part 4: Feed Tabs
   ============================================================ */
.bc-feed-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: var(--bc-border-light);
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0;
}
.bc-feed-tabs::-webkit-scrollbar { display: none; }
.bc-feed-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all 0.15s;
  border-radius: 0;
}
.bc-feed-tab:hover { color: var(--bc-text-primary); background: var(--bc-surface-hover); }
.bc-feed-tab.active {
  color: var(--main, #1d9bf0);
  border-bottom-color: var(--main, #1d9bf0);
}
@media (max-width: 600px) {
  .bc-feed-tab { padding: 8px 12px; font-size: 13px; }
}

/* ============================================================
   Part 5: Composer — lazy-load advanced tools via AJAX.
   Only 3 core buttons render initially; rest load on "More" click.
   ============================================================ */
/* "More Options" toggle button — always visible */
.bc-composer-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--bc-radius-full);
  background: var(--bc-surface-secondary);
  border: var(--bc-border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--bc-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  vertical-align: middle;
  line-height: 1;
  margin-left: 2px;
}
.bc-composer-more-btn:hover { background: var(--bc-surface-hover); color: var(--bc-text-primary); }
.bc-composer-more-btn.loading { pointer-events: none; opacity: 0.6; }

/* Lazy-loaded buttons: hidden until expanded */
.pub-footer-upper .bc-lazy-injected-btn { display: none !important; }
.pub-footer-upper.bc-composer-expanded .bc-lazy-injected-btn { display: inline-flex !important; }

/* ============================================================
   Part 6: TRDC Sidebar Card
   ============================================================ */
.bc-trdc-sidebar-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--bc-radius-md);
  padding: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.bc-trdc-sidebar-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(245,158,11,0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.bc-trdc-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.bc-trdc-card-amount {
  font-size: 28px;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1.1;
  margin-bottom: 2px;
}
.bc-trdc-card-unit {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}
.bc-trdc-card-link {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--bc-radius-full);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}
.bc-trdc-card-link:hover { background: rgba(255,255,255,0.18); }
/* Trending Tags widget */
.bc-trending-tags-widget {}
.bc-trending-tags-widget .bc-tw-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bc-text-secondary);
  padding: 12px 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bc-trending-tags-list {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bc-trending-tag-pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bc-surface-secondary);
  border: var(--bc-border-light);
  border-radius: var(--bc-radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--bc-text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.bc-trending-tag-pill:hover {
  background: rgba(29,155,240,0.1);
  color: #1d9bf0;
  border-color: rgba(29,155,240,0.3);
  text-decoration: none;
}

/* ============================================================
   Part 7: Chat offline banner — hide it
   ============================================================ */
/* WoWonder renders this element when socket is disconnected */
.offline-header, .tag_chat_offline, .wo-offline-bar,
.offline-status-bar, .tag_offline_bar,
[class*="offline-bar"], [class*="offlinebar"],
.status_offline_header { display: none !important; }

/* ============================================================
   Part 8: Micro UX Animations
   ============================================================ */
/* Post fade-in */
@keyframes bc-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-container, .wo_post_sec, .post-card {
  animation: bc-fade-in 0.35s ease both;
}
/* Stagger posts */
.post-container:nth-child(1) { animation-delay: 0.05s; }
.post-container:nth-child(2) { animation-delay: 0.10s; }
.post-container:nth-child(3) { animation-delay: 0.15s; }
.post-container:nth-child(4) { animation-delay: 0.20s; }
.post-container:nth-child(n+5) { animation-delay: 0.25s; }

/* Like bounce */
@keyframes bc-like-bounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.4); }
  65%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.bc-liked-bounce {
  animation: bc-like-bounce 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Card hover lift */
.wow_content {
  transition: box-shadow var(--bc-transition-normal), transform var(--bc-transition-normal);
}
.wow_content:not(.tag_pub_box_bg):hover {
  box-shadow: var(--bc-shadow-lg) !important;
  transform: translateY(-1px);
}

/* Skeleton shimmer — enhanced */
@keyframes bc-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel {
  background: linear-gradient(90deg, var(--bc-surface-secondary) 25%, var(--bc-surface-hover) 50%, var(--bc-surface-secondary) 75%);
  background-size: 800px 100%;
  animation: bc-shimmer 1.4s infinite linear;
}

/* ============================================================
   Part 9: Nav cleanup — hide rarely-used items from sidebar
   ============================================================ */
.tag_sidebar a[href*="link1=new-game"],
.tag_sidebar a[href*="link1=movies"],
.tag_sidebar a[href*="link1=offers"],
.tag_sidebar a[href*="link1=memories"],
.tag_sidebar a[href*="link1=common_things"],
.tag_sidebar a[href*="link1=funding"],
.tag_sidebar a[href*="link1=open_to_work"] {
  display: none !important;
}

/* Part 11: Mobile nav — replaced by UI-10 block below (Week 3) */

/* ============================================================
   SM-3: Global Modal System (40-60% DOM reduction)
   ============================================================ */

/* Global modal container - enhanced styling */
#bc-global-modal .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#bc-global-modal.fade .modal-dialog {
  transform: translateY(-20px);
  opacity: 0;
}

#bc-global-modal.show .modal-dialog {
  transform: translateY(0);
  opacity: 1;
}

/* Smooth modal animations */
#bc-global-modal .modal-content {
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: none;
}

#bc-global-modal .modal-header {
  border-bottom: 1px solid var(--bc-border-light, #e8e8e8);
  padding: 1.25rem 1.5rem;
  border-radius: 8px 8px 0 0;
}

#bc-global-modal .modal-header .close {
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
  opacity: 0.6;
  transition: opacity 0.2s;
}

#bc-global-modal .modal-header .close:hover {
  opacity: 1;
}

#bc-global-modal .modal-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--bc-text-primary, #333);
}

#bc-global-modal .modal-body {
  padding: 1.5rem;
  min-height: 80px;
  color: var(--bc-text-secondary, #666);
}

#bc-global-modal .modal-footer {
  border-top: 1px solid var(--bc-border-light, #e8e8e8);
  padding: 1rem 1.5rem;
  border-radius: 0 0 8px 8px;
}

/* Loading spinner for AJAX modals */
#bc-global-modal .fa-spinner {
  color: var(--bc-primary, #3f51b5);
}

/* Alert styling inside modals */
#bc-global-modal .alert {
  margin: 0;
  border-radius: 6px;
}

/* Button improvements */
#bc-global-modal .btn-mat {
  transition: all 0.2s ease;
}

#bc-global-modal .btn-mat:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#bc-global-modal .btn-mat:active:not(:disabled) {
  transform: translateY(0);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #bc-global-modal .modal-content {
    background-color: var(--bc-surface-secondary, #1e1e1e);
    color: var(--bc-text-primary-dark, #fff);
  }

  #bc-global-modal .modal-header,
  #bc-global-modal .modal-footer {
    border-color: var(--bc-border-dark, #333);
  }

  #bc-global-modal .modal-title {
    color: var(--bc-text-primary-dark, #fff);
  }

  #bc-global-modal .modal-body {
    color: var(--bc-text-secondary-dark, #ccc);
  }
}

/* ============================================================
   GE-1: Action Prompt Engine (Growth & Engagement)
   ============================================================ */

/* Prompt container */
#bc-action-prompt {
  margin-bottom: 7px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#bc-action-prompt.bc-prompt-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Prompt card */
.bc-prompt-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
  position: relative;
  overflow: hidden;
}

.bc-prompt-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Prompt type variations */
.bc-prompt-new_user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bc-prompt-trader {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bc-prompt-creator {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bc-prompt-inactive {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bc-prompt-growing {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.bc-prompt-grow_audience {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.bc-prompt-default {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Prompt icon */
.bc-prompt-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.bc-prompt-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* Prompt content */
.bc-prompt-content {
  flex: 1;
  min-width: 0;
}

.bc-prompt-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
}

.bc-prompt-message {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin: 0;
  line-height: 1.1;
}

/* Prompt CTA button */
.bc-prompt-cta {
  flex-shrink: 0;
  background: #fff;
  color: #667eea;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.bc-prompt-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.bc-prompt-cta:active {
  transform: translateY(0);
}

.bc-prompt-cta svg {
  width: 16px;
  height: 16px;
}

/* Trader prompt CTA color */
.bc-prompt-trader .bc-prompt-cta {
  color: #f5576c;
}

/* Creator prompt CTA color */
.bc-prompt-creator .bc-prompt-cta {
  color: #00f2fe;
}

/* Responsive design */
@media (max-width: 768px) {
  .bc-prompt-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 7px 10px;
    gap: 6px;
  }

  .bc-prompt-icon {
    width: 28px;
    height: 28px;
  }

  .bc-prompt-icon svg {
    width: 20px;
    height: 20px;
  }

  .bc-prompt-title {
    font-size: 16px;
  }

  .bc-prompt-message {
    font-size: 13px;
  }

  .bc-prompt-cta {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}

/* Animation for prompt appearance */
@keyframes bc-prompt-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bc-prompt-card {
  animation: bc-prompt-slide-in 0.5s ease;
}

/* ============================================================
   GE-2: TRDC Dopamine Feedback (Reward Toasts)
   Server-pushed punchline toasts with TRDC coin icon.
   ============================================================ */

/* Toast container — fixed top-right */
.bc-reward-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
  max-width: 380px;
}

/* Individual toast — dark glass card */
.bc-reward-toast {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(252, 213, 53, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(252, 213, 53, 0.1);
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.35, 0.265, 1.35);
  position: relative;
  overflow: hidden;
  pointer-events: all;
}

/* Show animation */
.bc-reward-toast.bc-reward-show {
  opacity: 1;
  transform: translateX(0);
}

/* Hide animation */
.bc-reward-toast.bc-reward-hide {
  opacity: 0;
  transform: translateX(400px) scale(0.8);
  transition: all 0.4s ease-in;
}

/* TRDC coin icon */
.bc-reward-coin {
  flex-shrink: 0;
  animation: bc-coin-spin 0.8s ease;
}

.bc-reward-coin svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 6px rgba(252, 213, 53, 0.4));
}

@keyframes bc-coin-spin {
  0% { transform: rotateY(0) scale(0.5); opacity: 0; }
  50% { transform: rotateY(180deg) scale(1.1); opacity: 1; }
  100% { transform: rotateY(360deg) scale(1); opacity: 1; }
}

/* Toast body text */
.bc-reward-body {
  flex: 1;
  min-width: 0;
}

.bc-reward-amount {
  font-size: 17px;
  font-weight: 700;
  color: #fcd535;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.3px;
}

.bc-reward-punchline {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Close button */
.bc-reward-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s;
}
.bc-reward-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Subtle gold shimmer on the left edge */
.bc-reward-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #fcd535, #f0b90b);
  border-radius: 14px 0 0 14px;
}

/* Balance update animation */
.bc-balance-updated {
  animation: bc-balance-pulse 0.6s ease;
}

@keyframes bc-balance-pulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); color: #fcd535; }
  50% { transform: scale(1.05); }
  75% { transform: scale(1.1); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bc-reward-container {
    top: auto;
    bottom: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .bc-reward-toast {
    min-width: auto;
    max-width: 100%;
  }

  .bc-reward-coin svg {
    width: 30px;
    height: 30px;
  }

  .bc-reward-amount {
    font-size: 15px;
  }

  .bc-reward-punchline {
    font-size: 12px;
  }
}

/* Dark mode — already dark by default, just deepen shadow */
.bc-dark-mode .bc-reward-toast {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(252, 213, 53, 0.15);
}

/* ============================================================
   GE-3: Gamification Badges (Achievement System)
   ============================================================ */

/* Badge container */
.bc-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

/* Individual badge */
.bc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.bc-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Small badge variant */
.bc-badge-small {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 12px;
}

/* Badge icon */
.bc-badge-icon {
  font-size: 16px;
  line-height: 1;
}

/* Badge unlock modal */
.bc-badge-unlock-modal {
  text-align: center;
  padding: 20px;
}

.bc-badge-unlock-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  animation: bc-badge-unlock-pulse 1.5s ease infinite;
}

@keyframes bc-badge-unlock-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6); }
}

.bc-badge-unlock-title {
  font-size: 14px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.bc-badge-unlock-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.bc-badge-unlock-desc {
  font-size: 15px;
  color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bc-badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  .bc-badge-unlock-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
  }
}

/* ============================================================
   UI-4: Feed Card Redesign — Instagram/X level polish
   ============================================================ */

/* UI-4: DISABLED — these rules had catastrophic bugs:
   - div[id^="post-"] matched actual post divs, adding 26px padding
   - div[class*="post_"] matched tag_post_actions, tag_post_react_btn, etc.
   - .post-description { display:flex } turned post content horizontal
   All post styling now handled by MC-3 block below. */

/* User names and time - modern typography */
.post-user-name,
.publisher-box h3,
.user-popover-content h6 {
    font-weight: var(--bc-font-weight-medium) !important;
    color: var(--bc-text-primary) !important;
    font-size: var(--bc-font-size-base) !important;
}

/* UI-4 time: DISABLED — span[class*="time"] too broad, matched any span
   with "time" in class. Post time styling handled by MC-3 block. */

/* UI-4 post text: DISABLED — div[class*="description"] p was too broad,
   matched paragraphs inside .post-description and added unwanted margins.
   Post text styling handled by MC-3 block. */

/* UI-4 post images: DISABLED — img[class*="post"] too broad.
   Post image radius handled by MC-3 block. */

/* UI-6: DISABLED — .post-actions already has display:flex from .valign class.
   The border-top/padding-top/margin-top added unwanted separators inside stats.
   div[class*="post-options"] was overly broad.
   Action bar styling handled by MC-3b and TG4 blocks. */

/* UI-4 comments: DISABLED — div[class*="comment"] matched everything with
   "comment" in class (comment-textarea, comment-container, comment_combo_footer,
   post-comments, etc.), adding unwanted padding/background to all of them.
   Comment styling uses WoWonder defaults. */

/* Remove old borders everywhere */
.panel-default,
.wow_content,
.post-container,
.wo_post_sec {
    border-color: transparent !important;
}

/* Share/More dropdown - modern */
.dropdown-menu,
div[class*="dropdown"] ul {
    border: none !important;
    border-radius: var(--bc-radius-md) !important;
    box-shadow: var(--bc-shadow-hover) !important;
    padding: 8px !important;
}

.dropdown-menu li a,
.dropdown-menu li button {
    border-radius: var(--bc-radius-sm) !important;
    padding: 10px 16px !important;
    transition: all var(--bc-transition-fast) !important;
}

.dropdown-menu li a:hover,
.dropdown-menu li button:hover {
    background: var(--bc-bg) !important;
    color: var(--bc-primary) !important;
}

/* Verified badge styling */
.verified,
span[class*="verified"],
.badge-verified {
    color: var(--bc-primary) !important;
    margin-left: 4px;
}

/* Creator/Trading post labels */
.post-label,
span[class*="label"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--bc-radius-full);
    font-size: var(--bc-font-size-xs);
    font-weight: var(--bc-font-weight-medium);
    background: var(--bc-bg-alt);
    color: var(--bc-text-secondary);
    margin-left: var(--bc-space-xs);
}

/* Trading post accent */
.post-trading,
div[data-type*="trading"],
div[class*="trading"] {
    border-left: 3px solid var(--bc-accent) !important;
}

/* Creator post accent */
.post-creator,
div[data-creator="true"],
div[class*="creator-post"] {
    border-left: 3px solid var(--bc-primary) !important;
}

/* Empty state - better spacing */
.no-posts,
.empty-state,
div[class*="empty"] {
    padding: var(--bc-space-2xl);
    text-align: center;
    color: var(--bc-text-tertiary);
}

/* Post loading skeleton - modern shimmer */
.post-skeleton,
.loading-post,
div[class*="skeleton"] {
    background: var(--bc-card);
    border-radius: var(--bc-radius-lg);
    padding: var(--bc-space-lg);
    margin-bottom: var(--bc-space-md);
    box-shadow: var(--bc-shadow-soft);
}

/* Ensure feed container has proper spacing */
#posts-loaded,
#posts,
div[class*="feed"],
div[class*="timeline"] {
    max-width: var(--bc-container-md);
    margin: 0 auto;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .post-container,
    .wo_post_sec,
    .post-card {
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: var(--bc-radius-md) !important;
    }

    .post-actions,
    .reactions {
        gap: var(--bc-space-sm);
    }

    .reactions img,
    .post-actions img {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ============================================================
   UI-9: Sidebar Navigation Cleanup — Only 6 Core Items
   Keep: Feed | Discover | Market | Creators | Wallet | Invite & Earn
   ============================================================ */

/* Hide non-essential items from "Me" section */
.tag_sidebar a[href*="link1=albums"],
.tag_sidebar a[href*="link1=saved-posts"],
.tag_sidebar a[href*="link1=leaderboard"] {
    display: none !important;
}

/* Hide entire "Community" section except Products (Market) */
.tag_sidebar a[href*="link1=events"],
.tag_sidebar a[href*="link1=blogs"],
.tag_sidebar a[href*="link1=forum"],
.tag_sidebar a[href*="link1=my-blogs"],
.tag_sidebar a[href*="link1=my-products"],
.tag_sidebar a[href*="link1=groups"],
.tag_sidebar a[href*="link1=my-groups"],
.tag_sidebar a[href*="link1=pages"],
.tag_sidebar a[href*="link1=my-pages"] {
    display: none !important;
}

/* Keep Products (Market) visible in Community */
/* .tag_sidebar a[href*="link1=products"] - stays visible */

/* Hide ALL Explore section items except main Explore/Discover */
.tag_sidebar a[href*="link1=most_liked"],
.tag_sidebar a[href*="link1=open_to_work_posts"],
.tag_sidebar a[href*="link1=new-game"],
.tag_sidebar a[href*="link1=movies"],
.tag_sidebar a[href*="link1=jobs"],
.tag_sidebar a[href*="link1=offers"],
.tag_sidebar a[href*="link1=memories"],
.tag_sidebar a[href*="link1=friends-nearby"],
.tag_sidebar a[href*="link1=common_things"],
.tag_sidebar a[href*="link1=funding"] {
    display: none !important;
}

/* Rename Products to "Market" for clarity */
.tag_sidebar a[href*="link1=products"] svg + text,
.tag_sidebar a[href*="link1=products"]::after {
    /* Market icon stays, text changes via JS or keep as is */
}

/* Hide empty sections if all children are hidden */
.tag_sidebar .tag_sidebar_section:has(> a:only-child:not([style*="display: none"])) {
    /* Keep section if it has visible items */
}

/* Auto-collapse Community and Explore sections by default */
#collapseCommunity.show,
#collapseExplore.show {
    /* Let them stay collapsed on mobile for cleaner UX */
}

/* Improve visible menu item spacing */
.tag_sidebar a {
    padding: 12px 16px !important;
    margin-bottom: 4px !important;
    border-radius: var(--bc-radius-sm) !important;
    transition: all var(--bc-transition-fast) !important;
    font-weight: var(--bc-font-weight-normal) !important;
    color: var(--bc-text-primary) !important;  /* --bc-text-primary now has dark mode override */
}

.tag_sidebar a:hover,
.tag_sidebar a.active {
    background: var(--bc-bg-alt, #EEF2FF) !important;  /* --bc-bg-alt now has dark mode override */
    color: var(--bc-primary) !important;
    transform: translateX(4px);
}

.tag_sidebar a svg {
    opacity: 0.8;
    transition: all var(--bc-transition-fast);
}

.tag_sidebar a:hover svg,
.tag_sidebar a.active svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Section headers modern styling */
.tag_sidebar_head {
    font-weight: var(--bc-font-weight-medium) !important;
    font-size: var(--bc-font-size-sm) !important;
    color: var(--bc-text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 8px !important;
}

/* Remove old borders from sidebar */
.tag_sidebar,
.tag_sidebar_section,
.tag_sidebar_section_prnt {
    border: none !important;
}

/* ============================================================
   WEEK 2 — PREMIUM LANDING LAYER
   UI-1 Hero Banner, UI-2 Glass Ticker, UI-3 Creator Strip, UI-7 Composer
   ============================================================ */

/* ---- UI-1: Hero Market Banner ---- */
/* Hide hero banner in native Android app */
html.bc-native-app #bc-hero-banner { display: none !important; }
/* Hide lightbox prev/next buttons in native app — swipe is used instead */
html.bc-native-app .wo_imagecombo_lbox .previous-btn,
html.bc-native-app .wo_imagecombo_lbox .next-btn { display: none !important; }

/* Scoped to #bc-hero-banner (home page only) to avoid overriding welcome page .bc-hero */
#bc-hero-banner {
  background: linear-gradient(135deg, #6C5CFF 0%, #00D4FF 100%);
  border-radius: var(--bc-radius-xl, 22px);
  padding: 0 20px;
  color: #fff;
  margin-top: -24px;
  margin-bottom: 7px;
  overflow: hidden;
  position: relative;
  min-height: 0;
}
#bc-hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
}
.bc-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.bc-hero-content { flex: 1; padding-bottom: 0; }
.bc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 0;
}
.bc-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,.4);
  animation: bc-live-pulse 1.8s ease infinite;
}
@keyframes bc-live-pulse {
  0%  { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
#bc-hero-banner .bc-hero-headline {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -.02em;
  background: none;
  -webkit-text-fill-color: #fff;
}
.bc-hero-name { opacity: .9; }
#bc-hero-banner .bc-hero-sub {
  font-size: 13px;
  opacity: .8;
  margin-bottom: 2px;
}
.bc-hero-ctas {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.bc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #6C5CFF;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}
.bc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  color: #6C5CFF;
}
.bc-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .2s;
  text-decoration: none;
}
.bc-btn-ghost:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}
.bc-hero-visual {
  width: 160px;
  flex-shrink: 0;
  align-self: flex-end;
  opacity: .6;
}
.bc-hero-chart { width: 100%; min-height: 30px; height: clamp(30px, 4vw, 44px); }
.bc-hero-chart svg { width: 100%; height: 100%; }

/* Hero stats bar — scoped to home banner */
#bc-hero-banner .bc-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 -40px;
  padding: 2px 40px;
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.12);
}
#bc-hero-banner .bc-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.bc-hero-stat-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}
#bc-hero-banner .bc-hero-stat-label {
  font-size: 11px;
  opacity: .7;
  margin-top: 2px;
}
.bc-hero-stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.2);
}

/* Medium screens — hide hero chart, stack CTA buttons */
@media (max-width: 1150px) {
  .bc-hero-visual { display: none; }
  .bc-hero-ctas { flex-direction: column; }
  .bc-hero-content { padding-bottom: 16px; }
}
/* Mobile hero — scoped to home banner */
@media (max-width: 768px) {
  #bc-hero-banner { padding: 0 12px; min-height: 0; margin-bottom: 4px !important; }
  .bc-hero-headline { font-size: 16px !important; }
  .bc-hero-sub { font-size: 11px !important; margin-bottom: 6px !important; }
  .bc-hero-eyebrow { font-size: 10px !important; margin-bottom: 2px !important; }
  .bc-btn-primary, .bc-btn-ghost { width: 100%; justify-content: center; padding: 6px 12px; font-size: 12px; }
  .bc-hero-ctas { gap: 6px !important; }
  #bc-hero-banner .bc-hero-stats { margin: 0 -12px; padding: 1px 12px; }
  .bc-hero-stat-value { font-size: 12px; }
  .bc-hero-stat-label { font-size: 11px; }
  #bc-hero-banner .bc-hero-stats { gap: 0; overflow-x: auto; flex-wrap: nowrap; }
  /* Composer box — 30% reduced on mobile */
  .tag_pub_box_bg { padding: 8px 12px !important; margin-bottom: 8px !important; gap: 8px !important; }
  .tag_pub_box_avatar img { width: 30px !important; height: 30px !important; }
  .tag_pub_box_bg_text { padding: 6px 12px !important; font-size: 13px !important; }
  .tag_pub_box_bg_camlve { width: 30px !important; height: 30px !important; }
}

/* ---- UI-2: Glass Market Ticker ---- */
/* Note: #bc-market-strip is a full-width bar — excluded from glass card styles */
.bc-market-ticker-wrap,
.bc-ticker-bar,
.market-ticker {
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  background: rgba(255,255,255,.7) !important;
  border-radius: 18px !important;
  box-shadow: var(--bc-shadow-soft, 0 8px 24px rgba(0,0,0,.06)) !important;
  border: 1px solid rgba(255,255,255,.8) !important;
}
/* Dark mode glass */
body.night-mode .bc-market-ticker-wrap,
body.night-mode .bc-ticker-bar {
  background: rgba(30,30,50,.7) !important;
  border-color: rgba(255,255,255,.08) !important;
}

/* ---- UI-3: Creator Spotlight Strip ---- */
.bc-creator-strip {
  background: var(--bc-card, #fff);
  border-radius: var(--bc-radius-lg, 16px);
  box-shadow: var(--bc-shadow-soft, 0 8px 24px rgba(0,0,0,.06));
  padding: 10px 16px;
  margin-bottom: 20px;
}
.bc-creator-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.bc-creator-strip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bc-text-primary, #111);
  margin: 0;
}
.bc-creator-strip-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--bc-primary, #6C5CFF);
  text-decoration: none;
}
.bc-creator-strip-more:hover { text-decoration: underline; color: var(--bc-primary, #6C5CFF); }
.bc-creator-strip-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.bc-creator-strip-scroll::-webkit-scrollbar { display: none; }
.bc-creator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.bc-creator-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
}
.bc-creator-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
}
.bc-creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(108,92,255,.3);
}
.bc-creator-card:hover .bc-creator-avatar {
  border-color: var(--bc-primary, #6C5CFF);
}
.bc-creator-rank {
  position: absolute;
  bottom: -3px;
  right: -3px;
  font-size: 14px;
  line-height: 1;
}
.bc-creator-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--bc-text-primary, #111);
  margin: 0;
  max-width: 60px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-creator-trdc {
  font-size: 10px;
  font-weight: 700;
  color: var(--bc-primary, #6C5CFF);
  margin: 0;
}

/* ---- UI-7: Instagram-Style Composer ---- */
.tag_pub_box_bg {
  background: var(--bc-card, #fff) !important;
  border-radius: var(--bc-radius-lg, 16px) !important;
  box-shadow: var(--bc-shadow-soft, 0 8px 24px rgba(0,0,0,.06)) !important;
  border: none !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
  transition: box-shadow .2s ease !important;
}
.tag_pub_box_bg:hover {
  box-shadow: var(--bc-shadow-hover, 0 12px 32px rgba(0,0,0,.10)) !important;
}
.tag_pub_box_avatar {
  flex-shrink: 0;
}
.tag_pub_box_avatar img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.tag_pub_box_bg_text {
  flex: 1 !important;
  background: var(--bc-bg, #F8FAFF) !important;
  border: 1.5px solid rgba(108,92,255,.15) !important;
  border-radius: 24px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
  color: var(--bc-text-muted, #888) !important;
  text-align: left !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: border-color .2s, background .2s !important;
}
.tag_pub_box_bg_text:hover {
  border-color: var(--bc-primary, #6C5CFF) !important;
  background: #fff !important;
}
/* Camera & Live buttons as icon chips */
.tag_pub_box_bg_camlve {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: var(--bc-bg, #F8FAFF) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--bc-primary, #6C5CFF) !important;
  transition: background .2s, transform .2s !important;
  padding: 0 !important;
}
.tag_pub_box_bg_camlve:hover {
  background: rgba(108,92,255,.1) !important;
  transform: translateY(-1px) !important;
}
.tag_pub_box_bg_camlve svg { color: var(--bc-primary, #6C5CFF); fill: var(--bc-primary, #6C5CFF); width: 20px; height: 20px; }

/* Composer modal polish */
.tag_main_pub_box .modal-content,
.tag_pub_box {
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.15) !important;
}
.tag_main_pub_box .modal-header {
  border-bottom: 1px solid var(--bc-border, #f0f0f0) !important;
  padding: 16px 20px !important;
}
#post-textarea {
  padding: 16px 20px !important;
}
#post-textarea .wo_pub_txtara_combo {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 4px;
}
.bc-dark-mode #post-textarea .wo_pub_txtara_combo,
body.night-mode #post-textarea .wo_pub_txtara_combo {
  border-color: rgba(255, 255, 255, 0.2);
}
#post-textarea .postText {
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* ============================================================
   WEEK 3 — APP-LEVEL FEEL
   UI-8 FAB, UI-10 Mobile Bottom Nav, UI-12 Skeleton, UI-11 Micro-animations
   ============================================================ */

/* ---- UI-8: Floating Action Button (desktop) ---- */
/* bc-fab hidden — using WoWonder native .tag_create_dropup instead */
.bc-fab {
  display: none !important;
}

/* ---- UI-10: Mobile Bottom Navigation ---- */
/* #bc-mobile-nav disabled — using WoWonder native bottom bar instead */
.bc-mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  color: #8899aa;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  transition: color .2s, transform .15s;
  padding: 0;
}
.bc-mob-nav-item:hover,
.bc-mob-nav-item.active {
  color: var(--bc-primary, #6C5CFF);
  text-decoration: none;
}
.bc-mob-nav-item:active { transform: scale(.9); }
.bc-mob-nav-item span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}
/* Create button — elevated pill in the centre */
.bc-mob-create-btn {
  position: relative;
  top: -8px;
  flex: 0 0 auto;
  padding: 0 !important;
}
.bc-mob-create-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bc-primary, #6C5CFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(108,92,255,.4);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.bc-mob-create-btn:hover .bc-mob-create-icon {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(108,92,255,.55);
}
/* Profile avatar in nav */
.bc-mob-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.bc-mob-profile-item:hover .bc-mob-nav-avatar,
.bc-mob-profile-item.active .bc-mob-nav-avatar {
  border-color: var(--bc-primary, #6C5CFF);
}
body.night-mode .bc-mob-nav-item { color: #667788; }

/* ---- UI-12: Skeleton Feed Loader ---- */
@keyframes bc-skel-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.bc-skel-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}
.bc-skel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.bc-skel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: bc-skel-shimmer 1.4s infinite linear;
}
.bc-skel-meta { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.bc-skel-line {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: bc-skel-shimmer 1.4s infinite linear;
}
.bc-skel-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bc-skel-image {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: bc-skel-shimmer 1.4s infinite linear;
  margin-bottom: 16px;
}
.bc-skel-actions {
  display: flex;
  gap: 16px;
}
.bc-skel-action {
  width: 64px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: bc-skel-shimmer 1.4s infinite linear;
}
/* Stagger shimmer animation offsets */
.bc-skel-card:nth-child(2) .bc-skel-line,
.bc-skel-card:nth-child(2) .bc-skel-avatar,
.bc-skel-card:nth-child(2) .bc-skel-image,
.bc-skel-card:nth-child(2) .bc-skel-action {
  animation-delay: .15s;
}
.bc-skel-card:nth-child(3) .bc-skel-line,
.bc-skel-card:nth-child(3) .bc-skel-avatar,
.bc-skel-card:nth-child(3) .bc-skel-image,
.bc-skel-card:nth-child(3) .bc-skel-action {
  animation-delay: .3s;
}
/* Dark mode skeletons */
body.night-mode .bc-skel-card { background: #1e1e2e; }
body.night-mode .bc-skel-line,
body.night-mode .bc-skel-avatar,
body.night-mode .bc-skel-image,
body.night-mode .bc-skel-action {
  background: linear-gradient(90deg, #2a2a3e 25%, #33334a 50%, #2a2a3e 75%);
  background-size: 600px 100%;
}

/* ---- UI-11: Micro Animation Pack ---- */
/* Global smooth transitions on interactive elements */
button:not(.bc-fab):not(.bc-mob-create-btn),
.btn {
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease !important;
}
button:not(.bc-fab):not(.bc-mob-create-btn):hover,
.btn:not(.btn-default):hover {
  transform: translateY(-1px);
}
button:not(.bc-fab):active,
.btn:active { transform: translateY(0) scale(.98) !important; }

/* Link underline animation */
a:not(.bc-btn-ghost):not(.bc-btn-primary):not(.bc-mob-nav-item):not(.bc-creator-card) {
  transition: opacity .15s ease, color .15s ease;
}

/* Card lift on hover (post cards) */
.wow_content:not(.tag_pub_box_bg):not(.bc-hero) {
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.wow_content:not(.tag_pub_box_bg):not(.bc-hero):hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.10) !important;
}

/* Input focus ring */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(108,92,255,.15) !important;
  border-color: var(--bc-primary, #6C5CFF) !important;
  transition: box-shadow .2s ease, border-color .2s ease;
}

/* Image scale on hover inside cards */
.wow_content img:not(.bc-mob-nav-avatar):not(.bc-creator-avatar) {
  transition: transform .3s ease;
}
.wow_content:hover img:not(.bc-mob-nav-avatar):not(.bc-creator-avatar) {
  transform: scale(1.01);
}

/* Smooth page transitions */
.page-margin {
  animation: bc-page-in .3s ease both;
}
@keyframes bc-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav item active indicator dot */
.bc-mob-nav-item.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bc-primary, #6C5CFF);
  margin: 1px auto 0;
}

/* ============================================================
   WEEK 4 — POLISH
   UI-13 Spacing, UI-14 Background Gradient, UI-15 Border Removal
   ============================================================ */

/* ---- UI-14: Soft Background Gradient ---- */
/* Override flat bg with a living gradient that shifts subtly */
body:not(.night-mode) {
  background: linear-gradient(160deg, #F8FAFF 0%, #EEF2FF 60%, #F3F0FF 100%) !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}
/* Ensure content areas don't inherit the gradient visually */
.tag_sidebar .sidebar_innr,
.right_side_bar {
  background: transparent !important;
}

/* ---- UI-13: Spacing Expansion ---- */
/* Between major sections on the feed */
.posts_load {
  margin-top: 6px;
}
.bc-feed-tabs {
  margin-bottom: 14px !important;
}
/* More air between widgets in sidebar */
.right_side_bar .wow_content,
.right_side_bar > div {
  margin-bottom: 14px !important;
}
/* Section gaps on home page */
.bc-hero          { margin-bottom: 20px !important; }
.bc-creator-strip { margin-bottom: 17px !important; }
#bc-action-prompt + div,
.greetalert       { margin-bottom: 17px !important; }
/* Stories section breathing room */
.tag_stories_on_home { margin-bottom: 17px !important; }
/* Post cards */
.wo_post_sec,
.post-container {
  margin-bottom: 5px !important;
}
.wow_content:not(.tag_pub_box_bg):not(.bc-hero) {
  margin-bottom: 14px !important;
}
/* Page container inner padding */
.page-margin > .container {
  padding-top: 17px !important;
  padding-bottom: 17px !important;
}

/* ---- UI-15: Remove Hard Borders — Replace With Shadows ---- */
/* Main post / content cards */
.wow_content {
  border: none !important;
  border-color: transparent !important;
}
/* Sidebar cards and widgets */
.right_side_bar .wow_content,
.tag_sidebar_section_prnt,
.tag_sidebar .wow_content {
  border: none !important;
}
/* Comment boxes */
.comments-area,
.comment-form,
.wo_comments_box {
  border-top: none !important;
}
/* Dividers inside cards — make ultra subtle */
.card-footer,
.post-footer,
.wo_post_footer,
.tag_pub_box .modal-footer {
  border-top: 1px solid rgba(0,0,0,.04) !important;
}
/* Input fields — clean visible border, focus ring */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea:not(.postText) {
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:not(.postText):focus {
  border-color: var(--bc-primary, #6C5CFF) !important;
  box-shadow: 0 0 0 3px rgba(108,92,255,.12) !important;
  outline: none !important;
}
/* Tabs, nav items — border-bottom replaced with shadow line */
.bc-lb-tabs,
.bc-feed-tabs {
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.07) !important;
  padding-bottom: 14px !important;
}
/* Header/nav borders */
.tag_header_main,
.tag_top_bar {
  border-bottom: none !important;
  box-shadow: 0 1px 12px rgba(0,0,0,.07) !important;
}
/* Modals */
.modal-content {
  border: none !important;
}
.modal-header {
  border-bottom: 1px solid rgba(0,0,0,.05) !important;
}
.modal-footer {
  border-top: 1px solid rgba(0,0,0,.05) !important;
}
/* Story / status strips */
.tag_lbox_stories,
.tag_stories_mobi {
  border: none !important;
  background: transparent !important;
}
/* Tables in admin / settings */
.table,
table {
  border-color: rgba(0,0,0,.06) !important;
}
td, th {
  border-color: rgba(0,0,0,.05) !important;
}
/* Dropdown menus */
.dropdown-menu {
  border: none !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.12) !important;
  border-radius: 14px !important;
}
/* Night mode border overrides */
body.night-mode .form-control,
body.night-mode input[type="text"],
body.night-mode input[type="email"],
body.night-mode input[type="password"],
body.night-mode input[type="search"],
body.night-mode input[type="number"],
body.night-mode input[type="tel"],
body.night-mode input[type="url"],
body.night-mode textarea:not(.postText) {
  border-color: rgba(255,255,255,.18) !important;
  background-color: #2a2a2a !important;
  color: #e2e2e2 !important;
}
body.night-mode .tag_header_main,
body.night-mode .tag_top_bar {
  box-shadow: 0 1px 12px rgba(0,0,0,.3) !important;
}
body.night-mode .dropdown-menu {
  box-shadow: 0 12px 40px rgba(0,0,0,.4) !important;
}

/* ---- Final Polish: Typography Tightening ---- */
/* Tighten up heading weights site-wide */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
}
/* Slightly bigger base size for legibility */
body, p, li, td {
  font-size: 15px;
  line-height: 1.6;
}
/* Username / display name in posts */
.wo_time_format,
.post-time,
.tag_p_time {
  font-size: 12px;
  color: var(--bc-text-tertiary, #94A3B8);
}
/* Reaction count labels */
.reactions span,
.wonders_numb {
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-text-secondary, #64748B);
}

/* ==========================================================================
   MC: MASTER CODEX v2 — Facebook-Matched Layout
   Deep audit against Facebook measurements. Pure CSS overrides, reversible.
   ========================================================================== */

/* ── MC-1: Cards ─────────────────────────────────────────────────────────
   Facebook: border-radius 8px, box-shadow 0 1px 2px rgba(0,0,0,.1)
   WoWonder default: border-radius 10px, box-shadow (heavy)
   ──────────────────────────────────────────────────────────────────────── */
.wow_content {
  box-shadow: none !important;
  border: 1px solid rgba(0,0,0,.1) !important;
  border-radius: 8px !important;
}
.post .panel {
  box-shadow: none !important;
  border: 1px solid rgba(0,0,0,.1) !important;
  border-radius: 8px !important;
}
/* Gap between posts — desktop only, mobile overridden in RR-5b */
.page-margin { margin: 11px 0 !important; }
.post { margin-bottom: 5px !important; }

/* ── MC-2: 3-Column Grid ────────────────────────────────────────────────
   Left sidebar 280px | Feed (flexible) | Right sidebar 280px
   Container expands to fill available space (was 950px, too narrow).
   Gutters reduced from 30px to 8px for tighter layout.
   ──────────────────────────────────────────────────────────────────────── */
.tag_sidebar { max-width: 280px !important; }
body:not(.bc-welcome) .tag_content  { margin-left: 280px !important; }
/* Ensure chat sidebar doesn't overlap content */
.tag_content.tag_chat_content { margin-right: 90px !important; }
@media (max-width: 1150px) {
  body:not(.bc-welcome) .tag_content { margin-left: 0 !important; }
  .tag_content.tag_chat_content { margin-right: 0 !important; }
  /* Nuclear: hide sidebar completely on mobile/tablet */
  .tag_sidebar {
    display: none !important;
  }
  /* Show sidebar only when hamburger menu opens it */
  body.side_open .tag_sidebar {
    display: block !important;
    transform: none !important;
    -webkit-transform: none !important;
    max-width: 260px !important;
    width: 260px !important;
  }
}
@media (max-width: 768px) {
  body.side_open .tag_sidebar {
    max-width: 240px !important;
    width: 240px !important;
  }
}
@media (max-width: 480px) {
  body.side_open .tag_sidebar {
    max-width: 220px !important;
    width: 220px !important;
  }
}
.col-lg-3.sidebar.rightcol {
  flex: 0 0 320px !important;
  max-width: 320px !important;
  width: 320px !important;
}
@media (max-width: 991px) {
  .col-lg-3.sidebar.rightcol { display: none !important; }
}

/* --- MC-2b: Expand container + reduce gaps (80% tighter) ---
   Before: container 950px centered in ~1160px → 105px gap each side
   After:  container fills available space (capped at 1200px) → ~8px gap
   Gutters: 30px → 8px between feed and right sidebar
   ------------------------------------------------------------------- */
@media (min-width: 1151px) {
  .page-margin > .container,
  body:not(.bc-welcome) .tag_content > .container,
  body:not(.bc-welcome) .tag_content .page-margin > .container,
  body:not(.bc-welcome) #contnet > .container,
  body:not(.bc-welcome) .tag_content .container {
    max-width: min(1200px, calc(100% - 16px)) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
/* Tighter column gutters — 12px total gap (matches left sidebar to feed gap) */
@media (min-width: 992px) {
  .page-margin > .container > .row,
  body:not(.bc-welcome) .tag_content .container > .row {
    margin-left: -6px !important;
    margin-right: -6px !important;
  }
  .page-margin > .container > .row > [class*="col-"],
  body:not(.bc-welcome) .tag_content .container > .row > [class*="col-"] {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* ── MC-3: Post Card Anatomy ────────────────────────────────────────────
   Facebook post header: padding 12px 16px, avatar 40×40px
   WoWonder default: padding 15px, avatar 48px
   ──────────────────────────────────────────────────────────────────────── */
/* Post heading padding: 12px top, 16px sides (Facebook exact) */
.post .post-heading { padding: 12px 16px 8px !important; }
.post .post-heading .image { margin-right: 12px !important; }

/* Avatar: 40px (Facebook standard; was 48px WoWonder, 36px our broken fix) */
.post .post-heading .image img,
.post .post-heading .image .avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
}

/* Post name: 15px, weight 600 (Facebook) */
.post .post-heading .meta .title .name {
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* Post meta (time, privacy): 12px, muted */
.post .post-heading .meta .time,
.post .post-heading .meta a[class*="privacy"],
.post .post-heading .meta .privacy {
  font-size: 12px !important;
  opacity: 0.75;
}

/* Post text body: 15px, 1.333 line-height (Facebook standard)
   CRITICAL: left/right MUST be 15px to match core's .tag_post_actions { margin: -15px }
   The negative margin cancels padding to make action bar edge-to-edge. */
.post .post-description {
  padding: 4px 15px 0 !important;
  overflow: hidden !important;
}
.post .post-description p,
.post .post-description .edited_text {
  font-size: 15px !important;
  line-height: 1.333 !important;
}

/* Post images: 8px radius (Facebook) */
.post_photo_section img { border-radius: 8px !important; }

/* ── MC-3b: Action Bar — CRITICAL layout guard ───────────────────────────
   WoWonder: .post-footer { padding: 15px } + .tag_post_actions { margin: 15px -15px 0 }
   These are PAIRED. Do NOT override .post-footer padding or the -15px
   negative margin math breaks → button widths collapse → vertical text.
   Instead: use flex guards + white-space to protect buttons explicitly.

   Also: earlier custom CSS set .tag_post_actions .stat-item { font-size:13px }
   Facebook uses 15px for action buttons. Override back to 15px here.
   ──────────────────────────────────────────────────────────────────────── */
/* Force horizontal flex — prevent any direction collapse */
.tag_post_actions {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  align-items: center !important;
}
/* Action button items: no shrink, no text wrap, 15px font (Facebook) */
.tag_post_actions .stat-item,
.tag_post_actions .wo-reaction-post {
  font-size: 15px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
/* React button inner spans: force inline */
.tag_post_react_btn,
.tag_post_react_btn span,
.tag_post_foot_acticon {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* ── MC-4: Buttons ───────────────────────────────────────────────────────
   Facebook: 8px radius, 15px font for action CTAs
   Safe: only touch radius and font-size (no height/display changes on .btn)
   ──────────────────────────────────────────────────────────────────────── */
.btn { border-radius: 8px !important; font-size: 13px !important; white-space: nowrap !important; }
.btn-sm { font-size: 12px !important; }
.btn-mat { border-radius: 8px !important; }

/* ── MC-5: Left Sidebar Icons ───────────────────────────────────────────
   Facebook: 20×20px icons, 15px label, 8px padding per item
   ──────────────────────────────────────────────────────────────────────── */
.tag_sidebar_section > a svg,
.tag_sidebar_section > a img {
  width: 20px !important;
  height: 20px !important;
  margin: 0 auto 6px !important;
}
.tag_sidebar_section > a {
  font-size: 12px !important;
  padding: 10px 6px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.tag_sidebar_section > a:hover:before {
  opacity: 0.06 !important;
  border-radius: 8px !important;
}
.tag_sidebar_head {
  font-size: 11px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
}

/* ── MC-6: Landing Hero ────────────────────────────────────────────────── */
.bc-hero { padding: 20px 24px !important; margin-bottom: 16px !important; }
.bc-hero-stats {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 10px !important;
}
.bc-hero-stat {
  padding: 4px 12px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.15) !important;
  font-size: 12px !important;
}

/* ── MC-7: Mobile Nav — use WoWonder native bottom bar ───────────────────
   Hide custom #bc-mobile-nav. Let WoWonder's native .tag_hdr_right
   reposition to bottom:0 at ≤768px (as in the official Wondertag demo).
   ──────────────────────────────────────────────────────────────────────── */
/* Show custom mobile nav on mobile only */
#bc-mobile-nav {
  display: none;
}
@media (max-width: 768px) {
  #bc-mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--bc-surface-primary, #fff);
    border-top: 1px solid var(--bc-border-color, rgba(0,0,0,0.08));
    padding: 4px 0 env(safe-area-inset-bottom, 4px);
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  }
  /* Pad page bottom so content isn't hidden behind nav (safe area for notched phones) */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; }
}
/* Dark mode */
html:has(link#night-mode-css) #bc-mobile-nav,
html.bc-dark-mode #bc-mobile-nav,
body.night_mode #bc-mobile-nav {
  background: #181818 !important;
  border-top-color: rgba(255,255,255,0.08) !important;
}
/* Notification badge on mobile nav items */
.bc-mob-nav-item { position: relative; }
.bc-mob-nav-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(12px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #EF4444;
  border-radius: 8px;
  display: none;
}
.bc-mob-nav-badge:not(:empty) { display: block; }

/* ── MC-7c: Mobile Profile Panel (slide-up from bottom) ──────────────── */
.bc-mobile-profile-panel {
  display: none;
}
@media (max-width: 768px) {
  .bc-mobile-profile-panel {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: var(--bc-surface-primary, #fff);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    pointer-events: auto !important;
  }
  .bc-mobile-profile-panel.open {
    transform: translateY(0);
  }
  .bc-mob-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
  }
  .bc-mob-profile-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
  }
  .bc-mob-profile-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    padding: 4px 8px;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
  }
  .bc-mob-profile-body {
    padding: 4px 12px 16px;
  }
  .bc-mob-profile-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
    cursor: pointer;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
  }
  .bc-mob-profile-item:hover,
  .bc-mob-profile-item:active {
    background: rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit;
  }
  .bc-mob-profile-item svg {
    flex-shrink: 0;
    opacity: 0.7;
  }
  .bc-mob-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }
  .bc-mob-profile-item div {
    display: flex;
    flex-direction: column;
  }
  .bc-mob-profile-item div strong {
    font-size: 15px;
  }
  .bc-mob-profile-item div small {
    font-size: 12px;
    opacity: 0.6;
  }
  .bc-mob-profile-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 4px 12px;
  }
  .bc-mob-profile-logout {
    color: #EF4444 !important;
  }
  .bc-mob-profile-logout svg {
    color: #EF4444 !important;
    opacity: 1 !important;
  }

  /* Dark mode */
  html:has(link#night-mode-css) .bc-mobile-profile-panel,
  html.bc-dark-mode .bc-mobile-profile-panel,
  body.night_mode .bc-mobile-profile-panel {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
  }
  html:has(link#night-mode-css) .bc-mob-profile-item:hover,
  html.bc-dark-mode .bc-mob-profile-item:hover,
  body.night_mode .bc-mob-profile-item:hover {
    background: rgba(255,255,255,0.06) !important;
  }
  html:has(link#night-mode-css) .bc-mob-profile-divider,
  html.bc-dark-mode .bc-mob-profile-divider,
  body.night_mode .bc-mob-profile-divider {
    background: rgba(255,255,255,0.1) !important;
  }

  /* Native Wondertag bottom toolbar: hide buttons behind #bc-mobile-nav,
     but keep dropdown panels visible (visibility can be overridden by children). */
  .tag_hdr_right {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .tag_hdr_right > .dropdown .dropdown-menu {
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1052 !important;
  }
}

/* ── MC-7a: Search in bottom nav + hide top search bar on mobile ──────── */
/* Hide search bar from header on mobile */
@media (max-width: 768px) {
  .tag_header > .search-container {
    display: none !important;
  }
  /* Show search when toggled open via bottom nav button */
  .tag_header > .search-container.bc-search-open {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: var(--header-background, #fff) !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
  }
  .tag_header > .search-container.bc-search-open form {
    width: 100% !important;
  }
  .tag_header > .search-container.bc-search-open .search-input {
    width: 100% !important;
    font-size: 16px !important;
    padding: 10px 12px 10px 40px !important;
  }
  .tag_header > .search-container.bc-search-open .tag_toggle_search {
    display: inline-flex !important;
  }
  .tag_header > .search-container.bc-search-open .search-dropdown-container {
    position: fixed !important;
    top: 52px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 45px !important;
    max-height: none !important;
    width: 100% !important;
    border-radius: 0 !important;
  }
}
/* Search button visible only on mobile bottom bar */
.bc-bottom-search-btn {
  display: none !important;
}
@media (max-width: 768px) {
  .bc-bottom-search-btn {
    display: flex !important;
    order: -1 !important;
  }
}

/* ── MC-7b: Mobile Logo — force logo visible on small screens ────────────
   Core hides .header-brand at ≤520px. Override to show the mobile icon
   logo (.tag_logo_mobi) in the top-left corner of the header bar.
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .header-brand {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1000 !important;
    flex-shrink: 0 !important;
  }
  .header-brand .tag_logo_mobi {
    display: inline-block !important;
    max-height: 32px !important;
    width: auto !important;
  }
  .header-brand .tag_logo_pc {
    display: none !important;
  }
}

/* ── MC-8: Typography — Inter font stack ────────────────────────────────
   Facebook: -apple-system / SF Pro / Segoe UI, 15px body, 1.333 lh
   We use Inter (closest system equivalent). Body stays 14px (WoWonder
   baseline) but post text is set to 15px above (MC-3).
   ──────────────────────────────────────────────────────────────────────── */
:root {
  --bc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
}
body, p, li, td, span, div {
  font-family: var(--bc-font-sans) !important;
}
body { font-size: 14px !important; line-height: 1.45 !important; }
input, textarea, select { font-family: var(--bc-font-sans) !important; font-size: 14px !important; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bc-font-sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* ── MC-9: Micro-animations ─────────────────────────────────────────────
   Hover lift on feed post cards. Sidebar widgets: shadow only, no lift.
   ──────────────────────────────────────────────────────────────────────── */
.post .panel {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.post .panel:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.12) !important;
  transform: translateY(-1px);
}
.col-lg-3.sidebar.rightcol .wow_content:hover,
.tag_main_right_side .wow_content:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
  transform: none !important;
}
.like-btn, .tag_like_btn { transition: transform 0.15s ease !important; }
.like-btn:hover, .tag_like_btn:hover { transform: scale(1.15) !important; }
.post { animation: bc-fade-in 0.25s ease both; }

/* ── MC-10: Speed-Safe ───────────────────────────────────────────────────
   Remove costly will-change, respect prefers-reduced-motion.
   ──────────────────────────────────────────────────────────────────────── */
#bc-market-strip, .tag_sidebar { will-change: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   LP: LANDING PAGE UNIFICATION + ELITE POLISH
   Phases 1–4 cleanup. All reversible CSS. No WoWonder core edits.
   ========================================================================== */

/* ── LP-1: Compact Hero (≤120px, single message, Facebook rule) ─────────── */
.bc-hero-compact {
  padding: 16px 20px !important;
  margin-bottom: 12px !important;
  min-height: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  background: rgba(0,0,0,0.06) !important;
  border-radius: 12px !important;
}
.bc-hero-line {
  font-size: 15px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  flex: 1 !important;
  color: #333 !important;
}
/* Dark mode hero text */
body.night_mode .tag_welcome .bc-hero-line,
html:has(link#night-mode-css) .tag_welcome .bc-hero-line {
  color: #e0e0e0 !important;
}
body.night_mode .tag_welcome .bc-hero-compact,
html:has(link#night-mode-css) .tag_welcome .bc-hero-compact {
  background: rgba(255,255,255,0.08) !important;
}
.bc-hero-cta {
  display: inline-block !important;
  padding: 8px 20px !important;
  background: var(--main, #4a90e2) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
/* Hide old multi-stat hero elements */
.bc-hero-badge, .bc-hero-headline, .bc-hero-sub,
.bc-hero-stats, .bc-hero-stat { display: none !important; }

/* ── LP-1B: Welcome/Login Page — Responsive layout ──────────────────────
   Covers: phones (<576px), tablets (576-991px), desktops (992px+)
   ──────────────────────────────────────────────────────────────────────── */

/* === Base: Two-column centered layout === */

/* Override WoWonder's forced min-width:992px!important on body & .container
   AND override MC-2 logged-in layout that leaks via .tag_content wrapper */
body.bc-welcome {
  min-width: 0 !important;
}
body.bc-welcome .tag_content {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.bc-welcome .tag_content .container {
  min-width: 0 !important;
  max-width: 1200px !important;
  width: 92% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}
.tag_welcome {
  min-height: 100vh !important;
  min-height: calc(var(--vh, 1vh) * 100) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}
/* Compact header — zero padding */
.tag_welcome .tag_wel_upper {
  padding: 0 !important;
  margin: 0 !important;
}
.tag_welcome .navbar-default {
  padding: 8px 0 !important;
}
/* 5x bigger logo on welcome/login page */
.tag_welcome .navbar-default .logo img {
  max-width: 700px !important;
  max-height: 250px !important;
}
/* Main content area — flush below header, no gaps */
.tag_welcome .tag_wel_middle {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Two-column row: hero left, auth right — top aligned */
.tag_welcome .tag_wel_row {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
/* Both columns equal width */
.tag_welcome .tag_wel_row > [class*="col-"] {
  flex: 1 1 0 !important;
  max-width: 50% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Left column: hero content */
.tag_welcome .tag_wel_row > .col-xl-6:first-child {
  display: block !important;
}
/* Remove empty space from .bc-hero wrapper and hidden title */
.tag_welcome .bc-hero {
  margin: 0 !important;
}
.tag_welcome .tag_wel_title {
  display: none !important;
}
.tag_welcome .tag_pro_widget {
  position: static !important;
  margin-top: 16px !important;
}
.tag_welcome .tag_wel_widget {
  margin: 16px 0 0 !important;
}
/* Right column: auth box fills its column */
.tag_welcome .tag_auth_box {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.tag_welcome .tag_wel_register {
  text-align: center !important;
}

/* === Phones (< 768px): stack vertically, auth first === */
@media (max-width: 767.98px) {
  body.bc-welcome .tag_content .container {
    width: 95% !important;
    max-width: 520px !important;
  }
  .tag_welcome .navbar-default .logo img {
    max-width: 200px !important;
    max-height: 80px !important;
  }
  .tag_welcome .tag_wel_row {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
  }
  .tag_welcome .tag_wel_row > [class*="col-"] {
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  /* Auth box (2nd col) comes first on mobile */
  .tag_welcome .tag_wel_row > .col-xl-6:last-child {
    order: -1 !important;
  }
  /* Hide hero content on mobile — login is priority */
  .tag_welcome .tag_wel_row > .col-xl-6:first-child {
    display: none !important;
  }
  .tag_welcome .tag_auth_box {
    padding: 20px !important;
  }
}

/* === Small phones (< 500px) === */
@media (max-width: 499.98px) {
  .tag_welcome .tag_wel_widget.tag_pro_widget {
    display: none !important;
  }
}

/* ── LP-2: Composer — all buttons visible in 2-column grid on desktop ───── */

/* ── LP-3: Offline Chat Panel ───────────────────────────────────────────────
   Hide "You are currently offline" banner — shown before WS connects
   ──────────────────────────────────────────────────────────────────────────── */
.chat-offline, .offline-banner, .tag_offline_bar,
[class*="offline"][class*="bar"], [class*="offline"][class*="msg"],
.chat-status-offline, #chat-offline-status { display: none !important; }

/* ── LP-4: Sidebar — keep only core links, hide template noise ──────────────
   Keep: News Feed, Discover, Creator Dashboard, Leaderboard, Wallet,
         Invite & Earn, Markets
   Remove: Events, Blog, Forum, Games, Movies, Offers, Memories,
           Common Things, Funding, My Products, My Pages
   ──────────────────────────────────────────────────────────────────────────── */
a[href*="link1=events"],
a[href*="link1=new-game"], a[href*="link1=movies"],
a[href*="link1=offers"], a[href*="link1=memories"],
a[href*="link1=common_things"], a[href*="link1=funding"],
a[href*="link1=blogs"] .tag_sidebar_section > a,
a[href*="link1=forum"] { display: none !important; }

/* ── LP-5: Sidebar opacity (EP-8) — reduce visual weight ───────────────── */
.tag_sidebar { opacity: 0.94; }
.tag_sidebar:hover { opacity: 1; transition: opacity 0.2s ease; }

/* ── EP-1: Visual Silence — max 3 highlights per screen ────────────────── */
/* Reduce sidebar head weight */
.tag_sidebar_head { opacity: 0.55 !important; font-size: 10px !important; }

/* ── EP-2: Typography hierarchy — only usernames bold ──────────────────── */
.post .post-heading .meta .title .name { font-weight: 600 !important; }
/* All other bold elements soften */
.post .post-heading .meta .time { font-weight: 400 !important; }
.tag_post_actions .stat-item { font-weight: 500 !important; }

/* ── EP-3: White space — top margin, between posts ──────────────────── */
.page-margin { margin: 17px 0 0 !important; }
.post { margin-bottom: 5px !important; }

/* ── EP-4: Hover physics (already in MC-9, reinforce values) ───────────── */
.post .panel:hover { transform: translateY(-1px) !important; transition: all 0.15s ease !important; }

/* ── EP-5: Composer auto-expand on focus ───────────────────────────────── */
.tag_pub_box textarea,
.tag_pub_box .publisher-input {
  min-height: 44px !important;
  max-height: 44px !important;
  transition: max-height 0.2s ease !important;
  overflow: hidden !important;
}
.tag_pub_box textarea:focus,
.tag_pub_box .publisher-input:focus {
  max-height: 200px !important;
}

/* ── EP-7: Remove hard borders — soft shadow only ─────────────────────── */
.wow_content, .post .panel {
  border: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.06) !important;
}

/* ── EP-9: Smooth scroll (disabled on html root — see TC_022 fix above) ── */

/* ── EP-10: First post visible rule — remove extra top spacing ─────────── */
.tag_home_filters.home { margin-top: 0 !important; margin-bottom: 6px !important; }
.greetalert { display: none !important; } /* greeting alert removed per EP-10 */

/* ── EP-12: Admin links kept visible — PHP already gates via Wo_IsAdmin() */

/* ── Duplicate trending block ───────────────────────────────────────────── */
/* If a second .bc-trending-section appears in right sidebar, hide it */
.col-lg-3 .bc-trending-section { display: none !important; }

/* ── Market ticker single row ───────────────────────────────────────────── */
/* Only one .bc-ticker-wrapper remains after DOM fix; ensure no overflow row */
#bc-market-strip { overflow: hidden !important; }
#bc-market-strip .bc-ticker-wrapper + .bc-ticker-wrapper { display: none !important; }

/* ==========================================================================
   ACTION BAR: Correct fix — proper selectors for WoWonder's actual DOM.

   DOM path: .post > .panel > .post-description > .tag_post_actions
             > div.valign > .wo-reaction-post.valign.stat-item
             > .like-btn.like-btn-post > .valign.tag_post_react_btn

   .like-btn-post is INSIDE .tag_post_actions — NOT inside .post-footer.
   Previous attempts used .post .post-footer as ancestor → never matched.

   Root cause 1: core line 2587 sets .like-btn{display:block}.
   Root cause 2: core line 2591 sets action-bar SVGs to padding:9px + width:40px
                 = 58px tall icon inside our 34px container → overflow collapses layout.
   ========================================================================== */

/* Fix 1: like-btn-post — correct selector, no wrong ancestor */
.like-btn-post {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

/* Fix 2b: Hide the "Like"/"React" text inside non-reacted button.
   Core CSS .tag_post_react_btn > span { font-size: 0 } hides it normally.
   Our body/span font-family rule can inflate inherited font-size via cascade,
   so explicitly reinforce font-size: 0 here with !important. */
.tag_post_react_btn > span {
  font-size: 0 !important;
}

/* Action bar SVG icons — use WoWonder core sizing (40px grey circle).
   Core line 2591 gives: padding:9px; border-radius:40%; background:rgba(0,0,0,.06);
   width:40px; height:40px; margin:0 7px. This is the default WoWonder look.
   We DON'T override these — let the core styling handle icon sizing.
   The 34px height constraint is also removed (see TG4 below) so icons fit. */

/* ==========================================================================
   FINAL REFACTOR BLOCK — TG3/TG4/TG6/TG7/TG8 + Global polish
   Update-safe CSS overrides. No WoWonder core edits.
   ========================================================================== */

/* ── TG6: Left Sidebar — keep core 6 links only ─────────────────────────────
   KEEP: News Feed · Discover · Creator Dashboard · Leaderboard · Wallet · Invite & Earn
   HIDE: Albums · Saved Posts · entire COMMUNITY section (events/blog/market/
         forum/my-articles/my-products/groups/pages) + EXPLORE section
   ──────────────────────────────────────────────────────────────────────────── */
/* Hide Albums and Saved Posts from ME section */
a[href*="link1=albums"],
a[href*="link1=saved-posts"] { display: none !important; }

/* Hide all COMMUNITY section links */
a[href*="link1=products"],
a[href*="link1=my-products"],
a[href*="link1=my-blogs"],
a[href*="link1=groups"],
a[href*="link1=pages"],
a[href*="link1=movies"],
a[href*="link1=new-game"],
a[href*="link1=common_things"],
a[href*="link1=funding"],
a[href*="link1=offers"],
a[href*="link1=memories"] { display: none !important; }

/* ── TG3: Composer — all buttons visible (LP-2 minimal mode removed) ───── */

/* Composer idle state — compact 40px height (reduced 30%) */
#tagPostBoxInput:not(:focus),
.tag_pub_box_input:not(:focus-within) {
  min-height: 40px !important;
  max-height: 40px !important;
  overflow: hidden !important;
  transition: max-height 0.2s ease !important;
}
#tagPostBoxInput:focus,
.tag_pub_box_input:focus-within {
  max-height: 300px !important;
  overflow: visible !important;
}

/* ── TG4: Post Layout — normalize all interaction elements ──────────────────
   Action buttons: height 34px, font 13px, icon 16px, gap 8px
   Post card: radius 14px, padding 16/12px, margin-bottom 14px
   ──────────────────────────────────────────────────────────────────────────── */
/* Post card geometry */
.post .panel { border-radius: 14px !important; margin-bottom: 0 !important; }
.post { margin-bottom: 5px !important; }
@media (max-width: 768px) {
  .post,
  .post-container,
  .wo_post_sec { margin-bottom: 3px !important; }
}

/* Action buttons — no fixed height (let WoWonder core 40px icons determine size) */
.tag_post_foot_acticon {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}
.tag_post_foot_acticon:hover { background: rgba(0,0,0,.05) !important; border-radius: 6px !important; }

/* Reaction button wrapper */
.wo-reaction-post {
  display: inline-flex !important;
  align-items: center !important;
}

/* Reactions popup — show only 3 preview reactions; rest on hover */
.reactions-box li.reaction:nth-child(n+4) { display: none !important; }
.wo-reaction-post:hover .reactions-box li.reaction:nth-child(n+4),
.wo-reaction-lightbox:hover .reactions-box li.reaction:nth-child(n+4) {
  display: inline-flex !important;
}

/* Comment box show/hide: WoWonder's Wo_ShowComments() toggles .hidden class.
   Core CSS: .hidden { display: none } (no !important).
   Do NOT add display:none here — it would override the JS toggle and break comments.
   Only boost d-block for PHP auto-show (tag_show_comments=1). */
.post-footer.post-comments.d-block { display: block !important; }

/* Stats row (like count / comment count) — clean compact */
.tag_post_foot_stats {
  padding: 4px 16px 2px !important;
  font-size: 12px !important;
  opacity: 0.8;
}

/* ── TG8: Chat — hide offline container ────────────────────────────────────── */
.chat-offline-container,
.tag_chat_offline,
.chat-offline-user,
#chat-offline,
.chat-opacity { opacity: 0 !important; pointer-events: none !important; height: 0 !important; overflow: hidden !important; }

/* ── Global polish ─────────────────────────────────────────────────────────── */
/* Consistent soft shadow on content cards (keeps MC-1 border for dark mode) */
.wow_content {
  box-shadow: 0 4px 12px rgba(0,0,0,.05) !important;
}

/* Spacing scale enforcement */
.tag_home_filters.home { margin-bottom: 8px !important; }

/* Translator button — place inline below post text, before read-more */
.post .translate-btn,
.post [onclick*="translate"],
.post [onclick*="Translate"] {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12px !important;
  opacity: 0.6 !important;
  margin: 4px 0 0 !important;
  cursor: pointer !important;
}
.post .translate-btn:hover { opacity: 1 !important; }

/* Post heading 3-dot menu — ensure only menu visible, not inline admin links */
.post .post-heading .dropdown-toggle svg { width: 16px !important; height: 16px !important; }

/* ==========================================================================
   FIX-1: Restore WoWonder native FAB (.tag_create_dropup)
   Moved left to clear 90px chat sidebar. Fix circle shape broken by MC-4.
   ========================================================================== */
.tag_create_dropup {
  display: block !important;
  right: 110px !important;
}
body[chat-off="true"] .tag_create_dropup {
  right: 30px !important;
}
/* Restore circle shape — MC-4 .btn rule breaks it to 8px */
.tag_create_dropup > .btn {
  border-radius: 50% !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bc-primary, #6C5CFF) !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(108,92,255,.45) !important;
}
.tag_create_dropup > .btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 36px rgba(108,92,255,.55) !important;
}
/* Hide native FAB on mobile — mobile nav has create button */
@media (max-width: 900px) {
  .tag_create_dropup { display: none !important; }
}

/* ==========================================================================
   FIX-2: Dark Mode — Full coverage for all custom bc-* elements
   Uses :has(link#night-mode-css) for modern browsers + .bc-dark-mode fallback
   ========================================================================== */

/* --- Cards: MC-1 border invisible in dark → use light border --- */
html:has(link#night-mode-css) .wow_content,
html.bc-dark-mode .wow_content,
html:has(link#night-mode-css) .post .panel,
html.bc-dark-mode .post .panel {
  border-color: rgba(255,255,255,.1) !important;
  box-shadow: none !important;
}

html:has(link#night-mode-css) .bc-mob-nav-item,
html.bc-dark-mode .bc-mob-nav-item {
  color: #8899a6 !important;
}
html:has(link#night-mode-css) .bc-mob-nav-item.active,
html.bc-dark-mode .bc-mob-nav-item.active {
  color: #e7e9ea !important;
}

/* --- Hero banner on home --- */
html:has(link#night-mode-css) .bc-hero,
html.bc-dark-mode .bc-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
}

/* --- Action Prompt banner --- */
html:has(link#night-mode-css) .bc-prompt-card,
html.bc-dark-mode .bc-prompt-card {
  box-shadow: 0 4px 20px rgba(0,0,0,.4) !important;
}

/* --- Sidebar widgets in dark mode --- */
html:has(link#night-mode-css) .wo_page_hdng,
html.bc-dark-mode .wo_page_hdng {
  border-bottom-color: rgba(255,255,255,.1) !important;
}

/* --- Feed tabs --- */
html:has(link#night-mode-css) .bc-feed-tabs,
html.bc-dark-mode .bc-feed-tabs {
  background: #212121 !important;
  border-color: rgba(255,255,255,.08) !important;
}
html:has(link#night-mode-css) .bc-feed-tabs a,
html.bc-dark-mode .bc-feed-tabs a {
  color: #8899a6 !important;
}
html:has(link#night-mode-css) .bc-feed-tabs a.active,
html.bc-dark-mode .bc-feed-tabs a.active {
  color: #e7e9ea !important;
}

/* --- Creator Dashboard dark mode --- */
html:has(link#night-mode-css) .bc-cd-cta-inner,
html.bc-dark-mode .bc-cd-cta-inner,
html:has(link#night-mode-css) .bc-cd-card,
html.bc-dark-mode .bc-cd-card,
html:has(link#night-mode-css) .bc-cd-thisweek,
html.bc-dark-mode .bc-cd-thisweek,
html:has(link#night-mode-css) .bc-cd-stat,
html.bc-dark-mode .bc-cd-stat {
  background: #212121 !important;
}
html:has(link#night-mode-css) .bc-cd-section-title,
html.bc-dark-mode .bc-cd-section-title {
  border-bottom-color: rgba(255,255,255,.1) !important;
  color: #e7e9ea !important;
}
html:has(link#night-mode-css) .bc-cd-tw-item,
html.bc-dark-mode .bc-cd-tw-item {
  background: rgba(255,255,255,.05) !important;
}
html:has(link#night-mode-css) .bc-cd-ms-bar,
html.bc-dark-mode .bc-cd-ms-bar {
  background: rgba(255,255,255,.1) !important;
}
html:has(link#night-mode-css) .bc-cd-milestone,
html.bc-dark-mode .bc-cd-milestone,
html:has(link#night-mode-css) .bc-cd-history-item,
html.bc-dark-mode .bc-cd-history-item {
  border-bottom-color: rgba(255,255,255,.08) !important;
}
html:has(link#night-mode-css) .bc-cd-growth-reach,
html.bc-dark-mode .bc-cd-growth-reach {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%) !important;
}
html:has(link#night-mode-css) .bc-cd-growth-invited,
html.bc-dark-mode .bc-cd-growth-invited {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}
html:has(link#night-mode-css) .bc-cd-growth-engagement,
html.bc-dark-mode .bc-cd-growth-engagement {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%) !important;
}

/* --- Trending section dark mode --- */
html:has(link#night-mode-css) .bc-trending-card,
html.bc-dark-mode .bc-trending-card {
  background: #1e1e2e !important;
}
html:has(link#night-mode-css) .bc-trending-info,
html.bc-dark-mode .bc-trending-info {
  color: #c5c5c5 !important;
}

/* --- Search bar in dark mode --- */
html:has(link#night-mode-css) .tag_header .search-input,
html.bc-dark-mode .tag_header .search-input {
  background: rgba(255,255,255,.08) !important;
  color: #e7e9ea !important;
}

/* --- Greeting alert in dark mode --- */
html:has(link#night-mode-css) .greetalert,
html.bc-dark-mode .greetalert {
  background: #212121 !important;
  color: #dcdcdc !important;
}

/* --- Font colors: ensure text is readable in both modes --- */
html:has(link#night-mode-css) .post .post-heading .meta .title .name,
html.bc-dark-mode .post .post-heading .meta .title .name {
  color: #e7e9ea !important;
}
html:has(link#night-mode-css) .post .post-description p,
html.bc-dark-mode .post .post-description p,
html:has(link#night-mode-css) .post .post-description .edited_text,
html.bc-dark-mode .post .post-description .edited_text {
  color: #dcdcdc !important;
}

/* --- Featured users / Creators sidebar in dark mode --- */
html:has(link#night-mode-css) .featured-users-innr .tag_pro_users > div a,
html.bc-dark-mode .featured-users-innr .tag_pro_users > div a {
  box-shadow: 0 0 0 1px rgba(255,255,255,.1) !important;
}
html:has(link#night-mode-css) .featured-users-innr h4,
html.bc-dark-mode .featured-users-innr h4 {
  color: #c5c5c5 !important;
}

/* --- Publisher box in dark mode --- */
html:has(link#night-mode-css) .tag_pub_box_bg_text,
html.bc-dark-mode .tag_pub_box_bg_text {
  background-color: #353535 !important;
  color: #c5c5c5 !important;
}

/* Install popup uses inline colors via JS — no dark mode override needed */

/* ==========================================================================
   FIX-3: Sidebar layout polish
   ========================================================================== */
/* Ensure right sidebar doesn't overlap content on medium screens */
@media (max-width: 1250px) and (min-width: 992px) {
  .col-lg-3.sidebar.rightcol {
    flex: 0 0 240px !important;
    max-width: 240px !important;
    width: 240px !important;
  }
}

/* ==========================================================================
   FIX-5: Sidebar + Ticker + Header — comprehensive layout fix
   1) Ticker stops at sidebar edge (margin-left = sidebar width)
   2) Header elements (search, profile icons) fit within 280px sidebar
   3) Sidebar overflow containment
   4) Dark mode: sidebar background, text, hover colors
   ========================================================================== */

/* --- 1) Ticker + banner: clear left sidebar on desktop --- */
@media (min-width: 1151px) {
  #bc-market-strip,
  .bc-announce-banner {
    margin-left: 280px !important;
    margin-right: 90px !important;
  }
  #bc-market-strip {
    padding-right: 230px !important;
    border-left: none !important;
    box-shadow: none !important;
  }
}
@media (max-width: 1250px) and (min-width: 992px) {
  #bc-market-strip {
    margin-right: 90px !important;
    padding-right: 150px !important;
  }
}
@media (max-width: 991px) {
  #bc-market-strip,
  .bc-announce-banner {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
}

/* --- 2) Left panel layout: logo → icons → search (≥1351px) --- */
@media (min-width: 1351px) {
  /* Logo: bigger, stays at top */
  .header-brand img {
    max-width: 160px !important;
    max-height: 50px !important;
  }
  /* Icons: below logo at 60px, spaced properly */
  .tag_hdr_right {
    width: 250px !important;
    top: 60px !important;
    justify-content: flex-start !important;
    padding: 2px 10px !important;
    gap: 0 !important;
  }
  /* Search: below icons */
  .tag_header > .search-container {
    width: 250px !important;
    top: 100px !important;
  }
  .tag_header > .search-container .dropdown-menu {
    max-width: 250px !important;
    top: 140px !important;
  }
  .tag_hdr_right > .dropdown .dropdown-menu {
    max-width: 250px !important;
    top: 100px !important;
  }
}

/* --- 2b) Compact notifications & activities in sidebar (50% shorter) --- */
.skel_noti,
.notification-list,
.user-request-list {
  padding: 4px 8px !important;
  margin: 1px 0 !important;
}
/* Fix flex layout: avatar + text in a single row */
.notification-list > .valign {
  flex-wrap: nowrap !important;
  align-items: center !important;
}
.skel_avatar,
.notification-list .notification-user-avatar,
.user-request-list .avatar {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}
/* Fix text area: use flex:1 instead of width:100% to prevent overflow */
.notification-list .notification-text,
.user-request-list .user-info {
  width: auto !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding-right: 28px !important;
}
.notification-list .notification-text > span {
  font-size: 13px !important;
  line-height: 1.3 !important;
}
.notification-list .notification-text > span a {
  font-size: 13px !important;
}
.notification-list .notification-text > span.sec_text {
  font-size: 12.5px !important;
}
.notification-list .ajax-time {
  font-size: 10px !important;
  margin: 1px 0 0 !important;
}
.notification-list .notification-text > svg,
.notification-list .notification-text .inline_act_emoji {
  width: 20px !important;
  height: 20px !important;
  padding: 3px !important;
}

/* --- 3) Sidebar overflow containment --- */
.tag_sidebar {
  overflow: hidden !important;
}
.tag_sidebar .sidebar_innr {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* --- 4a) DAY MODE: sidebar explicit colors ---
   Root cause: admin --header-background is #1e2321 (dark green-black),
   which core uses for sidebar bg. Dark text on dark bg = unreadable.
   Fix: force light bg + dark text for sidebar in day mode.
   ---------------------------------------------------------------- */
.tag_sidebar {
  background: #f8f9fa !important;
  border-right: 1px solid #e2e8f0 !important;
}
.tag_sidebar .sidebar_innr {
  background: #f8f9fa !important;
}
.tag_sidebar_head {
  color: #64748B !important;
}
.tag_sidebar_section > a {
  color: #334155 !important;
}
.tag_sidebar_section > a:hover {
  color: #6C5CFF !important;
}

/* --- 4b) NIGHT/DARK MODE: sidebar background --- */
html:has(link#night-mode-css) .tag_sidebar,
html.bc-dark-mode .tag_sidebar {
  background: #1a1a1a !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
}
html:has(link#night-mode-css) .tag_sidebar .sidebar_innr,
html.bc-dark-mode .tag_sidebar .sidebar_innr {
  background: #1a1a1a !important;
}

/* --- 4c) NIGHT/DARK MODE: sidebar links --- */
html:has(link#night-mode-css) .tag_sidebar a,
html.bc-dark-mode .tag_sidebar a {
  color: #c5c5c5 !important;
}
html:has(link#night-mode-css) .tag_sidebar a:hover,
html.bc-dark-mode .tag_sidebar a:hover,
html:has(link#night-mode-css) .tag_sidebar a.active,
html.bc-dark-mode .tag_sidebar a.active {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

/* --- 4d) NIGHT/DARK MODE: sidebar section headers + items --- */
html:has(link#night-mode-css) .tag_sidebar_head,
html.bc-dark-mode .tag_sidebar_head,
body.night_mode .tag_sidebar_head {
  color: #999 !important;
  opacity: 0.85 !important;
}
html:has(link#night-mode-css) .tag_sidebar_section_prnt,
html.bc-dark-mode .tag_sidebar_section_prnt {
  background: transparent !important;
}
html:has(link#night-mode-css) .tag_sidebar_section > a,
html.bc-dark-mode .tag_sidebar_section > a {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .tag_sidebar_section > a:hover,
html.bc-dark-mode .tag_sidebar_section > a:hover {
  color: #fff !important;
}

/* --- 4e) NIGHT/DARK MODE: sidebar footer links --- */
html:has(link#night-mode-css) .tag_footer_links a,
html.bc-dark-mode .tag_footer_links a,
body.night_mode .tag_footer_links a {
  color: #888 !important;
}
html:has(link#night-mode-css) .tag_footer_links a:hover,
html.bc-dark-mode .tag_footer_links a:hover {
  color: #aaa !important;
}

/* --- 4f) NIGHT/DARK MODE: sidebar scrollbar --- */
html:has(link#night-mode-css) .tag_sidebar .sidebar_innr::-webkit-scrollbar-thumb,
html.bc-dark-mode .tag_sidebar .sidebar_innr::-webkit-scrollbar-thumb {
  background-color: #444 !important;
  border-color: #1a1a1a !important;
}

/* --- 5) Sidebar-area CSS variable override at ≥1351px ---
   Core uses --header-color, --header-background, --header-search-color
   for ALL elements in the header/sidebar area. Admin set dark values
   (#1e2321 bg, #fff text). Instead of overriding every selector,
   override the VARIABLES at component scope so ALL children automatically
   inherit the correct sidebar-matching colors.
   ---------------------------------------------------------------- */
@media (min-width: 1351px) {
  /* DAY MODE: light sidebar = dark text */
  .tag_sidebar,
  .tag_hdr_right,
  .tag_header > .search-container,
  .tag_sett_sidebar,
  .tag_live_sidebar {
    --header-color: #334155;
    --header-background: #f8f9fa;
    --header-search-color: #e8ecf1;
    --header-hover-border: #6C5CFF;
  }

  /* Search input border for visibility on light bg */
  .tag_header .search-input {
    border: 1px solid #e2e8f0 !important;
  }

  /* Dropdown scrollbar to match light bg */
  .tag_hdr_right > .dropdown .dropdown-menu::-webkit-scrollbar-thumb,
  .tag_sidebar .sidebar_innr::-webkit-scrollbar-thumb {
    border-color: #f8f9fa !important;
  }

  /* Dropdown border for definition */
  .tag_hdr_right > .dropdown .dropdown-menu,
  .tag_header > .search-container .dropdown-menu {
    border-right: 1px solid #e2e8f0 !important;
  }
}

/* --- 5b) DARK MODE: sidebar-area CSS variable override --- */
@media (min-width: 1351px) {
  html:has(link#night-mode-css) .tag_sidebar,
  html.bc-dark-mode .tag_sidebar,
  html:has(link#night-mode-css) .tag_hdr_right,
  html.bc-dark-mode .tag_hdr_right,
  html:has(link#night-mode-css) .tag_header > .search-container,
  html.bc-dark-mode .tag_header > .search-container,
  html:has(link#night-mode-css) .tag_sett_sidebar,
  html.bc-dark-mode .tag_sett_sidebar,
  html:has(link#night-mode-css) .tag_live_sidebar,
  html.bc-dark-mode .tag_live_sidebar {
    --header-color: #c5c5c5;
    --header-background: #1a1a1a;
    --header-search-color: rgba(255,255,255,.1);
    --header-hover-border: #6C5CFF;
  }

  html:has(link#night-mode-css) .tag_header .search-input,
  html.bc-dark-mode .tag_header .search-input {
    border: 1px solid rgba(255,255,255,.1) !important;
  }

  html:has(link#night-mode-css) .tag_hdr_right > .dropdown .dropdown-menu::-webkit-scrollbar-thumb,
  html.bc-dark-mode .tag_hdr_right > .dropdown .dropdown-menu::-webkit-scrollbar-thumb {
    border-color: #1a1a1a !important;
  }

  html:has(link#night-mode-css) .tag_hdr_right > .dropdown .dropdown-menu,
  html.bc-dark-mode .tag_hdr_right > .dropdown .dropdown-menu,
  html:has(link#night-mode-css) .tag_header > .search-container .dropdown-menu,
  html.bc-dark-mode .tag_header > .search-container .dropdown-menu {
    border-right-color: rgba(255,255,255,.06) !important;
  }
}

/* ==========================================================================
   FIX-4: Post Composer Modal
   JS in footer.js moves #tagPostBox to <body> to escape CSS containment.
   These CSS rules are the PRIMARY visibility mechanism (no inline styles).
   ========================================================================== */
body.modal-open {
  overflow: hidden !important;
}
/* The modal itself: full viewport overlay */
#tagPostBox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1060 !important;
}
#tagPostBox.show {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: rgba(0,0,0,.6) !important;
  overflow-y: auto !important;
}
/* The dialog box inside: centered, visible, proper scale */
#tagPostBox.show .modal-dialog {
  transform: scale(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin: auto !important;
  width: 100% !important;
  max-width: 550px !important;
}
/* The white content card */
#tagPostBox.show .modal-content {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.3) !important;
}
/* Dark mode */
html:has(link#night-mode-css) #tagPostBox.show .modal-content,
html.bc-dark-mode #tagPostBox.show .modal-content {
  background: #212121 !important;
  color: #dcdcdc !important;
}
/* Mobile: full-screen modal with flex layout */
@media (max-width: 540px) {
  #tagPostBox.show .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
  }
  #tagPostBox.show .modal-content {
    border-radius: 0 !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* Textarea area fills available space */
  #tagPostBox.show .modal-content #post-textarea {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo textarea,
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo .postText {
    flex: 1 !important;
    min-height: 150px !important;
    max-height: unset !important;
    height: auto !important;
    resize: none !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    padding: 12px !important;
  }
  /* Footer sticks to bottom */
  #tagPostBox.show .modal-content .modal-footer {
    margin-top: auto !important;
    flex-shrink: 0 !important;
  }
  /* Publisher footer scrollable if buttons overflow viewport */
  #tagPostBox.show .modal-content .publisher-box-footer {
    max-height: 45vh !important;
    overflow-y: auto !important;
    flex-shrink: 0 !important;
  }
  /* publisher-box form wraps everything — make it flex too */
  #tagPostBox.show .modal-content .publisher-box,
  #tagPostBox.show .modal-content #publisher-box-focus {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ==========================================================================
   RR: RESPONSIVE RESET — Universal device compatibility
   Corrections only. No fundamental design changes.
   Covers: mobile (≤480), phablet (481–600), tablet (601–768),
           small-desktop (769–991), medium-desktop (992–1150),
           wide-desktop (1151–1350), ultra-wide (1351+)
   ========================================================================== */

/* --------------------------------------------------------------------------
   RR-1: iOS zoom prevention — inputs must be ≥16px
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  input, textarea, select, .form-control {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-2: Install popup — position above mobile nav on all mobile sizes
   Currently only adjusted at ≤480px. Mobile nav shows at ≤900px.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  #bc-install-popup {
    bottom: 76px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-3: Hero banner buttons — constrain width on landscape tablets
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .bc-btn-primary, .bc-btn-ghost,
  #bc-hero-banner .bc-btn-primary,
  #bc-hero-banner .bc-btn-ghost {
    max-width: 320px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-4: Feed tabs — extend responsive rule to 768px (was 600px only)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .bc-feed-tabs {
    gap: 0 !important;
  }
  .bc-feed-tab {
    padding: 8px 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
}

/* --------------------------------------------------------------------------
   RR-5: Post cards — consistent mobile spacing
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .post .panel {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0,0,0,.06) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
  }
  .post .post-heading {
    padding: 10px 12px 6px !important;
  }
  .post .post-heading .image img,
  .post .post-heading .image .avatar {
    width: 36px !important;
    height: 36px !important;
  }
  .post .post-heading .image {
    margin-right: 10px !important;
  }
  .post .post-body {
    padding: 4px 12px 8px !important;
  }
  .post .post-footer {
    padding: 4px 12px !important;
  }
  .tag_post_foot_stats {
    padding: 2px 12px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-5b: Post card spacing — 70% tighter on mobile only
   Sources of gap: .post margin, .wow_content.mb-15, .posts-container margin,
   .page-margin margin. Override all on mobile.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Post element itself */
  .post { margin-bottom: 0 !important; }
  /* .panel base rule (core: 20px, core mobile: 10px) — kill it */
  .post .panel,
  .post > .panel,
  .panel { margin-bottom: 0 !important; }
  /* Post containers */
  .post-container,
  .wo_post_sec { margin-bottom: 0 !important; }
  .posts-container { margin-bottom: 0 !important; }
  /* Loading skeleton (core mobile: 10px) */
  .tag_post_skel { margin-bottom: 0 !important; }
  /* People you may know widget (core mobile: 15px) */
  .tag_post_people_know { margin-bottom: 3px !important; }
  /* .mb-* utilities inside feed area */
  #posts-laoded .wow_content.mb-15,
  #posts-laoded .mb-15,
  #posts-laoded .mb-20,
  #posts-laoded .mb-25,
  .middlecol .wow_content.mb-15,
  .middlecol .mb-15,
  .middlecol .mb-20 { margin-bottom: 0 !important; }
  /* Page margin between feed sections */
  .page-margin { margin-top: 0 !important; margin-bottom: 0 !important; }
  /* Remove gap between consecutive posts */
  .post + .post,
  .wo_post_sec + .wo_post_sec { margin-top: 0 !important; }
  /* wow_content cards in feed — kill bottom margin */
  .middlecol .wow_content,
  #posts-laoded .wow_content { margin-bottom: 0 !important; }
}

/* --------------------------------------------------------------------------
   RR-6: Composer textarea — reduce max-height on mobile (keyboard space)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  #tagPostBoxInput:focus,
  .tag_pub_box_input:focus-within {
    max-height: 180px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-7: Composer modal — widen to 600px breakpoint for tablets
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  #tagPostBox.show .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
  }
  #tagPostBox.show .modal-content {
    border-radius: 0 !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* Textarea fills available space in full-screen composer modal */
  #tagPostBox.show .modal-content #post-textarea {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo textarea,
  #tagPostBox.show .modal-content #post-textarea .wo_pub_txtara_combo .postText {
    flex: 1 !important;
    min-height: 120px !important;
    max-height: unset !important;
    height: auto !important;
    overflow-y: auto !important;
    resize: none !important;
  }
}

/* --------------------------------------------------------------------------
   RR-8: Market strip — mobile adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  #bc-market-strip {
    font-size: 13px !important;
    height: 34px !important;
  }
  .bc-ticker-sep {
    margin: 0 8px !important;
  }
}
@media (max-width: 900px) {
  #bc-market-strip {
    margin-left: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   RR-9: Right sidebar — compress on medium desktop, hide on tablet
   Existing: hidden at ≤991px, 320px at ≥992px, 240px at 992–1250px
   Fix: ensure container adapts when right sidebar hidden
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .page-margin > .container,
  body:not(.bc-welcome) .tag_content > .container,
  body:not(.bc-welcome) .tag_content .page-margin > .container {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .page-margin > .container > .row,
  body:not(.bc-welcome) .tag_content .container > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .page-margin > .container > .row > [class*="col-"],
  body:not(.bc-welcome) .tag_content .container > .row > [class*="col-"] {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-10: Welcome/login page — responsive padding
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .tag_auth_box {
    padding: 18px !important;
  }
  .tag_welcome .bc-hero-compact {
    padding: 10px 14px !important;
    gap: 10px !important;
  }
  .bc-hero-line {
    font-size: 14px !important;
  }
  .bc-hero-cta {
    padding: 6px 16px !important;
    font-size: 13px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-11: Profile page buttons — stack vertically on small mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .tag_page_name_hdr .buttons-profile {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .tag_page_name_hdr .buttons-profile .btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .tag_page_name_hdr .event-info-cont-small h3 {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-12: Mobile bottom nav — safe area + floating element clearance
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(45px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Snackbar and push-notification popups sit at bottom:15px by default;
     lift them above the 45px native bottom nav */
  .snackbar,
  .tag_pop_noti {
    bottom: 60px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-14: Hover effects — disable on touch devices (prevent sticky hover)
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .post .panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.05) !important;
    transform: none !important;
  }
  .wow_content:hover {
    transform: none !important;
  }
  .like-btn:hover, .tag_like_btn:hover {
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   RR-15: Images and media — prevent overflow
   -------------------------------------------------------------------------- */
img, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto;
}
/* Exclude avatars and icons from height:auto */
.avatar, .bc-mob-nav-avatar,
.post .post-heading .image img,
.tag_sidebar_section > a img,
#bc-mobile-nav img {
  height: unset;
}

/* RR-16: Removed — let WoWonder core handle mobile dropdown panels natively */

/* --------------------------------------------------------------------------
   RR-17: Announcement banner — responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .bc-announce-banner {
    font-size: 12px !important;
    padding: 8px 12px !important;
  }
  .bc-announce-close {
    min-width: 28px !important;
    min-height: 28px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-18: Greeting banner — compact on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .greetalert {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
  .greetalert .small-texts {
    font-size: 11px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-19: CSS variables — extend to 1151px+ (was 1351px only)
   At 1151–1350px the sidebar is visible but variables weren't overridden.
   -------------------------------------------------------------------------- */
@media (min-width: 1151px) and (max-width: 1350px) {
  .tag_sidebar,
  .tag_hdr_right,
  .tag_header > .search-container,
  .tag_sett_sidebar,
  .tag_live_sidebar {
    --header-color: #334155;
    --header-background: #f8f9fa;
    --header-search-color: #e8ecf1;
    --header-hover-border: #6C5CFF;
  }
  .tag_header .search-input {
    border: 1px solid #e2e8f0 !important;
  }
}
@media (min-width: 1151px) and (max-width: 1350px) {
  html:has(link#night-mode-css) .tag_sidebar,
  html.bc-dark-mode .tag_sidebar,
  html:has(link#night-mode-css) .tag_hdr_right,
  html.bc-dark-mode .tag_hdr_right,
  html:has(link#night-mode-css) .tag_header > .search-container,
  html.bc-dark-mode .tag_header > .search-container,
  html:has(link#night-mode-css) .tag_sett_sidebar,
  html.bc-dark-mode .tag_sett_sidebar,
  html:has(link#night-mode-css) .tag_live_sidebar,
  html.bc-dark-mode .tag_live_sidebar {
    --header-color: #c5c5c5;
    --header-background: #1a1a1a;
    --header-search-color: rgba(255,255,255,.1);
    --header-hover-border: #6C5CFF;
  }
  html:has(link#night-mode-css) .tag_header .search-input,
  html.bc-dark-mode .tag_header .search-input {
    border: 1px solid rgba(255,255,255,.1) !important;
  }
}

/* --------------------------------------------------------------------------
   RR-20: Story avatars — smaller on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .status-list li .wo_story_list_avatar,
  .status-list li .status-icon img {
    width: 52px !important;
    height: 52px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-21: Sidebar widgets (right) — full-width card fix on tablet
   When right sidebar is visible (992–1250px at 240px) ensure widgets don't overflow
   -------------------------------------------------------------------------- */
@media (max-width: 1250px) and (min-width: 992px) {
  .col-lg-3.sidebar.rightcol .wow_content {
    padding: 12px !important;
  }
  .col-lg-3.sidebar.rightcol .wo_page_hdng {
    font-size: 13px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-22: Trending cards — prevent overflow on tiny screens
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .bc-trending-card {
    flex: 0 0 130px !important;
  }
  .bc-trending-thumb {
    height: 70px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-23: Leaderboard — better touch targets
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .bc-lb-row {
    padding: 12px 10px !important;
    gap: 10px !important;
  }
  .bc-lb-avatar {
    width: 34px !important;
    height: 34px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-24: Badge unlock page — responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .bc-badge {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }
  .bc-badge-unlock-icon {
    width: 64px !important;
    height: 64px !important;
    font-size: 32px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-25: Reward toast — full width on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .bc-reward-container {
    top: auto !important;
    bottom: 80px !important;
    right: 8px !important;
    left: 8px !important;
  }
  .bc-reward-toast {
    min-width: auto !important;
    max-width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   RR-26: Creator dashboard — responsive grid
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .bc-cd-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .bc-cd-stat {
    padding: 12px 8px !important;
  }
  .bc-cd-chart {
    height: 100px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-27: Discover grid — single column on very small screens
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .bc-discover-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   RR-28: Text overflow protection — prevent horizontal scroll
   Use `clip` instead of `hidden` so positioned descendants (especially
   theiaStickySidebar's position:fixed wrapper) aren't trapped in a scroll
   container.  `clip` clips visual overflow identically but does NOT create
   a scroll container, so fixed-position children escape correctly.
   -------------------------------------------------------------------------- */
body {
  overflow-x: hidden !important;
  overflow-x: clip !important;
}
.tag_content, .page-margin, .container {
  overflow-x: hidden;
  overflow-x: clip;
}

/* --------------------------------------------------------------------------
   RR-29: Hero banner stats bar — horizontal scroll on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  #bc-hero-banner .bc-hero-stats {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 16px !important;
  }
  #bc-hero-banner .bc-hero-stat {
    flex: 0 0 auto !important;
    min-width: 70px !important;
  }
  .bc-hero-stat-value {
    font-size: 15px !important;
  }
  #bc-hero-banner .bc-hero-stat-label {
    font-size: 10px !important;
  }
  .bc-hero-stat-divider {
    height: 20px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-30: Prompt cards — stack on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .bc-prompt-card {
    flex-direction: column !important;
    padding: 6px 10px !important;
    gap: 4px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-31: Container gutters — extend tight gutters below 992px
   -------------------------------------------------------------------------- */
@media (max-width: 991px) and (min-width: 769px) {
  .page-margin > .container > .row > [class*="col-"],
  body:not(.bc-welcome) .tag_content .container > .row > [class*="col-"] {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-32: Landscape phone specific fixes
   -------------------------------------------------------------------------- */
@media (max-height: 450px) and (orientation: landscape) {
  .bc-mob-nav-item span {
    display: none !important;
  }
  .bc-mob-create-icon {
    width: 40px !important;
    height: 40px !important;
  }
  .bc-mob-create-btn {
    top: -4px !important;
  }
  body {
    padding-bottom: 52px !important;
  }
  #bc-install-popup {
    bottom: 56px !important;
  }
  #tagPostBox.show .modal-dialog {
    max-width: 80% !important;
    height: auto !important;
    max-height: 100vh !important;
    margin: auto !important;
  }
  #tagPostBox.show .modal-content {
    border-radius: 12px !important;
    min-height: auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

/* --------------------------------------------------------------------------
   RR-33: Tablet portrait (768–991px) — optimize 2-column layout
   Right sidebar hidden, so feed gets full width
   -------------------------------------------------------------------------- */
@media (max-width: 991px) and (min-width: 769px) {
  .page-margin > .container > .row > .col-lg-9,
  body:not(.bc-welcome) .tag_content .container > .row > .col-lg-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   RR-34: Print styles — hide UI chrome
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   RR-35: Wallet balance — responsive font size
   Core: .wow_mini_wallets h5 { font-size: 60px }, sup { font-size: 30px }
   -------------------------------------------------------------------------- */
.wow_mini_wallets h5 {
  font-size: clamp(18px, 3vw, 30px) !important;
  word-break: break-all !important;
  line-height: 1.1 !important;
}
.wow_mini_wallets h5 sup {
  font-size: clamp(10px, 1.4vw, 15px) !important;
  top: clamp(-4px, -0.8vw, -10px) !important;
}
@media (max-width: 480px) {
  .wow_mini_wallets h5 {
    font-size: 18px !important;
  }
  .wow_mini_wallets h5 sup {
    font-size: 10px !important;
    top: -4px !important;
  }
  .wow_mini_wallets {
    padding: 12px !important;
  }
  .wow_mini_wallets_btns .btn {
    padding: 10px !important;
    min-width: 80px !important;
  }
  .wow_mini_wallets_btns .btn svg {
    width: 28px !important;
    height: 28px !important;
    margin-bottom: 8px !important;
  }
}
@media (max-width: 768px) {
  .wow_mini_wallets h5 {
    font-size: 20px !important;
  }
  .wow_mini_wallets h5 sup {
    font-size: 11px !important;
    top: -5px !important;
  }
}

/* --------------------------------------------------------------------------
   UNIFORM SPACING: Tighten gap between ticker → hero → sections
   Desktop: reduce top blank space above hero. Section gaps stay as-is (perfect).
   Mobile:  tighten ALL section gaps for compact feed layout.
   -------------------------------------------------------------------------- */
/* Desktop — eliminate blank gap between ticker and hero */
#bc-market-strip {
  margin-bottom: 0 !important;
}
/* Reduce header wrapper margin (creates white gap between ticker & content) */
header {
  margin-bottom: 8px !important;
}
#bc-hero-banner {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}
.page-margin {
  margin-top: 0 !important;
}
.page-margin > .container {
  padding-top: 4px !important;
}
/* Dark mode: ensure no white gap between ticker and hero banner */
html:has(link#night-mode-css) body,
html.bc-dark-mode body,
body.night_mode {
  background-color: var(--body-bg, #121212) !important;
}

/* Mobile — compact all section gaps */
@media (max-width: 900px) {
  header {
    margin-bottom: 4px !important;
  }
  .page-margin {
    margin-top: 0 !important;
  }
  .page-margin > .container {
    padding-top: 2px !important;
  }
  #bc-hero-banner {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    border-radius: 0 !important;
  }
  .tag_welcome .bc-hero {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
  }
  /* Creator strip gap */
  .bc-creator-strip {
    margin-bottom: 8px !important;
  }
  /* Hero bottom gap */
  .bc-hero {
    margin-bottom: 8px !important;
  }
  /* Action prompt / greeting card gap */
  #bc-action-prompt + div,
  .greetalert {
    margin-bottom: 8px !important;
  }
  /* Stories section */
  .tag_stories_on_home {
    margin-bottom: 8px !important;
  }
  /* General widgets in feed */
  .wow_content:not(.tag_pub_box_bg):not(.bc-hero) {
    margin-bottom: 8px !important;
  }
  /* Feed tabs */
  .bc-feed-tabs {
    margin-bottom: 8px !important;
  }
}

/* --------------------------------------------------------------------------
   RR-34: Print styles — hide UI chrome
   -------------------------------------------------------------------------- */
@media print {
  #bc-mobile-nav, #bc-market-strip, .bc-fab,
  .tag_sidebar, .tag_header, nav.navbar,
  #bc-install-popup, .bc-announce-banner,
  .bc-feed-tabs, .tag_bottom_nav { display: none !important; }
  .tag_content { margin-left: 0 !important; }
  body { padding: 0 !important; }
  .post .panel { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ==========================================================================
   MOBILE POST SPACING — FINAL OVERRIDE (must be last in file)
   This block MUST remain at the very end of the stylesheet.
   It overrides all earlier .post/.panel/.page-margin margin rules.
   ========================================================================== */
@media (max-width: 900px) {
  .post,
  .post-container,
  .wo_post_sec,
  .posts-container,
  div.post,
  div.post-container { margin-bottom: 0 !important; margin-top: 0 !important; padding-bottom: 0 !important; }

  .panel,
  .post .panel,
  .post > .panel,
  .post .panel.panel-white,
  .post .panel.panel-white.panel-shadow {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(0,0,0,.06) !important;
  }

  .page-margin { margin-top: 0 !important; margin-bottom: 0 !important; }

  .tag_post_skel { margin-bottom: 0 !important; }
  .tag_post_people_know { margin-bottom: 3px !important; }

  #posts-laoded .wow_content,
  #posts-laoded .mb-15,
  #posts-laoded .mb-20,
  .middlecol .wow_content,
  .middlecol .mb-15,
  .middlecol .mb-20,
  .home_post_people .wow_content { margin-bottom: 0 !important; }

  .home_post_people,
  #posts-laoded,
  #posts { gap: 0 !important; }

  .promoted-post { margin-bottom: 0 !important; }
}

/* ==========================================================================
   FIX-3: Profile page avatar overlap — MC-1 border/radius breaks cover-to-info
   connection. Cover card and info card must be seamless (no border-top, flat
   top corners on info card).
   ========================================================================== */

/* Cover card — no border, no rounded bottom corners (info card sits flush below) */
.wo_user_profile .cardheader.wow_content,
.wo_page_profile .cardheader.wow_content,
.wo_group_profile .cardheader.wow_content,
.wo_event_profile .cardheader.wow_content {
  border: none !important;
  border-radius: 10px 10px 0 0 !important;
  box-shadow: none !important;
}

/* Info card below cover — flat top, rounded bottom, NO border-top */
.wo_user_profile .tag_page_name_hdr,
.wo_page_profile .tag_page_name_hdr,
.wo_group_profile .tag_group_name_hdr,
.wo_event_profile .tag_event_name_hdr {
  border-radius: 0 0 10px 10px !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  border-top: none !important;
  box-shadow: none !important;
}

/* Hovercard wrapper — transparent, no border */
.tag_cover_bg .card.hovercard {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Avatar — keep core sizing/overlap intact */
.wo_user_profile .user-avatar {
  width: 130px !important;
  height: 130px !important;
  margin: -70px 0 15px !important;
  position: relative !important;
  z-index: 10 !important;
}
.wo_user_profile .user-avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  padding: 4px !important;
  background-color: var(--bc-surface-primary, #fff) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
  position: relative !important;
  z-index: 5 !important;
}

/* Action buttons — stay to the right, above avatar */
.wow_user_page_btns {
  z-index: 11 !important;
}

/* Mobile — full-width profile cards, smaller avatar */
@media (max-width: 768px) {
  .wo_user_profile .cardheader.wow_content,
  .wo_page_profile .cardheader.wow_content,
  .wo_group_profile .cardheader.wow_content,
  .wo_event_profile .cardheader.wow_content {
    border-radius: 0 !important;
  }
  .wo_user_profile .tag_page_name_hdr,
  .wo_page_profile .tag_page_name_hdr,
  .wo_group_profile .tag_group_name_hdr,
  .wo_event_profile .tag_event_name_hdr {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin: 0 -15px !important;
  }
  .wo_user_profile .user-avatar {
    width: 110px !important;
    height: 110px !important;
    margin: -50px 0 15px !important;
  }
}

/* ==========================================================================
   FIX-4b: Mobile bottom nav — uniform icons, distinct colors, home button
   ========================================================================== */

/* Hide original WoWonder bottom toolbar — replaced by header bottom nav */
.tag_sec_toolbar {
  display: none !important;
}

/* Home button — hidden on desktop, shown on mobile */
.bc-bottom-home-btn {
  display: none !important;
}

@media (max-width: 768px) {
  .bc-bottom-home-btn {
    display: flex !important;
    order: -2 !important;
  }

  /* Uniform icon size for ALL bottom nav SVGs */
  .tag_hdr_right > .dropdown > .tag_hdr_droptoggle svg,
  .tag_hdr_right > .dropdown > a.tag_hdr_droptoggle svg,
  .tag_hdr_right > .tag_main_usr_ddmenu > .tag_hdr_droptoggle svg {
    width: 24px !important;
    height: 24px !important;
  }
  .tag_hdr_user_droptoggle img {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
  }

  /* Equal button tap target — uniform padding and alignment */
  .tag_hdr_right > .dropdown > .tag_hdr_droptoggle,
  .tag_hdr_right > .dropdown > a.tag_hdr_droptoggle,
  .tag_hdr_right > .tag_main_usr_ddmenu > .tag_hdr_droptoggle {
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  /* Colorful icons — each button gets a distinct color */
  .bc-bottom-home-btn > .tag_hdr_droptoggle svg {
    color: #0073CE !important;              /* Blue — Home */
  }
  .bc-bottom-search-btn > .tag_hdr_droptoggle svg {
    color: #8B5CF6 !important;              /* Purple — Search */
  }
  .requests-container > .tag_hdr_droptoggle svg {
    color: #23BB9B !important;              /* Teal — Requests */
  }
  .messages-notification-container > .tag_hdr_droptoggle svg {
    color: #3B82F6 !important;              /* Blue — Messages */
  }
  .notification-container > .tag_hdr_droptoggle svg {
    color: #F59E0B !important;              /* Amber — Notifications */
  }

  /* Active/open state */
  .tag_hdr_right > .dropdown.show > .tag_hdr_droptoggle {
    background: rgba(0,0,0,0.06) !important;
  }
  html:has(link#night-mode-css) .tag_hdr_right > .dropdown.show > .tag_hdr_droptoggle,
  html.bc-dark-mode .tag_hdr_right > .dropdown.show > .tag_hdr_droptoggle {
    background: rgba(255,255,255,0.1) !important;
  }
}

/* === Creator Rank Badge on Posts === */
.bc-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.bc-rank-badge svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Wallet page — dark mode font/color uniformity
   Ensure text colors, sizes, and borders are consistent in day & night views.
   ========================================================================== */

/* Page title — explicit colors to avoid admin --header-color bleed */
.tag_page_title,
h2.tag_page_title {
  color: #1a1a1a !important;
}
html:has(link#night-mode-css) .tag_page_title,
html:has(link#night-mode-css) h2.tag_page_title,
html.bc-dark-mode .tag_page_title,
html.bc-dark-mode h2.tag_page_title {
  color: #e0e0e0 !important;
}

/* "My Balance" label and balance amount */
html:has(link#night-mode-css) .wow_mini_wallets p.bold,
html.bc-dark-mode .wow_mini_wallets p.bold,
body.night_mode .wow_mini_wallets p.bold {
  color: #c8ccd0 !important;
}
html:has(link#night-mode-css) .wow_mini_wallets h5,
html.bc-dark-mode .wow_mini_wallets h5,
body.night_mode .wow_mini_wallets h5 {
  color: #e7e9ea !important;
}

/* TRDC description line — overrides inline color:#64748b */
html:has(link#night-mode-css) .wow_mini_wallets p[style*="color"],
html.bc-dark-mode .wow_mini_wallets p[style*="color"],
body.night_mode .wow_mini_wallets p[style*="color"] {
  color: #8899a6 !important;
}

/* Wallet action buttons text */
html:has(link#night-mode-css) .wow_mini_wallets_btns .btn,
html.bc-dark-mode .wow_mini_wallets_btns .btn,
body.night_mode .wow_mini_wallets_btns .btn {
  color: #c8ccd0 !important;
}
html:has(link#night-mode-css) .wow_mini_wallets_btns .btn:hover,
html.bc-dark-mode .wow_mini_wallets_btns .btn:hover,
body.night_mode .wow_mini_wallets_btns .btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Transaction log heading */
html:has(link#night-mode-css) .wallet_transactions > p.bold,
html.bc-dark-mode .wallet_transactions > p.bold,
body.night_mode .wallet_transactions > p.bold {
  color: #e7e9ea !important;
}

/* Transaction table headers */
html:has(link#night-mode-css) .wow_wallet_trans thead tr th,
html.bc-dark-mode .wow_wallet_trans thead tr th,
body.night_mode .wow_wallet_trans thead tr th {
  color: #c8ccd0 !important;
}

/* Transaction table body text */
html:has(link#night-mode-css) .wow_wallet_trans tbody tr td,
html.bc-dark-mode .wow_wallet_trans tbody tr td,
body.night_mode .wow_wallet_trans tbody tr td {
  color: #b0b8c0 !important;
}

/* Transaction table borders */
html:has(link#night-mode-css) .wow_wallet_trans thead,
html:has(link#night-mode-css) .wow_wallet_trans tbody tr,
html.bc-dark-mode .wow_wallet_trans thead,
html.bc-dark-mode .wow_wallet_trans tbody tr,
body.night_mode .wow_wallet_trans thead,
body.night_mode .wow_wallet_trans tbody tr {
  border-bottom-color: #3a3a3a !important;
}

/* "Add Funds" form text */
html:has(link#night-mode-css) .wow_add_money_hid_form p.bold,
html.bc-dark-mode .wow_add_money_hid_form p.bold,
body.night_mode .wow_add_money_hid_form p.bold {
  color: #c8ccd0 !important;
}
html:has(link#night-mode-css) .wow_add_money_hid_form .add-amount h5,
html.bc-dark-mode .wow_add_money_hid_form .add-amount h5,
body.night_mode .wow_add_money_hid_form .add-amount h5 {
  color: #e7e9ea !important;
}
html:has(link#night-mode-css) .wow_add_money_hid_form .add-amount input,
html.bc-dark-mode .wow_add_money_hid_form .add-amount input,
body.night_mode .wow_add_money_hid_form .add-amount input {
  color: #e7e9ea !important;
}

/* ==========================================================================
   Send Money modal — fix Amount/TRDC/input alignment & sizing
   Base: h5 is 60px, sup is 30px, input inherits nothing (browser default).
   Fix: scale down h5, match input font-size to h5, center-align everything.
   ========================================================================== */
.wow_snd_money_form .add-amount h5 {
  font-size: 36px !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 4px !important;
  margin: 0 auto !important;
  padding: 8px 0 !important;
}
.wow_snd_money_form .add-amount h5 sup {
  font-size: 18px !important;
  top: 0 !important;
  position: relative !important;
  align-self: center !important;
  margin-right: 4px !important;
}
.wow_snd_money_form .add-amount h5 input {
  font-size: 36px !important;
  font-family: 'Readex Pro', sans-serif !important;
  font-weight: 300 !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(255,255,255,0.15) !important;
  background: transparent !important;
  min-width: 60px !important;
  max-width: 200px !important;
  text-align: center !important;
  padding: 0 4px !important;
  outline: none !important;
}
/* Light mode border */
.wow_snd_money_form .add-amount h5 input {
  border-bottom-color: rgba(0,0,0,0.12) !important;
}
html:has(link#night-mode-css) .wow_snd_money_form .add-amount h5 input,
html.bc-dark-mode .wow_snd_money_form .add-amount h5 input,
body.night_mode .wow_snd_money_form .add-amount h5 input {
  border-bottom-color: rgba(255,255,255,0.2) !important;
  color: #e7e9ea !important;
}
/* Dark mode for Amount label */
html:has(link#night-mode-css) .wow_snd_money_form p.bold,
html.bc-dark-mode .wow_snd_money_form p.bold,
body.night_mode .wow_snd_money_form p.bold {
  color: #c8ccd0 !important;
}
html:has(link#night-mode-css) .wow_snd_money_form .add-amount h5,
html.bc-dark-mode .wow_snd_money_form .add-amount h5,
body.night_mode .wow_snd_money_form .add-amount h5 {
  color: #e7e9ea !important;
}
html:has(link#night-mode-css) .wow_snd_money_form .add-amount h5 sup,
html.bc-dark-mode .wow_snd_money_form .add-amount h5 sup,
body.night_mode .wow_snd_money_form .add-amount h5 sup {
  color: #aab !important;
}

/* Also fix Add Funds form same way */
.wow_add_money_hid_form .add-amount h5 {
  font-size: 36px !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 4px !important;
}
.wow_add_money_hid_form .add-amount h5 sup {
  font-size: 18px !important;
  top: 0 !important;
  position: relative !important;
  margin-right: 4px !important;
}
.wow_add_money_hid_form .add-amount h5 input {
  font-size: 36px !important;
  font-family: 'Readex Pro', sans-serif !important;
  font-weight: 300 !important;
  min-width: 60px !important;
  max-width: 200px !important;
  text-align: center !important;
}

/* ==========================================================================
   Wallet transaction table — fit within content area
   Base theme sets .table-responsive { white-space: nowrap } which forces
   the table wider than available space. The parent .container has
   overflow-x: hidden, clipping the Amount column.
   Fix: allow text to wrap so the table fits within available width.
   ========================================================================== */
.wallet_transactions .table-responsive {
  white-space: normal !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
.wow_wallet_trans {
  table-layout: auto !important;
  width: 100% !important;
}
.wow_wallet_trans td,
.wow_wallet_trans th {
  white-space: normal !important;
  word-break: break-word !important;
  padding: 10px 8px !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}
/* Status column: constrain instead of fixed width="300" */
.wow_wallet_trans th:nth-child(2),
.wow_wallet_trans td:nth-child(2) {
  max-width: 280px !important;
  width: auto !important;
}
/* Amount column: prevent wrapping for currency values */
.wow_wallet_trans th:last-child,
.wow_wallet_trans td:last-child {
  white-space: nowrap !important;
  text-align: right !important;
}
/* Date column: prevent wrapping */
.wow_wallet_trans th:nth-child(3),
.wow_wallet_trans td:nth-child(3) {
  white-space: nowrap !important;
}
/* Type column: compact */
.wow_wallet_trans th:first-child,
.wow_wallet_trans td:first-child {
  white-space: nowrap !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   Header logo — larger for sidebar layout, normal for top-bar layout
   ========================================================================== */
.header-brand img {
  max-width: 160px !important;
  max-height: 50px !important;
}
/* Mobile logo at ≤520px */
@media (max-width: 520px) {
  .header-brand .tag_logo_mobi {
    max-height: 38px !important;
  }
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE TEXT FIXES
   body.night_mode is now set by footer.js (previously never set).
   Using all 3 selectors for maximum browser compatibility:
     - html:has(link#night-mode-css) — CSS-only, modern browsers
     - html.bc-dark-mode — JS fallback via footer.js
     - body.night_mode — JS fallback via footer.js (NEW)
   ========================================================================== */

/* --- Global: ensure all page content text is readable in dark mode --- */
html:has(link#night-mode-css) .tag_content,
html.bc-dark-mode .tag_content,
body.night_mode .tag_content {
  color: #dcdcdc !important;
}

/* --- Page titles across ALL inner pages --- */
html:has(link#night-mode-css) .tag_page_title,
html:has(link#night-mode-css) h2.tag_page_title,
html.bc-dark-mode .tag_page_title,
html.bc-dark-mode h2.tag_page_title,
body.night_mode .tag_page_title,
body.night_mode h2.tag_page_title {
  color: #e0e0e0 !important;
}

/* --- Utility text color classes that break in dark mode --- */
html:has(link#night-mode-css) .gray,
html.bc-dark-mode .gray,
body.night_mode .gray {
  color: #aaa !important;
}
html:has(link#night-mode-css) .gray-1,
html.bc-dark-mode .gray-1,
body.night_mode .gray-1 {
  color: #aaa !important;
}
html:has(link#night-mode-css) .black-color,
html.bc-dark-mode .black-color,
body.night_mode .black-color {
  color: #ccc !important;
}
html:has(link#night-mode-css) .second-user-color,
html.bc-dark-mode .second-user-color,
body.night_mode .second-user-color {
  color: #ccc !important;
}
html:has(link#night-mode-css) .small-mention,
html.bc-dark-mode .small-mention,
body.night_mode .small-mention {
  color: #aaa !important;
}

/* --- Panel/card headings --- */
html:has(link#night-mode-css) .panel-white .panel-heading,
html.bc-dark-mode .panel-white .panel-heading,
body.night_mode .panel-white .panel-heading {
  color: #dcdcdc !important;
}

/* --- Settings sidebar + collapsible panels --- */
html:has(link#night-mode-css) .tag_sett_sidebar,
html.bc-dark-mode .tag_sett_sidebar,
body.night_mode .tag_sett_sidebar {
  background: #1a1a1a !important;
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .colloape-panel-stg,
html.bc-dark-mode .colloape-panel-stg,
body.night_mode .colloape-panel-stg {
  background: #212121 !important;
  color: #ccc !important;
}
html:has(link#night-mode-css) .colloape-panel-stg i,
html.bc-dark-mode .colloape-panel-stg i,
body.night_mode .colloape-panel-stg i {
  color: #aaa !important;
}

/* --- Form controls, inputs, textareas --- */
html:has(link#night-mode-css) .form-control,
html.bc-dark-mode .form-control,
body.night_mode .form-control {
  color: #e2e2e2 !important;
  background-color: #373737 !important;
  border-color: #484848 !important;
}
html:has(link#night-mode-css) textarea,
html.bc-dark-mode textarea,
body.night_mode textarea {
  color: #e2e2e2 !important;
}
html:has(link#night-mode-css) input[type="text"],
html:has(link#night-mode-css) input[type="email"],
html:has(link#night-mode-css) input[type="password"],
html:has(link#night-mode-css) input[type="number"],
html:has(link#night-mode-css) input[type="search"],
html.bc-dark-mode input[type="text"],
html.bc-dark-mode input[type="email"],
html.bc-dark-mode input[type="password"],
html.bc-dark-mode input[type="number"],
html.bc-dark-mode input[type="search"],
body.night_mode input[type="text"],
body.night_mode input[type="email"],
body.night_mode input[type="password"],
body.night_mode input[type="number"],
body.night_mode input[type="search"] {
  color: #e2e2e2 !important;
}

/* --- Chat / Messenger icons + text --- */
html:has(link#night-mode-css) .chat-textarea .chat-btns-w,
html.bc-dark-mode .chat-textarea .chat-btns-w,
body.night_mode .chat-textarea .chat-btns-w {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .chat_optns,
html.bc-dark-mode .chat-textarea .chat-btns-w .chat_optns,
body.night_mode .chat-textarea .chat-btns-w .chat_optns {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .btn-file,
html.bc-dark-mode .chat-textarea .chat-btns-w .btn-file,
body.night_mode .chat-textarea .chat-btns-w .btn-file {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-textarea .chat-btns-w svg,
html.bc-dark-mode .chat-textarea .chat-btns-w svg,
body.night_mode .chat-textarea .chat-btns-w svg {
  color: #b0b0b0 !important;
  fill: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .btn-file:hover,
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .chat_optns:hover,
html.bc-dark-mode .chat-textarea .chat-btns-w .btn-file:hover,
html.bc-dark-mode .chat-textarea .chat-btns-w .chat_optns:hover,
body.night_mode .chat-textarea .chat-btns-w .btn-file:hover,
body.night_mode .chat-textarea .chat-btns-w .chat_optns:hover {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .btn-file:hover svg,
html:has(link#night-mode-css) .chat-textarea .chat-btns-w .chat_optns:hover svg,
html.bc-dark-mode .chat-textarea .chat-btns-w .btn-file:hover svg,
html.bc-dark-mode .chat-textarea .chat-btns-w .chat_optns:hover svg,
body.night_mode .chat-textarea .chat-btns-w .btn-file:hover svg,
body.night_mode .chat-textarea .chat-btns-w .chat_optns:hover svg {
  color: #e0e0e0 !important;
  fill: #e0e0e0 !important;
}
/* Also fix message option buttons in full messenger page */
html:has(link#night-mode-css) .message-option-btns .btn,
html.bc-dark-mode .message-option-btns .btn,
body.night_mode .message-option-btns .btn {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .message-option-btns .btn svg,
html.bc-dark-mode .message-option-btns .btn svg,
body.night_mode .message-option-btns .btn svg {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .message-option-btns .btn:hover,
html.bc-dark-mode .message-option-btns .btn:hover,
body.night_mode .message-option-btns .btn:hover {
  color: #e0e0e0 !important;
}
/* Chat select-color icon */
html:has(link#night-mode-css) .select-color,
html.bc-dark-mode .select-color,
body.night_mode .select-color {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-textarea textarea,
html.bc-dark-mode .chat-textarea textarea,
body.night_mode .chat-textarea textarea {
  color: #e2e2e2 !important;
  background-color: rgba(255,255,255,0.08) !important;
}
html:has(link#night-mode-css) .record-chat-audio,
html.bc-dark-mode .record-chat-audio,
body.night_mode .record-chat-audio {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .chat-recording-time,
html.bc-dark-mode .chat-recording-time,
body.night_mode .chat-recording-time {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .message-details,
html.bc-dark-mode .message-details,
body.night_mode .message-details {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .chat-messages-wrapper .incoming p .hash,
html:has(link#night-mode-css) .messages-container .incoming p .hash,
html.bc-dark-mode .chat-messages-wrapper .incoming p .hash,
html.bc-dark-mode .messages-container .incoming p .hash,
body.night_mode .chat-messages-wrapper .incoming p .hash,
body.night_mode .messages-container .incoming p .hash {
  color: #fff !important;
}

/* --- Messages page sidebar text + icons --- */
html:has(link#night-mode-css) .wo_msg_right_prt,
html.bc-dark-mode .wo_msg_right_prt,
body.night_mode .wo_msg_right_prt {
  color: #dcdcdc !important;
}
/* Full-page messenger write area icons */
html:has(link#night-mode-css) .tag_msg_write .btn-file,
html:has(link#night-mode-css) .tag_msg_write svg,
html.bc-dark-mode .tag_msg_write .btn-file,
html.bc-dark-mode .tag_msg_write svg,
body.night_mode .tag_msg_write .btn-file,
body.night_mode .tag_msg_write svg {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .tag_msg_write .btn-file:hover,
html:has(link#night-mode-css) .tag_msg_write .btn-file:hover svg,
html.bc-dark-mode .tag_msg_write .btn-file:hover,
html.bc-dark-mode .tag_msg_write .btn-file:hover svg,
body.night_mode .tag_msg_write .btn-file:hover,
body.night_mode .tag_msg_write .btn-file:hover svg {
  color: #e0e0e0 !important;
}
/* Full-page messenger textarea */
html:has(link#night-mode-css) .tag_msg_write textarea,
html.bc-dark-mode .tag_msg_write textarea,
body.night_mode .tag_msg_write textarea {
  color: #e2e2e2 !important;
}

/* --- Post footer + comment interaction text --- */
html:has(link#night-mode-css) .post .post-footer .input-group-addon a,
html.bc-dark-mode .post .post-footer .input-group-addon a,
body.night_mode .post .post-footer .input-group-addon a {
  color: #aaa !important;
}
html:has(link#night-mode-css) #comment-likes,
html:has(link#night-mode-css) #comment-wonders,
html.bc-dark-mode #comment-likes,
html.bc-dark-mode #comment-wonders,
body.night_mode #comment-likes,
body.night_mode #comment-wonders {
  color: #aaa !important;
}

/* --- Blog/article text --- */
html:has(link#night-mode-css) .blog-desc,
html.bc-dark-mode .blog-desc,
body.night_mode .blog-desc {
  color: #bbb !important;
}
html:has(link#night-mode-css) .tag_pop_artis li .article-title,
html.bc-dark-mode .tag_pop_artis li .article-title,
body.night_mode .tag_pop_artis li .article-title {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .tag_pop_artis li .article-info,
html.bc-dark-mode .tag_pop_artis li .article-info,
body.night_mode .tag_pop_artis li .article-info {
  color: #999 !important;
}
html:has(link#night-mode-css) .wow_main_blogs,
html.bc-dark-mode .wow_main_blogs,
body.night_mode .wow_main_blogs {
  background: #212121 !important;
}

/* --- Events / Groups / Nearby --- */
html:has(link#night-mode-css) .events-tab-list,
html:has(link#night-mode-css) .events-tab-content,
html:has(link#night-mode-css) .event-descripton,
html.bc-dark-mode .events-tab-list,
html.bc-dark-mode .events-tab-content,
html.bc-dark-mode .event-descripton,
body.night_mode .events-tab-list,
body.night_mode .events-tab-content,
body.night_mode .event-descripton {
  background: #212121 !important;
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .group_tab_dropdown,
html.bc-dark-mode .group_tab_dropdown,
body.night_mode .group_tab_dropdown {
  color: #ccc !important;
}
html:has(link#night-mode-css) .group_tab_dropdown span,
html.bc-dark-mode .group_tab_dropdown span,
body.night_mode .group_tab_dropdown span {
  color: #bbb !important;
}
html:has(link#night-mode-css) .nearby-users-distance,
html.bc-dark-mode .nearby-users-distance,
body.night_mode .nearby-users-distance {
  background: #212121 !important;
  color: #ccc !important;
}

/* --- Tab container + general containers --- */
html:has(link#night-mode-css) .tab-container,
html.bc-dark-mode .tab-container,
body.night_mode .tab-container {
  background: #212121 !important;
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .wowonder-well,
html.bc-dark-mode .wowonder-well,
body.night_mode .wowonder-well {
  background: #212121 !important;
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .cover-container,
html.bc-dark-mode .cover-container,
body.night_mode .cover-container {
  background: #212121 !important;
}

/* --- List group items --- */
html:has(link#night-mode-css) .list-group-item:first-child,
html.bc-dark-mode .list-group-item:first-child,
body.night_mode .list-group-item:first-child {
  background: #2a2a2a !important;
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .list-group-item.gray-list:hover,
html.bc-dark-mode .list-group-item.gray-list:hover,
body.night_mode .list-group-item.gray-list:hover {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .list-group-item.gray-list a:hover,
html.bc-dark-mode .list-group-item.gray-list a:hover,
body.night_mode .list-group-item.gray-list a:hover {
  color: #fff !important;
}

/* --- Emoji picker --- */
html:has(link#night-mode-css) .wo_emoji_tab,
html.bc-dark-mode .wo_emoji_tab,
body.night_mode .wo_emoji_tab {
  background: #2a2a2a !important;
}
html:has(link#night-mode-css) .wo_emoji_p,
html.bc-dark-mode .wo_emoji_p,
body.night_mode .wo_emoji_p {
  color: #bbb !important;
}
html:has(link#night-mode-css) .emo-post-container,
html.bc-dark-mode .emo-post-container,
body.night_mode .emo-post-container {
  background: #212121 !important;
}

/* --- Settings update alert --- */
html:has(link#night-mode-css) .setting-saved-update-alert,
html.bc-dark-mode .setting-saved-update-alert,
body.night_mode .setting-saved-update-alert {
  color: #bbb !important;
}

/* --- Page likes counter --- */
html:has(link#night-mode-css) .page-likes,
html.bc-dark-mode .page-likes,
body.night_mode .page-likes {
  color: #aaa !important;
}

/* --- Carousel (slick) controls --- */
html:has(link#night-mode-css) .slick-next,
html:has(link#night-mode-css) .slick-prev,
html.bc-dark-mode .slick-next,
html.bc-dark-mode .slick-prev,
body.night_mode .slick-next,
body.night_mode .slick-prev {
  background: #333 !important;
  color: #e0e0e0 !important;
}

/* --- Scroll-to-top button --- */
html:has(link#night-mode-css) .scroll-top-wrapper,
html.bc-dark-mode .scroll-top-wrapper,
body.night_mode .scroll-top-wrapper {
  background-color: #444 !important;
  color: #e0e0e0 !important;
}

/* --- Search / Forum elements --- */
html:has(link#night-mode-css) #search-forums,
html.bc-dark-mode #search-forums,
body.night_mode #search-forums {
  background: #373737 !important;
  color: #e2e2e2 !important;
  border-color: #484848 !important;
}

/* --- Discover section (was body.night_mode only — now all 3) --- */
html:has(link#night-mode-css) .bc-discover-section,
html.bc-dark-mode .bc-discover-section {
  background: #181818 !important;
}
html:has(link#night-mode-css) .bc-discover-card,
html.bc-dark-mode .bc-discover-card {
  background: #212121 !important;
  border-color: #333 !important;
}
html:has(link#night-mode-css) .bc-discover-card-text,
html.bc-dark-mode .bc-discover-card-text {
  color: #b0b0b0 !important;
}
html:has(link#night-mode-css) .bc-discover-card-thumb,
html.bc-dark-mode .bc-discover-card-thumb {
  background-color: #2a2a2a !important;
}
html:has(link#night-mode-css) .bc-discover-hashtag-pill,
html.bc-dark-mode .bc-discover-hashtag-pill {
  background: #1a2332 !important;
  color: #5b9cf5 !important;
}
html:has(link#night-mode-css) .bc-discover-follow-btn.bc-followed,
html.bc-dark-mode .bc-discover-follow-btn.bc-followed {
  background: #333 !important;
  color: #aaa !important;
  border-color: #444 !important;
}
html:has(link#night-mode-css) .bc-discover-person-card,
html.bc-dark-mode .bc-discover-person-card {
  border-color: #333 !important;
}
html:has(link#night-mode-css) .bc-discover-empty,
html.bc-dark-mode .bc-discover-empty {
  color: #888 !important;
}

/* --- Welcome card (was body.night_mode only) --- */
html:has(link#night-mode-css) .bc-welcome-card,
html.bc-dark-mode .bc-welcome-card {
  background: #212121 !important;
}

/* --- Badge unlock description --- */
html:has(link#night-mode-css) .bc-badge-unlock-desc,
html.bc-dark-mode .bc-badge-unlock-desc,
body.night_mode .bc-badge-unlock-desc {
  color: #b0b0b0 !important;
}

/* --- User discovery card links --- */
html:has(link#night-mode-css) .nearby_user_wrapper .user_wrapper_link,
html.bc-dark-mode .nearby_user_wrapper .user_wrapper_link,
body.night_mode .nearby_user_wrapper .user_wrapper_link {
  color: #e0e0e0 !important;
}

/* --- Developer apps text --- */
html:has(link#night-mode-css) .wow_dev_apps .ap_name a,
html.bc-dark-mode .wow_dev_apps .ap_name a,
body.night_mode .wow_dev_apps .ap_name a {
  color: #e0e0e0 !important;
}

/* --- Feelings selector --- */
html:has(link#night-mode-css) .feelings-value,
html.bc-dark-mode .feelings-value,
body.night_mode .feelings-value {
  background: #2a2a2a !important;
}

/* --- Job form --- */
html:has(link#night-mode-css) .wo_create_job_qstn,
html.bc-dark-mode .wo_create_job_qstn,
body.night_mode .wo_create_job_qstn {
  background: #373737 !important;
  color: #e2e2e2 !important;
}

/* --- Search filter age --- */
html:has(link#night-mode-css) .tag_srch_fltr_age .age_number,
html.bc-dark-mode .tag_srch_fltr_age .age_number,
body.night_mode .tag_srch_fltr_age .age_number {
  background: #373737 !important;
  color: #e2e2e2 !important;
}

/* --- Lightbox close button --- */
html:has(link#night-mode-css) .tag_lbox_toolbar .close-lightbox,
html.bc-dark-mode .tag_lbox_toolbar .close-lightbox,
body.night_mode .tag_lbox_toolbar .close-lightbox {
  background: #333 !important;
  color: #e0e0e0 !important;
}

/* ==========================================================================
   SITE-WIDE DARK MODE FIXES — Phase 2 (Audit-driven)
   Covers: leaderboard, invite widget, hero banner, prompt cards, trending,
   cover/go-back buttons, inline style overrides, admin panel gaps, and
   remaining base theme elements without dark.css coverage.
   ========================================================================== */

/* --- Leaderboard: silver rank contrast --- */
html:has(link#night-mode-css) .bc-lb-rank-2 .bc-lb-rank-num,
html.bc-dark-mode .bc-lb-rank-2 .bc-lb-rank-num,
body.night_mode .bc-lb-rank-2 .bc-lb-rank-num {
  color: #c0c8d4 !important;
}

/* --- Invite widget: green button dark mode enhancement --- */
html:has(link#night-mode-css) .bc-invite-widget-btn,
html.bc-dark-mode .bc-invite-widget-btn,
body.night_mode .bc-invite-widget-btn {
  background: #059669 !important;
}

/* --- Hero banner: dark mode adjustments --- */
html:has(link#night-mode-css) #bc-hero-banner,
html.bc-dark-mode #bc-hero-banner,
body.night_mode #bc-hero-banner {
  background: linear-gradient(135deg, #4a3cb8 0%, #007aa8 100%) !important;
}
html:has(link#night-mode-css) .bc-btn-primary,
html.bc-dark-mode .bc-btn-primary,
body.night_mode .bc-btn-primary {
  background: rgba(255,255,255,0.95) !important;
  color: #4a3cb8 !important;
}
html:has(link#night-mode-css) .bc-btn-primary:hover,
html.bc-dark-mode .bc-btn-primary:hover,
body.night_mode .bc-btn-primary:hover {
  background: #fff !important;
}
html:has(link#night-mode-css) .bc-btn-ghost,
html.bc-dark-mode .bc-btn-ghost,
body.night_mode .bc-btn-ghost {
  border-color: rgba(255,255,255,0.35) !important;
  color: #fff !important;
}
html:has(link#night-mode-css) .bc-btn-ghost:hover,
html.bc-dark-mode .bc-btn-ghost:hover,
body.night_mode .bc-btn-ghost:hover {
  background: rgba(255,255,255,0.18) !important;
}

/* --- Prompt cards: CTA text colors --- */
html:has(link#night-mode-css) .bc-prompt-trader .bc-prompt-cta,
html.bc-dark-mode .bc-prompt-trader .bc-prompt-cta,
body.night_mode .bc-prompt-trader .bc-prompt-cta {
  color: #ff7b8a !important;
}
html:has(link#night-mode-css) .bc-prompt-creator .bc-prompt-cta,
html.bc-dark-mode .bc-prompt-creator .bc-prompt-cta,
body.night_mode .bc-prompt-creator .bc-prompt-cta {
  color: #4df0ff !important;
}

/* --- Trending tag hover --- */
html:has(link#night-mode-css) .bc-trending-tag-pill:hover,
html.bc-dark-mode .bc-trending-tag-pill:hover,
body.night_mode .bc-trending-tag-pill:hover {
  background: rgba(29,155,240,0.15) !important;
  color: #5fb8f5 !important;
  border-color: rgba(29,155,240,0.25) !important;
}

/* --- Cover photo / Go back buttons: invert for dark bg --- */
html:has(link#night-mode-css) .btn_goback,
html.bc-dark-mode .btn_goback,
body.night_mode .btn_goback {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}
html:has(link#night-mode-css) .btn_goback:hover,
html.bc-dark-mode .btn_goback:hover,
body.night_mode .btn_goback:hover {
  background: rgba(255,255,255,0.25) !important;
}
html:has(link#night-mode-css) .profile_cover .btn,
html:has(link#night-mode-css) .tag_cover_bg .cardheader > .btn,
html.bc-dark-mode .profile_cover .btn,
html.bc-dark-mode .tag_cover_bg .cardheader > .btn,
body.night_mode .profile_cover .btn,
body.night_mode .tag_cover_bg .cardheader > .btn {
  background: rgba(255,255,255,0.2) !important;
}
html:has(link#night-mode-css) .profile_cover .btn:hover,
html:has(link#night-mode-css) .tag_cover_bg .cardheader > .btn:hover,
html.bc-dark-mode .profile_cover .btn:hover,
html.bc-dark-mode .tag_cover_bg .cardheader > .btn:hover,
body.night_mode .profile_cover .btn:hover,
body.night_mode .tag_cover_bg .cardheader > .btn:hover {
  background: rgba(255,255,255,0.35) !important;
}

/* --- Ticker text in dark mode --- */
html:has(link#night-mode-css) .bc-ticker-flat,
html.bc-dark-mode .bc-ticker-flat,
body.night_mode .bc-ticker-flat {
  color: #aab !important;
}

/* --- Reward toast dark mode enhancement --- */
html:has(link#night-mode-css) .bc-reward-toast,
html.bc-dark-mode .bc-reward-toast,
body.night_mode .bc-reward-toast {
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}

/* --- Install guide modal icon/button colors (already dark-themed) --- */
html:has(link#night-mode-css) .bc-ig-icon,
html.bc-dark-mode .bc-ig-icon,
body.night_mode .bc-ig-icon {
  color: #8b7dff !important;
}
html:has(link#night-mode-css) .bc-ig-num,
html.bc-dark-mode .bc-ig-num,
body.night_mode .bc-ig-num {
  background: #5b4cc8 !important;
}
html:has(link#night-mode-css) .bc-ig-done,
html.bc-dark-mode .bc-ig-done,
body.night_mode .bc-ig-done {
  background: #5b4cc8 !important;
}

/* --- TRDC sidebar card dark mode --- */
html:has(link#night-mode-css) .bc-trdc-sidebar-card,
html.bc-dark-mode .bc-trdc-sidebar-card,
body.night_mode .bc-trdc-sidebar-card {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}

/* ==========================================================================
   INLINE STYLE OVERRIDES
   Template .phtml files have hardcoded inline colors that can't be edited.
   Override with CSS !important using attribute selectors.
   ========================================================================== */

/* Points/TRDC balance title — inline color:#0073CE */
html:has(link#night-mode-css) h5[style*="color:#0073CE"],
html:has(link#night-mode-css) h5[style*="color: #0073CE"],
html.bc-dark-mode h5[style*="color:#0073CE"],
html.bc-dark-mode h5[style*="color: #0073CE"],
body.night_mode h5[style*="color:#0073CE"],
body.night_mode h5[style*="color: #0073CE"] {
  color: #4da6ff !important;
}

/* Post metadata — inline color:#9197a3 */
html:has(link#night-mode-css) span[style*="color:#9197a3"],
html.bc-dark-mode span[style*="color:#9197a3"],
body.night_mode span[style*="color:#9197a3"] {
  color: #8899a6 !important;
}

/* Post links — inline color: #666 */
html:has(link#night-mode-css) a[style*="color: #666"],
html:has(link#night-mode-css) a[style*="color:#666"],
html.bc-dark-mode a[style*="color: #666"],
html.bc-dark-mode a[style*="color:#666"],
body.night_mode a[style*="color: #666"],
body.night_mode a[style*="color:#666"] {
  color: #aab !important;
}

/* Sidebar content button — inline color: #0073CE */
html:has(link#night-mode-css) button[style*="color: #0073CE"],
html:has(link#night-mode-css) button[style*="color:#0073CE"],
html.bc-dark-mode button[style*="color: #0073CE"],
html.bc-dark-mode button[style*="color:#0073CE"],
body.night_mode button[style*="color: #0073CE"],
body.night_mode button[style*="color:#0073CE"] {
  color: #4da6ff !important;
}

/* No posts found message — inline color:#8899a6 */
html:has(link#night-mode-css) div[style*="color:#8899a6"],
html.bc-dark-mode div[style*="color:#8899a6"],
body.night_mode div[style*="color:#8899a6"] {
  color: #8899a6 !important;
}

/* Register page — inline color: #888 and #666 */
html:has(link#night-mode-css) small[style*="color: #888"],
html:has(link#night-mode-css) small[style*="color:#888"],
html.bc-dark-mode small[style*="color: #888"],
html.bc-dark-mode small[style*="color:#888"],
body.night_mode small[style*="color: #888"],
body.night_mode small[style*="color:#888"] {
  color: #aaa !important;
}
html:has(link#night-mode-css) small[style*="color: #666"],
html:has(link#night-mode-css) small[style*="color:#666"],
html.bc-dark-mode small[style*="color: #666"],
html.bc-dark-mode small[style*="color:#666"],
body.night_mode small[style*="color: #666"],
body.night_mode small[style*="color:#666"] {
  color: #aab !important;
}

/* Share post container — inline #a33e40 reddish text */
html:has(link#night-mode-css) a[style*="color:#a33e40"],
html.bc-dark-mode a[style*="color:#a33e40"],
body.night_mode a[style*="color:#a33e40"] {
  color: #d66b6d !important;
}

/* Social sharing icon colors — these are brand colors, intentionally kept
   but slightly brightened for dark backgrounds */
html:has(link#night-mode-css) .social-btn[style*="color: #337ab7"],
html.bc-dark-mode .social-btn[style*="color: #337ab7"],
body.night_mode .social-btn[style*="color: #337ab7"] {
  color: #5a9bd6 !important;
}

/* ==========================================================================
   BASE THEME ELEMENTS — Missing dark.css overrides
   These selectors exist in stylesheet/style.css with hardcoded light colors
   but dark.css never overrides them.
   ========================================================================== */

/* --- Sidebar profile style --- */
html:has(link#night-mode-css) .sidebar-profile-style,
html.bc-dark-mode .sidebar-profile-style,
body.night_mode .sidebar-profile-style {
  background: #212121 !important;
  color: #dcdcdc !important;
}

/* --- Padding-15 utility with !important bg --- */
html:has(link#night-mode-css) .padding-15,
html.bc-dark-mode .padding-15,
body.night_mode .padding-15 {
  background: #212121 !important;
}

/* --- Panel white footer --- */
html:has(link#night-mode-css) .panel-white .panel-footer,
html.bc-dark-mode .panel-white .panel-footer,
body.night_mode .panel-white .panel-footer {
  background: #1a1a1a !important;
  border-top-color: #333 !important;
}

/* --- Div control --- */
html:has(link#night-mode-css) .div-control,
html.bc-dark-mode .div-control,
body.night_mode .div-control {
  background: #212121 !important;
  color: #dcdcdc !important;
}

/* --- Status media selector --- */
html:has(link#night-mode-css) #select-status-media,
html.bc-dark-mode #select-status-media,
body.night_mode #select-status-media {
  background: #2a2a2a !important;
}

/* --- Blog section background --- */
html:has(link#night-mode-css) .blog-com-wrapper .blog-comment-item-body > div,
html.bc-dark-mode .blog-com-wrapper .blog-comment-item-body > div,
body.night_mode .blog-com-wrapper .blog-comment-item-body > div {
  color: #aaa !important;
}

/* --- User discovery / nearby --- */
html:has(link#night-mode-css) .nearby_user_wrapper,
html.bc-dark-mode .nearby_user_wrapper,
body.night_mode .nearby_user_wrapper {
  background: #212121 !important;
}
html:has(link#night-mode-css) .friends_nearby_status_ul li,
html.bc-dark-mode .friends_nearby_status_ul li,
body.night_mode .friends_nearby_status_ul li {
  background: #2a2a2a !important;
}

/* --- Header loading spinner --- */
html:has(link#night-mode-css) .header-loading-sppiner,
html.bc-dark-mode .header-loading-sppiner,
body.night_mode .header-loading-sppiner {
  color: #aaa !important;
}

/* --- Pace loader overlay --- */
html:has(link#night-mode-css) .pace-activity-parent,
html.bc-dark-mode .pace-activity-parent,
body.night_mode .pace-activity-parent {
  background: #121212 !important;
}

/* --- Group dropdown --- */
html:has(link#night-mode-css) .group_tab_dropdown span:hover,
html.bc-dark-mode .group_tab_dropdown span:hover,
body.night_mode .group_tab_dropdown span:hover {
  background: #333 !important;
  color: #e0e0e0 !important;
}

/* --- Search articles / blog --- */
html:has(link#night-mode-css) .search-artiles-form .inner-addon .glyphicon,
html.bc-dark-mode .search-artiles-form .inner-addon .glyphicon,
body.night_mode .search-artiles-form .inner-addon .glyphicon {
  color: #aaa !important;
}

/* --- Active gray list item --- */
html:has(link#night-mode-css) .gray-list.active a,
html.bc-dark-mode .gray-list.active a,
body.night_mode .gray-list.active a {
  color: #fff !important;
}

/* --- Movies mobile search dropdown --- */
html:has(link#night-mode-css) .navbar-movies-mobile-search-dropdown ul,
html.bc-dark-mode .navbar-movies-mobile-search-dropdown ul,
body.night_mode .navbar-movies-mobile-search-dropdown ul {
  color: #dcdcdc !important;
}

/* --- Story progress bar --- */
html:has(link#night-mode-css) .story_lightbox .mfp-wrap .mfp_progress_line_ .load,
html.bc-dark-mode .story_lightbox .mfp-wrap .mfp_progress_line_ .load,
body.night_mode .story_lightbox .mfp-wrap .mfp_progress_line_ .load {
  background: #e0e0e0 !important;
}

/* --- Lightbox preloader --- */
html:has(link#night-mode-css) .lb-preloader svg,
html.bc-dark-mode .lb-preloader svg,
body.night_mode .lb-preloader svg {
  background: #212121 !important;
}

/* --- Blog categories in sidebar --- */
html:has(link#night-mode-css) .tag_pop_artis li,
html.bc-dark-mode .tag_pop_artis li,
body.night_mode .tag_pop_artis li {
  border-bottom-color: rgba(255,255,255,0.06) !important;
}

/* --- Characters left message --- */
html:has(link#night-mode-css) .charsLeft-message,
html.bc-dark-mode .charsLeft-message,
body.night_mode .charsLeft-message {
  color: #999 !important;
}

/* --- Upload bank receipts --- */
html:has(link#night-mode-css) .upload_bank_receipts > div,
html.bc-dark-mode .upload_bank_receipts > div,
body.night_mode .upload_bank_receipts > div {
  background: #2a2a2a !important;
}

/* --- Video player (plyr) slider thumb --- */
html:has(link#night-mode-css) .plyr--full-ui input[type=range]::-webkit-slider-thumb,
html.bc-dark-mode .plyr--full-ui input[type=range]::-webkit-slider-thumb,
body.night_mode .plyr--full-ui input[type=range]::-webkit-slider-thumb {
  background: #e0e0e0 !important;
}

/* --- Post publish time label --- */
html:has(link#night-mode-css) .tag_pub_rectime,
html.bc-dark-mode .tag_pub_rectime,
body.night_mode .tag_pub_rectime {
  background: #2a2a2a !important;
}

/* --- Ad format header --- */
html:has(link#night-mode-css) .wo_ad_header_format,
html.bc-dark-mode .wo_ad_header_format,
body.night_mode .wo_ad_header_format {
  background: #212121 !important;
}

/* ==========================================================================
   DEEP AUDIT FIXES — Phase 3 (Feb 2026)
   Remaining 17 user-side dark mode gaps (4 MEDIUM, 13 LOW)
   ========================================================================== */

/* --- MEDIUM: Password validation text invisible (#000 on dark) --- */
html:has(link#night-mode-css) .helper-text li.valid,
html.bc-dark-mode .helper-text li.valid,
body.night_mode .helper-text li.valid {
  color: #b0b0b0 !important;
  text-decoration-color: #666 !important;
}

/* --- MEDIUM: Generic .panel bg not overridden --- */
html:has(link#night-mode-css) .panel,
html.bc-dark-mode .panel,
body.night_mode .panel {
  background-color: #212121 !important;
}

/* --- MEDIUM: Active job nav tab stays white --- */
html:has(link#night-mode-css) .tag_job_jumbo_nav li.active a,
html.bc-dark-mode .tag_job_jumbo_nav li.active a,
body.night_mode .tag_job_jumbo_nav li.active a {
  background-color: #212121 !important;
  color: #fff !important;
}

/* --- MEDIUM: Share modal search input keeps light bg --- */
html:has(link#night-mode-css) .shar_modl_chose_pgrp input,
html.bc-dark-mode .shar_modl_chose_pgrp input,
body.night_mode .shar_modl_chose_pgrp input {
  background-color: #373737 !important;
  border-bottom-color: rgba(255,255,255,0.42) !important;
  color: #e2e2e2 !important;
}

/* --- LOW: User-fetch popover name container --- */
html:has(link#night-mode-css) .user-fetch .user-name,
html.bc-dark-mode .user-fetch .user-name,
body.night_mode .user-fetch .user-name {
  color: #e0e0e0 !important;
}

/* --- LOW: Earn points tip icon --- */
html:has(link#night-mode-css) .earn_points .points_tip svg,
html.bc-dark-mode .earn_points .points_tip svg,
body.night_mode .earn_points .points_tip svg {
  color: #aaa !important;
}

/* --- LOW: Confirmation code label --- */
html:has(link#night-mode-css) .tag_confrm_code > span,
html.bc-dark-mode .tag_confrm_code > span,
body.night_mode .tag_confrm_code > span {
  color: #888 !important;
}

/* --- LOW: Group chat member list border --- */
html:has(link#night-mode-css) .group_chat_mbr_part,
html.bc-dark-mode .group_chat_mbr_part,
body.night_mode .group_chat_mbr_part {
  border-bottom-color: #3d3d3d !important;
}

/* --- LOW: Group info paragraph text --- */
html:has(link#night-mode-css) .wow_my_groups_info p,
html.bc-dark-mode .wow_my_groups_info p,
body.night_mode .wow_my_groups_info p {
  color: #aaa !important;
}

/* --- LOW: Modal footer border --- */
html:has(link#night-mode-css) .modal .modal-footer,
html.bc-dark-mode .modal .modal-footer,
body.night_mode .modal .modal-footer {
  border-top-color: #3f3f3f !important;
}

/* --- LOW: Flickity carousel buttons --- */
html:has(link#night-mode-css) .flickity-button,
html.bc-dark-mode .flickity-button,
body.night_mode .flickity-button {
  background: rgba(255,255,255,0.15) !important;
  color: #e0e0e0 !important;
}

/* --- LOW: Job question block close button --- */
html:has(link#night-mode-css) .wo_create_job_qstn_block button.close,
html.bc-dark-mode .wo_create_job_qstn_block button.close,
body.night_mode .wo_create_job_qstn_block button.close {
  color: #e0e0e0 !important;
  background-color: #555 !important;
}

/* --- LOW: Upload bank receipts icon --- */
html:has(link#night-mode-css) .upload_bank_receipts svg,
html.bc-dark-mode .upload_bank_receipts svg,
body.night_mode .upload_bank_receipts svg {
  color: #ccc !important;
  background-color: #555 !important;
}

/* --- LOW: Greeting alert paragraph --- */
html:has(link#night-mode-css) .greetalert p,
html.bc-dark-mode .greetalert p,
body.night_mode .greetalert p {
  color: rgba(255,255,255,0.6) !important;
}

/* --- LOW: Search result badge bg --- */
html:has(link#night-mode-css) .search-dropdown-result .search_result_badge,
html.bc-dark-mode .search-dropdown-result .search_result_badge,
body.night_mode .search-dropdown-result .search_result_badge {
  background: #2E2E2E !important;
}

/* --- LOW: Bitchat card flat border invisible --- */
html:has(link#night-mode-css) .bc-card-flat,
html.bc-dark-mode .bc-card-flat,
body.night_mode .bc-card-flat {
  border-color: rgba(255,255,255,0.08) !important;
}

/* --- LOW: Thumbnail placeholder backgrounds --- */
html:has(link#night-mode-css) .bc-trending-thumb,
html:has(link#night-mode-css) .bc-discover-card-thumb,
html.bc-dark-mode .bc-trending-thumb,
html.bc-dark-mode .bc-discover-card-thumb,
body.night_mode .bc-trending-thumb,
body.night_mode .bc-discover-card-thumb {
  background-color: #2a2a2a !important;
}

/* --- LOW: Glass morphism dark mode --- */
html:has(link#night-mode-css) .bc-glass,
html.bc-dark-mode .bc-glass,
body.night_mode .bc-glass {
  background: rgba(30,41,59,0.6) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* ==========================================================================
   CRITICAL: Dark Mode BACKGROUND Fixes — Phase 4 (Feb 2026)
   Ensures ALL content containers switch to dark backgrounds.
   Previous fixes only changed TEXT colors but missed BACKGROUNDS.
   ========================================================================== */

/* --- Main content area: ensure dark bg propagates --- */
html:has(link#night-mode-css) .tag_content,
html.bc-dark-mode .tag_content,
body.night_mode .tag_content {
  background-color: var(--body-bg, #121212) !important;
}

/* --- Panel-white standalone (dark.css only covered .user-ad-container .panel-white) --- */
html:has(link#night-mode-css) .panel-white,
html.bc-dark-mode .panel-white,
body.night_mode .panel-white {
  background-color: #212121 !important;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.5), 0 1px 2px 0 rgba(0,0,0,0.46) !important;
}

/* --- Profile header card (tag_page_name_hdr has no bg defined anywhere) --- */
html:has(link#night-mode-css) .tag_page_name_hdr,
html.bc-dark-mode .tag_page_name_hdr,
body.night_mode .tag_page_name_hdr {
  background-color: #212121 !important;
}

/* --- Profile name text (light gray on white = invisible) --- */
html:has(link#night-mode-css) .tag_page_name_hdr h3,
html:has(link#night-mode-css) .tag_page_name_hdr h3 a,
html:has(link#night-mode-css) .tag_page_name_hdr .user_name,
html.bc-dark-mode .tag_page_name_hdr h3,
html.bc-dark-mode .tag_page_name_hdr h3 a,
html.bc-dark-mode .tag_page_name_hdr .user_name,
body.night_mode .tag_page_name_hdr h3,
body.night_mode .tag_page_name_hdr h3 a,
body.night_mode .tag_page_name_hdr .user_name {
  color: #e7e9ea !important;
}

/* --- wow_content: reinforce dark bg (already in dark.css but can be overridden) --- */
html:has(link#night-mode-css) .wow_content,
html.bc-dark-mode .wow_content,
body.night_mode .wow_content {
  background-color: #212121 !important;
}

/* --- Discover page header --- */
html:has(link#night-mode-css) .bc-discover-header h2,
html.bc-dark-mode .bc-discover-header h2,
body.night_mode .bc-discover-header h2 {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .bc-discover-header h2 svg,
html.bc-dark-mode .bc-discover-header h2 svg,
body.night_mode .bc-discover-header h2 svg {
  color: #8899a6 !important;
}

/* --- Discover section backgrounds --- */
html:has(link#night-mode-css) .bc-discover-section,
html.bc-dark-mode .bc-discover-section,
body.night_mode .bc-discover-section {
  background-color: #212121 !important;
}
html:has(link#night-mode-css) .bc-discover-section-header h4,
html.bc-dark-mode .bc-discover-section-header h4,
body.night_mode .bc-discover-section-header h4 {
  color: #e0e0e0 !important;
}

/* --- Settings page containers --- */
html:has(link#night-mode-css) .tag_hdr_top_sett,
html.bc-dark-mode .tag_hdr_top_sett,
body.night_mode .tag_hdr_top_sett {
  background-color: var(--body-bg, #121212) !important;
}

/* --- Settings sidebar: fix for mobile back button visibility --- */
/* When JS sets inline display:block via fadeIn or setProperty, ensure it wins */
@media (max-width: 992px) {
  .tag_sett_sidebar[style*="display: block"] {
    display: block !important;
  }
  .tag_sett_sidebar[style*="display:block"] {
    display: block !important;
  }
}

/* --- Creator dashboard wrapper --- */
html:has(link#night-mode-css) .creator-dashboard-container,
html:has(link#night-mode-css) .creator_dashboard,
html.bc-dark-mode .creator-dashboard-container,
html.bc-dark-mode .creator_dashboard,
body.night_mode .creator-dashboard-container,
body.night_mode .creator_dashboard {
  background-color: #212121 !important;
  color: #dcdcdc !important;
}

/* Language dropdown — make scrollable when too many languages */
.lang_select.dropup .dropdown-menu {
  max-height: 50vh;
  overflow-y: auto;
}

/* ==========================================================================
   P3-9: Post Composer Fix
   ========================================================================== */

/* 1. Emoji dropdown z-index — raise above lightbox/modal overlay layers.
      Base stylesheet sets z-index:2 which is too low when inside a lightbox
      or stacking-context layer. Bootstrap uses 1000 for .dropdown-menu. */
.emo-post-container {
  z-index: 1000 !important;
}

/* 2. Video upload area — ensure the ratio container clips its children
      and that the overlay covers it fully, regardless of flex parent. */
.tag_pub_vids {
  position: relative !important;
  overflow: hidden !important;
}

/* 3. Share button + chars counter — flex-align them so the button is
      perfectly centered alongside the character counter in the header. */
.tag_pub_box .modal-header > div:nth-child(2) {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ==========================================================================
   P4-DM: Dark Mode Complete Fix
   Targets gaps not covered by dark.css or earlier style.css overrides.
   ========================================================================== */

/* 1. Alert variants — wallet.css overrides Bootstrap alerts with solid
      light-mode colors (#f8d7da, #d4edda). These need dark overrides so
      alerts are readable on the dark #121212 background. */
body.night_mode .alert-success {
  background-color: rgba(76, 175, 80, 0.12) !important;
  color: #81c784 !important;
  border-color: rgba(76, 175, 80, 0.25) !important;
}
body.night_mode .alert-danger {
  background-color: rgba(244, 67, 54, 0.12) !important;
  color: #e57373 !important;
  border-color: rgba(244, 67, 54, 0.25) !important;
}
body.night_mode .alert-warning {
  background-color: rgba(243, 148, 64, 0.12) !important;
  color: #ffb74d !important;
  border-color: rgba(243, 148, 64, 0.25) !important;
}
body.night_mode .alert-info {
  background-color: rgba(33, 150, 243, 0.12) !important;
  color: #64b5f6 !important;
  border-color: rgba(33, 150, 243, 0.25) !important;
}

/* 2. Add Funds form container — wallet.css sets background:#ffffff.
      Override to match the dark surface palette. */
body.night_mode .wow_add_money_hid_form {
  background: #1e1e2e !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4) !important;
}

/* 3. Earn-points section divider — base style uses rgba(0,0,0,0.08) which
      is invisible on the #121212 dark background. */
body.night_mode .earn_points .ep_illus {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* 4. Wallet subtitle text — wallet.phtml contains an inline color:#64748b
      on the "Use TRDC to boost posts…" subtitle. Override via structural
      selector so inline !important is not needed in the PHP. */
body.night_mode .wow_mini_wallets > div > p:not(.bold) {
  color: #9ca3af !important;
}

/* 5. .form-control inputs — wallet.css sets background:#ffffff and a light
      border. Covers the bank-transfer Transaction ID field and any other
      .form-control outside of .tag_field wrappers. */
body.night_mode .form-control {
  background-color: #373737 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #e2e2e2 !important;
}
body.night_mode .form-control:focus {
  background-color: #434343 !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
}
body.night_mode .form-control[readonly],
body.night_mode .form-control:disabled {
  background-color: #2a2a2a !important;
  color: #9ca3af !important;
}
body.night_mode .form-control::placeholder {
  color: rgba(255, 255, 255, 0.38) !important;
}

/* 6. .file-upload border — wallet.css sets a light-grey border #e1e8ed.
      On dark backgrounds this is still slightly visible but looks washed
      out; align with the dark border palette. */
body.night_mode .file-upload {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* 7. form-group labels — Bootstrap's .form-group uses a plain <label>
      which inherits body color. wallet.css also defines .form-label
      with color:#2c3e50 (dark on light). Override for dark mode. */
body.night_mode .form-group label,
body.night_mode .form-label {
  color: #c8ccd0 !important;
}

/* 8. .counter on My Points page (inside .earn_points) — ensure TRDC
      counter heading and sub-text are readable. The .counter box
      itself is covered in dark.css (line 288) but the inline SVG coin
      and p.point-text text color need explicit dark treatment. */
body.night_mode .earn_points .counter h2,
body.night_mode .earn_points .counter h5 {
  color: #e7e9ea !important;
}
body.night_mode .earn_points .counter .point-text,
body.night_mode .earn_points .counter .count-text {
  color: #9ca3af !important;
}

/* ==========================================================================
   P5-15: Post Card — media fit + overflow containment
   Ensure all embedded media in post bodies fits within the card width.
   body { overflow-x: hidden } (RR-28) clips overflow at the page level,
   but that just clips — the content below handles actual fit.
   ========================================================================== */

/* 1. Images and video in post body always fit their container */
.post .post-description img,
.post .post-description video {
  max-width: 100% !important;
  height: auto !important;
}

/* 2. Iframes embedded directly in post text (non-wrapped, e.g. user HTML) */
.post .post-description iframe {
  max-width: 100% !important;
}

/* 3. Tables in post text get inner horizontal scroll instead of overflowing */
.post .post-description table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 4. Pre/code blocks in post text */
.post .post-description pre {
  max-width: 100%;
  overflow-x: auto;
}

/* 5. Mobile: post panel clips any residual overflow */
@media (max-width: 768px) {
  .post .panel.panel-white {
    overflow: hidden;
  }
}

/* ==========================================================================
   QA-CLS: Sidebar avatar containers — reserve space before image loads
   Prevents layout shift (CLS) on sidebar user/group/page lists
   ========================================================================== */
.sidebar-listed-user-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-listed-user-avatar img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   FIX-SB: Right sidebar — native CSS sticky instead of theiaStickySidebar JS.
   The JS plugin miscalculates container boundaries in flex layouts, causing
   the sidebar to vanish on scroll.  CSS position:sticky is reliable, native,
   and simpler.
   - align-self:flex-start prevents the flex child from stretching to the
     full row height (which would defeat sticky).
   - max-height + overflow-y:auto gives the sidebar its own scroll when the
     widget stack is taller than the viewport.
   ========================================================================== */
.tag_main_right_side {
  position: sticky !important;
  top: 66px;
  align-self: flex-start;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.tag_main_right_side::-webkit-scrollbar {
  width: 4px;
}
.tag_main_right_side::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15);
  border-radius: 4px;
}

/* ==========================================================================
   REG-PW: Password visibility toggle on registration & login forms
   ========================================================================== */
.bc-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: rgba(0,0,0,.45);
  z-index: 1;
  line-height: 1;
  display: flex;
  align-items: center;
}
.bc-pw-toggle:hover {
  color: rgba(0,0,0,.7);
}
.tag_field:has(.bc-pw-toggle) > input {
  padding-right: 44px !important;
}

/* ---- Location Permission Modal ---- */
.bc-loc-dialog { max-width:260px; margin:auto; }
.bc-loc-modal { border-radius:12px !important; overflow:hidden; border:none !important; box-shadow:0 12px 36px rgba(0,0,0,0.3); padding:0 !important; }
.bc-loc-header { background:linear-gradient(135deg,#0073CE 0%,#005bb5 100%); padding:16px 16px 12px; text-align:center; }
.bc-loc-icon { width:40px; height:40px; background:rgba(255,255,255,0.15); border-radius:50%; display:inline-flex; align-items:center; justify-content:center; margin-bottom:8px; }
.bc-loc-icon svg { width:20px; height:20px; }
.bc-loc-title { color:#fff; margin:0 0 4px; font-size:14px; font-weight:700; }
.bc-loc-subtitle { color:rgba(255,255,255,0.85); margin:0; font-size:11px; line-height:1.4; }
.bc-loc-body { padding:12px 16px 6px; text-align:center; }
.bc-loc-desc { color:#555; font-size:11px; line-height:1.5; margin:0 0 4px; }
.bc-loc-note { color:#888; font-size:10px; margin:0; }
.bc-loc-actions { padding:8px 16px 14px; display:flex; gap:8px; }
.bc-loc-btn-skip { flex:1; padding:8px; border-radius:8px; font-size:11px; font-weight:600; background:#f1f3f5; color:#555; border:none; }
.bc-loc-btn-allow { flex:2; padding:8px; border-radius:8px; font-size:11px; font-weight:600; background:#0073CE; color:#fff; border:none; cursor:pointer; }
.bc-loc-btn-skip:hover { background:#e2e6ea; }
.bc-loc-btn-allow:hover { background:#005bb5; }
/* Tablet */
@media (min-width:768px) {
.bc-loc-dialog { max-width:280px; }
}
/* Desktop */
@media (min-width:992px) {
.bc-loc-dialog { max-width:300px; }
}
/* Small mobile */
@media (max-width:360px) {
.bc-loc-dialog { max-width:230px; margin:auto 12px; }
.bc-loc-header { padding:12px 12px 10px; }
.bc-loc-body { padding:10px 12px 4px; }
.bc-loc-actions { padding:6px 12px 12px; }
}

/* Location modal — dark mode */
html:has(link#night-mode-css) .bc-loc-modal,
html.bc-dark-mode .bc-loc-modal { background-color:#212121 !important; }
html:has(link#night-mode-css) .bc-loc-desc,
html.bc-dark-mode .bc-loc-desc { color:#ccc; }
html:has(link#night-mode-css) .bc-loc-note,
html.bc-dark-mode .bc-loc-note { color:#999; }
html:has(link#night-mode-css) .bc-loc-btn-skip,
html.bc-dark-mode .bc-loc-btn-skip { background:#3a3a3a; color:#ddd; }
html:has(link#night-mode-css) .bc-loc-btn-skip:hover,
html.bc-dark-mode .bc-loc-btn-skip:hover { background:#4a4a4a; }

/* ==========================================================================
   FIX-POST: Post cards fit-to-screen on all mobile devices
   Override core negative margins that cause horizontal overflow.
   Posts render edge-to-edge with proper containment.
   ========================================================================== */
@media (max-width: 520px) {
  /* Prevent horizontal scroll from any overflow */
  body, html {
    overflow-x: hidden !important;
  }
  /* Remove negative margins that push posts outside viewport */
  .post:not(.wo_imagecombo_lbox),
  .tag_pub_box_bg {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }
  /* Container flush to edges */
  .tag_cont_fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Post inner content breathing room */
  .post .post_hdr,
  .post .post-text,
  .post .post-actions,
  .post .comment-section,
  .post .wo_post_sec_text,
  .post .record-btn-cont,
  .post .post_content,
  .post .shared-post-header {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* Post images/videos full width */
  .post .post_img,
  .post .post-media,
  .post .post_video,
  .post .wo_imagecombo_cont {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }
  /* Feed container no overflow */
  #contnet,
  .tag_content,
  .page-margin {
    overflow-x: hidden !important;
  }
  /* Column padding tighter */
  .page-margin > .container > .row > [class*="col-"],
  body:not(.bc-welcome) .tag_content .container > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-margin > .container,
  body:not(.bc-welcome) .tag_content > .container,
  body:not(.bc-welcome) .tag_content .page-margin > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ==========================================================================
   FIX-5: Native app adjustments
   ========================================================================== */

/* FIX-5a: Wallet login styles for native app */
html.bc-native-app .bc-wallet-login .bc-wallet-hint { display: none; }

.bc-wallet-list { margin-top: 8px; }
.bc-wallet-list-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 6px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.bc-wallet-list-btn:hover { background: #f5f5f5; }
.bc-wallet-list-btn svg { flex-shrink: 0; }

/* FIX-5b: Google login fallback button for WebView */
.bc-google-fallback-btn {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bc-google-fallback-btn:hover { background: #f8f9fa; text-decoration: none; color: #3c4043; }
html.bc-native-app .bc-google-fallback-btn { display: flex; }
html.bc-native-app #buttonDiv { display: none !important; }

/* FIX-5c: Sidebar load-more for native app */
.bc-sidebar-load-more {
  display: none;
  padding: 8px 16px;
  margin: 4px 0 8px 0;
  font-size: 13px;
  color: var(--bc-accent, #0073CE);
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.bc-sidebar-load-more:hover { text-decoration: underline; }
html.bc-native-app .bc-sidebar-load-more { display: block; }

/* =====================================================
   Dark Mode Consistency Fixes — Modals, Dropdowns, Overlays
   ===================================================== */
html:has(link#night-mode-css) .modal-content,
html.bc-dark-mode .modal-content,
body.night_mode .modal-content {
  background-color: #212121 !important;
  color: #e7e9ea !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html:has(link#night-mode-css) .modal-header,
html.bc-dark-mode .modal-header,
body.night_mode .modal-header {
  border-bottom-color: rgba(255,255,255,0.1) !important;
  color: #e7e9ea !important;
}
html:has(link#night-mode-css) .modal-body,
html.bc-dark-mode .modal-body,
body.night_mode .modal-body {
  color: #dcdcdc !important;
}
html:has(link#night-mode-css) .modal-footer,
html.bc-dark-mode .modal-footer,
body.night_mode .modal-footer {
  border-top-color: rgba(255,255,255,0.1) !important;
}
html:has(link#night-mode-css) .modal-header .close,
html.bc-dark-mode .modal-header .close,
body.night_mode .modal-header .close {
  color: #fff !important;
  opacity: 0.7;
}

/* Dropdown menus */
html:has(link#night-mode-css) .dropdown-menu,
html.bc-dark-mode .dropdown-menu,
body.night_mode .dropdown-menu {
  background-color: #2e2e2e !important;
  border-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important;
}
html:has(link#night-mode-css) .dropdown-menu > li > a,
html:has(link#night-mode-css) .dropdown-item,
html.bc-dark-mode .dropdown-menu > li > a,
html.bc-dark-mode .dropdown-item,
body.night_mode .dropdown-menu > li > a,
body.night_mode .dropdown-item {
  color: #e0e0e0 !important;
}
html:has(link#night-mode-css) .dropdown-menu > li > a:hover,
html:has(link#night-mode-css) .dropdown-item:hover,
html.bc-dark-mode .dropdown-menu > li > a:hover,
html.bc-dark-mode .dropdown-item:hover,
body.night_mode .dropdown-menu > li > a:hover,
body.night_mode .dropdown-item:hover {
  background-color: #3d3d3d !important;
  color: #fff !important;
}
html:has(link#night-mode-css) .dropdown-divider,
html.bc-dark-mode .dropdown-divider,
body.night_mode .dropdown-divider {
  border-top-color: rgba(255,255,255,0.08) !important;
}

/* Form controls inside modals */
html:has(link#night-mode-css) .modal .form-control,
html.bc-dark-mode .modal .form-control,
body.night_mode .modal .form-control {
  background-color: #181818 !important;
  color: #e7e9ea !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html:has(link#night-mode-css) .modal .form-control::placeholder,
html.bc-dark-mode .modal .form-control::placeholder,
body.night_mode .modal .form-control::placeholder {
  color: #6e7a85 !important;
}

/* Select inputs */
html:has(link#night-mode-css) .modal select.form-control,
html.bc-dark-mode .modal select.form-control,
body.night_mode .modal select.form-control {
  background-color: #181818 !important;
  color: #e7e9ea !important;
}

/* Tooltips */
html:has(link#night-mode-css) .tooltip-inner,
html.bc-dark-mode .tooltip-inner,
body.night_mode .tooltip-inner {
  background-color: #2e2e2e !important;
  color: #e2e2e2 !important;
}

/* Cards inside dark mode */
html:has(link#night-mode-css) .card,
html.bc-dark-mode .card,
body.night_mode .card {
  background-color: #212121 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html:has(link#night-mode-css) .card-header,
html.bc-dark-mode .card-header,
body.night_mode .card-header {
  background-color: #2a2a2a !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
  color: #e7e9ea !important;
}

/* Popover */
html:has(link#night-mode-css) .popover,
html.bc-dark-mode .popover,
body.night_mode .popover {
  background-color: #2e2e2e !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html:has(link#night-mode-css) .popover-body,
html.bc-dark-mode .popover-body,
body.night_mode .popover-body {
  color: #dcdcdc !important;
}

/* ==========================================================================
   Text Stories — Creation & Display
   ========================================================================== */

/* Story type tabs */
.bc-story-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.bc-story-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: transparent;
  color: #666;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.bc-story-tab:hover {
  border-color: #aaa;
  color: #333;
}
.bc-story-tab.active {
  border-color: var(--bc-primary, #6c5ce7);
  background: var(--bc-primary, #6c5ce7);
  color: #fff;
}
.bc-story-tab svg {
  flex-shrink: 0;
}

/* Color picker grid */
.bc-story-colors {
  margin-bottom: 16px;
}
.bc-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.bc-color-btn {
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}
.bc-color-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.bc-color-btn.active {
  border-color: var(--bc-primary, #6c5ce7);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bc-primary, #6c5ce7);
  transform: scale(1.05);
}

/* Text story preview in create form */
.bc-story-text-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  padding: 20px;
  word-break: break-word;
  min-height: 100px;
}

/* Text story display in lightbox */
.bc-text-story-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  border-radius: inherit;
}
.bc-text-story-content p {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  word-break: break-word;
  margin: 0;
  max-width: 100%;
}

/* Dark mode adjustments for story tabs */
html:has(link#night-mode-css) .bc-story-tab,
html.bc-dark-mode .bc-story-tab,
body.night_mode .bc-story-tab {
  border-color: #444;
  color: #aaa;
}
html:has(link#night-mode-css) .bc-story-tab:hover,
html.bc-dark-mode .bc-story-tab:hover,
body.night_mode .bc-story-tab:hover {
  border-color: #666;
  color: #ccc;
}
html:has(link#night-mode-css) .bc-story-tab.active,
html.bc-dark-mode .bc-story-tab.active,
body.night_mode .bc-story-tab.active {
  border-color: var(--bc-primary, #6c5ce7);
  background: var(--bc-primary, #6c5ce7);
  color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bc-color-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .bc-text-story-content p {
    font-size: 20px;
  }
}

/* ==========================================================================
   TRDC Tip System
   ========================================================================== */
.bc-tip-btn {
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s;
}
.bc-tip-btn:hover {
  opacity: 1;
  color: #f39c12;
}
.bc-tip-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bc-tip-amount-btn {
  flex: 1 1 auto;
  min-width: 70px;
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.bc-tip-amount-btn:hover {
  border-color: #f39c12;
  color: #f39c12;
}
.bc-tip-amount-btn.active {
  border-color: #f39c12;
  background: #f39c12;
  color: #fff;
}
.bc-tip-balance {
  font-size: 13px;
  color: #888;
}
.bc-tip-custom input {
  border-radius: 8px;
}
html:has(link#night-mode-css) .bc-tip-amount-btn,
html.bc-dark-mode .bc-tip-amount-btn,
body.night_mode .bc-tip-amount-btn {
  border-color: #444;
  color: #ccc;
}
html:has(link#night-mode-css) .bc-tip-amount-btn:hover,
html.bc-dark-mode .bc-tip-amount-btn:hover,
body.night_mode .bc-tip-amount-btn:hover {
  border-color: #f39c12;
  color: #f39c12;
}
html:has(link#night-mode-css) .bc-tip-amount-btn.active,
html.bc-dark-mode .bc-tip-amount-btn.active,
body.night_mode .bc-tip-amount-btn.active {
  border-color: #f39c12;
  background: #f39c12;
  color: #fff;
}

/* ==========================================================================
   Token-Gated Content
   ========================================================================== */
.post-container {
  position: relative;
}
.bc-gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.15);
  border-radius: inherit;
}
.bc-gate-lock {
  text-align: center;
  background: rgba(255,255,255,0.95);
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.bc-gate-lock svg {
  color: #f39c12;
  margin-bottom: 8px;
}
.bc-gate-lock p {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
  color: #333;
}
.bc-gate-lock span {
  font-size: 13px;
  color: #888;
}
.bc-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #f39c12;
  background: rgba(243,156,18,0.1);
  border-radius: 4px;
  margin: 8px 12px 0;
}
.bc-gate-dropdown {
  min-width: 220px;
  padding: 0;
  border-radius: 10px;
}
.bc-gate-trigger.active,
.bc-gate-trigger:hover {
  color: #f39c12 !important;
}

/* Dark mode gate */
html:has(link#night-mode-css) .bc-gate-lock,
html.bc-dark-mode .bc-gate-lock,
body.night_mode .bc-gate-lock {
  background: rgba(30,30,40,0.95);
}
html:has(link#night-mode-css) .bc-gate-lock p,
html.bc-dark-mode .bc-gate-lock p,
body.night_mode .bc-gate-lock p {
  color: #eee;
}

/* ===== Trading Signals ===== */
.bc-signal-btn svg { vertical-align: middle; }

.bc-signal-card {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 12px 4px;
  border-left: 4px solid #888;
  background: #f8f9fa;
}
.bc-signal-card.bc-signal-buy { border-left-color: #22c55e; background: #f0fdf4; }
.bc-signal-card.bc-signal-sell { border-left-color: #ef4444; background: #fef2f2; }
.bc-signal-card.bc-signal-hold { border-left-color: #f59e0b; background: #fffbeb; }

.bc-signal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.bc-signal-type {
  font-weight: 700;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bc-signal-buy .bc-signal-type { background: #22c55e; }
.bc-signal-sell .bc-signal-type { background: #ef4444; }
.bc-signal-hold .bc-signal-type { background: #f59e0b; }

.bc-signal-pair {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a2e;
}
.bc-signal-tf {
  font-size: 12px;
  color: #666;
  background: #e5e7eb;
  padding: 1px 8px;
  border-radius: 10px;
}
.bc-signal-status {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: auto;
  font-weight: 600;
}
.bc-signal-status-active { background: #dbeafe; color: #1d4ed8; }
.bc-signal-status-hit_target { background: #dcfce7; color: #16a34a; }
.bc-signal-status-hit_stoploss { background: #fee2e2; color: #dc2626; }
.bc-signal-status-closed, .bc-signal-status-expired { background: #e5e7eb; color: #6b7280; }

.bc-signal-prices {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}
.bc-signal-price {
  display: flex;
  flex-direction: column;
}
.bc-signal-price small {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.bc-signal-price strong {
  font-size: 14px;
  color: #1a1a2e;
}

.bc-signal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bc-signal-conf {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
}
.bc-signal-actions {
  display: flex;
  gap: 4px;
}
.bc-signal-actions .btn-xs {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Signal modal */
.bc-signal-types {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bc-signal-type-btn {
  padding: 4px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.15s;
  text-align: center;
}
.bc-signal-type-btn input { display: none; }
.bc-signal-type-btn.active { border-color: #3b82f6; background: #eff6ff; color: #3b82f6; }
.bc-signal-type-btn:hover { border-color: #93c5fd; }

/* Dark mode */
html:has(link#night-mode-css) .bc-signal-card,
html.bc-dark-mode .bc-signal-card,
body.night_mode .bc-signal-card {
  background: #1e1e2e;
}
html:has(link#night-mode-css) .bc-signal-card.bc-signal-buy,
html.bc-dark-mode .bc-signal-card.bc-signal-buy,
body.night_mode .bc-signal-card.bc-signal-buy { background: #0a2e1a; }
html:has(link#night-mode-css) .bc-signal-card.bc-signal-sell,
html.bc-dark-mode .bc-signal-card.bc-signal-sell,
body.night_mode .bc-signal-card.bc-signal-sell { background: #2e0a0a; }
html:has(link#night-mode-css) .bc-signal-card.bc-signal-hold,
html.bc-dark-mode .bc-signal-card.bc-signal-hold,
body.night_mode .bc-signal-card.bc-signal-hold { background: #2e2a0a; }

html:has(link#night-mode-css) .bc-signal-pair,
html.bc-dark-mode .bc-signal-pair,
body.night_mode .bc-signal-pair { color: #e5e5e5; }

html:has(link#night-mode-css) .bc-signal-price strong,
html.bc-dark-mode .bc-signal-price strong,
body.night_mode .bc-signal-price strong { color: #e5e5e5; }

html:has(link#night-mode-css) .bc-signal-tf,
html.bc-dark-mode .bc-signal-tf,
body.night_mode .bc-signal-tf { background: #374151; color: #9ca3af; }

html:has(link#night-mode-css) .bc-signal-type-btn,
html.bc-dark-mode .bc-signal-type-btn,
body.night_mode .bc-signal-type-btn { border-color: #444; color: #ccc; }

html:has(link#night-mode-css) .bc-signal-type-btn.active,
html.bc-dark-mode .bc-signal-type-btn.active,
body.night_mode .bc-signal-type-btn.active { border-color: #3b82f6; background: #1e3a5f; color: #60a5fa; }

/* ===== Portfolio Tracker Widget ===== */
.bc-portfolio-widget { overflow: hidden; min-width: 0; }
.bc-portfolio-widget .tag_sidebar_widget_title { flex-wrap: nowrap; }
.bc-portfolio-widget .bc-pf-add-btn { flex-shrink: 0; }
.bc-pf-add-btn { background: none; border: none; color: #3b82f6; padding: 2px 6px; }
.bc-pf-add-btn:hover { color: #2563eb; }

.bc-pf-list { max-height: 240px; overflow-y: auto; }
.bc-pf-item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
.bc-pf-item:last-child { border-bottom: none; }
.bc-pf-coin { flex: 1; min-width: 0; }
.bc-pf-coin strong { font-size: 13px; display: block; color: #1a1a2e; }
.bc-pf-coin small { font-size: 11px; color: #888; }
.bc-pf-val { text-align: right; }
.bc-pf-val span { font-size: 13px; font-weight: 600; color: #1a1a2e; display: block; }
.bc-pf-val small { font-size: 11px; }
.bc-pf-up { color: #22c55e; }
.bc-pf-down { color: #ef4444; }
.bc-pf-rm {
  background: none; border: none; color: #ccc; font-size: 16px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.bc-pf-rm:hover { color: #ef4444; }

.bc-pf-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 2px solid #f0f0f0;
  background: #fafafa;
  border-radius: 0 0 10px 10px;
}
.bc-pf-total span { font-size: 12px; color: #666; }
.bc-pf-total strong { font-size: 16px; color: #1a1a2e; }

.bc-pf-coin-results {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  margin-top: 4px;
}
.bc-pf-coin-results:empty { border: none; }
.bc-pf-coin-opt {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
}
.bc-pf-coin-opt:hover { background: #f0f7ff; }
.bc-pf-coin-opt:last-child { border-bottom: none; }
.bc-pf-coin-opt strong { margin-right: 4px; }

/* Dark mode */
html:has(link#night-mode-css) .bc-pf-item,
html.bc-dark-mode .bc-pf-item,
body.night_mode .bc-pf-item { border-bottom-color: #2a2a3a; }

html:has(link#night-mode-css) .bc-pf-coin strong,
html.bc-dark-mode .bc-pf-coin strong,
body.night_mode .bc-pf-coin strong { color: #e5e5e5; }

html:has(link#night-mode-css) .bc-pf-val span,
html.bc-dark-mode .bc-pf-val span,
body.night_mode .bc-pf-val span { color: #e5e5e5; }

html:has(link#night-mode-css) .bc-pf-total,
html.bc-dark-mode .bc-pf-total,
body.night_mode .bc-pf-total { background: #1a1a2e; border-top-color: #2a2a3a; }

html:has(link#night-mode-css) .bc-pf-total strong,
html.bc-dark-mode .bc-pf-total strong,
body.night_mode .bc-pf-total strong { color: #e5e5e5; }

html:has(link#night-mode-css) .bc-pf-coin-results,
html.bc-dark-mode .bc-pf-coin-results,
body.night_mode .bc-pf-coin-results { border-color: #333; background: #1e1e2e; }

html:has(link#night-mode-css) .bc-pf-coin-opt,
html.bc-dark-mode .bc-pf-coin-opt,
body.night_mode .bc-pf-coin-opt { border-bottom-color: #2a2a3a; color: #ccc; }

html:has(link#night-mode-css) .bc-pf-coin-opt:hover,
html.bc-dark-mode .bc-pf-coin-opt:hover,
body.night_mode .bc-pf-coin-opt:hover { background: #2a2a3a; }

/* --- Ticker: dark mode text colors --- */
html:has(link#night-mode-css) .bc-ticker-label,
html.bc-dark-mode .bc-ticker-label,
body.night_mode .bc-ticker-label { color: rgba(255,255,255,0.5) !important; }
html:has(link#night-mode-css) .bc-ticker-price,
html.bc-dark-mode .bc-ticker-price,
body.night_mode .bc-ticker-price { color: #e7e9ea !important; }
html:has(link#night-mode-css) .bc-ticker-sep,
html.bc-dark-mode .bc-ticker-sep,
body.night_mode .bc-ticker-sep { color: rgba(255,255,255,0.15) !important; }

/* --- Announcement banner: multicolor shine (light + dark) --- */
@keyframes bc-color-cycle {
  0%   { color: #ff0055; }
  17%  { color: #ff8800; }
  33%  { color: #ddbb00; }
  50%  { color: #00aa44; }
  67%  { color: #0077ff; }
  83%  { color: #9900cc; }
  100% { color: #ff0055; }
}
.bc-announce-banner {
  background: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.bc-announce-banner span,
.bc-announce-banner .bc-announce-link {
  background: none !important;
  -webkit-text-fill-color: unset !important;
  animation: bc-color-cycle 3s linear infinite !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: 0.03em;
}
.bc-announce-banner .bc-announce-link { text-decoration: none !important; }
.bc-announce-banner .bc-announce-close { color: #666 !important; }
html:has(link#night-mode-css) .bc-announce-banner,
html.bc-dark-mode .bc-announce-banner,
body.night_mode .bc-announce-banner {
  background: #111 !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}
html:has(link#night-mode-css) .bc-announce-banner .bc-announce-close,
html.bc-dark-mode .bc-announce-banner .bc-announce-close,
body.night_mode .bc-announce-banner .bc-announce-close { color: #aaa !important; }

/* --- Remove ALL gaps between ticker → announcement → hero banner --- */
#bc-market-strip { margin-bottom: 0 !important; border-bottom: none !important; }
.bc-announce-banner { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 6px !important; padding-bottom: 6px !important; }
header { margin-bottom: 0 !important; }

/* --- Sidebar layout: collapse header from flow but keep children visible --- */
body:not(.tag_header_top_p):not(.bc-welcome) header {
  display: block !important;
  height: 0 !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
body:not(.tag_header_top_p):not(.bc-welcome) header nav.navbar {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  border: none !important;
}
body:not(.tag_header_top_p):not(.bc-welcome) header .tag_header_shadow {
  display: none !important;
}

/* --- Sidebar announcement: remove shadow --- */
.home-announcement.wow_content,
.tag_announce.wow_content {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}
.home-announcement.wow_content:hover,
.tag_announce.wow_content:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   MOBILE WEBVIEW / CHROME MOBILE FIXES (≤768px and ≤480px)
   Fixes for: header, dropdowns, chat, profile, publisher, dark mode nav
   ========================================================================== */

/* --- Dropdown menus: prevent overflow on small screens --- */
@media (max-width: 768px) {
  .tag_navbar_top_right .tag_hdr_right > .dropdown .dropdown-menu,
  .tag_navbar_top .tag_header > .search-container .dropdown-menu {
    min-width: auto !important;
    width: 100% !important;
    border-radius: 0 !important;
  }
}

/* --- Publisher box: desktop-like 2-column grid on mobile --- */
@media (max-width: 768px) {
  .publisher-box .publisher-box-footer .pub-footer-upper {
    white-space: normal !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    padding: 15px 7.5px 5px !important;
    text-align: inherit !important;
    overflow-x: visible !important;
  }
  /* Show full button with label (not icon-only) */
  .tag_pub_box_btns {
    display: block !important;
    width: calc(50% - 15px) !important;
    min-width: unset !important;
    height: auto !important;
    text-align: inherit !important;
    background-color: rgba(0,0,0,0.05) !important;
    border-radius: 10px !important;
    margin: 0 7.5px 10px !important;
    padding: 0 12px !important;
    line-height: 34px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
  }
  /* Show button labels on mobile */
  .tag_pub_box_btns > span {
    display: inline !important;
  }
  .tag_pub_box_btns svg {
    width: 22px !important;
    height: 22px !important;
    margin: -2px 6px 0 0 !important;
  }
  /* Record button container same width */
  .tag_pubbox_record {
    display: block !important;
    width: calc(50% - 15px) !important;
    min-width: unset !important;
    margin: 0 7.5px 10px !important;
    font-size: 13px !important;
  }
  .tag_pubbox_record .btn {
    width: 100% !important;
    margin: 0 !important;
  }
  /* Dark mode button background */
  html:has(link#night-mode-css) .tag_pub_box_btns,
  html.bc-dark-mode .tag_pub_box_btns,
  body.night_mode .tag_pub_box_btns {
    background-color: rgba(255,255,255,0.08) !important;
    color: #dcdcdc !important;
  }
}

/* --- Chat: fix text truncation width --- */
@media (max-width: 768px) {
  .recipient-chat-user .chat-user-text {
    max-width: 180px !important;
  }
}
@media (max-width: 480px) {
  .recipient-chat-user .chat-user-text {
    max-width: 140px !important;
  }
}

/* --- Profile: buttons wrap, cover responsive --- */
@media (max-width: 768px) {
  .buttons-profile,
  .wow_user_page_btns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .buttons-profile .btn,
  .wow_user_page_btns .btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
  .tag_cover_sec_bg {
    height: 200px !important;
    overflow: hidden !important;
  }
  .tag_cover_sec_bg img {
    height: 200px !important;
    object-fit: cover !important;
  }
  .wo_user_profile .user-bottom-nav ul {
    white-space: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .wo_user_profile .user-bottom-nav ul::-webkit-scrollbar {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .tag_cover_sec_bg,
  .tag_cover_sec_bg img {
    height: 150px !important;
  }
}

/* --- Product titles: reduce size on mobile --- */
@media (max-width: 768px) {
  .tag_randm_plist .product_info h2 {
    font-size: 18px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
}

/* --- Dark mode: mobile nav icon/text colors --- */
html:has(link#night-mode-css) #bc-mobile-nav .bc-mob-nav-item,
html.bc-dark-mode #bc-mobile-nav .bc-mob-nav-item,
body.night_mode #bc-mobile-nav .bc-mob-nav-item {
  color: #ccc !important;
}
html:has(link#night-mode-css) #bc-mobile-nav .bc-mob-nav-item.active,
html.bc-dark-mode #bc-mobile-nav .bc-mob-nav-item.active,
body.night_mode #bc-mobile-nav .bc-mob-nav-item.active {
  color: #fff !important;
}
html:has(link#night-mode-css) #bc-mobile-nav .bc-mob-nav-item svg,
html.bc-dark-mode #bc-mobile-nav .bc-mob-nav-item svg,
body.night_mode #bc-mobile-nav .bc-mob-nav-item svg {
  color: inherit !important;
}

/* --- Dark mode: add missing CSS variable overrides --- */
html:has(link#night-mode-css),
html.bc-dark-mode,
body.night_mode {
  --bc-surface-primary: #181818;
  --bc-surface-secondary: #222;
  --bc-border-color: rgba(255,255,255,0.08);
  --bc-text-primary: #e7e9ea;
  --bc-text-secondary: #8899a6;
  --bc-text-tertiary: #666;
}

/* --- Modals: add safe padding on mobile --- */
@media (max-width: 480px) {
  .modal.fade { padding: 0 !important; }
  .modal-dialog { width: 100% !important; margin: 0 !important; }
  .wow_mat_mdl .modal-content { border-radius: 0 !important; min-height: 100vh !important; }
}

/* --- Sidebar: safe area inset for notched phones --- */
@media (max-width: 768px) {
  .tag_sidebar {
    padding-top: max(56px, calc(56px + env(safe-area-inset-top, 0px))) !important;
  }
}

/* --- Small phone (≤375px) specific fixes --- */
@media (max-width: 375px) {
  #bc-market-strip { font-size: 13px !important; height: 34px !important; }
  .bc-ticker-change { margin-right: 10px !important; font-size: 12px !important; }
  .bc-ticker-sep { margin-right: 10px !important; }
  .bc-ticker-label { font-size: 11px !important; }
  .bc-announce-banner { font-size: 11px !important; padding: 6px 10px !important; }
  #bc-mobile-nav { padding: 2px 0 env(safe-area-inset-bottom, 2px) !important; }
  .bc-mob-create-icon { width: 44px !important; height: 44px !important; }
  body { padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px)) !important; }
  .bc-hero-headline { font-size: 15px !important; }
  .bc-hero-sub { font-size: 11px !important; }
  .bc-btn-primary, .bc-btn-ghost { font-size: 11px !important; padding: 6px 12px !important; }
}

/* ==========================================================================
   MOBILE SIDEBAR — Restore desktop grid layout with collapsible groups
   Override WoWonder's .tag_sidebar_mobi rules that flatten the sidebar
   into a full-width list and hide group headers.
   ========================================================================== */
.tag_sidebar_mobi .tag_sidebar_head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  padding: 8px 14px !important;
  margin: 0 4px 4px !important;
  color: var(--header-color, #666) !important;
  border-radius: 8px !important;
  background: rgba(128,128,128,0.08) !important;
}
.tag_sidebar_mobi .tag_sidebar_head svg {
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.3s ease !important;
}
.tag_sidebar_mobi .tag_sidebar_head[aria-expanded="true"] svg {
  transform: rotate(180deg) !important;
}
/* Restore grid layout for sidebar links */
.tag_sidebar_mobi .tag_sidebar_section {
  display: flex !important;
  flex-wrap: wrap !important;
}
.tag_sidebar_mobi .tag_sidebar_section > a {
  width: 33.333% !important;
  text-align: center !important;
  display: inline-block !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 14px 4px !important;
  line-height: 1.2 !important;
  height: auto !important;
  margin: 0 !important;
  color: var(--header-color, #333) !important;
}
.tag_sidebar_mobi .tag_sidebar_section > a svg,
.tag_sidebar_mobi .tag_sidebar_section > a img {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 auto 6px !important;
}
/* Restore collapse behavior — don't force all sections open */
.tag_sidebar_mobi .collapse:not(.show) {
  display: none !important;
}
.tag_sidebar_mobi .collapse.show,
.tag_sidebar_mobi .collapsing {
  display: block !important;
}
/* Section dividers */
.tag_sidebar_mobi > .tag_sidebar_section_prnt {
  border-bottom: 1px solid rgba(128,128,128,0.12) !important;
  padding: 10px 8px !important;
}
/* Dark mode sidebar text */
html:has(link#night-mode-css) .tag_sidebar_mobi .tag_sidebar_section > a,
html.bc-dark-mode .tag_sidebar_mobi .tag_sidebar_section > a,
body.night_mode .tag_sidebar_mobi .tag_sidebar_section > a {
  color: #ccc !important;
}
html:has(link#night-mode-css) .tag_sidebar_mobi .tag_sidebar_head,
html.bc-dark-mode .tag_sidebar_mobi .tag_sidebar_head,
body.night_mode .tag_sidebar_mobi .tag_sidebar_head {
  color: #999 !important;
  background: rgba(255,255,255,0.05) !important;
}

/* ==========================================================================
   Reaction Popup — mobile-safe sizing (ALL devices)
   ========================================================================== */
/* Force ::after to never render (no content = no pseudo-element, but enforce it) */
.reaction::after {
  content: none !important;
  display: none !important;
}
/* Stop infinite animation blinking — play once then stop */
.reaction-1 img, .reaction-2 img, .reaction-3 img,
.reaction-4 img, .reaction-5 img, .reaction-6 img {
  animation-iteration-count: 1 !important;
  animation-duration: 0.8s !important;
}
/* Dark mode reaction popup background */
html:has(link#night-mode-css) .reactions-box,
html.bc-dark-mode .reactions-box,
body.night_mode .reactions-box,
html.night-mode .reactions-box {
  background: #2d2d2d !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
/* Dark mode post images — no white background behind images */
html:has(link#night-mode-css) .post .post_img,
html:has(link#night-mode-css) .post .post-media,
html:has(link#night-mode-css) .post .wo_imagecombo_cont,
html.night-mode .post .post_img,
html.night-mode .post .post-media,
html.night-mode .post .wo_imagecombo_cont,
body.night_mode .post .post_img,
body.night_mode .post .post-media,
body.night_mode .post .wo_imagecombo_cont {
  background-color: transparent !important;
}
html:has(link#night-mode-css) .post .panel,
html.night-mode .post .panel,
body.night_mode .post .panel {
  background-color: #212121 !important;
}
/* Mobile reaction popup — single row, all devices
   JS now sets display:flex (not block) when showing the popup */
.reactions-box {
  max-width: calc(100vw - 16px) !important;
  overflow: hidden !important;
  padding: 4px !important;
  border-radius: 28px !important;
  z-index: 9999 !important;
  /* Flex layout — activated when JS sets display:flex */
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}
/* Every reaction item — uniform size, flex child */
.reactions-box .reaction {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px !important;
  margin: 0 !important;
  flex: 0 1 auto !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  position: relative !important;
  list-style: none !important;
  /* Prevent any text/attribute content from showing */
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  overflow: hidden !important;
}
.reactions-box .reaction img,
.reactions-box .reaction svg {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  padding: 0 !important;
  display: block !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}
/* Small screens: shrink to fit */
@media (max-width: 400px) {
  .reactions-box .reaction {
    width: 34px !important;
    height: 34px !important;
  }
  .reactions-box .reaction img,
  .reactions-box .reaction svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
  }
}

/* ==========================================================================
   Cookie Consent Banner — above bottom nav
   ========================================================================== */
.cc-window, .cc-banner, .cc-bottom {
  z-index: 10000 !important;
}
@media (max-width: 768px) {
  .cc-window, .cc-banner, .cc-bottom {
    bottom: 60px !important;
    padding-bottom: 8px !important;
  }
}

/* ==========================================================================
   Ticker — don't overlap page content
   ========================================================================== */
@media (max-width: 768px) {
  #bc-market-strip {
    position: relative !important;
    z-index: 50 !important;
  }
  /* Ensure content below ticker is not overlapped */
  #bc-market-strip + * {
    position: relative;
    z-index: 1;
  }
}

/* ==========================================================================
   Mobile Touch & Button Responsiveness
   ========================================================================== */
/* Remove 300ms tap delay on all interactive elements */
a, button, input, select, textarea, .btn, [role="button"], [onclick] {
  touch-action: manipulation;
}
/* Remove iOS tap highlight gray flash */
* {
  -webkit-tap-highlight-color: transparent;
}
/* Faster button feedback on mobile */
@media (max-width: 768px) {
  .btn, a.btn, button, [role="button"] {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* ==========================================================================
   iOS Safari Compatibility Fixes
   ========================================================================== */
/* Fix iOS Safari 100vh issue (address bar overlap) */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
  html {
    height: -webkit-fill-available;
  }
  /* Fix position:fixed elements on iOS (bottom nav) */
  #bc-mobile-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  /* Fix iOS momentum scrolling */
  .main-content, .sidebar, .feed_container,
  .tag_sidebar_mobi, .messages-list, .chat-messages {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
  /* Fix iOS input zoom on focus (font-size < 16px triggers zoom) */
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="search"], input[type="url"],
  input[type="number"], textarea, select {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   Dark Mode Flash Prevention
   ========================================================================== */
/* When JS adds .night-mode class early (before CSS loads), hide body until ready */
html.night-mode {
  background-color: #212121 !important;
  color-scheme: dark;
}
html:not(.night-mode) {
  background-color: #fff !important;
  color-scheme: light;
}

/* ==========================================================================
   Mobile Layout Fixes — iPhone & Android
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile */
  body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  /* Fix header overlapping content */
  .main-container, .content-container, #main-content {
    padding-top: 0 !important;
  }
  /* Fix images overflowing containers */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  /* Prevent text overflow */
  .post-text, .post-description, .activity-text,
  .user-name, .username, h1, h2, h3, h4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
  /* Fix cover photo sizing on profile pages */
  .cover-container, .profile-cover, .user_cover_img,
  .cover_image, [class*="cover"] img {
    max-height: 200px !important;
    object-fit: cover !important;
    width: 100% !important;
  }
  /* Bottom nav spacing — don't cover content (safe area for notched phones) */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Fix dropdowns/modals going off screen */
  .dropdown-menu {
    max-width: calc(100vw - 20px) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
  }
  .modal-dialog {
    margin: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }
}

/* ==========================================================================
   Device-Specific Fixes — All Phones & Tablets
   ========================================================================== */

/* --- iPhone SE / Small phones (320px) --- */
@media (max-width: 360px) {
  #bc-market-strip { font-size: 12px !important; height: 32px !important; }
  .bc-ticker-wrapper { animation-duration: 45s !important; }
  .bc-hero-headline { font-size: 14px !important; }
  .bc-hero-sub { font-size: 10px !important; }
  .tag_pub_box_btns {
    width: 100% !important;
    margin: 0 0 8px !important;
  }
  .tag_pubbox_record {
    width: 100% !important;
    margin: 0 0 8px !important;
  }
}

/* --- Touch targets — minimum 44px on all interactive elements --- */
@media (max-width: 768px) {
  .bc-mob-nav-item {
    min-height: 44px !important;
    min-width: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .bc-chat-send-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .tag_pub_box_avatar img {
    width: 36px !important;
    height: 36px !important;
  }
  .tag_pub_box_bg_camlve {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
}

/* --- Safe area insets for notched phones (iPhone X+, Android gesture nav) --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bc-mobile-nav {
    padding-bottom: env(safe-area-inset-bottom, 4px) !important;
  }
  .cc-window, .cc-banner, .cc-bottom {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #bc-update-banner {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  /* Search overlay — account for notch/Dynamic Island */
  .tag_header > .search-container.bc-search-open {
    padding-top: env(safe-area-inset-top, 0px) !important;
  }
}

/* --- Viewport meta tag — proper HTML element sizing --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* --- Minimum font size enforcement — accessibility --- */
@media (max-width: 768px) {
  .bc-trending-reactions,
  .bc-cd-header-badge,
  .bc-cd-rank-badge,
  .bc-cd-chart-val,
  .bc-cd-chart-day,
  .bc-cd-growth-hint,
  .pro-badge {
    font-size: 11px !important;
  }
}

/* --- Story lightbox — fit mobile screens --- */
@media (max-width: 768px) {
  .tag_lbox_story_view {
    min-width: unset !important;
    width: 100% !important;
  }
  .tag_story_side {
    width: 100% !important;
    max-width: 100% !important;
    position: absolute !important;
    bottom: 0 !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
  }
}

/* --- Product images — responsive on small screens --- */
@media (max-width: 480px) {
  .tag_randm_plist .product_info .valign img {
    width: 100px !important;
    min-width: 100px !important;
    height: 100px !important;
  }
}

/* ==========================================================================
   Android App WebView — .bc-native-app class injected by MainActivity.kt
   Targets ALL Android devices: phones (360-428px), tablets (600-800px)
   ========================================================================== */

/* --- Edge-to-edge: account for Android status bar & nav bar --- */
html.bc-native-app {
  /* Android WebView runs edge-to-edge; pad for status bar */
  padding-top: env(safe-area-inset-top, 0px);
}
html.bc-native-app body {
  /* Prevent content behind Android gesture nav bar */
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
}

/* --- Hide hero/install banners in native app --- */
html.bc-native-app #bc-hero-banner,
html.bc-native-app #bc-install-popup,
html.bc-native-app #bc-android-install-modal,
html.bc-native-app .bc-install-prompt {
  display: none !important;
}

/* --- App header: match status bar color transition --- */
html.bc-native-app .tag_navbar_top,
html.bc-native-app .tag_header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
}

/* --- Smoother scrolling in WebView --- */
html.bc-native-app * {
  -webkit-overflow-scrolling: touch;
}
html.bc-native-app body {
  overscroll-behavior-y: none;
}

/* --- Fix WebView rendering: force GPU acceleration on key elements --- */
html.bc-native-app .post,
html.bc-native-app .tag_sidebar_mobi,
html.bc-native-app #bc-market-strip,
html.bc-native-app .tag_header,
html.bc-native-app #bc-mobile-nav {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* --- Android-specific touch improvements --- */
html.bc-native-app a,
html.bc-native-app button,
html.bc-native-app .btn,
html.bc-native-app [onclick],
html.bc-native-app [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* --- Fix keyboard pushing content up --- */
html.bc-native-app #bc-mobile-nav {
  /* When keyboard opens (adjustResize), nav stays at bottom */
  position: fixed !important;
  bottom: 0 !important;
}

/* --- Android small phones (360px — Samsung Galaxy S series, Pixel) --- */
@media (max-width: 380px) {
  html.bc-native-app .tag_header .search-input {
    font-size: 13px !important;
  }
  html.bc-native-app .bc-ticker-wrapper {
    animation-duration: 45s !important;
  }
  html.bc-native-app #bc-market-strip {
    height: 32px !important;
    font-size: 12px !important;
  }
}

/* --- Android medium phones (390-412px — Pixel 7/8, Samsung S23/S24) --- */
@media (min-width: 381px) and (max-width: 420px) {
  html.bc-native-app #bc-market-strip {
    height: 34px !important;
    font-size: 13px !important;
  }
}

/* --- Android large phones (428px+ — Samsung Ultra, Pixel Pro) --- */
@media (min-width: 421px) and (max-width: 500px) {
  html.bc-native-app #bc-market-strip {
    height: 36px !important;
    font-size: 14px !important;
  }
}

/* --- Android tablets (600-800px) --- */
@media (min-width: 600px) and (max-width: 800px) {
  html.bc-native-app .tag_pub_box_btns {
    width: calc(50% - 15px) !important;
  }
  html.bc-native-app .tag_sidebar_mobi {
    width: 300px !important;
  }
}

/* --- Android foldables (Samsung Fold outer: 280px, inner: 720px) --- */
@media (max-width: 300px) {
  html.bc-native-app .tag_pub_box_btns {
    width: 100% !important;
    font-size: 11px !important;
    padding: 0 8px !important;
  }
  html.bc-native-app #bc-market-strip {
    height: 28px !important;
    font-size: 11px !important;
  }
  html.bc-native-app .tag_header .search-input {
    font-size: 12px !important;
  }
}
@media (min-width: 700px) and (max-width: 740px) {
  /* Samsung Fold inner display */
  html.bc-native-app .tag_pub_box_btns {
    width: calc(33.33% - 15px) !important;
  }
}

/* --- Dark mode in app (night-mode class set by JS in <head>) --- */
html.bc-native-app.night-mode {
  background-color: #121212 !important;
}
html.bc-native-app.night-mode body {
  background-color: #121212 !important;
}
html.bc-native-app.night-mode .tag_header,
html.bc-native-app.night-mode .tag_navbar_top {
  background-color: #1a1a1a !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}
html.bc-native-app.night-mode #bc-mobile-nav {
  background: #181818 !important;
  border-top-color: rgba(255,255,255,0.08) !important;
}

/* --- Post reaction popup in app — inherits mobile fixes above --- */
html.bc-native-app .reactions-box {
  border-radius: 28px !important;
}

/* --- Fix images in posts inside app --- */
html.bc-native-app .post img:not(.avatar):not([class*="emoji"]):not([class*="reaction"]) {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
}

/* --- Fix modals in app (full screen, no border radius) --- */
@media (max-width: 540px) {
  html.bc-native-app .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
  }
  html.bc-native-app .modal-content {
    border-radius: 0 !important;
    min-height: 100% !important;
  }
}

/* --- Prevent horizontal scroll in app (common Android WebView issue) --- */
html.bc-native-app,
html.bc-native-app body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* --- Fix chat input area in app --- */
html.bc-native-app .tag_msg_write {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 100 !important;
  background: inherit !important;
}

/* --- Cookie consent banner: already in native app, hide it --- */
html.bc-native-app .cc-window,
html.bc-native-app .cc-banner {
  display: none !important;
}

/* ==========================================================================
   People You May Know — fix photo click on mobile / Android WebView
   The padding-bottom:100% aspect-ratio trick on <a class="avatar"> can fail
   to register taps on some Android WebViews.  We replace it with aspect-ratio
   (universally supported on Android 8+) and ensure full touch responsiveness.
   ========================================================================== */

/* Use modern aspect-ratio instead of the padding-bottom hack */
.tag_sidebar_users .avatar {
  padding-bottom: 0 !important;   /* disable the old trick */
  aspect-ratio: 1 / 1 !important; /* same square shape, proper click area */
  cursor: pointer !important;
  touch-action: manipulation !important; /* fast tap, no 300ms delay */
  -webkit-tap-highlight-color: rgba(0,0,0,0.08) !important;
}

/* Image fill — keep absolute positioning */
.tag_sidebar_users .avatar img {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important; /* let clicks pass through to the <a> */
}

/* Whole card responds to touch quickly */
.wow_side_usrs,
.tag_sidebar_users {
  touch-action: manipulation !important;
  cursor: pointer !important;
}

/* ── NAV-7: 7-item mobile bottom nav — small screen label tightening ── */
@media (max-width: 380px) {
  .bc-mob-nav-item span {
    font-size: 9px;
    max-width: 40px;
  }
  .bc-mob-nav-item svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================================
   QA Bug Fixes
   ============================================================ */

/* TC_005: Market strip sticky below navbar — prevents overlap with fixed navbar */
#bc-market-strip {
  position: sticky !important;
  top: 56px !important;
  z-index: 1044 !important;
}
/* TC_005: ensure body padding-top >= navbar height on all viewport sizes */
@media (max-width: 520px) {
  body { padding-top: 56px !important; }
}

/* TC_006: sidebar dropdown menus must appear above the fixed navbar */
.tag_sidebar .dropdown-menu,
.tag_sidebar_section .dropdown-menu,
.tag_sidebar_users .dropdown-menu {
  z-index: 1046 !important;
}

/* TC_013: My Information cards — prevent icon/text overflow at col-6 width */
.tag_select_info_dload .empty_state {
  word-break: break-word;
  hyphens: auto;
  font-size: 13px;
  line-height: 1.3;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 8px !important;
}
.tag_select_info_dload .empty_state svg {
  flex-shrink: 0;
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 8px;
}

/* TC_014: Download My Information — prevent text overlapping the SVG */
.ready_to_down_info {
  display: none;
  text-align: center;
  padding: 20px;
}
.ready_to_down_info svg {
  display: block;
  margin: 0 auto 16px;
  width: 100px !important;
  height: 100px !important;
}
.ready_to_down_info a.btn {
  display: inline-block;
  margin-top: 12px;
}

/* TC_010 / TC_018 / TC_020: float label stays elevated when field has content.
   The :not(:placeholder-shown) selector is false when the field has a value,
   ensuring the label never sits on top of existing text. */
.tag_field > input:not(:placeholder-shown) + span,
.tag_field > textarea:not(:placeholder-shown) + span {
  font-size: 13px !important;
  padding: 6px 16px 0 !important;
}

/* ==========================================================================
   Market strip overlap fix — removed.
   The core style.header.css already sets body.tag_header_top_p padding-top
   to 56px for the fixed navbar. The market strip is position:relative
   (normal flow) and takes its own 39px space — no extra body padding needed.
   ========================================================================== */

/* --- FIX: force market strip and announce banner flush to viewport top --- */
/* Diagnostic showed strip.top=56 despite body padding=0. Root cause unclear.
   Fix: make both position:sticky at top:0 so they always stick to the top
   of the viewport, regardless of what's pushing them down in flow. */
#bc-market-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}
.bc-announce-banner {
  position: sticky !important;
  top: 39px !important;
  z-index: 99 !important;
}

/* Welcome / logged-out pages have no navbar strip — no extra padding */
body.bc-welcome {
  padding-top: 0 !important;
}
