:root {
    --bg-color: #ffffff;
    --app-bg: #ffffff;
    --primary: #1d9bf0;
    --primary-hover: #1a8cd8;
    --text-main: #0f1419;
    --text-muted: #536471;
    --input-bg: #eff3f4;
    --input-border: #eff3f4;
    --border-color: #eff3f4;
    --hover-bg: rgba(15, 20, 25, 0.1);
    --header-bg: rgba(255, 255, 255, 0.85);
    --like-color: #f91880;
    --rt-color: #00ba7c;
    --btn-dark: #0f1419;
}

[data-theme="dark"] {
    --bg-color: #15202b;
    --app-bg: #15202b;
    --text-main: #eff3f4;
    --text-muted: #8b98a5;
    --input-bg: #253341;
    --input-border: #38444d;
    --border-color: #38444d;
    --hover-bg: rgba(239, 243, 244, 0.1);
    --header-bg: rgba(21, 32, 43, 0.85);
    --btn-dark: #eff3f4;
}

[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .text-dark, [data-theme="dark"] .text-main, [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: var(--text-main) !important; }
[data-theme="dark"] .bg-light { background-color: var(--input-bg) !important; }
[data-theme="dark"] .bg-white { background-color: var(--app-bg) !important; color: var(--text-main) !important; }
[data-theme="dark"] .border { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-bottom { border-bottom-color: var(--border-color) !important; }
[data-theme="dark"] .card { background-color: var(--app-bg); border-color: var(--border-color); }
[data-theme="dark"] .btn-dark { background-color: #eff3f4 !important; color: #0f1419 !important; border: none; }
[data-theme="dark"] .btn-outline-dark { border-color: #536471 !important; color: #eff3f4 !important; }
[data-theme="dark"] .btn-outline-dark:hover { background-color: rgba(239, 243, 244, 0.1) !important; }

/* Premium Themes */
[data-theme="glass"] {
    --bg-color: #000000;
    --app-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(0, 0, 0, 0.3);
}
[data-theme="glass"] body {
    background: radial-gradient(circle at top right, #1a1a2e, #16213e, #0f3460);
    background-attachment: fixed;
}
[data-theme="glass"] .post-item, [data-theme="glass"] .compose-box, [data-theme="glass"] .suggestion-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 5px;
    border-radius: 12px;
}

[data-theme="cyberpunk"] {
    --bg-color: #050505;
    --primary: #f0f;
    --primary-hover: #ff00ff;
    --text-main: #00ffff;
    --text-muted: #ff00ff;
    --border-color: #333;
    --input-bg: #111;
    --app-bg: #050505;
}
[data-theme="cyberpunk"] .post-item { border: 1px solid #f0f; margin: 10px 0; box-shadow: 0 0 10px rgba(255, 0, 255, 0.2); }

[data-theme="gold"] {
    --bg-color: #0a0a0a;
    --primary: #ffd700;
    --primary-hover: #ffcc00;
    --text-main: #ffffff;
    --text-muted: #b8860b;
    --border-color: #2a2a2a;
    --input-bg: #1a1a1a;
    --app-bg: #0a0a0a;
}
[data-theme="gold"] .post-item { border-left: 3px solid #ffd700; }

[data-theme="arctic"] {
    --bg-color: #f0f8ff;
    --primary: #00bfff;
    --text-main: #2f4f4f;
    --text-muted: #708090;
    --border-color: #b0c4de;
    --input-bg: #ffffff;
    --app-bg: #f0f8ff;
}

[data-theme="sakura"] {
    --bg-color: #fff5f8;
    --primary: #ff69b4;
    --text-main: #4a4a4a;
    --text-muted: #db7093;
    --border-color: #ffd1dc;
    --input-bg: #ffffff;
    --app-bg: #fff5f8;
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary);
    z-index: 9999;
    width: 0%;
    transition: width 0.4s ease;
    display: none;
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.5);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* Status Pulse Animation */
.status-pulse::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background-color: inherit;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

/* AUTHENTICATION PAGE */
.auth-wrapper { 
    width: 100%; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    background: var(--app-bg);
}
@media (min-width: 900px) { .auth-wrapper { flex-direction: row; } }

.auth-slider-side { 
    width: 100%; 
    background: linear-gradient(135deg, var(--primary) 0%, #00acee 100%); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 30px 10px; 
}
@media (max-width: 899px) { .auth-slider-side { display: none; } }
@media (min-width: 900px) { .auth-slider-side { width: 55%; min-height: 100vh; } }

.auth-form-side { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 20px; 
    background-color: var(--app-bg); 
}
@media (min-width: 900px) { .auth-form-side { width: 45%; min-height: 100vh; } }

/* Swiper styling */
.communitySwiper { width: 100%; max-width: 320px; padding-bottom: 30px; }
@media (max-width: 899px) { .communitySwiper { max-width: 250px; } }
.swiper-slide { background-color: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.slide-banner { height: 100px; background-size: cover; background-position: center; position: relative; }
.slide-avatar { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #ffffff; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); background-size: cover; background-position: center; }
.slide-info { margin-top: 35px; padding: 0 15px 15px; text-align: center; }
.slide-info h5 { margin-bottom: 2px; font-weight: 700; font-size: 15px; color: #0f1419; }
.slide-info .badge { font-size: 10px; padding: 3px 8px; border-radius: 10px; margin-bottom: 8px; }
.slide-info p { font-size: 12px; color: #536471; margin:0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}

/* Form Styles */
.auth-form-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-form-container h1 { font-weight: 800; font-size: 48px; margin-bottom: 40px; letter-spacing: -1.5px; line-height: 1.1; }
.auth-form-container h4 { font-weight: 700; margin-bottom: 25px; font-size: 28px; }
@media (max-width: 576px) {
    .auth-form-container h1 { font-size: 32px; margin-bottom: 20px; }
    .auth-form-container h4 { font-size: 22px; }
}
.input-group-custom { 
    position: relative; 
    display: flex; 
    align-items: center; 
    background-color: var(--input-bg); 
    border: 1px solid var(--input-border); 
    border-radius: 8px; 
    height: 54px; 
    margin-bottom: 15px; 
    transition: 0.2s; 
}
.input-group-custom:focus-within { 
    border-color: var(--primary); 
    background-color: var(--app-bg);
    box-shadow: 0 0 0 1px var(--primary); 
}
.input-group-custom .input-icon { padding-left: 15px; color: var(--text-muted); }
.input-group-custom .form-control { border: none; background: transparent; height: 100%; font-size: 16px; padding-left: 10px; box-shadow:none !important; color:var(--text-main); }
.input-group-custom .form-control::placeholder { color: var(--text-muted); }
.compact-file { 
    border: 1px solid var(--input-border); 
    border-radius: 8px; 
    font-size: 13px; 
    padding: 12px; 
    color: var(--text-muted); 
    width: 100%; 
    background: var(--input-bg);
}
.btn-primary { background-color: var(--primary); color: white; border: none; border-radius: 9999px; font-weight: 700; transition: 0.2s; height: 48px; }
.btn-primary:hover { background-color: var(--primary-hover); }

/* Online Stats & Recent Users */
.stat-pill {
    flex: 1;
    background: var(--input-bg);
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--input-border);
}
.stat-pill .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}
.stat-pill.male .pulse { background: var(--primary); }
.stat-pill.female .pulse { background: #f91880; }

.stat-pill .pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: stat-pulse 1.5s infinite;
}
@keyframes stat-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

.recent-user-slide { background: transparent !important; box-shadow: none !important; }
.recent-user-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ru-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ru-info { flex-grow: 1; min-width: 0; }
.ru-name { font-weight: 700; font-size: 13px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-username { font-size: 11px; color: var(--text-muted); }
.ru-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: #17bf63;
    color: white;
}
.ru-badge.female { background: #f91880; }
.ru-badge.offline { background: rgba(0,0,0,0.05); color: #657786 !important; border: 1px solid rgba(0,0,0,0.03); }
[data-theme="dark"] .ru-badge.offline { background: rgba(255,255,255,0.1); color: #8899a6 !important; }

.stat-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}
.stat-box .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 2px; }
.stat-box .value { font-size: 20px; font-weight: 800; color: var(--text-main); }

.auth-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-bottom: 20px;
}

/* DASHBOARD / TWITTER UI */
.twitter-layout { display: flex; justify-content: center; width: 100%; max-width: 1280px; margin: 0 auto; }
.left-sidebar { width: 80px; height: 100vh; position: sticky; top: 0; border-right: 1px solid var(--border-color); padding: 10px; display: flex; flex-direction: column; align-items: center; }
@media (min-width: 1280px) { .left-sidebar { width: 275px; align-items: flex-start; padding: 10px 20px; } }
.nav-link-tw { display: flex; align-items: center; padding: 12px; margin-bottom: 5px; border-radius: 9999px; color: var(--text-main); text-decoration: none; font-size: 20px; transition: 0.2s; }
.nav-link-tw:hover { background-color: var(--input-bg); color: var(--text-main); }
.nav-link-tw svg { width: 26px; height: 26px; }
.nav-text { display: none; margin-left: 20px; font-weight: 400; }
.nav-link-tw.active { font-weight: 700; }
@media (min-width: 1280px) { .nav-text { display: inline; } }

/* Main Feed & Posts */
.main-feed { flex-grow: 1; max-width: 600px; border-right: 1px solid var(--border-color); min-height: 100vh; }
.feed-header { position: sticky; top: 0; background-color: var(--header-bg); backdrop-filter: blur(12px); padding: 15px; border-bottom: 1px solid var(--border-color); z-index: 10; }
.feed-header h5 { margin: 0; font-weight: 700; color: var(--text-main); }
.compose-box { display: flex; padding: 15px; border-bottom: 1px solid var(--border-color); background-color: var(--app-bg); }
.compose-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; background-size: cover; background-position: center; flex-shrink:0; }
.compose-input { flex-grow: 1; }
.compose-input textarea { width: 100%; border: none; outline: none; font-size: 20px; resize: none; padding-top: 10px; font-family: inherit; background: transparent; color: var(--text-main); }
.compose-input textarea::placeholder { color: var(--text-muted); }
.compose-input textarea::placeholder { color: var(--text-muted); }
.compose-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.post-item { display: flex; padding: 15px; border-bottom: 1px solid var(--border-color); transition: 0.2s; }
.post-content-area { flex-grow: 1; min-width:0; }
.post-meta { display: flex; align-items: baseline; }
.post-meta strong { font-size: 15px; margin-right: 5px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;}
.post-meta span { color: var(--text-muted); font-size: 15px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.post-text { margin-top: 5px; font-size: 15px; line-height: 1.5; color: var(--text-main); word-wrap:break-word; }

/* Interactive Actions */
.post-actions { display: flex; justify-content: space-between; margin-top: 10px; max-width: 425px; color: var(--text-muted); }
.action-btn { background: transparent; border: none; outline: none; color: var(--text-muted); display: flex; align-items: center; cursor: pointer; transition: 0.2s; font-size: 14px;}
.action-btn:hover { color: var(--primary); background-color: var(--hover-bg); border-radius: 999px; }
.action-btn:hover { color: var(--primary); }
.action-btn svg { width: 18px; height: 18px; margin-right: 5px; transition:0.2s; }

.action-btn.liked { color: var(--like-color); }
.action-btn.liked svg { fill: var(--like-color); stroke: var(--like-color); }
.action-btn.retweeted { color: var(--rt-color); }
.action-btn.retweeted svg { stroke: var(--rt-color); }

/* Replies Section */
.reply-input { flex-grow: 1; border: 1px solid var(--border-color); border-radius: 20px; padding: 6px 15px; outline: none; margin-right: 10px; font-size: 14px; }
.reply-input:focus { border-color: var(--primary); }

/* Right Sidebar */
.right-sidebar { display: none; width: 350px; padding: 20px; height: 100vh; position: sticky; top: 0; }
@media (min-width: 1000px) { .right-sidebar { display: block; } }
.search-bar { background-color: var(--input-bg); border-radius: 9999px; display: flex; align-items: center; padding: 10px 20px; margin-bottom: 20px; }
.search-bar input { background: transparent; border: none; outline: none; margin-left: 10px; width: 100%; color: var(--text-main); }
.search-bar input::placeholder { color: var(--text-muted); }
.suggestion-card { background-color: var(--input-bg); border-radius: 16px; padding: 15px; }
.suggestion-card h4 { font-weight: 800; font-size: 20px; margin-bottom: 15px; }
.suggestion-item { display: flex; align-items: center; padding: 10px 0; transition: 0.2s; cursor: pointer; }
.suggestion-item:hover { background-color: var(--hover-bg); }
.sugg-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; background-size: cover; }
.sugg-info { flex-grow: 1; overflow: hidden;}
.sugg-info strong { display: block; font-size: 15px; color: var(--text-main); white-space:nowrap; text-overflow:ellipsis; overflow:hidden;}
.sugg-info span { font-size: 14px; color: var(--text-muted); }
.sugg-btn { background-color: var(--btn-dark); color: var(--bg-color); border: none; border-radius: 9999px; padding: 6px 16px; font-weight: 700; font-size: 14px; }
.sugg-btn:hover { opacity: 0.9; }

/* Mobile Bottom Navigation & Header */
.bottom-nav { display: none; }
@media (max-width: 600px) {
    .left-sidebar { display: none; }
    .main-feed { border-right: none; }
    .pb-mobile { padding-bottom: 90px; }
    
    .mobile-header { position: sticky; top: 0; background-color: var(--header-bg); backdrop-filter: blur(12px); z-index: 10; }
    
    .bottom-nav {
        display: flex; 
        position: fixed; 
        bottom: 15px; 
        left: 50%;
        transform: translateX(-50%);
        width: 92%; 
        max-width: 450px;
        background: var(--header-bg); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid var(--border-color);
        justify-content: space-around; 
        padding: 10px 8px; 
        z-index: 1000;
        border-radius: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }
    
    .nav-link-tw {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        padding: 6px;
        border-radius: 12px;
        position: relative;
    }
    
    .nav-link-tw:active {
        transform: scale(0.85);
    }
    
    .nav-link-tw.active {
        color: var(--primary) !important;
    }
    
    .nav-link-tw.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        width: 5px;
        height: 5px;
        background: var(--primary);
        border-radius: 50%;
        box-shadow: 0 0 8px var(--primary);
    }
}

/* Animations */
.view-panel { display: none; opacity: 0; transition: opacity 0.3s ease; }
.view-panel.active { display: block; opacity: 1; }
.eyewash-effect { animation: eyewash 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes eyewash { 0% { filter: blur(10px); opacity: 0; } 100% { filter: blur(0); opacity: 1; } }
.shake { animation: shake 0.4s both; }
@keyframes shake { 10%,90%{transform:translateX(-2px);} 30%,70%{transform:translateX(4px);} 50%{transform:translateX(-4px);} }

/* Lightbox Overlay */
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.95);
    z-index: 9999;
    flex-direction: column;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: 0.2s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}
#lightbox-swiper {
    width: 100%;
    height: 100%;
}
#lightbox-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
#lightbox-swiper .swiper-slide img, #lightbox-swiper .swiper-slide video {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

/* Profile specific */
.profile-banner {
    width: 100%;
    height: 140px;
    background-color: var(--primary);
    background-size: cover;
    background-position: center;
}
.profile-avatar-container {
    position: relative;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Changed from flex-end */
    margin-bottom: 10px;
}
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    background-color: #fff;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    margin-top: -50px; /* Avatar overlaps banner */
}

.profile-actions-wrapper {
  width: auto;
  display: flex;
  margin-top: 10px;
}

.profile-action-btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 6px 12px;
    font-size: 13px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #cfd9de;
    background: transparent;
    color: var(--text-main);
    margin-top: 5px;
}

.btn-poke-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
}
.btn-poke-primary:hover {
    filter: brightness(0.9);
}

.btn-follow-action {
    background-color: #0f1419 !important;
    color: #ffffff !important;
    border: none !important;
}
[data-theme="dark"] .btn-follow-action {
    background-color: #eff3f4 !important;
    color: #0f1419 !important;
}

.btn-unfollow {
    border-color: #cfd9de !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .btn-unfollow {
    border-color: #536471 !important;
}

.btn-block-profile {
    border-color: #cfd9de !important;
    color: #f4212e !important;
}
.btn-block-profile:hover {
    background-color: rgba(244, 33, 46, 0.1) !important;
}

.btn-settings-profile {
    border: 1px solid #cfd9de !important;
    color: var(--text-main) !important;
    background: transparent !important;
    transition: 0.2s;
}
.btn-settings-profile:hover {
    background-color: var(--hover-bg) !important;
}
[data-theme="dark"] .btn-settings-profile {
    border-color: #536471 !important;
}
[data-theme="dim"] .btn-settings-profile {
    border-color: #536471 !important;
}
@media (max-width: 576px) {
    .profile-banner { height: 120px; }
    .profile-avatar { width: 80px; height: 80px; margin-top: -40px; }
    .profile-action-btn { padding: 4px 8px; font-size: 11px; }
    .profile-actions-wrapper { margin-right: -10px; gap: 4px; }
}
.profile-action-btn:hover {
    background-color: var(--hover-bg);
}

/* Premium Button Styling */
.btn-get-premium-profile {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-get-premium-profile::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: none;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

.btn-get-premium-profile:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    filter: brightness(1.1);
}

/* Link Resets */
a.text-dark, a.text-dark:visited, a.text-dark:active { color: var(--text-main) !important; }
a.text-muted, a.text-muted:visited, a.text-muted:active { color: var(--text-muted) !important; }
a.text-dark:hover, a.text-muted:hover { text-decoration: underline !important; }

/* Mobile Compose FAB & Modal */
.mobile-fab {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: 0.2s;
}
.mobile-fab:active { transform: scale(0.95); }

.compose-close-btn { 
    display: none; 
    position: absolute; 
    top: 15px; 
    left: 15px; 
    background: transparent; 
    border: none; 
    font-size: 28px; 
    color: var(--text-main); 
    cursor: pointer;
}

@media (max-width: 575px) {
    .compose-box {
        display: none !important; /* hidden by default on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 1050;
        flex-direction: column;
        padding-top: 60px;
        background-color: var(--bg-color);
    }
    .compose-box.mobile-active {
        display: flex !important;
    }
    .compose-close-btn {
        display: block !important;
    }
}

/* Display Names in Posts & Comments (Blue/Pink) */
.post-meta a.text-dark { color: var(--primary) !important; }
.post-meta a.text-dark.female { color: #f91880 !important; }

.reply-item strong a.text-dark { color: var(--primary) !important; }
.reply-item strong a.text-dark.female { color: #f91880 !important; }

/* Mentions */
.mention {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.mention:hover {
    text-decoration: underline;
}

/* --- Post Menu --- */
.post-menu-container { position: relative; }
.post-item .post-menu-container { margin-left: auto; }
.post-menu-btn { 
    background: none; border: none; padding: 5px; border-radius: 50%; color: var(--text-muted); cursor: pointer; transition: 0.2s; 
}
.post-menu-btn:hover { background-color: rgba(29, 155, 240, 0.1); color: var(--primary); }
.post-menu { 
    position: absolute; right: 0; top: 100%; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 8px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); z-index: 100; display: none; min-width: 150px; overflow: hidden;
}
.post-menu-item { 
    padding: 10px 15px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: 0.2s; font-size: 14px; color: var(--text-main);
}
.post-menu-item:hover { background-color: var(--hover-bg); }
.post-menu-item.danger { color: #f4212e; }
.post-menu-item svg { width: 18px; height: 18px; }

.mention-suggestions {
    position: absolute;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 2000;
    max-height: 200px;
    overflow-y: auto;
    min-width: 200px;
    display: none;
}
.mention-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.mention-item:hover, .mention-item.active {
    background-color: var(--hover-bg);
}
.mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    background-size: cover;
    background-position: center;
}
.mention-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.mention-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}
.mention-username {
    font-size: 13px;
    color: var(--text-muted);
}

/* Sticker Picker Tabs */
.sticker-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    padding: 0 10px;
    gap: 15px;
}
.sticker-tab-btn {
    background: none;
    border: none;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}
.sticker-tab-btn:hover {
    color: var(--primary);
}
.sticker-tab-btn.active {
    color: var(--primary);
}
.sticker-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 99px;
}
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
    max-height: 280px;
    overflow-y: auto;
}

/* Reaction Panel */
.reaction-panel {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 5px 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    white-space: nowrap;
    animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.reaction-emoji {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
    display: inline-block;
}
.reaction-emoji:hover {
    transform: scale(1.3);
}
.post-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}
.reaction-pill {
    background: var(--hover-bg);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    transition: 0.2s;
}
.reaction-pill.active {
    border-color: var(--primary);
    background: rgba(29, 155, 240, 0.1);
}

/* Premium Promotion Card */
.premium-promo-card {
    background: linear-gradient(135deg, #1d9bf0 0%, #8e2de2 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(29, 155, 240, 0.3);
    transition: 0.3s;
    cursor: pointer;
}
.premium-promo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(29, 155, 240, 0.4);
}
.premium-promo-card h5 {
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.premium-promo-card p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.4;
}
.premium-promo-card .btn-promo {
    background: white;
    color: black;
    border: none;
    border-radius: 999px;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}
.premium-promo-card .btn-promo:hover {
    background: #f1f1f1;
    transform: scale(1.05);
}
.premium-promo-card svg.star-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    opacity: 0.15;
    transform: rotate(15deg);
}

/* Responsive Post Meta Fix */
    }
}

/* Optimized Mobile Profile Layout */
@media (max-width: 576px) {
    .profile-avatar {
        width: 90px !important;
        height: 90px !important;
        margin-top: -45px !important;
        border-width: 3px !important;
    }
    .profile-avatar-container {
        padding: 0 5px !important;
    }
    .profile-action-btn {
        padding: 4px 10px !important;
        font-size: 12px !important;
        gap: 3px !important;
    }
    .profile-actions-wrapper {
        margin-top: 12px !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 5px !important;
        margin-right: -8px !important;
    }
}

/* Messenger Styles */
.messenger-container {
    display: flex;
    height: 100vh;
    background: var(--app-bg);
}

.messages-sidebar {
    width: 350px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .messages-sidebar { width: 100%; }
    .chat-view { display: none; }
    .chat-view.active { display: flex; position: fixed; inset: 0; z-index: 1000; width: 100%; }
}

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

.conv-list {
    flex-grow: 1;
    overflow-y: auto;
}

.conv-item {
    display: flex;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
    align-items: center;
}

.conv-item:hover { background-color: var(--hover-bg); }
.conv-item.active { background-color: var(--input-bg); border-right: 2px solid var(--primary); }

.conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.conv-info { flex-grow: 1; min-width: 0; }
.conv-name { font-weight: 700; display: block; }
.conv-last-msg { color: var(--text-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.chat-view {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
}

.chat-header {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

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

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

.msg-media {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 5px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input-wrapper {
    flex-grow: 1;
    background: var(--input-bg);
    border-radius: 20px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
}

.chat-input-wrapper input {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 8px 0;
    color: var(--text-main);
}

.online-indicator {
    width: 12px;
    height: 12px;
    background-color: #00ba7c;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.offline-indicator {
    width: 12px;
    height: 12px;
    background-color: #71767b;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
}
