@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: rgba(17, 24, 39, 0.7);
  --bg-tertiary: #1f2937;
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #06b6d4; /* Cyan */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(17, 24, 39, 0.5);
  --glass-blur: blur(12px);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.15) 0px, transparent 50%);
}

/* Glassmorphism Container */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
}

/* Header & Navigation */
header {
  position: relative;
  z-index: 100;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

header .logo {
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
}

header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

header nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

header nav a:hover, header nav a.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-secondary);
}

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Main Content Wrapper */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* User Profile Badge */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-profile span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-secondary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Badge roles */
.badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-admin { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }
.badge-host { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.badge-broker { background: rgba(6, 182, 212, 0.2); color: #67e8f9; border: 1px solid #06b6d4; }
.badge-tenant { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid #6366f1; }

/* Modal Background Blur */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

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


/* ====================================================
   FACEBOOK STYLE ADDITIONS
   ==================================================== */

/* Left Sidebar Styles */
.sidebar-left {
  position: sticky;
  top: 70px;
  height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.sidebar-left::-webkit-scrollbar {
  width: 4px;
}
.sidebar-left::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

.fb-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
  cursor: pointer;
}
.fb-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.fb-sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

/* Stories Carousel */
.stories-container {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}
.stories-container::-webkit-scrollbar {
  height: 6px;
}
.stories-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.story-card {
  width: 110px;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}
.story-card:hover {
  transform: scale(1.02);
}
.story-card:hover .story-bg {
  transform: scale(1.05);
}
.story-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.story-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
.story-avatar {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #1877f2;
  z-index: 2;
  object-fit: cover;
}
.story-name {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Story Creator Card */
.story-card.creator {
  background: #1e293b;
  display: flex;
  flex-direction: column;
}
.story-card.creator::after {
  display: none;
}
.story-creator-top {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.story-creator-bottom {
  height: 50px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.story-plus-btn {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1877f2;
  border: 3px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Media Grid Layouts */
.post-media-container {
  border-radius: 12px;
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--border-color);
  background: #020617;
}

.media-grid {
  display: grid;
  gap: 4px;
  width: 100%;
}

.media-grid.grid-1 {
  grid-template-columns: 1fr;
}
.media-grid.grid-1 img, .media-grid.grid-1 video {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
}

.media-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.media-grid.grid-2 img, .media-grid.grid-2 video {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.media-grid.grid-3 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 240px 180px;
}
.media-grid.grid-3 .media-item:nth-child(1) {
  grid-column: span 6;
}
.media-grid.grid-3 .media-item:nth-child(2) {
  grid-column: span 3;
}
.media-grid.grid-3 .media-item:nth-child(3) {
  grid-column: span 3;
}
.media-grid.grid-3 img, .media-grid.grid-3 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-grid.grid-4 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 300px 160px;
}
.media-grid.grid-4 .media-item:nth-child(1) {
  grid-column: span 3;
}
.media-grid.grid-4 .media-item {
  grid-column: span 1;
}
.media-grid.grid-4 img, .media-grid.grid-4 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid Overlay More Photo count */
.media-item.more-overlay {
  position: relative;
}
.media-item.more-overlay::before {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  z-index: 2;
}

.media-item video {
  background: #000;
}

/* Reactions Button & Tooltip */
.reaction-btn-wrapper {
  position: relative;
}

.reactions-tooltip {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  margin-bottom: 8px;
}
.reaction-btn-wrapper:hover .reactions-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.reaction-emoji {
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reaction-emoji:hover {
  transform: scale(1.35) translateY(-5px);
}

.active-react-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

/* Comments section styling */
.post-comment-input-area {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  position: relative;
}
.post-comment-input-area .comment-form-wrapper {
  flex: 1;
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  align-items: center;
  gap: 0.5rem;
}
.post-comment-input-area input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.88rem;
  padding: 0.25rem 0;
}
.comment-icon-btn {
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
}
.comment-icon-btn:hover {
  color: var(--accent-secondary);
}

/* Comment Image Preview Container */
.comment-img-preview-box {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 4px;
  z-index: 10;
}
.comment-img-preview-box img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.comment-img-preview-box .close-preview {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  cursor: pointer;
}

/* Floating Chat Windows */
.floating-chat-container {
  position: fixed;
  bottom: 0;
  right: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  z-index: 999;
  pointer-events: none;
}

.floating-chat-box {
  width: 280px;
  height: 380px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  pointer-events: auto;
}

.floating-chat-box.minimized {
  height: 44px;
}

.floating-chat-header {
  height: 44px;
  padding: 0 0.75rem;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.floating-chat-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.floating-chat-header-title img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.floating-chat-actions {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.floating-chat-actions i:hover {
  color: #fff;
}

.floating-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #0f172a;
}
.floating-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.floating-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

.floating-chat-input-area {
  padding: 0.5rem;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.floating-chat-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.floating-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: #fff;
  outline: none;
}
.floating-chat-input:focus {
  border-color: var(--accent-secondary);
}

.floating-chat-msg-bubble {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
  border-radius: 12px;
}
.floating-chat-msg-bubble.user {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 12px 12px 0 12px;
}
.floating-chat-msg-bubble.target {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px 12px 12px 0;
}
.floating-chat-msg-bubble img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 4px;
}

/* Emoji Picker styling */
.emoji-picker-btn-container {
  position: relative;
}
.emoji-picker-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  grid-template-columns: repeat(5, 30px);
  gap: 4px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  z-index: 100;
  margin-bottom: 8px;
}
.emoji-picker-tooltip span {
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
}
.emoji-picker-tooltip span:hover {
  background: rgba(255,255,255,0.08);
}

/* ====================================================
   DESKTOP LAYOUT SYSTEM
   ==================================================== */

.sys-user-role-badge {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}
.sys-user-role-badge.admin {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}
.sys-user-role-badge.host {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}
.sys-user-role-badge.broker {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #67e8f9 !important;
  border: 1px solid rgba(6, 182, 212, 0.25) !important;
}
.sys-user-role-badge.tenant {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.property-status-badge {
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  display: inline-block;
  margin-left: 0.5rem;
  font-weight: 500;
}
.property-status-badge.approved {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--success) !important;
}
.property-status-badge.pending {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--warning) !important;
}

.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-stack img, .avatar-stack .avatar-more {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  object-fit: cover;
  margin-left: -8px;
  position: relative;
}
.avatar-stack img:nth-child(1) { z-index: 5; margin-left: 0; }
.avatar-stack img:nth-child(2) { z-index: 4; }
.avatar-stack img:nth-child(3) { z-index: 3; }
.avatar-stack img:nth-child(4) { z-index: 2; }
.avatar-stack img:nth-child(5) { z-index: 1; }
.avatar-stack .avatar-more {
  z-index: 0;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  color: #fff;
}

.index-container {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.profile-layout, .group-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 160px);
  overflow: hidden;
  margin-top: 0.5rem;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  height: 100%;
  overflow: hidden;
}

.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ====================================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ==================================================== */

@media (max-width: 768px) {
  /* Navigation Header Compact */
  header {
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
  }
  header nav {
    gap: 0.5rem !important;
    justify-content: center !important;
  }
  header nav a {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.82rem !important;
  }
  
  /* Main Container padding */
  main {
    padding: 0.75rem !important;
  }

  /* Index / Feed layout */
  .index-container {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .index-container .sidebar-left,
  .index-container .sidebar-right {
    display: none !important;
  }
  .feed-section {
    max-width: 100% !important;
  }

  /* Profile layout */
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Center profile header info on mobile */
  .profile-container > .glass > div:nth-child(2) {
    justify-content: center !important;
    text-align: center !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 1rem !important;
  }
  .profile-container > .glass .profile-header-info {
    flex-direction: column !important;
    align-items: center !important;
    margin-top: -70px !important;
    gap: 0.75rem !important;
  }
  .profile-container > .glass .profile-name-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 0.25rem !important;
  }
  .profile-container > .glass .profile-action-buttons {
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* Group layout */
  .group-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Center group banner & action bar on mobile */
  .group-container > .glass > div:first-child {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    height: auto !important;
    padding: 1.5rem 1rem !important;
  }
  .group-container > .glass > div:first-child > div {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .group-container > .glass > div:nth-child(2) {
    flex-direction: column !important;
    align-items: center !important;
    padding: 1rem !important;
    gap: 0.75rem !important;
    justify-content: center !important;
  }

  /* Chat Messenger Mobile Flow */
  .chat-container {
    grid-template-columns: 1fr !important;
    height: calc(100vh - 140px) !important;
    margin-top: 0 !important;
  }
  .chat-sidebar {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
  }
  .chat-sidebar.mobile-active {
    display: flex !important;
  }
  .chat-window {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
  }
  .chat-window.mobile-active {
    display: flex !important;
  }
  .chat-window .mobile-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Stories Carousel styles on mobile */
  .story-card {
    width: 95px !important;
    height: 160px !important;
  }

  /* Post Media grid adjustments on mobile */
  .media-grid.grid-2 img, .media-grid.grid-2 video {
    height: 180px !important;
  }
  .media-grid.grid-3 {
    grid-template-rows: 160px 120px !important;
  }
  .media-grid.grid-4 {
    grid-template-rows: 180px 100px !important;
  }
}

