/* assets/css/style.css - Official seenfil Dark Glass Theme */
@import url('./fonts.css');
@import url('./feather.css');

:root {
    --bg-body: #0d121d;
    --bg-header: rgba(14, 20, 32, 0.94);
    --bg-card: rgba(20, 28, 45, 0.65);
    --bg-sidebar: rgba(15, 22, 36, 0.85);
    --bg-input: rgba(25, 34, 54, 0.85);
    --bg-hover: rgba(59, 130, 246, 0.15);
    
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(59, 130, 246, 0.4);

    --primary-blue: #38bdf8;
    --primary-neon: #2563eb;
    --accent-green: #22c55e;
    --accent-green-bg: rgba(34, 197, 94, 0.55);

    --text-white: #ffffff;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-logo: 'Fredoka', 'Inter', sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto;
}

body {
    background-color: var(--bg-body);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
    touch-action: pan-y;
}

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

/* ==========================================================
   TOP HEADER NAVBAR
   ========================================================== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    font-size: 26px;
    color: var(--primary-blue);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-family: var(--font-logo);
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.header-search-box {
    position: relative;
    width: 380px;
    max-width: 100%;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap i {
    position: absolute;
    left: 16px;
    font-size: 16px;
    color: var(--text-dim);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    padding: 0 20px 0 46px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
}

.search-input::placeholder {
    color: var(--text-dim);
    font-weight: 500;
}

.search-input:focus {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(30, 42, 66, 0.95);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s, transform 0.2s;
}

.header-avatar:hover {
    border-color: var(--primary-blue);
    transform: scale(1.04);
}

.header-login-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.header-login-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* ==========================================================
   APP 3-COLUMN LAYOUT
   ========================================================== */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 86px 20px 40px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ==========================================================
   LEFT SIDEBAR
   ========================================================== */
.left-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.left-sidebar::-webkit-scrollbar {
    display: none;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-caption {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    padding: 6px 12px;
    margin-bottom: 2px;
}

.nav-glass-link {
    background: rgba(20, 28, 45, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-glass-link i {
    font-size: 19px;
    color: #ffffff;
    transition: transform 0.2s ease;
    width: 22px;
    text-align: center;
}

.nav-glass-link:hover {
    background: var(--bg-hover);
    border-color: var(--border-glow);
    transform: translateX(6px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.nav-glass-link:hover i {
    transform: scale(1.15);
    color: var(--primary-blue);
}

.nav-glass-link.active {
    background: rgba(59, 130, 246, 0.25);
    border-left: 4px solid #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}

.nav-glass-link::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.nav-glass-link:hover::before {
    left: 100%;
}

.user-quick-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.user-quick-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.user-quick-details {
    flex: 1;
    overflow: hidden;
}

.user-quick-name {
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-quick-handle {
    font-size: 12px;
    color: var(--text-dim);
}

/* ==========================================================
   CENTER MAIN CONTENT
   ========================================================== */
.main-feed-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ==========================================================
   STORIES / RECOMMENDATION USER CAROUSEL
   ========================================================== */
.stories-carousel-wrap {
    overflow: hidden;
    width: 100%;
}

.stories-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 2px 16px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.user-hover {
    flex: 0 0 142px;
    width: 142px;
    background: rgba(20, 28, 45, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 10px 14px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.user-hover:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45),
                0 0 0 3px rgba(59, 130, 246, 0.25);
}

.user-hover.active {
    border: 2px solid #2563eb;
    box-shadow: 0 0 22px rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.15);
}

.user-hover::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.user-hover:hover::before {
    left: 100%;
}

.user-card-photo {
    width: 100%;
    height: 114px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 8px;
    display: block;
    background: #111827;
}

.user-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-btn {
    display: inline-block;
    width: 90%;
    padding: 7px 0;
    background: rgba(34, 197, 94, 0.85);
    border: 1px solid rgba(34, 197, 94, 0.9);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
}

.follow-btn:hover {
    background: #16a34a !important;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.55);
}

.follow-btn.following {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-light);
}

/* Profile Friend Buttons */
.friend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: none;
    outline: none;
}

.friend-btn-add {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.friend-btn-add:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.friend-btn-sent {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.friend-btn-sent:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.friend-btn-received {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.friend-btn-received:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

.friend-btn-friends {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.friend-btn-friends:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.message-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 700;
}

/* ==========================================================
   GLASS CARDS (Main container)
   ========================================================== */
.glass-card-main {
    background: #141c2d;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Welcome Announcement Card */
.welcome-banner-card {
    padding: 22px 26px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.8;
}

.welcome-banner-card p {
    margin-bottom: 8px;
}

.welcome-banner-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   RIGHT SIDEBAR ("My communities")
   ========================================================== */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.communities-widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.communities-widget-see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    transition: color 0.2s;
}

.communities-widget-see-all:hover {
    color: #ffffff;
    text-decoration: underline;
}

.community-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.community-list::-webkit-scrollbar {
    width: 6px;
}

.community-list::-webkit-scrollbar-track {
    background: transparent;
}

.community-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.community-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.community-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.1s ease;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.community-row-item:focus,
.community-row-item:active {
    outline: none !important;
    box-shadow: none !important;
}

.community-row-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.community-row-item:active {
    background: rgba(255, 255, 255, 0.12);
}

.community-row-item.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}

.community-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.community-thumb {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.community-name-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.1s ease;
}

.community-row-item:hover .community-name-text {
    color: #ffffff;
}

.community-row-item.active .community-name-text {
    color: var(--primary-blue);
}

.community-arrow-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    transition: background 0.1s ease, color 0.1s ease;
    flex-shrink: 0;
    margin-left: 8px;
    outline: none !important;
}

.community-row-item:hover .community-arrow-btn,
.community-row-item.active .community-arrow-btn {
    background: var(--primary-blue);
    color: #0b121e;
}

/* ==========================================================
   POSTS STREAM & CARDS (Native smooth 60fps acceleration)
   ========================================================== */
.post-item-card {
    padding: 20px 22px;
    margin-bottom: 18px;
    overflow: visible;
    background: #141c2d;
    border: 1px solid var(--border-glass);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    content-visibility: auto;
    contain-intrinsic-size: auto 450px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
}

.post-item-card:has(video) {
    content-visibility: visible !important;
}

.post-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
}

/* Post Top-Right Context Menu */
.post-menu-wrap {
    position: relative;
    margin-left: auto;
    align-self: flex-start;
}

.post-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 19px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.05);
}

.post-menu-btn:active {
    transform: scale(0.96);
}

.post-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 170px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 120;
    display: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-menu-dropdown.show {
    display: block;
}

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

.post-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.post-menu-item.danger {
    color: #fca5a5;
}

.post-menu-item.danger i {
    color: #ef4444;
    font-size: 15px;
}

.post-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #ffffff;
}

.post-menu-item.danger:hover i {
    color: #fca5a5;
}

.post-author-avatar {
    width: 46px;
    height: 46px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border-glass);
    background: #1e293b;
    display: block;
    flex-shrink: 0;
}

.post-head-info {
    flex: 1;
}

.post-author-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta-sub {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.post-community-badge {
    color: var(--primary-blue);
    font-weight: 600;
}

.post-body-text {
    font-size: 14.5px;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 14px;
    word-break: break-word;
}

.post-media-container {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #000000;
    max-height: 520px;
}

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

.post-media-container video {
    width: 100%;
    max-height: 520px;
    display: block;
}

.post-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.post-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.post-action-btn.liked {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
}

.post-views-count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    transition: all 0.25s ease;
}

.post-views-count:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.post-views-count i {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.post-views-count:hover i {
    color: var(--primary-blue);
}

@keyframes viewPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); color: #38bdf8; }
    100% { transform: scale(1); }
}

.view-pop {
    animation: viewPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

/* ==========================================================
   POST COMPOSER
   ========================================================== */
.composer-card {
    padding: 18px 20px;
}

.composer-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.composer-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 14.5px;
    resize: none;
    min-height: 60px;
    outline: none;
}

.composer-textarea::placeholder {
    color: var(--text-dim);
}

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

/* ==========================================================
   COMMUNITY SELECTION (sign-up-2)
   ========================================================== */
.glass-card-community {
    background: rgba(20, 28, 45, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.glass-card-community:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.glass-card-community.selected {
    border: 2px solid #22c55e;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.35);
}

.glass-cover-community {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    position: relative;
}

.glass-cover-community::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
}

.glass-avatar-community {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    top: -32px;
    left: 20px;
    object-fit: cover;
    z-index: 2;
}

.community-checkbox-wrap {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
}

.community-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.glass-card-community.selected .community-check-icon {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

/* ==========================================================
   RESPONSIVE DESIGN
   ========================================================== */
@media (max-width: 1120px) {
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .left-sidebar {
        display: none;
    }
    .header-search-box {
        display: none;
    }
    .top-navbar {
        padding: 0 16px;
    }
    .app-container {
        padding-top: 76px;
    }
}

/* ==========================================================
   INTERACTIVE PHOTO SOCIAL MODAL (Likes, Comments & Emojis)
   ========================================================== */
.photo-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.photo-modal-backdrop.active {
    display: flex !important;
    opacity: 1;
}

.photo-modal-container {
    display: flex;
    width: 94vw;
    max-width: 1220px;
    height: 88vh;
    max-height: 880px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85);
    position: relative;
    animation: zoomModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomModalIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
}

.photo-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Left Photo Area */
.photo-stage-area {
    flex: 1 1 0%;
    background: #020617;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
}

.photo-img-wrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.photo-modal-img {
    max-width: 100%;
    max-height: calc(88vh - 40px);
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
    transition: opacity 0.2s ease;
}

.photo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-nav-prev {
    left: 18px;
}

.photo-nav-next {
    right: 18px;
}

.photo-nav-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: translateY(-50%) scale(1.1);
}

.photo-modal-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 14px;
    border-radius: 20px;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.photo-modal-spinner {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spinModal 0.8s linear infinite;
}

@keyframes spinModal {
    to { transform: rotate(360deg); }
}

/* Right Social Sidebar */
.photo-social-sidebar {
    width: 410px;
    background: #0f172a;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.photo-author-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.photo-author-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.photo-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(56, 189, 248, 0.4);
}

.photo-author-info {
    display: flex;
    flex-direction: column;
}

.photo-author-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.photo-author-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Comments Stream */
.photo-comments-stream {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.photo-comments-stream::-webkit-scrollbar {
    width: 5px;
}

.photo-comments-stream::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.photo-comments-loading,
.photo-empty-comments {
    margin: auto;
    text-align: center;
    color: var(--text-dim);
    font-size: 13.5px;
    padding: 30px 10px;
}

.photo-spinner-inline {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spinModal 0.8s linear infinite;
    margin: 0 auto 10px;
}

.photo-comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: fadeInComment 0.2s ease;
}

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

.photo-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.photo-comment-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 9px 13px;
    flex: 1;
}

.photo-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.photo-comment-user {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.photo-comment-user:hover {
    color: var(--primary-blue);
}

.photo-comment-time {
    font-size: 11px;
    color: var(--text-dim);
}

.photo-comment-text {
    font-size: 13.5px;
    color: #e2e8f0;
    line-height: 1.45;
    word-break: break-word;
}

/* Actions & Reactions Panel */
.photo-actions-panel {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.015);
}

.photo-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #e2e8f0;
    padding: 2px 0;
    outline: none;
}

.photo-like-btn .heart-icon {
    stroke: #94a3b8;
    fill: transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-like-btn:hover .heart-icon {
    transform: scale(1.15);
    stroke: #ef4444;
}

.photo-like-btn.liked .heart-icon {
    stroke: #ef4444;
    fill: #ef4444;
}

.photo-like-btn.pulse .heart-icon {
    animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.photo-likes-counter {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
}

.photo-likes-label {
    font-size: 13px;
    color: var(--text-dim);
}

/* Quick Emojis Bar (Смайлики быстрых реакций) */
.photo-quick-emojis {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 4px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.photo-quick-emojis::-webkit-scrollbar {
    display: none;
}

.quick-emoji-item {
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px 5px;
    border-radius: 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.quick-emoji-item:hover {
    transform: scale(1.3) translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.quick-emoji-item:active {
    transform: scale(1.1);
}

/* Comment Input Area */
.photo-comment-input-area {
    padding: 12px 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    background: #0f172a;
}

.photo-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.photo-emoji-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.photo-emoji-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.08);
}

.photo-comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
}

.photo-comment-input::placeholder {
    color: var(--text-dim);
}

.photo-comment-input:focus {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.photo-comment-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.photo-comment-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
}

.photo-comment-send-btn:active {
    transform: scale(0.96);
}

.photo-comment-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* EMOJI POPOVER PICKER (Выбор смайликов) */
.seenfil-emoji-popover {
    position: absolute;
    bottom: 68px;
    left: 14px;
    right: 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emoji-picker-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.emoji-picker-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.emoji-picker-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.emoji-picker-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}

.emoji-picker-tabs::-webkit-scrollbar {
    display: none;
}

.emoji-tab-btn {
    padding: 7px 11px;
    background: none;
    border: none;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
}

.emoji-tab-btn:hover {
    color: #ffffff;
}

.emoji-tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.emoji-grid-body {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 10px;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.emoji-cell {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    padding: 6px 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-cell:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.25);
}

.emoji-cell:active {
    transform: scale(1.05);
}

/* Modal Responsive */
@media (max-width: 900px) {
    .photo-modal-container {
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .photo-stage-area {
        height: 52vh;
        flex: none;
    }
    .photo-modal-img {
        max-height: calc(52vh - 30px);
    }
    .photo-social-sidebar {
        width: 100%;
        flex: 1 1 0%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================================
   HEADER BADGES & LIVE TOAST NOTIFICATIONS
   ========================================================== */
.header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    animation: badgePulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePulse {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.badge-red {
    background: #ef4444;
}

.badge-blue {
    background: #0284c7;
}

.live-toast-container {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: 100%;
}

.live-toast-item {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    position: relative;
    cursor: pointer;
    animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.live-toast-item:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.live-toast-item.fading {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.live-toast-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.live-toast-body {
    flex: 1;
    overflow: hidden;
}

.live-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-toast-text {
    font-size: 12.5px;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s ease;
}

.live-toast-close:hover {
    color: #ffffff;
}

/* ==========================================================
   COMMUNITY HERO HEADER & 18+ RESTRICTIONS
   ========================================================== */
.community-hero-block {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 22px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.community-hero-cover {
    width: 100%;
    height: 150px;
    position: relative;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
}

.community-hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.75);
}

.community-hero-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.community-hero-content {
    position: relative;
    padding: 0 24px 22px;
}

.community-hero-top-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -50px;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.community-hero-avatar-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: #0f172a;
    border: 4px solid #111827;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    flex-shrink: 0;
}

.community-hero-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-18-avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.community-action-btn {
    border: none;
    cursor: pointer;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.community-action-btn.not-joined {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
}

.community-action-btn.not-joined:hover {
    background: linear-gradient(135deg, #0369a1, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

.community-action-btn.joined {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.community-action-btn.joined .btn-text-hover {
    display: none;
}

.community-action-btn.joined:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.community-action-btn.joined:hover .btn-text-normal {
    display: none;
}

.community-action-btn.joined:hover .btn-text-hover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-18-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    vertical-align: middle;
}

.community-meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.community-meta-row strong {
    color: #ffffff;
}

.community-gatekeeper-card {
    border-radius: 20px;
    padding: 48px 30px;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: radial-gradient(circle at 50% 10%, rgba(239, 68, 68, 0.15), rgba(15, 23, 42, 0.85));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    margin-bottom: 24px;
}

/* Global Floating Scroll To Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), #1d4ed8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.2s ease;
    z-index: 999;
}
.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top-btn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.65);
}
.scroll-to-top-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ==========================================================
   SHARE POST MODAL
   ========================================================== */
.share-modal-card {
    position: relative;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.share-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

@media (max-width: 480px) {
    .share-social-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

.share-social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 12px;
    font-weight: 600;
}

.share-social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.share-social-btn:active {
    transform: translateY(-1px) scale(0.97);
}

.share-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.share-social-btn:hover .share-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* ==========================================================
   MULTI-PHOTO COLLAGES & MEDIA GRID
   ========================================================== */
.post-media-gallery {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #000000;
    position: relative;
}

/* 1 Photo */
.post-media-gallery.gallery-count-1 .gallery-item img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.post-media-gallery.gallery-count-1 .gallery-item img:hover {
    opacity: 0.94;
}

/* 2 Photos: side by side */
.post-media-gallery.gallery-count-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    height: 340px;
}
.post-media-gallery.gallery-count-2 .gallery-item {
    position: relative;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}
.post-media-gallery.gallery-count-2 .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.post-media-gallery.gallery-count-2 .gallery-item:hover img {
    transform: scale(1.02);
}

/* 3 Photos: 1 left (2 rows), 2 right (1 row each) */
.post-media-gallery.gallery-count-3 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    height: 380px;
}
.post-media-gallery.gallery-count-3 .gallery-item:first-child {
    grid-row: span 2;
}
.post-media-gallery.gallery-count-3 .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.post-media-gallery.gallery-count-3 .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.post-media-gallery.gallery-count-3 .gallery-item:hover img {
    transform: scale(1.02);
}

/* 4 Photos: 2x2 grid */
.post-media-gallery.gallery-count-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    height: 380px;
}
.post-media-gallery.gallery-count-4 .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.post-media-gallery.gallery-count-4 .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.post-media-gallery.gallery-count-4 .gallery-item:hover img {
    transform: scale(1.02);
}

/* 5+ Photos: 2x2 with overlay on the 4th item */
.post-media-gallery.gallery-count-multi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    height: 380px;
}
.post-media-gallery.gallery-count-multi .gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.post-media-gallery.gallery-count-multi .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.post-media-gallery.gallery-count-multi .gallery-item:hover img {
    transform: scale(1.02);
}
.post-media-gallery .gallery-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}
.post-media-gallery .gallery-item:hover .gallery-more-overlay {
    background: rgba(15, 23, 42, 0.82);
}

/* ==========================================================
   FORMATTED POST CONTENT (Code, Markdown, Emojis)
   ========================================================== */
.post-body-text .post-code-block {
    margin: 12px 0;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
}
.post-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.post-code-header .post-code-copy-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.post-code-header .post-code-copy-btn:hover {
    background: rgba(56, 189, 248, 0.15);
}
.post-code-pre {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: 'Consolas', 'Fira Code', 'Monaco', monospace;
    font-size: 13.5px;
    line-height: 1.55;
    color: #38bdf8;
    background: transparent;
    white-space: pre;
}
.post-inline-code {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 13px;
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.post-blockquote {
    margin: 10px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--primary-blue);
    background: rgba(56, 189, 248, 0.05);
    border-radius: 0 8px 8px 0;
    color: #cbd5e1;
    font-style: italic;
}
.post-link {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}
.post-link:hover {
    color: #7dd3fc;
}

/* ==========================================================
   FEED COMPOSER TRIGGER BOX
   ========================================================== */
.feed-composer-box {
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.composer-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.composer-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border-glass);
}
.composer-fake-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}
.composer-fake-input:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.composer-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}
.composer-action-pill {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
}
.composer-action-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ==========================================================
   RICH CREATE POST MODAL & EDITOR
   ========================================================== */
#createPostModal {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

#createPostModal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.create-post-modal-content {
    max-width: 620px;
    width: 94%;
    padding: 24px;
    border-radius: 24px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.22s ease;
}
.create-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.create-post-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.composer-group-select-wrap {
    margin-bottom: 16px;
}
.composer-group-select-wrap label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.composer-group-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}
.composer-group-select:focus {
    border-color: var(--primary-blue);
}

.composer-title-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 14.5px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.composer-title-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Toolbar */
.composer-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    flex-wrap: wrap;
}
.composer-tool-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease;
}
.composer-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.composer-tool-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 4px;
}

/* Textarea & Preview tabs */
.composer-tabs-wrap {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.composer-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.composer-tab-btn.active {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
}
.composer-textarea {
    width: 100%;
    min-height: 130px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 12px 12px;
    color: #ffffff;
    font-size: 14.5px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}
.composer-textarea:focus {
    border-color: rgba(56, 189, 248, 0.4);
}
.composer-preview-box {
    min-height: 130px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 12px 12px;
    color: #e2e8f0;
    font-size: 14.5px;
    line-height: 1.6;
    display: none;
    box-sizing: border-box;
}

/* Attachments preview row in modal */
.composer-attachments-area {
    margin-top: 14px;
}
.composer-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.composer-thumb-item {
    position: relative;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000;
}
.composer-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.composer-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s ease;
}
.composer-thumb-remove:hover {
    background: #ef4444;
}

.composer-video-preview {
    margin-top: 10px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    max-height: 220px;
}
.composer-video-preview video {
    width: 100%;
    max-height: 220px;
    display: block;
}

/* Upload progress bar */
.composer-upload-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}
.composer-upload-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.2s ease;
}

/* Bottom Bar */
.composer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 12px;
}
.composer-add-media-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.composer-btn-attach {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.composer-btn-attach:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Accessibility & Semantic SEO Helpers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Location Autocomplete Dropdown */
.location-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 270px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    z-index: 9999;
    max-height: 290px;
    overflow-y: auto;
    padding: 6px 0;
    backdrop-filter: blur(20px);
}
.location-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.location-autocomplete-item:last-child {
    border-bottom: none;
}
.location-autocomplete-item:hover,
.location-autocomplete-item.selected {
    background: rgba(56, 189, 248, 0.14);
}
.location-autocomplete-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.location-autocomplete-emoji {
    font-size: 17px;
    flex-shrink: 0;
    line-height: 1;
}
.location-autocomplete-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.location-autocomplete-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.location-autocomplete-name mark {
    background: transparent;
    color: #38bdf8;
    font-weight: 700;
}
.location-autocomplete-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.location-autocomplete-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    white-space: nowrap;
    flex-shrink: 0;
}
.location-autocomplete-empty {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

/* ========================================================
   Smart Global Search (Elasticsearch-like UX & Aesthetics)
   ======================================================== */

/* Header Search UI Enhancements */
.header-search-spinner {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    pointer-events: none;
}

.header-search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}
.header-search-clear-btn:hover {
    color: #ffffff;
}

/* Header Live Dropdown */
.header-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 440px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
    backdrop-filter: blur(24px);
    padding: 8px 0;
}

.search-dropdown-section {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.search-dropdown-section:last-of-type {
    border-bottom: none;
}

.search-dropdown-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    cursor: pointer;
}
.search-dropdown-item:hover,
.search-dropdown-item.selected {
    background: rgba(56, 189, 248, 0.12);
}

.search-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #1e293b;
}

.search-dropdown-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1e293b;
}

.search-dropdown-info {
    min-width: 0;
    flex: 1;
}

.search-dropdown-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.search-dropdown-post-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.search-dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    background: rgba(56, 189, 248, 0.05);
    transition: background 0.15s ease;
}
.search-dropdown-footer:hover,
.search-dropdown-footer.selected {
    background: rgba(56, 189, 248, 0.18);
}

.search-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Query Highlight */
mark.search-highlight,
.search-highlight {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: 600;
}

/* ========================================================
   Search Page Styles (/search)
   ======================================================== */
.search-page-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.search-header-card {
    padding: 22px 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-page-form {
    width: 100%;
}

.search-page-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.search-page-icon {
    position: absolute;
    left: 18px;
    font-size: 18px;
    color: var(--primary-blue);
    pointer-events: none;
}

.search-page-input {
    flex: 1;
    height: 48px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 0 44px 0 50px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}
.search-page-input:focus {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(30, 42, 66, 0.95);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

.search-page-clear-btn {
    position: absolute;
    right: 120px;
    color: var(--text-dim);
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
    padding: 4px;
}
.search-page-clear-btn:hover {
    color: #ffffff;
}

.search-page-submit-btn {
    height: 48px;
    padding: 0 24px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.search-page-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.search-layout-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    font-size: 12.5px;
}

/* Tabs Bar */
.search-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.search-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.search-tab-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.search-tab-item.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
}

.search-tab-badge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}
.search-tab-item.active .search-tab-badge {
    background: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

/* Sections */
.search-section-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

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

.search-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.search-section-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 10px;
}

.search-section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
}
.search-section-more:hover {
    text-decoration: underline;
}

/* Users Grid */
.search-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.search-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    transition: all 0.2s ease;
}
.search-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.search-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.search-user-online-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
    box-shadow: 0 0 6px #22c55e;
}

.search-user-info {
    min-width: 0;
    flex: 1;
}

.search-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-user-name:hover {
    color: var(--primary-blue);
}

.search-user-handle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.search-user-loc {
    font-size: 11.5px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-user-bio {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.3;
}

.search-user-actions {
    flex-shrink: 0;
}

.search-btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.15s ease;
}
.search-btn-view:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

/* Groups Grid */
.search-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.search-group-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    transition: all 0.2s ease;
}
.search-group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-group-logo-wrap {
    flex-shrink: 0;
}

.search-group-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-group-info {
    min-width: 0;
    flex: 1;
}

.search-group-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-group-name:hover {
    color: var(--primary-blue);
}

.search-group-members {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.search-group-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.3;
}

.search-group-actions {
    flex-shrink: 0;
}

/* Posts Stream in Search */
.search-posts-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-post-body {
    font-size: 14.5px;
    line-height: 1.5;
    color: #e2e8f0;
}

/* Empty States */
.search-empty-state {
    padding: 48px 24px;
    text-align: center;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 18px;
}

.search-empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
}

.search-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 0 20px;
}

.search-suggestions-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-pill-label {
    font-size: 12.5px;
    color: var(--text-dim);
}

.search-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}
.search-pill:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}

/* Pagination */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0 10px;
}

.search-page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}
.search-page-link:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.search-page-indicator {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================================
   Admin Control Panel Styles (/admin)
   ======================================================== */
.admin-layout-container {
    max-width: 1680px;
    width: 100%;
    padding: 86px 28px 40px;
    gap: 28px;
}
@media (max-width: 1024px) {
    .admin-layout-container {
        padding: 86px 16px 30px;
        gap: 16px;
    }
}

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
}
.admin-sidebar .nav-caption {
    font-size: 11px;
    letter-spacing: 0.1em;
}
.admin-sidebar .nav-glass-link.active {
    background: rgba(56, 189, 248, 0.18);
    border-left: 4px solid #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}
.admin-sidebar .nav-glass-link.active i {
    color: #38bdf8;
}
.admin-quick-badge {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.25);
    margin-top: 10px;
}

.admin-panel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

/* Header Card */
.admin-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    gap: 16px;
    flex-wrap: wrap;
}

.admin-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 4px 10px;
    border-radius: 8px;
}

.admin-header-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 4px 0 0;
    letter-spacing: -0.02em;
}

.admin-header-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

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

/* Action Buttons */
.admin-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-1px);
}

.admin-btn-glow {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}
.admin-btn-glow:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(168, 85, 247, 0.35));
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.admin-btn-primary {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border: none;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.admin-btn-primary:hover {
    opacity: 0.95;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
}

/* Tabs */
.admin-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
}
.admin-tabs-nav::-webkit-scrollbar {
    display: none;
}

.admin-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.admin-tab-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}
.admin-tab-link.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

/* KPI Cards */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 1200px) {
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.admin-kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(20, 28, 45, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.admin-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.admin-kpi-info {
    flex: 1;
    min-width: 0;
}

.admin-kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.admin-kpi-val {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin: 4px 0 6px;
}

.admin-kpi-sub {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Blocks Grid */
.admin-two-cols-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 1100px) {
    .admin-two-cols-grid {
        grid-template-columns: 1fr;
    }
}

.admin-block-card {
    padding: 22px 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.admin-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.admin-block-more {
    font-size: 12.5px;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}
.admin-block-more:hover {
    text-decoration: underline;
}

/* Filter Bar */
.admin-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.5);
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-filter-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 440px;
}
.admin-filter-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-dim);
    pointer-events: none;
}

.admin-filter-input {
    width: 100%;
    height: 42px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0 16px 0 40px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.admin-filter-input:focus {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(20, 32, 52, 0.95);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.admin-filter-select {
    height: 42px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 150px;
    transition: all 0.2s ease;
}
.admin-filter-select:focus {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}
.admin-filter-select option {
    background: #0f172a;
    color: #ffffff;
}

.admin-filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    box-sizing: border-box;
    user-select: none;
    transition: all 0.15s ease;
}
.admin-filter-checkbox:hover {
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}
.admin-filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    margin: 0;
}

.admin-table-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Table */
.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.admin-table-wrap::-webkit-scrollbar {
    height: 8px;
}
.admin-table-wrap::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}
.admin-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}
.admin-table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.4);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.admin-table th {
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.035);
    color: #94a3b8;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.04);
}

.admin-text-truncate {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar-small {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
}

.admin-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
}

.admin-link-bold {
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}
.admin-link-bold:hover {
    color: var(--primary-blue);
}

.admin-subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    text-decoration: none;
}

.admin-micro-badge {
    font-size: 11px;
    margin-left: 4px;
}

/* Badges */
.admin-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    white-space: nowrap;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-admin {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Actions Cell */
.admin-actions-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.admin-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.admin-btn-icon:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}
.admin-btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    transform: translateY(-1px);
}

/* Media Grid */
.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.admin-media-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-media-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(56, 189, 248, 0.3);
}

.admin-media-thumb-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: #0f172a;
    display: block;
}

.admin-media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.admin-media-thumb-wrap:hover .admin-media-thumb {
    transform: scale(1.05);
}

.admin-media-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-media-del-btn {
    width: 100%;
    padding: 9px 0;
    border: none;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
}
.admin-media-del-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ==========================================================
   SPONSORED ADVERTISEMENT CARDS & BADGES
   ========================================================== */
.sponsored-ad-card {
    position: relative;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
    box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.15) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sponsored-ad-card:hover {
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 14px 35px -8px rgba(2, 132, 199, 0.25) !important;
}

.badge-sponsored {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sponsored-media-container video,
.sponsored-media-container img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sponsored-media-container a:hover img {
    transform: scale(1.015);
}

/* ==========================================================
   DIRECT CHAT MEDIA & EMOJI PICKER ENHANCEMENTS
   ========================================================== */
#chatAttachBtn:hover,
#chatEmojiBtn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px);
}

.chat-emoji-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

#chatEmojiGrid::-webkit-scrollbar,
#chatMessages::-webkit-scrollbar {
    width: 6px;
}

#chatEmojiGrid::-webkit-scrollbar-track,
#chatMessages::-webkit-scrollbar-track {
    background: transparent;
}

#chatEmojiGrid::-webkit-scrollbar-thumb,
#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

#chatEmojiGrid::-webkit-scrollbar-thumb:hover,
#chatMessages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-bubble-row img {
    max-width: 100%;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.chat-bubble-row img:hover {
    filter: brightness(1.05);
}

/* ==========================================================
   PROFILE GUESTS (VISITORS) STYLES
   ========================================================== */
.guest-card {
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease !important;
}

.guest-card:hover {
    transform: translateY(-3px);
    border-color: rgba(236, 72, 153, 0.4) !important;
    box-shadow: 0 12px 30px -8px rgba(236, 72, 153, 0.2) !important;
}

/* ==========================================================
   MOBILE BOTTOM NAVIGATION BAR & PWA INSTALL BANNER
   ========================================================== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(13, 18, 29, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 9999;
        align-items: center;
        justify-content: space-around;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--text-dim);
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        background: none;
        border: none;
        padding: 6px 12px;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
    }

    .mobile-nav-item i {
        font-size: 20px;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--primary-blue);
    }

    .mobile-nav-action-btn {
        padding: 0;
        margin-top: -16px;
    }

    .mobile-nav-plus-circle {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: linear-gradient(135deg, #2563eb, #38bdf8);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 22px;
        box-shadow: 0 4px 18px rgba(56, 189, 248, 0.45);
        border: 3px solid rgba(13, 18, 29, 0.95);
        transition: transform 0.18s ease;
    }

    .mobile-nav-action-btn:active .mobile-nav-plus-circle {
        transform: scale(0.92);
    }

    .mobile-nav-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        border: 1.5px solid rgba(255, 255, 255, 0.2);
    }

    .mobile-nav-badge {
        position: absolute;
        top: -4px;
        right: -8px;
        background: #ef4444;
        color: #ffffff;
        font-size: 10px;
        font-weight: 700;
        padding: 1px 5px;
        border-radius: 8px;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    }

    /* Messenger Screen Responsive Split on Mobile */
    .chat-messenger-container {
        min-height: calc(100vh - 165px) !important;
    }
    .chat-messenger-container .chat-sidebar-col {
        width: 100% !important;
        border-right: none !important;
    }
    .chat-messenger-container.chat-open .chat-sidebar-col {
        display: none !important;
    }
    .chat-messenger-container:not(.chat-open) .chat-active-col {
        display: none !important;
    }
    .chat-mobile-back-btn {
        display: flex !important;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        width: 36px;
        height: 36px;
        color: #ffffff;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 18px;
        flex-shrink: 0;
        transition: background 0.15s;
    }
    .chat-mobile-back-btn:active {
        background: rgba(255, 255, 255, 0.16);
    }

    /* Body Padding for bottom bar */
    .app-container {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Mobile feed optimizations for silky-smooth 60fps scrolling */
    .post-item-card {
        padding: 15px 14px;
        margin-bottom: 12px;
        border-radius: 16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    .post-media-gallery {
        border-radius: 12px;
    }
    .post-media-gallery.gallery-count-1 .gallery-item img {
        max-height: 420px;
    }
    .post-media-gallery.gallery-count-2 {
        height: 230px;
    }
    .post-media-gallery.gallery-count-3 {
        height: 250px;
    }
    .post-media-gallery.gallery-count-multi {
        height: 250px;
    }
}

/* ==========================================================
   PWA FLOATING INSTALL BANNER
   ========================================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 74px;
    left: 16px;
    right: 16px;
    max-width: 420px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.18);
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.pwa-install-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (min-width: 769px) {
    .pwa-install-banner {
        bottom: 24px;
        right: 24px;
        left: auto;
        width: 380px;
    }
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pwa-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pwa-banner-text {
    min-width: 0;
}

.pwa-banner-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-subtitle {
    color: var(--text-dim);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
    transition: transform 0.15s;
}

.pwa-install-btn:active {
    transform: scale(0.95);
}

.pwa-dismiss-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ==========================================================
   IOS PWA INSTRUCTION MODAL
   ========================================================== */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pwa-ios-modal.active {
    opacity: 1;
}

.pwa-ios-content {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.8);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-ios-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
}

.pwa-ios-logo {
    border-radius: 12px;
}

.pwa-ios-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    color: #e2e8f0;
    line-height: 1.4;
}

.pwa-ios-step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #38bdf8;
    color: #0b0f19;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==============================================================
   Rich Code Blocks, Formatting & Comment System Enhancements
   ============================================================== */
.code-block-wrap {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lang {
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-code-btn {
    border: none;
    background: transparent;
    color: #38bdf8;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background: rgba(56, 189, 248, 0.12);
}

.code-block-wrap pre {
    margin: 0;
    padding: 12px 16px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    color: #e2e8f0;
}

.inline-code {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 12.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.comment-tool-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.comment-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.mini-emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 1050;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 6px 10px;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    white-space: nowrap;
}

.mini-emoji-picker.show {
    display: flex !important;
}

.mini-emoji-picker span {
    font-size: 19px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mini-emoji-picker span:hover {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.12);
}

.comment-action-btn:hover {
    color: #38bdf8 !important;
}

.comment-action-btn.liked {
    color: #ef4444 !important;
}

.post-discussion-card-link:hover {
    background: rgba(56, 189, 248, 0.16) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: #7dd3fc !important;
    transform: translateY(-1px);
}

