/* ============================================================
   SHIVOMANIA - Facebook-Style Social Network
   Professional Theme with Dark Mode Support
   ============================================================ */

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

:root {
    --fb-blue: #1877f2;
    --fb-blue-dark: #166fe5;
    --fb-green: #42b72a;
    --fb-red: #ff4444;
    --fb-yellow: #f7b928;
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #f2f2f2;
    --text: #050505;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    --border: #dddfe2;
    --border-light: #e4e6eb;
    --shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-float: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --success: #42b72a;
    --error: #ff4444;
    --warning: #f7b928;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --fb-blue: #4dabf7;
    --fb-blue-dark: #339af0;
    --bg: #18191a;
    --bg-card: #242526;
    --bg-hover: #3a3b3c;
    --text: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #8a8d91;
    --border: #3e4042;
    --border-light: #3a3b3c;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.25);
    --shadow-float: 0 4px 20px rgba(0,0,0,0.4);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 56px;
}

a { color: var(--fb-blue); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   TOP NAVBAR (Facebook Style)
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fb-blue);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-brand img { height: 40px; width: 40px; border-radius: 50%; }

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

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg);
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: width 0.2s;
}

.search-box input:focus { width: 280px; }

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.5;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-tab {
    padding: 8px 32px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.4rem;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-tab:hover { background: var(--bg-hover); }

.nav-tab.active { color: var(--fb-blue); }

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0; right: 0;
    height: 3px;
    background: var(--fb-blue);
    border-radius: 2px 2px 0 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    transition: background 0.2s;
}

.nav-user:hover { background: var(--bg-hover); }

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

.nav-icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text);
    position: relative;
    transition: background 0.2s;
}

.nav-icon-btn:hover { background: var(--border); }

.nav-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--fb-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    border: 2px solid var(--bg-card);
}

/* ===== DROPDOWN ===== */
.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 48px; right: 0;
    width: 280px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border);
    padding: 8px;
    display: none;
    z-index: 1001;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}

.dropdown-item:hover { background: var(--bg-hover); opacity: 1; }

.dropdown-item .icon { font-size: 1.2rem; width: 28px; text-align: center; }

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

/* ============================================================
   MAIN LAYOUT (3-Column Facebook Grid)
   ============================================================ */
.fb-layout {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    padding: 20px;
    align-items: start;
}

.fb-left, .fb-right {
    position: sticky;
    top: 76px;
    height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 4px;
}

.fb-center {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-pad { padding: 16px; }

/* ===== LEFT SIDEBAR MENU ===== */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.menu-item:hover { background: var(--bg-hover); opacity: 1; }

.menu-item .icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.menu-item img.icon { background: none; object-fit: cover; }

.menu-section {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 12px 4px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

/* ===== STORIES ===== */
.stories-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
}

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

.story-card {
    flex-shrink: 0;
    width: 110px;
    height: 190px;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.story-card:hover { transform: scale(1.03); }

.story-bg {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.story-card:hover .story-bg { transform: scale(1.05); }

.story-avatar {
    position: absolute;
    top: 10px; left: 10px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid var(--fb-blue);
    object-fit: cover;
    background: var(--bg-card);
}

.story-avatar.add {
    border: none;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.story-name {
    position: absolute;
    bottom: 8px; left: 8px; right: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== POST COMPOSER ===== */
.composer {
    padding: 12px 16px;
}

.composer-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.composer-top img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.composer-trigger {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    text-align: left;
}

.composer-trigger:hover { background: var(--border-light); }

.composer-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 8px;
}

.composer-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
}

.composer-action:hover { background: var(--bg-hover); }

/* ===== FEED POSTS ===== */
.feed-post {
    padding: 12px 16px 10px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-header img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta { flex: 1; }

.post-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
}

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

.post-menu {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
    background: none;
    border: none;
}

.post-menu:hover { background: var(--bg-hover); }

.post-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text);
}

.post-media {
    width: 100%;
    border-radius: var(--radius);
    margin-top: 4px;
    max-height: 500px;
    object-fit: contain;
    background: var(--bg-hover);
    display: block;
}

.post-media video, .post-media audio {
    width: 100%;
    border-radius: var(--radius);
    max-height: 500px;
}

/* ===== REACTIONS BAR ===== */
.reactions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.reaction-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border: none;
    user-select: none;
}

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

.reaction-btn.active-like { color: var(--fb-blue); }
.reaction-btn.active-dislike { color: var(--fb-red); }

.reaction-btn .count { font-size: 0.8rem; }

/* ===== COMMENTS PREVIEW ===== */
.post-stats {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   RIGHT SIDEBAR & CHAT
   ============================================================ */
.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title .actions { display: flex; gap: 8px; }

.sidebar-title button {
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-title button:hover { background: var(--bg-hover); }

.chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

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

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

.chat-user .name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
}

.chat-user .online-indicator {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    position: absolute;
    bottom: 4px; left: 32px;
}

/* ===== FLOATING CHAT WIDGET ===== */
.chat-widget {
    position: fixed;
    bottom: 0; right: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.chat-bubbles {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    align-items: flex-end;
}

.chat-window {
    width: 320px;
    height: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border);
    border-bottom: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-window-header {
    padding: 8px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.chat-window-header img {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-window-header .name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-window-header .close {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    background: none; border: none;
}

.chat-window-header .close:hover { background: var(--bg-hover); }

.chat-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg.sent {
    align-self: flex-end;
    background: var(--fb-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.received {
    align-self: flex-start;
    background: var(--bg-hover);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-msg .time {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 2px;
    display: block;
    text-align: right;
}

.chat-window-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    align-items: center;
}

.chat-window-footer input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 50px;
    border: none;
    background: var(--bg-hover);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

.chat-window-footer button {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--fb-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    margin-bottom: 16px;
    position: relative;
}

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

/* ===== CHAT PANEL (Right Sidebar) ===== */
.chat-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 12px;
}

/* ============================================================
   PROFILE PAGE (Facebook Style)
   ============================================================ */
.profile-cover {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--fb-blue), var(--fb-blue-dark));
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

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

.profile-cover-edit {
    position: absolute;
    bottom: 20px; right: 20px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-header-bar {
    background: var(--bg-card);
    padding: 0 30px 16px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    position: relative;
}

.profile-avatar-wrap {
    position: relative;
    margin-top: -40px;
}

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

.profile-avatar-wrap .edit-avatar {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.profile-info { flex: 1; padding-bottom: 10px; }

.profile-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.profile-info .friends-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-actions-bar {
    display: flex;
    gap: 8px;
    padding-bottom: 10px;
}

.profile-tabs {
    display: flex;
    gap: 4px;
    padding: 0 30px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.profile-tab {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
}

.profile-tab:hover { background: var(--bg-hover); }

.profile-tab.active {
    color: var(--fb-blue);
    border-bottom-color: var(--fb-blue);
}

.profile-body {
    max-width: 1100px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    padding: 0 20px;
}

.profile-sidebar { display: flex; flex-direction: column; gap: 16px; }

.profile-intro {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 16px;
}

.profile-intro h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.intro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.intro-item .icon { font-size: 1.2rem; width: 24px; text-align: center; }

.profile-friends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.profile-friend {
    text-align: center;
}

.profile-friend img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    object-fit: cover;
}

.profile-friend .name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== WALL / TIMELINE ===== */
.wall-post-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.wall-post-item:last-child { border-bottom: none; }

.wall-post-item img {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.wall-content { flex: 1; }

.wall-content .author { font-weight: 600; font-size: 0.9rem; }

.wall-content .time { font-size: 0.75rem; color: var(--text-muted); }

.wall-content p { margin-top: 4px; font-size: 0.9rem; }

/* ============================================================
   FRIENDS PAGE
   ============================================================ */
.friends-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.friends-header h2 { font-size: 1.5rem; font-weight: 700; }

.friends-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.friends-tab {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--fb-blue);
    background: var(--bg-hover);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.friends-tab:hover { background: var(--border-light); }

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.friend-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.friend-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.friend-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.friend-card-body { padding: 12px; }

.friend-card-body .name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.friend-card-body .mutual {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--fb-blue);
    color: white;
}

.btn-primary:hover { background: var(--fb-blue-dark); opacity: 1; }

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

.btn-secondary:hover { background: var(--border); opacity: 1; }

.btn-success { background: var(--fb-green); color: white; }

.btn-danger { background: var(--fb-red); color: white; }

.btn-small { padding: 6px 12px; font-size: 0.85rem; }

.btn-block { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 3px rgba(24,119,242,0.15);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* ===== MODAL (Composer) ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 { font-size: 1.25rem; font-weight: 700; }

.modal-header .close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-body { padding: 16px; }

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

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

.modal-user .name { font-weight: 600; }

.modal textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    resize: none;
    min-height: 120px;
    outline: none;
    color: var(--text);
    font-family: var(--font);
}

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

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

.modal-attach-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flash-success { background: rgba(66,183,42,0.1); color: var(--success); border: 1px solid rgba(66,183,42,0.2); }
.flash-error { background: rgba(255,68,68,0.1); color: var(--error); border: 1px solid rgba(255,68,68,0.2); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    padding-top: 0;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    padding: 20px;
    align-items: center;
}

.auth-brand h1 {
    font-size: 3.5rem;
    color: var(--fb-blue);
    font-weight: 800;
    margin-bottom: 12px;
}

.auth-brand p {
    font-size: 1.3rem;
    color: var(--text);
    line-height: 1.4;
}

.auth-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 16px;
}

.auth-box input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
}

.auth-box input:focus { border-color: var(--fb-blue); }

.auth-box .btn { width: 100%; padding: 12px; font-size: 1.1rem; margin-bottom: 12px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-link { text-align: center; font-size: 0.9rem; margin-top: 12px; }

/* ============================================================
   AVATARS
   ============================================================ */
.avatar-tiny { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-small { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-medium { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.avatar-large { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty .icon { font-size: 3rem; margin-bottom: 12px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .fb-layout { grid-template-columns: 1fr; }
    .fb-left, .fb-right { display: none; }
    .fb-center { max-width: 100%; }
    .profile-body { grid-template-columns: 1fr; }
    .profile-header-bar { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar-wrap { margin-top: -60px; }
    .profile-actions-bar { justify-content: center; }
    .profile-tabs { justify-content: center; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 8px; }
    .search-box { display: none; }
    .nav-center { gap: 0; }
    .nav-tab { padding: 8px 16px; }
    .nav-user span { display: none; }
    .auth-container { grid-template-columns: 1fr; text-align: center; }
    .auth-brand h1 { font-size: 2.5rem; }
    .profile-cover { height: 200px; }
    .profile-avatar-wrap img { width: 120px; height: 120px; }
    .friends-grid { grid-template-columns: repeat(2, 1fr); }
    .chat-widget { display: none; }
    body { padding-top: 50px; }

    /* Verified badge — mobile shrink */
    .verified-badge {
        width: 14px;
        height: 14px;
        font-size: 9px;
        margin-left: 3px;
        top: 0;
        box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 2px var(--fb-blue);
    }
    .verified-badge::before {
        transform: scale(0.8);
    }
    .verified-badge-large {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-left: 5px;
        top: -1px;
        box-shadow: 0 0 0 1.5px var(--bg-card), 0 0 0 3px var(--fb-blue);
    }
    .verified-badge-large::before {
        transform: scale(0.95);
    }
    .post-author .verified-badge {
        width: 13px;
        height: 13px;
        font-size: 8px;
        margin-left: 2px;
        box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 2px var(--fb-blue);
    }
    .profile-info h1 .verified-badge {
        width: 22px;
        height: 22px;
        font-size: 14px;
        margin-left: 5px;
        top: -2px;
        box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px var(--fb-blue);
    }
    .profile-info h1 .verified-badge::before {
        transform: scale(0.95);
    }
    .admin-user .verified-badge {
        width: 12px;
        height: 12px;
        font-size: 7px;
        margin-left: 2px;
        box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 1.5px var(--fb-blue);
    }
}

@media (max-width: 480px) {
    .nav-tab { padding: 8px 12px; font-size: 1.1rem; }
    .friends-grid { grid-template-columns: 1fr; }
    .profile-tabs { flex-wrap: wrap; }

    /* Verified badge — extra small screens */
    .verified-badge {
        width: 12px;
        height: 12px;
        font-size: 8px;
        margin-left: 2px;
        box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 1.5px var(--fb-blue);
    }
    .verified-badge::before {
        transform: scale(0.75);
    }
    .verified-badge-large {
        width: 18px;
        height: 18px;
        font-size: 11px;
        margin-left: 4px;
        box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 2.5px var(--fb-blue);
    }
    .profile-info h1 .verified-badge {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-left: 4px;
        box-shadow: 0 0 0 1.5px var(--bg-card), 0 0 0 3px var(--fb-blue);
    }
}

/* ===== MOBILE BOTTOM NAV (Optional) ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 6px 0;
    z-index: 999;
    justify-content: space-around;
}

.mobile-nav a {
    font-size: 1.4rem;
    padding: 6px 16px;
    color: var(--text-muted);
    position: relative;
}

.mobile-nav a.active { color: var(--fb-blue); }

@media (max-width: 768px) {
    .mobile-nav { display: flex; }
    body { padding-bottom: 60px; }
}


/* ===== POST LINKS & EMBEDS ===== */
.post-content a.post-link {
    color: var(--fb-blue);
    text-decoration: none;
    word-break: break-all;
}
.post-content a.post-link:hover {
    text-decoration: underline;
}
.post-content .embed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 16px 0;
    background: #000;
    box-shadow: var(--shadow-card);
}
@media (max-width: 768px) {
    .post-content .embed-container {
        min-height: 240px;
        border-radius: var(--radius);
    }
}
/* Fallback for older browsers */
@supports not (aspect-ratio: 16 / 9) {
    .post-content .embed-container {
        height: 0;
        padding-bottom: 56.25%;
    }
}
.post-content .embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== LINK PREVIEW CARDS ===== */
.link-preview-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 10px 0 6px;
    background: var(--bg-card);
    text-decoration: none !important;
    transition: background 0.2s, box-shadow 0.2s;
    max-width: 100%;
}
.link-preview-card:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-card);
    opacity: 1 !important;
}
.link-preview-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hover);
    border-bottom: 1px solid var(--border);
}
.link-preview-body {
    padding: 12px 14px;
}
.link-preview-domain {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.link-preview-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.link-preview-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 768px) {
    .link-preview-image { height: 140px; }
    .link-preview-title { font-size: 0.9rem; }
}


/* ============================================================
   MOBILE COMPACTNESS — Auto-shrink everything so users never
   need to pinch-zoom.  Injected after all other rules.
   ============================================================ */

/* Base scale-down for anything under 768 px */
@media (max-width: 768px) {
    html { font-size: 13px; }
    body { padding-top: 44px; }

    /* Navbar */
    .navbar { height: 44px; padding: 0 8px; }
    .nav-brand { font-size: 1.25rem; }
    .nav-tab { padding: 6px 14px; font-size: 1.15rem; }
    .nav-tab.active::after { bottom: -6px; height: 2px; }
    .nav-icon-btn { width: 32px; height: 32px; font-size: 0.95rem; }
    .nav-user { padding: 2px 6px; }
    .nav-user img { width: 24px; height: 24px; }
    .nav-badge { font-size: 0.55rem; padding: 0 3px; }

    /* Layout */
    .fb-layout { padding: 10px; gap: 10px; }
    .fb-center { gap: 10px; }

    /* Cards & composer */
    .card { border-radius: var(--radius); }
    .composer { padding: 8px 12px; }
    .composer-top { padding-bottom: 8px; gap: 8px; }
    .composer-top img { width: 32px; height: 32px; }
    .composer-trigger { padding: 8px 12px; font-size: 0.85rem; }
    .composer-action { padding: 6px 10px; font-size: 0.8rem; }

    /* Feed posts */
    .feed-post { padding: 10px 12px 8px; }
    .post-header { gap: 8px; margin-bottom: 8px; }
    .post-header img { width: 32px; height: 32px; }
    .post-author { font-size: 0.85rem; }
    .post-time { font-size: 0.7rem; }
    .post-content p { font-size: 0.85rem; margin-bottom: 6px; }
    .post-media { border-radius: var(--radius); max-height: 300px; }
    .post-stats { padding: 4px 0; font-size: 0.75rem; }
    .reactions-bar { padding: 4px 0; margin-top: 6px; }
    .reaction-btn { padding: 4px; font-size: 0.8rem; gap: 4px; }

    /* Comments */
    .comments-section { padding-top: 6px; margin-top: 6px; }
    .comment-item { gap: 6px; margin-bottom: 6px; }
    .comment-item img { width: 24px !important; height: 24px !important; }

    /* Buttons */
    .btn { padding: 6px 12px; font-size: 0.85rem; }
    .btn-small { padding: 4px 8px; font-size: 0.75rem; }

    /* Modals */
    .modal { max-width: 92vw; }
    .modal-header { padding: 10px 12px; }
    .modal-header h3 { font-size: 1rem; }
    .modal-body { padding: 12px; }
    .modal-user img { width: 32px; height: 32px; }
    .modal textarea { font-size: 0.95rem; min-height: 80px; }
    .modal-footer { padding: 8px 12px; }
    .modal-attach-btn { width: 30px; height: 30px; font-size: 0.95rem; }

    /* Profile */
    .profile-cover { height: 160px; }
    .profile-header-bar { padding: 0 16px 12px; gap: 12px; }
    .profile-avatar-wrap { margin-top: -30px; }
    .profile-avatar-wrap img { width: 100px; height: 100px; border-width: 3px; }
    .profile-avatar-wrap .edit-avatar { width: 28px; height: 28px; font-size: 0.85rem; }
    .profile-info h1 { font-size: 1.35rem; }
    .profile-info .friends-count { font-size: 0.8rem; }
    .profile-actions-bar { gap: 6px; padding-bottom: 6px; }
    .profile-tabs { padding: 0 16px; }
    .profile-tab { padding: 10px 12px; font-size: 0.85rem; }
    .profile-body { margin: 12px auto; gap: 12px; padding: 0 12px; grid-template-columns: 1fr; }
    .profile-intro { padding: 12px; }
    .profile-intro h3 { font-size: 1rem; margin-bottom: 8px; }
    .intro-item { font-size: 0.85rem; padding: 4px 0; }

    /* Friends page */
    .friends-header { padding: 12px 16px; margin-bottom: 12px; }
    .friends-header h2 { font-size: 1.15rem; }
    .friends-tabs { margin-top: 10px; padding-top: 10px; gap: 6px; }
    .friends-tab { padding: 6px 12px; font-size: 0.8rem; }
    .friends-grid { gap: 10px; grid-template-columns: repeat(2, 1fr); }
    .friend-card img { height: 140px; }
    .friend-card-body { padding: 10px; }
    .friend-card-body .name { font-size: 0.85rem; }
    .friend-card-body .mutual { font-size: 0.75rem; margin-bottom: 8px; }

    /* Chat widget */
    .chat-widget { right: 8px; }
    .chat-window { width: 260px; height: 340px; }
    .chat-toggle { width: 40px; height: 40px; font-size: 1.1rem; margin-bottom: 10px; }

    /* Dropdown */
    .dropdown-menu { width: 240px; top: 40px; }
    .dropdown-item { padding: 8px 10px; font-size: 0.85rem; }

    /* Wall */
    .wall-post-item { padding: 8px 0; gap: 8px; }
    .wall-post-item img { width: 28px; height: 28px; }
    .wall-content .author { font-size: 0.85rem; }
    .wall-content p { font-size: 0.85rem; }

    /* Left sidebar menu (if shown) */
    .menu-item { padding: 6px 10px; font-size: 0.85rem; gap: 10px; }
    .menu-item .icon { width: 30px; height: 30px; font-size: 0.95rem; }

    /* Embeds */
    .post-content .embed-container { min-height: 180px; margin: 10px 0; }

    /* Flash */
    .flash { padding: 8px 12px; font-size: 0.85rem; margin-bottom: 10px; }

    /* Mobile bottom nav */
    .mobile-nav { padding: 4px 0; }
    .mobile-nav a { font-size: 1.15rem; padding: 4px 12px; }
    body { padding-bottom: 50px; }
}

/* Ultra-compact for very small screens */
@media (max-width: 480px) {
    html { font-size: 12px; }
    .fb-layout { padding: 6px; }
    .friends-grid { grid-template-columns: 1fr; }
    .friend-card img { height: 180px; }
    .profile-cover { height: 130px; }
    .profile-avatar-wrap img { width: 80px; height: 80px; }
    .profile-info h1 { font-size: 1.15rem; }
    .nav-tab { padding: 6px 10px; font-size: 1rem; }
    .post-content .embed-container { min-height: 150px; }
    .chat-window { width: 92vw; height: 50vh; }
}

/* Prevent any element from forcing horizontal scroll */
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }


/* ============================================================
   VERIFIED BADGE (Facebook-style)
   ============================================================ */
/* ============================================================
   VERIFIED BADGE (Facebook-style blue circle with white check)
   ============================================================ */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--fb-blue);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
    box-shadow: 0 0 0 1.5px var(--bg-card), 0 0 0 3px var(--fb-blue);
    position: relative;
    top: -1px;
}
.verified-badge::before {
    content: "✓";
    display: block;
    transform: scale(0.9);
}
.verified-badge-large {
    width: 26px;
    height: 26px;
    font-size: 15px;
    margin-left: 8px;
    top: -2px;
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--fb-blue);
}
.verified-badge-large::before {
    transform: scale(1);
}
.post-author .verified-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 4px;
    top: -1px;
    box-shadow: 0 0 0 1.5px var(--bg-card), 0 0 0 2.5px var(--fb-blue);
}
.profile-info h1 .verified-badge {
    width: 28px;
    height: 28px;
    font-size: 17px;
    margin-left: 8px;
    top: -3px;
    box-shadow: 0 0 0 2.5px var(--bg-card), 0 0 0 5px var(--fb-blue);
}
.profile-info h1 .verified-badge::before {
    transform: scale(1.05);
}
.admin-user .verified-badge {
    width: 15px;
    height: 15px;
    font-size: 9px;
    margin-left: 4px;
    top: -1px;
    box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 2.5px var(--fb-blue);
}
.badge-verified {
    background: var(--fb-blue);
    color: white;
}

/* ===== PHOTO LIGHTBOX (Facebook-style) ===== */
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
}
.photo-lightbox.show { display: flex; }
.photo-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}
.photo-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.photo-lightbox-content {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.photo-lightbox-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: #000;
}
.photo-lightbox-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
}
.photo-lightbox-sidebar {
    width: 400px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
}
.lightbox-header { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.lightbox-header .post-header { margin-bottom: 0; }
.lightbox-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.lightbox-caption {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text);
    word-break: break-word;
}
.lightbox-stats { margin-bottom: 6px; }
.lightbox-stats .post-stats { border-bottom: none; padding: 4px 0; }
.lightbox-reactions { margin-bottom: 10px; }
.lightbox-reactions .reactions-bar { margin-top: 0; border-top: 1px solid var(--border); }
.lightbox-comments .comments-section { display: block !important; margin-top: 0; border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 768px) {
    .photo-lightbox-content { flex-direction: column; }
    .photo-lightbox-media { padding: 60px 8px 8px; flex: none; height: 50vh; }
    .photo-lightbox-sidebar { width: 100%; height: 50vh; border-left: none; border-top: 1px solid var(--border); }
    .photo-lightbox-close { top: 8px; right: 8px; width: 36px; height: 36px; }
}

/* ============================================================
   VOICE CHAT
   ============================================================ */
.voice-call-btn {
    margin-left: auto;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.voice-call-btn:hover { background: var(--fb-blue); color: white; }
.voice-call-btn.calling { background: var(--fb-red); color: white; animation: pulseCall 1.5s infinite; }
.voice-call-btn.connected { background: var(--success); color: white; }
@keyframes pulseCall {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.call-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
}
.call-overlay.show { display: flex; }
.call-overlay-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 3px solid var(--fb-blue);
    object-fit: cover;
    background: var(--bg-card);
}
.call-overlay-name { color: #fff; font-size: 1.4rem; font-weight: 700; }
.call-overlay-status { color: rgba(255,255,255,0.7); font-size: 1rem; }
.call-overlay-actions { display: flex; gap: 20px; margin-top: 8px; }
.call-btn {
    width: 58px; height: 58px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.call-btn:hover { transform: scale(1.08); }
.call-btn-accept { background: var(--success); color: white; }
.call-btn-decline { background: var(--fb-red); color: white; }
.call-btn-end { background: var(--fb-red); color: white; }
.call-btn-mute { background: var(--bg-hover); color: var(--text); }

.call-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border-radius: 50px;
    padding: 8px 20px;
    display: none;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-float);
    z-index: 3001;
    border: 1px solid var(--border);
}
.call-bar.show { display: flex; }
.call-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.call-bar-info img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.call-timer { color: var(--text-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 36px; }

/* Mic Popup */
.mic-popup {
    position: fixed;
    top: 76px;
    right: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 4000;
    max-width: 310px;
    display: none;
    animation: slideInPopup 0.35s ease;
    overflow: hidden;
}
.mic-popup.show { display: block; }
.mic-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.mic-popup-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.15);
    color: var(--fb-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.mic-popup h4 { font-size: 1rem; font-weight: 700; color: var(--text); }
.mic-popup p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.4; }
.mic-popup-dismiss {
    background: var(--bg-hover);
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
}
.mic-popup-dismiss:hover { background: var(--border); }
.mic-popup-timer {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: var(--fb-blue);
    width: 100%;
}
@keyframes slideInPopup {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .call-overlay-avatar { width: 70px; height: 70px; }
    .call-overlay-name { font-size: 1.15rem; }
    .call-btn { width: 50px; height: 50px; font-size: 1.3rem; }
    .call-bar { bottom: 12px; padding: 6px 14px; gap: 10px; }
    .mic-popup { right: 10px; left: 10px; max-width: none; top: 60px; }
}
/* ===== POST TIMESTAMP LINK ===== */
a.post-time {
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
}
a.post-time:hover {
    text-decoration: underline;
}