/**
 * FaithSpace Web Application Theme
 * Modern Social Network Layout with Mobile-First Responsiveness
 */

:root {
    --fs-primary: #048C3F;
    --fs-primary-dark: #037033;
    --fs-primary-light: #eaf7ee;
    --fs-accent-blue: #0284C7;
    --fs-accent-blue-light: #e0f2fe;
    --fs-accent-red: #EF4444;
    --fs-accent-yellow: #F59E0B;
    --fs-accent-green: #10B981;
    
    --fs-bg: #eff2f6;
    --fs-card-bg: #ffffff;
    --fs-text-main: #111827;
    --fs-text-body: #374151;
    --fs-text-muted: #6b7280;
    --fs-text-light: #9ca3af;
    --fs-border: #e5e7eb;
    --fs-border-subtle: #f3f4f6;
    
    --fs-radius-sm: 8px;
    --fs-radius-md: 12px;
    --fs-radius-lg: 16px;
    --fs-radius-full: 9999px;
    
    --fs-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --fs-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06);
    --fs-font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--fs-bg);
    color: var(--fs-text-body);
    font-family: var(--fs-font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--fs-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
}

.top-navbar .navbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.brand-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-icon {
    height: 36px;
    width: auto;
    display: block;
}

.top-search-wrap {
    position: relative;
    width: 240px;
}

.top-search-wrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fs-text-light);
    font-size: 0.9rem;
    pointer-events: none;
}

.top-search-input {
    width: 100%;
    background: #f0f2f5;
    border: 1px solid transparent;
    border-radius: var(--fs-radius-sm);
    padding: 8px 14px 8px 38px;
    font-size: 0.9rem;
    color: var(--fs-text-main);
    outline: none;
    transition: all 0.2s ease;
}

.top-search-input:focus {
    background: #ffffff;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(4, 140, 63, 0.12);
}

.nav-center-menu {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-menu-link {
    color: var(--fs-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--fs-radius-sm);
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-menu-link:hover,
.nav-menu-link.active {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
}

.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--fs-radius-md);
    background: #eff2f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fs-text-muted);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.nav-icon-btn:hover {
    background: #e2e8f0;
    color: var(--fs-text-main);
}

.nav-icon-btn .badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: var(--fs-accent-red);
    border-radius: 50%;
    border: 2px solid #fff;
}

.user-profile-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   Avatar Utilities (NO Fake Images!)
   ========================================================================== */
.user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50%;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.user-avatar-initials.avatar-xs { width: 28px; height: 28px; font-size: 0.72rem; }
.user-avatar-initials.avatar-sm { width: 34px; height: 34px; font-size: 0.8rem; }
.user-avatar-initials.avatar-md { width: 42px; height: 42px; font-size: 0.95rem; }
.user-avatar-initials.avatar-lg { width: 72px; height: 72px; font-size: 1.45rem; border: 3px solid #ffffff; }

.user-avatar-img {
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.user-avatar-img.avatar-xs { width: 28px; height: 28px; }
.user-avatar-img.avatar-sm { width: 34px; height: 34px; }
.user-avatar-img.avatar-md { width: 42px; height: 42px; }
.user-avatar-img.avatar-lg { width: 72px; height: 72px; border: 3px solid #ffffff; }

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.main-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

.app-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.ui-card {
    background: var(--fs-card-bg);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-md);
    box-shadow: var(--fs-shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}

/* ==========================================================================
   Left Sidebar: Profile & Nav
   ========================================================================== */
.profile-card {
    text-align: center;
}

.profile-card-cover {
    height: 70px;
    width: 100%;
    background: linear-gradient(135deg, #048C3F, #10B981, #0284C7);
    position: relative;
    overflow: hidden;
}

.profile-avatar-wrap {
    margin-top: -36px;
    position: relative;
    display: inline-block;
}

.profile-card-body {
    padding: 10px 16px 16px;
}

.profile-user-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fs-text-main);
    margin-bottom: 2px;
}

.profile-user-title {
    font-size: 0.82rem;
    color: var(--fs-text-muted);
    margin-bottom: 10px;
}

.profile-user-bio {
    font-size: 0.84rem;
    color: var(--fs-text-body);
    line-height: 1.45;
    margin-bottom: 14px;
    padding: 0 4px;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 12px 0;
    border-top: 1px solid var(--fs-border-subtle);
    border-bottom: 1px solid var(--fs-border-subtle);
}

.stat-item-col {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--fs-text-main);
}

.stat-label {
    font-size: 0.74rem;
    color: var(--fs-text-muted);
}

/* Left Navigation Menu Card */
.menu-card-body {
    padding: 10px;
}

.menu-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-nav-item {
    cursor: pointer;
}

.menu-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--fs-radius-sm);
    color: var(--fs-text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.menu-nav-item a:hover {
    background: var(--fs-border-subtle);
    color: var(--fs-text-main);
}

.menu-nav-item.active a {
    background: var(--fs-primary-light);
    color: var(--fs-primary);
}

.menu-nav-item a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* ==========================================================================
   Center Column: Stories, Composer, Feed
   ========================================================================== */
.stories-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.stories-scroll-container::-webkit-scrollbar {
    display: none;
}

.story-card-item {
    width: 108px;
    height: 165px;
    flex-shrink: 0;
    border-radius: var(--fs-radius-md);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--fs-shadow-card);
    transition: transform 0.2s ease;
}

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

.story-add-card {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

.story-add-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eff2f6;
    color: var(--fs-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.story-add-card:hover .story-add-icon {
    background: var(--fs-primary);
    color: #fff;
}

.story-add-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fs-text-main);
    line-height: 1.25;
}

.story-user-card {
    background-size: cover;
    background-position: center;
}

.story-user-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.78) 100%);
}

.story-author-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.story-avatar-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.story-snippet-text {
    position: absolute;
    top: 38px;
    left: 8px;
    right: 8px;
    bottom: 26px;
    z-index: 2;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Composer Card */
.composer-card {
    padding: 18px 20px 14px;
}

.composer-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.composer-input-trigger {
    flex-grow: 1;
    background: #f9fafb;
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-sm);
    padding: 10px 16px;
    color: var(--fs-text-muted);
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.composer-input-trigger:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.composer-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--fs-border-subtle);
    flex-wrap: wrap;
    gap: 8px;
}

.composer-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid transparent;
    padding: 7px 14px;
    border-radius: var(--fs-radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--fs-text-body);
    cursor: pointer;
    transition: all 0.15s ease;
}

.composer-action-btn:hover {
    background: #f3f4f6;
}

.composer-action-btn i.icon-photo { color: var(--fs-accent-green); }
.composer-action-btn i.icon-video { color: var(--fs-accent-blue); }
.composer-action-btn i.icon-event { color: var(--fs-accent-red); }

/* ==========================================================================
   Post Cards
   ========================================================================== */
.post-card {
    padding: 20px;
}

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

.post-author-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author-name {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--fs-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-time-stamp {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--fs-text-light);
}

.post-author-subtitle {
    font-size: 0.8rem;
    color: var(--fs-text-muted);
}

.post-options-btn {
    background: none;
    border: none;
    color: var(--fs-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.post-content-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--fs-text-main);
    margin-bottom: 12px;
}

.post-media-container {
    border-radius: var(--fs-radius-sm);
    overflow: hidden;
    margin-top: 10px;
    background: #000;
}

.post-media-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.post-engagement-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--fs-border-subtle);
}

.post-action-group {
    display: flex;
    align-items: center;
    gap: 18px;
}

.post-action-btn {
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fs-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
}

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

.post-action-btn.liked {
    color: var(--fs-accent-red);
}

.post-share-icon-btn {
    background: none;
    border: none;
    color: var(--fs-text-muted);
    font-size: 0.95rem;
    cursor: pointer;
}

/* Comments Drawer */
.comments-drawer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fs-border-subtle);
}

.comment-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.comment-input-field {
    flex-grow: 1;
    background: #f9fafb;
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-full);
    padding: 8px 16px;
    font-size: 0.88rem;
    color: var(--fs-text-main);
    outline: none;
}

.comment-input-field:focus {
    background: #ffffff;
    border-color: var(--fs-primary);
}

.comment-send-btn {
    background: var(--fs-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--fs-radius-full);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.comment-send-btn:hover {
    background: var(--fs-primary-dark);
}

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

.comment-single-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-bubble {
    background: #f3f4f6;
    border-radius: var(--fs-radius-md);
    padding: 8px 14px;
    max-width: 90%;
}

.comment-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fs-text-main);
    margin-bottom: 2px;
}

.comment-text-content {
    font-size: 0.85rem;
    color: var(--fs-text-body);
}

/* ==========================================================================
   Feature Cards (Communities, Devotionals, Prayers, Testimonies)
   ========================================================================== */
.feature-card {
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    box-shadow: var(--fs-shadow-hover);
}

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

.feature-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--fs-radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--fs-primary-light);
    color: var(--fs-primary);
}

.feature-tag-badge.urgent {
    background: #fee2e2;
    color: #ef4444;
}

.feature-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fs-text-main);
    margin-bottom: 6px;
}

.feature-card-body {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--fs-text-body);
    margin-bottom: 14px;
}

.feature-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--fs-border-subtle);
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   Right Sidebar: Who to Follow & Daily Word
   ========================================================================== */
.widget-card {
    padding: 20px;
}

.widget-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fs-text-main);
    margin-bottom: 16px;
}

.follow-items-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.follow-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

.follow-user-info {
    min-width: 0;
}

.follow-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fs-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-subtitle {
    font-size: 0.78rem;
    color: var(--fs-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--fs-accent-blue-light);
    color: var(--fs-accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.follow-action-btn:hover {
    background: #bae6fd;
}

.follow-action-btn.following {
    background: var(--fs-accent-blue);
    color: #ffffff;
}

.view-more-btn {
    width: 100%;
    padding: 8px 14px;
    background: var(--fs-accent-blue-light);
    color: var(--fs-accent-blue);
    border: none;
    border-radius: var(--fs-radius-sm);
    font-weight: 600;
    font-size: 0.86rem;
    margin-top: 16px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
}

.view-more-btn:hover {
    background: #bae6fd;
}

/* Daily Word Widget */
.news-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item-row {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.news-item-headline {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fs-text-main);
    line-height: 1.35;
    margin-bottom: 2px;
    transition: color 0.15s ease;
}

.news-item-row:hover .news-item-headline {
    color: var(--fs-primary);
}

.news-item-time {
    font-size: 0.76rem;
    color: var(--fs-text-light);
}

/* Floating Chat Action Button */
.floating-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--fs-radius-md);
    background: var(--fs-accent-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
    z-index: 999;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.floating-chat-bubble:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   Full Authentication Barrier View (Clean Login & Register Screen)
   ========================================================================== */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #eff2f6 0%, #e2e8f0 100%);
}

.auth-card {
    background: #ffffff;
    border-radius: var(--fs-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    border: 1px solid var(--fs-border);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-logo {
    height: 44px;
    width: auto;
    margin-bottom: 12px;
}

.auth-tagline {
    font-size: 0.92rem;
    color: var(--fs-text-muted);
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: var(--fs-radius-sm);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--fs-text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: var(--fs-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auth-field-group {
    margin-bottom: 16px;
}

.auth-field-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--fs-text-main);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    color: var(--fs-text-main);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(4, 140, 63, 0.15);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--fs-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--fs-radius-sm);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: var(--fs-primary-dark);
}

.auth-error-box {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--fs-radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: none;
}

/* ==========================================================================
   Mobile Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid var(--fs-border);
    z-index: 1000;
    padding: 0 8px;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--fs-text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--fs-radius-sm);
    cursor: pointer;
    gap: 4px;
    transition: color 0.15s ease;
}

.mobile-nav-item i {
    font-size: 1.15rem;
}

.mobile-nav-item.active {
    color: var(--fs-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
    .app-grid {
        grid-template-columns: 260px minmax(0, 1fr);
    }
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 860px) {
    .top-search-wrap {
        display: none;
    }
    .nav-center-menu {
        display: none;
    }
    .main-wrapper {
        padding: 14px 10px 80px;
    }
    .app-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .left-sidebar {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .floating-chat-bubble {
        bottom: 74px;
        right: 16px;
    }
    .composer-card {
        padding: 14px;
    }
    .post-card {
        padding: 16px;
    }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--fs-radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fs-border);
}

.modal-box-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fs-text-main);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--fs-text-muted);
    cursor: pointer;
}

.modal-box-body {
    padding: 20px;
}

.modal-box-footer {
    padding: 14px 20px;
    background: #f9fafb;
    border-top: 1px solid var(--fs-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.modal-composer-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--fs-text-main);
    resize: vertical;
    outline: none;
}

.modal-composer-textarea:focus {
    border-color: var(--fs-primary);
}

.feed-spinner {
    text-align: center;
    padding: 30px;
    color: var(--fs-primary);
    font-size: 1.4rem;
}

/* ==========================================================================
   User Dropdown Menu (Hover & Click Support)
   ========================================================================== */
.dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    background: #ffffff;
    border-radius: var(--fs-radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--fs-border);
    z-index: 1500;
    overflow: visible;
    display: none;
}

/* Invisible bridge so mouse moving from button to dropdown doesn't lose hover */
.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

/* Open on hover or active class */
.dropdown-wrapper:hover .user-dropdown-menu,
.user-dropdown-menu.active {
    display: block;
    animation: fadeInDown 0.15s ease;
}

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

.dropdown-user-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--fs-border);
    background: #f8fafc;
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--fs-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-handle {
    font-size: 0.8rem;
    color: var(--fs-text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--fs-text-main);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--fs-text-muted);
    font-size: 0.95rem;
}

.dropdown-item.danger {
    color: #ef4444;
    border-top: 1px solid var(--fs-border);
}

.dropdown-item.danger i {
    color: #ef4444;
}

/* ==========================================================================
   Mobile Navigation Drawer
   ========================================================================== */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: none;
}

.mobile-drawer-overlay.active {
    display: flex;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    background: #ffffff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 2501;
    overflow-y: auto;
    animation: drawerSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-drawer-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--fs-border);
}

.mobile-drawer-user {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--fs-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-drawer-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    flex: 1;
}

.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: var(--fs-text-main);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mobile-drawer-item:hover,
.mobile-drawer-item.active {
    background: var(--fs-primary-light);
    color: var(--fs-primary);
}

.mobile-drawer-item i {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--fs-primary);
}

.mobile-drawer-divider {
    height: 1px;
    background: var(--fs-border);
    margin: 8px 0;
}

/* ==========================================================================
   Settings Switch & Section Styling
   ========================================================================== */
.settings-section-card {
    background: var(--fs-card-bg);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--fs-text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.settings-toggle-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fs-text-main);
    margin-bottom: 2px;
}

.settings-toggle-info p {
    font-size: 0.82rem;
    color: var(--fs-text-muted);
}

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

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

.slider-round {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: 0.2s;
    border-radius: 24px;
}

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

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

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

