/* ============================================
   BASE STYLES
   ============================================ */

html {
    font-size: 14px;
    height: 100%;
    /* User font settings - defaults */
    --user-font-size: 16px;
    --user-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Main content font settings - applies to body except header/footer */
main,
.main-content,
.content-area,
.container-fluid>.row>.col-lg-6,
.container-fluid>.row>.col-lg-10,
.posts-container,
.chat-messages,
.profile-content,
.glass-card:not(header *):not(footer *),
/* Post content - actual class names */
.post-card,
.post-content,
.post-text,
.feed-post,
.caption-text,
.post-caption-ig,
.comment-text,
.comment-content,
/* Chat content - actual class names */
.message-bubble,
.message-bubble-container,
.message-content,
.message-content-text,
#chat-messages,
.chat-window,
/* Other content areas */
.notification-item,
.search-results,
.settings-form,
.modal-body {
    font-size: var(--user-font-size) !important;
    font-family: var(--user-font-family) !important;
}

/* Font size data attribute overrides */
html[data-font-size="small"] main,
html[data-font-size="small"] .main-content,
html[data-font-size="small"] .content-area,
html[data-font-size="small"] .glass-card:not(header *):not(footer *),
html[data-font-size="small"] .post-card,
html[data-font-size="small"] .post-content,
html[data-font-size="small"] .caption-text,
html[data-font-size="small"] .post-caption-ig,
html[data-font-size="small"] .message-bubble,
html[data-font-size="small"] .message-content-text,
html[data-font-size="small"] #chat-messages,
html[data-font-size="small"] .modal-body {
    font-size: 14px !important;
}

html[data-font-size="large"] main,
html[data-font-size="large"] .main-content,
html[data-font-size="large"] .content-area,
html[data-font-size="large"] .glass-card:not(header *):not(footer *),
html[data-font-size="large"] .post-card,
html[data-font-size="large"] .post-content,
html[data-font-size="large"] .caption-text,
html[data-font-size="large"] .post-caption-ig,
html[data-font-size="large"] .message-bubble,
html[data-font-size="large"] .message-content-text,
html[data-font-size="large"] #chat-messages,
html[data-font-size="large"] .modal-body {
    font-size: 18px !important;
}

html[data-font-size="x-large"] main,
html[data-font-size="x-large"] .main-content,
html[data-font-size="x-large"] .content-area,
html[data-font-size="x-large"] .glass-card:not(header *):not(footer *),
html[data-font-size="x-large"] .post-card,
html[data-font-size="x-large"] .post-content,
html[data-font-size="x-large"] .caption-text,
html[data-font-size="x-large"] .post-caption-ig,
html[data-font-size="x-large"] .message-bubble,
html[data-font-size="x-large"] .message-content-text,
html[data-font-size="x-large"] #chat-messages,
html[data-font-size="x-large"] .modal-body {
    font-size: 20px !important;
}

/* Font family overrides */
html[data-font-family="inter"] main,
html[data-font-family="inter"] .main-content,
html[data-font-family="inter"] .content-area,
html[data-font-family="inter"] .glass-card:not(header *):not(footer *),
html[data-font-family="inter"] .post-card,
html[data-font-family="inter"] .post-content,
html[data-font-family="inter"] .message-bubble,
html[data-font-family="inter"] #chat-messages,
html[data-font-family="inter"] .modal-body {
    font-family: 'Inter', sans-serif;
}

html[data-font-family="roboto"] main,
html[data-font-family="roboto"] .main-content,
html[data-font-family="roboto"] .content-area,
html[data-font-family="roboto"] .glass-card:not(header *):not(footer *),
html[data-font-family="roboto"] .post-card,
html[data-font-family="roboto"] .post-content,
html[data-font-family="roboto"] .message-bubble,
html[data-font-family="roboto"] #chat-messages,
html[data-font-family="roboto"] .modal-body {
    font-family: 'Roboto', sans-serif;
}

html[data-font-family="opensans"] main,
html[data-font-family="opensans"] .main-content,
html[data-font-family="opensans"] .content-area,
html[data-font-family="opensans"] .glass-card:not(header *):not(footer *),
html[data-font-family="opensans"] .post-card,
html[data-font-family="opensans"] .post-content,
html[data-font-family="opensans"] .message-bubble,
html[data-font-family="opensans"] #chat-messages,
html[data-font-family="opensans"] .modal-body {
    font-family: 'Open Sans', sans-serif;
}

html[data-font-family="lato"] main,
html[data-font-family="lato"] .main-content,
html[data-font-family="lato"] .content-area,
html[data-font-family="lato"] .glass-card:not(header *):not(footer *),
html[data-font-family="lato"] .post-card,
html[data-font-family="lato"] .post-content,
html[data-font-family="lato"] .message-bubble,
html[data-font-family="lato"] #chat-messages,
html[data-font-family="lato"] .modal-body {
    font-family: 'Lato', sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

/* Email login collapse button chevron rotation */
.transition-transform {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .transition-transform {
    transform: rotate(180deg);
}

/* Collapse section border styling */
#email-login-section,
#email-register-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

[data-theme="dark"] #email-login-section,
[data-theme="dark"] #email-register-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Utility: hover background light */
.hover-bg-light:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .hover-bg-light:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Likes clickable styling */
.likes-clickable {
    cursor: pointer;
}

/* Stacked avatars for likes */
.likes-avatars-stack {
    display: flex;
    align-items: center;
    margin-right: 6px;
}

.likes-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--card-bg, #fff);
    margin-left: -8px;
    object-fit: cover;
}

.likes-avatar:first-child {
    margin-left: 0;
}

.likes-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
}

.post-likes-ig {
    display: flex;
    align-items: center;
    gap: 4px;
}

.likes-text {
    font-size: 0.9rem;
}

[data-theme="dark"] .likes-avatar {
    border-color: #1e1e1e;
}

:root {
    --bg-color: #f0f2f5;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-color: #212529;
    --nav-bg: #ffffff;
    --nav-text: #212529;
    --sidebar-width: 240px;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --bg-gradient: none;
    --text-color: #e0e0e0;
    --nav-bg: #1e1e1e;
    --nav-text: #e0e0e0;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.footer {
    flex-shrink: 0;
}

/* ============================================
   NAVBAR STYLES
   ============================================ */

.navbar {
    transition: all 0.3s ease;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    max-width: 950px;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .glass-nav {
    background: rgba(20, 20, 20, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--nav-text);
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.navbar-light .navbar-brand {
    color: var(--nav-text);
}

header.sticky-top {
    z-index: 1050;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

[data-theme="dark"] .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-glass {
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    color: var(--text-color);
}

.btn-glass:hover,
.btn-glass:focus,
.btn-glass[aria-expanded="true"] {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .btn-glass {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .btn-glass:hover,
[data-theme="dark"] .btn-glass:focus,
[data-theme="dark"] .btn-glass[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #6c757d;
}

[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .btn-outline-secondary:focus,
[data-theme="dark"] .btn-outline-secondary:active {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* ============================================
   DARK THEME UTILITIES
   ============================================ */

[data-theme="dark"] .footer.text-muted {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bg-light-subtle {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] a.text-muted:hover {
    color: #fff !important;
}

[data-theme="dark"] .border-top {
    border-color: #2d2d2d !important;
}

[data-theme="dark"] .border-bottom {
    border-color: #2d2d2d !important;
}

[data-theme="dark"] .border {
    border-color: #2d2d2d !important;
}

[data-theme="dark"] ::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1;
}

[data-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #2d2d2d;
    color: #e0e0e0;
}

/* ============================================
   GLASS CARD UTILITY
   ============================================ */

.glass-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 2rem;
}

[data-theme="dark"] .glass-card {
    background-color: rgba(30, 30, 30, 0.92);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Ensure text inside glass-card is readable in dark mode */
[data-theme="dark"] .glass-card h5,
[data-theme="dark"] .glass-card h6,
[data-theme="dark"] .glass-card .list-group-item {
    color: #e0e0e0;
}

[data-theme="dark"] .glass-card .list-group-item h6 {
    color: #ffffff;
}

[data-theme="dark"] .glass-card .list-group-item small.text-muted {
    color: #a0a0a0 !important;
}

.glass-dropdown {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .glass-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-dropdown .dropdown-item {
    color: var(--text-color);
    transition: all 0.2s ease;
}

[data-theme="dark"] .glass-dropdown .dropdown-item {
    color: #e0e0e0;
}

.glass-dropdown .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .glass-dropdown .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.gradient-text {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.phone-mockup {
    width: 280px;
    height: 550px;
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.phone-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .phone-screen {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .phone-screen .bg-light {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .phone-screen .text-dark {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .preview-section {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Phone Preview Search */
.search-result-item:hover {
    background-color: #f0f2f5;
}

[data-theme="dark"] .search-result-item:hover {
    background-color: #2d2d2d;
}

[data-theme="dark"] #searchResults {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="dark"] .phone-screen .form-control {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .phone-screen .border-bottom,
[data-theme="dark"] .phone-screen .border-top {
    border-color: #333 !important;
}

.mini-post:hover {
    background-color: #e9ecef !important;
}

[data-theme="dark"] .mini-post {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .mini-post:hover {
    background-color: #3d3d3d !important;
}

/* ============================================
   AUTHENTICATION PAGE STYLES
   ============================================ */

body>.container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main[role="main"] {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: min(480px, 100%);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .auth-card {
    background-color: rgba(30, 30, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-tabs {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 999px;
    position: relative;
}

[data-theme="dark"] .auth-tabs {
    background: rgba(255, 255, 255, 0.05);
}

.tab-glider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background-color: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 0;
}

[data-theme="dark"] .tab-glider {
    background-color: #4d4d4d !important;
}

.auth-tabs .auth-tab {
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    padding: 0.6rem 1rem;
    transition: color 0.3s ease;
    background: transparent !important;
    color: var(--text-color);
    opacity: 0.7;
    z-index: 1;
}

.auth-tabs .auth-tab.active {
    color: #000;
    opacity: 1;
    box-shadow: none;
}

[data-theme="dark"] .auth-tabs .auth-tab.active {
    color: #fff;
}

[data-theme="dark"] .auth-tab:not(.active) {
    color: #adb5bd;
}

[data-theme="dark"] .auth-tab:not(.active):hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-body {
    margin-top: 2rem;
}

.form-feedback {
    min-height: 1.25rem;
    font-size: 0.9rem;
}

.auth-card .form-control {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-card .form-control:focus {
    background-color: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-theme="dark"] .auth-card .form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .auth-card .form-control:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--bs-primary);
}

.auth-card .btn-primary {
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   AGE VERIFICATION MODAL
   ============================================ */

.age-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-theme="dark"] .age-modal-overlay {
    background: rgba(0, 0, 0, 0.95);
}

.age-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.age-modal-content {
    max-width: 450px;
    width: 90%;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background-color: #ffffff !important;
}

[data-theme="dark"] .age-modal-content {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background-color: rgba(30, 30, 30, 0.6) !important;
}

.age-modal-overlay.show .age-modal-content {
    transform: scale(1);
}

/* ============================================
   CLOUDFLARE TURNSTILE STYLES
   ============================================ */

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.cf-turnstile iframe {
    margin: 0 auto;
}

/* ============================================
   CONSOLE POPUP STYLES
   ============================================ */

.console-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: #1e1e1e;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Consolas', 'Monaco', monospace;
    z-index: 9999;
    border: 1px solid #333;
    overflow: hidden;
    display: none;
}

.console-header {
    background: #2d2d2d;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.console-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.console-dot.red {
    background: #ff5f56;
}

.console-dot.yellow {
    background: #ffbd2e;
}

.console-dot.green {
    background: #27c93f;
}

.console-title {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}

.console-body {
    padding: 15px;
    color: #27c93f;
    font-size: 14px;
    min-height: 100px;
}

.console-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ============================================
   AVATAR STYLES
   ============================================ */

.avatar-egg {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #fff;
}

[data-theme="dark"] .avatar-egg {
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
}

/* ============================================
   SIDEBAR NAVIGATION STYLES
   ============================================ */

.nav-link-custom {
    color: var(--text-color);
    transition: all 0.2s ease;
    font-weight: 500;
    border-radius: 50rem;
    text-decoration: none;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.nav-link-custom i {
    font-size: 1.25rem;
}

.search-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.search-input {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

[data-theme="dark"] .search-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-input:focus {
    background: var(--bg-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
    padding-left: 1rem;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
}

[data-theme="dark"] .search-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-result-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

[data-theme="dark"] .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

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

.search-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.search-result-username {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

[data-theme="dark"] .search-result-username {
    color: #a0a0a0;
}

.search-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

[data-theme="dark"] .search-no-results {
    color: #a0a0a0;
}


/* ============================================
   PROFILE PAGE STYLES
   ============================================ */

.profile-header {
    position: relative;
    margin-bottom: 1rem;
}

.cover-photo {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border: 5px solid var(--bg-color);
    border-radius: 50%;
    margin-top: -70px;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    overflow: hidden;
}

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

[data-theme="dark"] .profile-avatar {
    border-color: var(--bg-color);
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
}

.stat-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.post-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-image {
    max-height: 400px;
    object-fit: cover;
    border-radius: 16px;
}

.edit-field {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.edit-field:hover {
    background: rgba(0, 0, 0, 0.03);
}

.edit-field:focus {
    background: #fff;
    border-color: var(--bs-primary);
    outline: none;
}

[data-theme="dark"] .edit-field:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .edit-field:focus {
    background: rgba(0, 0, 0, 0.3);
}

.info-icon {
    width: 20px;
    text-align: center;
    opacity: 0.5;
}

/* ============================================
   HOME PAGE STYLES
   ============================================ */

.trend-item {
    transition: background-color 0.2s;
    cursor: pointer;
}

.trend-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .trend-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border: 2px solid var(--bg-color);
    border-radius: 50%;
}

/* ============================================
   CHAT PAGE STYLES
   ============================================ */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Search Input - Minimal Design */
.chat-search-input {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chat-search-input:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: none;
    outline: none;
}

.chat-search-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
    font-weight: 400;
}

[data-theme="dark"] .chat-search-input {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .chat-search-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .chat-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Chat Header */
.chat-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .chat-header {
    border-color: rgba(255, 255, 255, 0.05);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

/* Chat Empty State */
.chat-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bs-primary);
}

[data-theme="dark"] .chat-empty-icon {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

/* Chat Input Area */
.chat-input-wrapper {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .chat-input-wrapper {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.chat-message-input {
    background: rgba(0, 0, 0, 0.03);
    border: none;
    border-radius: 20px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    resize: none;
    max-height: 120px;
    transition: all 0.2s ease;
}

.chat-message-input:focus {
    background: rgba(0, 0, 0, 0.05);
    box-shadow: none;
    outline: none;
}

[data-theme="dark"] .chat-message-input {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

[data-theme="dark"] .chat-message-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MODAL STYLES
   ============================================ */

/* Glass card modal content - remove height: 100% */
.modal-content.glass-card {
    height: auto;
}

/* ============================================
   NOTIFICATION ITEM STYLES
   ============================================ */
.notification-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.notification-item.unread {
    background-color: rgba(13, 110, 253, 0.08);
}

.notification-item.unread:hover {
    background-color: rgba(13, 110, 253, 0.12);
}

.notification-message {
    color: var(--text-color, #1a1a2e);
    line-height: 1.4;
    font-size: 0.95rem;
}

.notification-time {
    color: #6c757d;
    font-size: 0.85rem;
}

.notification-icon-badge {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    bottom: -2px;
    right: -2px;
    border: 2px solid #fff;
}

/* Dark mode notification styles */
[data-theme="dark"] .notification-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notification-item.unread {
    background-color: rgba(13, 110, 253, 0.15);
}

[data-theme="dark"] .notification-item.unread:hover {
    background-color: rgba(13, 110, 253, 0.2);
}

[data-theme="dark"] .notification-message {
    color: #ffffff;
}

[data-theme="dark"] .notification-time {
    color: #a0a0a0;
}

[data-theme="dark"] .notification-icon-badge {
    border-color: #1e1e1e;
}

/* Christmas theme notification styles */
[data-theme="christmas"] .notification-item {
    border-bottom-color: rgba(196, 30, 58, 0.08);
}

[data-theme="christmas"] .notification-item:hover {
    background-color: rgba(196, 30, 58, 0.03);
}

[data-theme="christmas"] .notification-item.unread {
    background-color: rgba(196, 30, 58, 0.08);
}

[data-theme="christmas"] .notification-item.unread:hover {
    background-color: rgba(196, 30, 58, 0.12);
}

[data-theme="christmas"] .notification-message {
    color: #1a1a2e;
}

[data-theme="christmas"] .notification-icon-badge {
    border-color: #fff;
}

/* Modal glass-card - more opaque for better text readability */
.modal .glass-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .modal .glass-card {
    background-color: rgba(25, 25, 25, 0.98);
}

[data-theme="christmas"] .modal .glass-card {
    background-color: rgba(255, 255, 255, 0.95);
}

/* Modal form inputs */
.modal .form-control,
.modal .form-select {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.modal .form-control:focus,
.modal .form-select:focus {
    background-color: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

[data-theme="dark"] .modal .form-control,
[data-theme="dark"] .modal .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .modal .form-control:focus,
[data-theme="dark"] .modal .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

[data-theme="dark"] .modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .modal .form-label {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .modal .form-select option {
    background-color: #1e1e1e;
    color: #fff;
}

/* Modal close button */
[data-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* User list items in modals (followers/following) */
.user-list-item {
    transition: background-color 0.2s ease;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.user-list-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.user-list-item:last-child {
    border-bottom: none !important;
}

[data-theme="dark"] .user-list-item {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .user-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .user-list-item .fw-bold {
    color: #fff;
}

[data-theme="dark"] .user-list-item small.text-muted {
    color: #a0a0a0 !important;
}

/* Modal header styling for dark mode */
[data-theme="dark"] .modal-header {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-header .modal-title {
    color: #f0f0f0;
}

/* Modal content dark mode */
[data-theme="dark"] .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-body {
    color: #d0d0d0;
}

/* Step indicators */
[data-theme="dark"] .step-circle {
    background-color: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .step-circle.active {
    background-color: #4287f5;
    color: white;
    border-color: #4287f5;
}

[data-theme="dark"] .step-line {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .step-line.active {
    background-color: #4287f5;
}

/* Text colors */
[data-theme="dark"] .text-muted {
    color: #999 !important;
}

[data-theme="dark"] .form-text {
    color: #888;
}

/* ============================================
   PASSWORD RESET MODAL STYLES
   ============================================ */

/* Modern glassmorphic modal */
#passwordResetModal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #passwordResetModal .modal-content {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Step indicators container */
#passwordResetModal .d-flex.justify-content-between {
    position: relative;
    padding: 0 2rem;
}

/* Step circles - modern circular design */
.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(200, 200, 200, 0.2);
    border: 2px solid rgba(150, 150, 150, 0.3);
    color: #888;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.step-circle.active {
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    border-color: #4287f5;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 135, 245, 0.4);
    transform: scale(1.1);
}

[data-theme="dark"] .step-circle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .step-circle.active {
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    border-color: #5a9eff;
    box-shadow: 0 4px 12px rgba(90, 158, 255, 0.5);
}

/* Step indicators container - flex layout */
.step-indicators-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 2rem;
    position: relative;
}

/* Step wrapper - each step with its connector */
.step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    text-align: center;
    max-width: 120px;
}

.step-wrapper.last {
    flex: 1;
}

/* Step connector lines - positioned to connect circles */
.step-connector {
    position: absolute;
    top: 22px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: rgba(200, 200, 200, 0.3);
    transition: all 0.4s ease;
    z-index: 1;
    transform: translateX(22px);
}

.step-connector.active {
    background: linear-gradient(90deg, #4287f5 0%, #5a9eff 100%);
    box-shadow: 0 0 8px rgba(66, 135, 245, 0.4);
}

[data-theme="dark"] .step-connector {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .step-connector.active {
    background: linear-gradient(90deg, #4287f5 0%, #5a9eff 100%);
    box-shadow: 0 0 8px rgba(90, 158, 255, 0.6);
}

/* Step circle - ensure it's above the connector line */
.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    background: #fff;
    border: 2px solid rgba(150, 150, 150, 0.3);
    color: #888;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 5;
}

.step-circle.active {
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    border-color: #4287f5;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 135, 245, 0.4);
    transform: scale(1.1);
}

.step-circle.completed {
    background: #4287f5;
    border-color: #4287f5;
    color: white;
}

[data-theme="dark"] .step-circle {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .step-circle.active {
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    border-color: #5a9eff;
    box-shadow: 0 4px 12px rgba(90, 158, 255, 0.5);
}

/* Step labels */
.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.step-wrapper:has(.step-circle.active) .step-label {
    color: #4287f5;
    font-weight: 600;
}

[data-theme="dark"] .step-label {
    color: #888;
}

/* Step labels */
#passwordResetModal small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    transition: color 0.3s ease;
}

#passwordResetModal .text-center.flex-fill {
    transition: all 0.3s ease;
}

#passwordResetModal .step-circle.active+small,
#passwordResetModal #step-indicator-1:has(.step-circle.active) small,
#passwordResetModal #step-indicator-2:has(.step-circle.active) small,
#passwordResetModal #step-indicator-3:has(.step-circle.active) small {
    color: #4287f5;
    font-weight: 600;
}

[data-theme="dark"] #passwordResetModal small {
    color: #888;
}

/* Modal header styling */
#passwordResetModal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

[data-theme="dark"] #passwordResetModal .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

#passwordResetModal .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form inputs in modal */
#passwordResetModal .form-control {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

#passwordResetModal .form-control:focus {
    border-color: #4287f5;
    box-shadow: 0 0 0 4px rgba(66, 135, 245, 0.1);
    background: white;
}

[data-theme="dark"] #passwordResetModal .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] #passwordResetModal .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5a9eff;
    box-shadow: 0 0 0 4px rgba(90, 158, 255, 0.15);
}

/* Verification code input - monospace styling */
#verification-code,
#twoFactorCode,
#twoFactorVerifyCode,
.verification-code-input {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 1.75rem;
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 600;
    caret-color: transparent;
}

/* Buttons in modal */
#passwordResetModal .btn-primary {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #4287f5 0%, #5a9eff 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(66, 135, 245, 0.3);
    transition: all 0.3s ease;
}

#passwordResetModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 135, 245, 0.4);
}

#passwordResetModal .btn-primary:active {
    transform: translateY(0);
}

#passwordResetModal .btn-outline-secondary {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#passwordResetModal .btn-outline-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #passwordResetModal .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] #passwordResetModal .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Icons in modal */
#passwordResetModal .bi-envelope-check,
#passwordResetModal .bi-check-circle {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Timer styling */
#code-timer {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-weight: 700;
    font-size: 1rem;
}

/* Alert messages */
#passwordResetModal .alert {
    border-radius: 12px;
    border: none;
    backdrop-filter: blur(10px);
}

/* Close button */
#passwordResetModal .btn-close {
    background-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#passwordResetModal .btn-close:hover {
    opacity: 1;
}

[data-theme="dark"] #passwordResetModal .btn-close {
    filter: invert(1);
}

/* Input group styling */
#passwordResetModal .input-group .btn {
    border-radius: 0 12px 12px 0;
    border-left: none;
}

#passwordResetModal .input-group .form-control {
    border-radius: 12px 0 0 12px;
}

/* Form labels */
#passwordResetModal .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #333;
}

[data-theme="dark"] #passwordResetModal .form-label {
    color: #d0d0d0;
}

/* ============================================
   ACCORDION DARK MODE
   ============================================ */

/* Accordion buttons */
[data-theme="dark"] .accordion-button {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: rgba(66, 135, 245, 0.15);
    color: #5a9eff;
}

[data-theme="dark"] .accordion-button:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* Accordion body content */
[data-theme="dark"] .accordion-body {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-item {
    background-color: transparent;
}

/* ============================================
   ABOUT PAGE DARK MODE
   ============================================ */

/* Glass card headings */
[data-theme="dark"] .glass-card h5,
[data-theme="dark"] .glass-card h6 {
    color: #f0f0f0;
}

[data-theme="dark"] .glass-card .text-muted {
    color: #b0b0b0 !important;
}

/* Security feature cards */
[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .glass-card .small.text-muted {
    color: #a0a0a0 !important;
}

/* ============================================
   DOCUMENTATION PAGE STYLES
   ============================================ */

/* Documentation sidebar navigation */
.nav-link {
    color: var(--text-color);
    border-left: 3px solid transparent;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: rgba(66, 135, 245, 0.05);
}

/* Documentation glass cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .glass-card {
    background: rgba(255, 255, 255, 0.02);
}

/* Code blocks in documentation */
code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
}

/* Accordion default state (light mode) */
.accordion-button {
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(66, 135, 245, 0.1);
    color: var(--primary-color);
}

/* ============================================
   SETTINGS PAGE STYLES
   ============================================ */

/* Settings Navigation Tabs */
.settings-nav-wrapper {
    position: relative;
}

.settings-tabs-nav {
    padding: 0.5rem;
}

.settings-nav-pills {
    gap: 0.25rem;
    padding: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.settings-nav-pills::-webkit-scrollbar {
    display: none;
}

.settings-tab-link {
    color: var(--text-color);
    background: transparent;
    border: none;
    border-radius: 50rem;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Higher specificity to override Bootstrap nav-pills */
.nav-pills .nav-link.settings-tab-link:hover {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

.nav-pills .nav-link.settings-tab-link.active {
    background-color: var(--bs-danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--bs-danger-rgb), 0.3);
}

[data-theme="dark"] .nav-pills .nav-link.settings-tab-link {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .nav-pills .nav-link.settings-tab-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-pills .nav-link.settings-tab-link.active {
    color: #fff;
    background-color: var(--bs-danger);
}

/* Settings Form Styles */
.settings-form .form-control,
.settings-form .form-select {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.settings-form .form-control:focus,
.settings-form .form-select:focus {
    background-color: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

[data-theme="dark"] .settings-form .form-control,
[data-theme="dark"] .settings-form .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .settings-form .form-control:focus,
[data-theme="dark"] .settings-form .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--bs-primary);
}

[data-theme="dark"] .settings-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .settings-form .form-select option {
    background-color: #1e1e1e;
    color: #fff;
}

/* Font settings specific styling */
[data-theme="dark"] #fontFamilyPreference,
[data-theme="dark"] .font-size-selector .font-size-option {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

[data-theme="dark"] .font-size-selector .font-size-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .font-size-selector .font-size-option.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

[data-theme="dark"] .font-preview-box {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Settings Input Group */
.settings-form .input-group .input-group-text {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px 0 0 12px;
    color: var(--text-color);
}

[data-theme="dark"] .settings-form .input-group .input-group-text {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.settings-form .input-group .form-control {
    border-radius: 0 12px 12px 0;
}

/* Settings Toggle/Switch */
.settings-switch {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.settings-switch:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.settings-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-toggle-item {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    transition: background-color 0.2s;
}

.settings-toggle-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .settings-toggle-item {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .settings-toggle-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-toggle-item .form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Settings Info Box */
.settings-info-box {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

[data-theme="dark"] .settings-info-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Profile Avatar Large */
.profile-avatar-large {
    width: 120px;
    height: 120px;
    position: relative;
}

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

.profile-avatar-large .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 3rem;
    color: #fff;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 1rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    min-width: 100px;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.theme-option.active {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.05);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .theme-option.active {
    background: rgba(var(--bs-primary-rgb), 0.15);
}

.theme-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.theme-option:hover .theme-preview {
    transform: scale(1.1);
}

.theme-preview.theme-system {
    background: linear-gradient(135deg, #fff 50%, #1e1e1e 50%);
    border: 2px solid #e0e0e0;
    color: #667eea;
}

.theme-preview.theme-light {
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #ffc107;
}

.theme-preview.theme-dark {
    background: #1e1e1e;
    border: 2px solid #333;
    color: #6c757d;
}

.theme-option span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Password Strength */
.password-strength .progress {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="dark"] .password-strength .progress {
    background-color: rgba(255, 255, 255, 0.1);
}

.password-strength .progress-bar {
    transition: width 0.3s, background-color 0.3s;
}

/* Toggle Password Visibility */
.toggle-password {
    border-radius: 0 12px 12px 0;
}

/* Settings Toast */
#settingsToast {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#settingsToast.error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

/* Dark mode toast styling */
[data-theme="dark"] .toast {
    background-color: #2d2d2d !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .toast .toast-header {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .toast .toast-body {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .toast .btn-close {
    filter: invert(1);
}

/* Responsive Settings */
@media (max-width: 991.98px) {
    .settings-tab-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .settings-tab-link i {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .settings-nav-pills {
        justify-content: flex-start !important;
    }

    .settings-tab-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   POST CARD STYLES - INSTAGRAM STYLE
   ============================================ */

/* Instagram-style post card */
.post-card-ig {
    background: var(--nav-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 24px;
    /* overflow: hidden removed to allow dropdown menus to display properly */
}

[data-theme="dark"] .post-card-ig {
    background: #000;
    border-color: rgba(255, 255, 255, 0.15);
}

/* YouTube Embed Container - Responsive 16:9 */
.youtube-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* YouTube embed in post caption */
.post-caption-ig .youtube-embed-container,
.caption-text .youtube-embed-container {
    margin: 8px 0;
    border-radius: 8px;
}

/* Smaller embed for comments */
.comment-content .youtube-embed-container {
    max-width: 400px;
    padding-bottom: 225px;
    /* Fixed height for comments */
}

[data-theme="dark"] .youtube-embed-container {
    background: #1a1a1a;
}

/* YouTube embed in chat messages */
.chat-youtube-embed {
    max-width: 320px;
    padding-bottom: 180px;
    /* Fixed height for chat bubbles */
    margin: 8px 0;
    border-radius: 12px;
}

.chat-message-sent .chat-youtube-embed,
.chat-message-received .chat-youtube-embed {
    margin-top: 8px;
}

/* Make chat bubble wider when it contains a YouTube embed */
.chat-message-sent:has(.chat-youtube-embed),
.chat-message-received:has(.chat-youtube-embed) {
    max-width: 350px !important;
}

/* Remove bottom margin on paragraph when followed by youtube embed */
.chat-message-sent p:has(+ .chat-youtube-embed),
.chat-message-received p:has(+ .chat-youtube-embed) {
    margin-bottom: 0;
}

/* Post Header */
.post-header-ig {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
}

.avatar-ig {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--nav-bg, #fff), var(--nav-bg, #fff)) padding-box,
        linear-gradient(145deg, var(--bs-primary), #ff6b9d) border-box;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.2);
    overflow: hidden;
}

/* When avatar has a colored background (fallback with initial) */
.avatar-ig.d-flex {
    background:
        linear-gradient(145deg, #6b7280, #4b5563) padding-box,
        linear-gradient(145deg, var(--bs-primary), #ff6b9d) border-box !important;
    border: 2px solid transparent !important;
}

.avatar-ig img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-ig span {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .avatar-ig {
    background:
        linear-gradient(#1a1a1a, #1a1a1a) padding-box,
        linear-gradient(145deg, var(--bs-primary), #ff6b9d) border-box;
}

.post-username-ig {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.post-username-ig:hover {
    text-decoration: none;
}

.post-time-ig {
    color: #8e8e8e;
    font-size: 14px;
    margin-left: auto;
}

.post-time-ig::before {
    content: "•";
    margin-right: 8px;
}

/* Post Media - Instagram aspect ratio */
.post-media-ig {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-media-ig img,
.post-media-ig video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
}

/* Post Media Carousel Styles */
.post-carousel {
    position: relative;
    width: 100%;
    background: #000;
}

/* Ensure the carousel container takes full width */
.post-carousel .carousel {
    width: 100%;
}

/* Carousel item centering - use text-align instead of flex which breaks Bootstrap */
.post-carousel .carousel-item {
    text-align: center;
    background: #000;
}

.post-carousel .carousel-inner img,
.post-carousel .carousel-inner video {
    max-height: 600px;
    object-fit: contain;
    margin: 0 auto;
}

.post-carousel .carousel-control-prev,
.post-carousel .carousel-control-next {
    position: absolute;
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0.8;
    z-index: 10;
}

.post-carousel .carousel-control-prev {
    left: 15px;
}

.post-carousel .carousel-control-next {
    right: 15px;
}

.post-carousel .carousel-control-prev:hover,
.post-carousel .carousel-control-next:hover {
    opacity: 1;
}

.post-carousel .carousel-control-prev-icon,
.post-carousel .carousel-control-next-icon {
    filter: invert(1);
    width: 16px;
    height: 16px;
}

.post-carousel .carousel-indicators {
    margin-bottom: 10px;
}

.post-carousel .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.post-carousel .carousel-indicators button.active {
    background-color: #fff;
}

.carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}


/* Post Actions - Instagram Style */
.post-actions-ig {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}

.actions-left {
    display: flex;
    gap: 4px;
}

.action-btn-ig {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 24px;
    line-height: 1;
    transition: opacity 0.2s, transform 0.2s;
}

.action-btn-ig:hover {
    opacity: 0.6;
}

.action-btn-ig:active {
    transform: scale(0.9);
}

.action-btn-ig.like-btn:hover {
    color: var(--text-color);
}

.action-btn-ig.like-btn.liked {
    color: #ed4956;
}

.action-btn-ig.like-btn.liked i::before {
    content: "\F415";
}

/* Bookmark button active state */
.action-btn-ig.bookmark-btn.bookmarked {
    color: #0095f6;
}

[data-theme="dark"] .action-btn-ig.bookmark-btn.bookmarked {
    color: #58a6ff;
}

[data-theme="christmas"] .action-btn-ig.bookmark-btn.bookmarked {
    color: #FFD700;
}

/* Repost button active state */
.action-btn-ig.repost-btn.reposted {
    color: #00ba7c;
}

[data-theme="dark"] .action-btn-ig.repost-btn.reposted {
    color: #1db954;
}

[data-theme="christmas"] .action-btn-ig.repost-btn.reposted {
    color: #00ba7c;
}

/* Likes count */
.post-likes-ig {
    padding: 0 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

/* Caption */
.post-caption-ig {
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
}

.caption-username {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin-right: 6px;
}

.caption-username:hover {
    color: var(--text-color);
    text-decoration: none;
}

.caption-text {
    word-break: break-word;
}

/* Truncated caption with show more */
.caption-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.caption-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.show-more-btn {
    background: none;
    border: none;
    color: #8e8e8e;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}

.show-more-btn:hover {
    color: #c7c7c7;
}

[data-theme="dark"] .show-more-btn {
    color: #a0a0a0;
}

[data-theme="dark"] .show-more-btn:hover {
    color: #d0d0d0;
}

.more-btn {
    background: none;
    border: none;
    color: #8e8e8e;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
}

.more-btn:hover {
    color: #c7c7c7;
}


/* Hashtags and Mentions - Instagram style */
.hashtag-ig {
    color: #0095f6;
    text-decoration: none;
    font-weight: 600;
    font-style: italic;
    background: rgba(0, 149, 246, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mention-ig {
    color: #0095f6;
    text-decoration: none;
    font-weight: bold;
    background: rgba(0, 149, 246, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hashtag-ig:hover,
.mention-ig:hover {
    text-decoration: none;
    opacity: 0.9;
    background: rgba(0, 149, 246, 0.15);
}

[data-theme="dark"] .hashtag-ig,
[data-theme="dark"] .mention-ig {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.15);
}

[data-theme="dark"] .mention-ig:hover {
    background: rgba(88, 166, 255, 0.25);
}

/* Christmas theme mentions - festive colors! */
[data-theme="christmas"] .hashtag-ig,
[data-theme="christmas"] .mention-ig {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
}

[data-theme="christmas"] .hashtag-ig:hover,
[data-theme="christmas"] .mention-ig:hover {
    background: rgba(220, 38, 38, 0.18);
}


/* View comments link */
.view-comments-ig {
    display: block;
    padding: 4px 16px 8px;
    color: #8e8e8e;
    font-size: 14px;
    text-decoration: none;
}

.view-comments-ig:hover {
    text-decoration: none;
    color: #8e8e8e;
}

/* Add comment input */
.add-comment-ig {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    gap: 8px;
}

[data-theme="dark"] .add-comment-ig {
    border-color: rgba(255, 255, 255, 0.15);
}

.comment-input-ig {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
}

.comment-input-ig::placeholder {
    color: #8e8e8e;
}

.post-comment-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    opacity: 0.3;
}

.post-comment-btn:not(:disabled) {
    opacity: 1;
}

.post-comment-btn:hover:not(:disabled) {
    color: #00376b;
}

[data-theme="dark"] .post-comment-btn:hover:not(:disabled) {
    color: #1877f2;
}

/* Text-only posts styling */
.post-card-ig:not(:has(.post-media-ig)) .post-caption-ig {
    padding-top: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Quoted post embed in quote tweets */
.quoted-post {
    transition: opacity 0.2s;
}

.quoted-post:hover {
    opacity: 0.9;
}

/* Quoted post media - show full image/video at natural aspect ratio */
.quoted-post img,
.quoted-post video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: #000;
}

[data-theme="dark"] .quoted-post {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .quoted-post .text-dark {
    color: #e0e0e0 !important;
}

/* Reposted by header */
.reposted-by-header {
    background: rgba(0, 186, 124, 0.05);
}

.reposted-by-header i {
    color: #00ba7c;
}

[data-theme="dark"] .reposted-by-header {
    background: rgba(29, 185, 84, 0.1);
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Post composer */
#post-composer {
    width: 100%;
}

/* Feed container */
#feed-container {
    width: 100%;
}

/* Post Composer - modern clean look */
#post-composer {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

#post-composer textarea {
    font-size: 0.95rem;
    min-height: 50px;
}

#post-composer textarea:focus {
    outline: none;
}

#post-composer textarea::placeholder {
    color: #888;
}

/* Drag and drop visual feedback */
#post-composer.drag-over,
#chat-input-area.drag-over {
    border: 2px dashed var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
    transition: all 0.2s ease;
}

#post-composer.drag-over::before,
#chat-input-area.drag-over::before {
    content: "Drop files here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: var(--bs-primary);
    pointer-events: none;
    z-index: 100;
}

[data-theme="dark"] #post-composer.drag-over,
[data-theme="dark"] #chat-input-area.drag-over {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* Composer action buttons - clean icons */
.composer-action-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    font-size: 1rem;
}

.composer-action-btn:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary) !important;
}

[data-theme="dark"] .composer-action-btn:hover {
    background: rgba(var(--bs-primary-rgb), 0.2);
}

#post-composer .composer-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50%;
    border: 2.5px solid transparent;
    background:
        linear-gradient(145deg, #6b7280, #4b5563) padding-box,
        linear-gradient(145deg, #06b6d4, #0ea5e9) border-box !important;
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.25);
    overflow: hidden;
}

#post-composer .composer-avatar span {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}


/* ============================================
   INPUT HIGHLIGHTER - Real-time highlighting
   ============================================ */
.input-highlighter-container {
    position: relative;
    width: 100%;
    /* Ensure container matches textarea borders if needed, or let textarea handle it */
}

/* The background layer that shows the colors */
.input-highlight-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    /* Will be synced from textarea via JS */
    margin: 0;
    font-family: inherit;
    /* Will be synced via JS */
    font-size: inherit;
    /* Will be synced via JS */
    line-height: inherit;
    /* Will be synced via JS */
    white-space: pre-wrap;
    word-wrap: break-word;
    /* Ensure wrapping matches textarea */
    overflow: hidden;
    pointer-events: none;
    /* Let clicks pass through to textarea */
    color: inherit;
    /* visible text color so normal text shows up */
    background: transparent;
    border: none;
    /* Textarea has the border */
    z-index: 1;
    text-align: left;
}

/* The foreground textarea interacting with user */
.input-highlighter-container textarea {
    position: relative;
    z-index: 2;
    background: transparent !important;
    /* Must see through to highlight layer */
    color: transparent !important;
    /* Hide raw text to prevent shadow */
    caret-color: #000;
    /* Keep cursor visible */
    width: 100%;
    display: block;
    overflow-y: hidden;
    /* For auto-resize */
    resize: none;
    /* Disable manual resize if we auto-resize */
}

/* Dark mode cursor */
[data-theme="dark"] .input-highlighter-container textarea {
    caret-color: #fff;
}

/* Highlighted hashtags in input */
.highlight-hashtag {
    color: #0095f6;
    font-weight: 600;
    font-style: italic;
    background: rgba(0, 149, 246, 0.1);
    border-radius: 4px;
    /* Remove padding to avoid misalignment with text flow */
    /* Only text color/style should be different unless we handle spacing carefully */
}

/* Highlighted mentions in input */
.highlight-mention {
    color: #0095f6;
    font-weight: bold;
    background: rgba(0, 149, 246, 0.1);
    border-radius: 4px;
}

/* Dark mode */
[data-theme="dark"] .highlight-hashtag,
[data-theme="dark"] .highlight-mention {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.15);
}

/* Christmas theme */
[data-theme="christmas"] .highlight-hashtag,
[data-theme="christmas"] .highlight-mention {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
}

#post-composer .composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Christmas theme variant for composer avatar */
[data-theme="christmas"] #post-composer .composer-avatar {
    background:
        linear-gradient(145deg, #6b7280, #4b5563) padding-box,
        linear-gradient(145deg, #C41E3A, #FFD700) border-box !important;
    box-shadow: 0 3px 10px rgba(196, 30, 58, 0.3);
}

#media-preview img,
#media-preview video {
    max-width: 100%;
    max-height: 150px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

/* Hashtag and Mention links */
.hashtag,
.mention {
    font-weight: 500;
    transition: opacity 0.2s;
}

.hashtag:hover,
.mention:hover {
    opacity: 0.8;
}

/* Dark Mode Post Styles */
[data-theme="dark"] .post-card {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .post-card .fw-bold,
[data-theme="dark"] .post-card .post-text {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .post-card .text-muted {
    color: #888 !important;
}

[data-theme="dark"] #post-composer {
    background: rgba(30, 30, 30, 0.8);
}

[data-theme="dark"] #post-composer textarea {
    color: #e0e0e0;
}

[data-theme="dark"] #post-composer textarea::placeholder {
    color: #666;
}

[data-theme="dark"] .post-actions .btn {
    color: #888;
}

[data-theme="dark"] .post-actions .btn:hover {
    color: var(--bs-primary) !important;
}

/* ============================================
   CHRISTMAS THEME
   ============================================ */

[data-theme="christmas"] {
    /* Primary Colors - Christmas Red & Green */
    --bs-primary: #C41E3A;
    /* Vibrant Cranberry Red */
    --bs-primary-rgb: 196, 30, 58;
    --bs-secondary: #165B33;
    --bs-secondary-rgb: 22, 91, 51;
    --christmas-gold: #FFD700;

    /* Backgrounds - Warm Cream (subtle, readable) */
    --bs-body-bg: #FFFAF5;
    --bs-body-color: #212529;

    /* Global Variables Mapping */
    --bg-color: #FFFAF5;
    --bg-gradient: linear-gradient(180deg, #FFFAF5 0%, #FFF5EB 100%);
    --text-color: #212529;
    --nav-text: #212529;

    /* Surface Colors */
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(196, 30, 58, 0.15);
    --card-bg: #ffffff;

    /* Overrides for specific elements */
    --link-color: #C41E3A;
    --link-hover-color: #A01830;
}

/* ============================================
   FESTIVE BUTTON STYLES
   ============================================ */
[data-theme="christmas"] .btn-primary {
    background: linear-gradient(135deg, #C41E3A 0%, #A01830 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    transition: all 0.3s ease;
}

[data-theme="christmas"] .btn-primary:hover {
    background: linear-gradient(135deg, #D42426 0%, #C41E3A 100%);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
    transform: translateY(-2px);
}

[data-theme="christmas"] .btn-outline-primary {
    border-color: #C41E3A;
    color: #C41E3A;
}

[data-theme="christmas"] .btn-outline-primary:hover {
    background: #C41E3A;
    color: #fff;
}

/* ============================================
   FESTIVE NAVBAR STYLING
   ============================================ */
[data-theme="christmas"] .glass-nav {
    background: linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)) padding-box,
        linear-gradient(90deg, #C41E3A, #FFD700, #165B33, #FFD700, #C41E3A) border-box;
    border: 3px solid transparent;
    border-radius: 50rem;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.15);
}

/* ============================================
   FESTIVE CARD & GLASS EFFECTS
   ============================================ */
[data-theme="christmas"] .glass-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(196, 30, 58, 0.08);
    box-shadow: 0 10px 40px rgba(196, 30, 58, 0.08), 0 0 0 1px rgba(255, 215, 0, 0.05);
}

[data-theme="christmas"] .auth-card {
    border: 1px solid rgba(196, 30, 58, 0.1);
    box-shadow: 0 20px 60px rgba(196, 30, 58, 0.1);
}

/* ============================================
   FESTIVE TEXT ACCENTS
   ============================================ */
[data-theme="christmas"] .text-primary {
    color: #C41E3A !important;
}

[data-theme="christmas"] h1,
[data-theme="christmas"] h2 {
    color: #C41E3A;
}

[data-theme="christmas"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #C41E3A;
}

[data-theme="christmas"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: #A01830;
}

/* Dark mode override removed - Christmas theme is always light/cream */

/* ============================================
   CHRISTMAS SIDEBAR ICONS
   ============================================ */
[data-theme="christmas"] .nav-link-custom i {
    color: #C41E3A;
}

[data-theme="christmas"] .nav-link-custom:hover i,
[data-theme="christmas"] .nav-link-custom.active i {
    color: #A01830;
}

/* ============================================
   SNOWFALL EFFECT
   ============================================ */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999;
    color: #B0E0E6;
    /* Powder Blue - visible on cream background */
    font-size: 1.5em;
    /* Larger */
    font-family: Arial, sans-serif;
    text-shadow:
        0 0 3px #87CEEB,
        /* Sky blue glow */
        0 0 8px #ADD8E6,
        /* Light blue outer glow */
        0 1px 2px rgba(0, 0, 0, 0.2);
    /* Subtle shadow for depth */
    user-select: none;
    pointer-events: none;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.9;
}

[data-theme="christmas"] .snowflake {
    display: block;
}

/* Hide snow if not supported or not enabled */
.snowflake {
    display: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) translateX(30px) rotate(360deg);
        opacity: 0;
    }
}

/* ============================================
   FESTIVE LIGHTS TOP BORDER
   ============================================ */
[data-theme="christmas"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(90deg,
            #E53935 0px, #E53935 20px,
            #43A047 20px, #43A047 40px,
            #FFB300 40px, #FFB300 60px);
    z-index: 10000;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.5),
        0 0 12px rgba(67, 160, 71, 0.5),
        0 0 12px rgba(255, 179, 0, 0.5);
    animation: twinkly-glow 1s infinite alternate;
    pointer-events: none;
}

@keyframes twinkly-glow {
    0% {
        box-shadow: 0 0 8px rgba(229, 57, 53, 0.4),
            0 0 8px rgba(67, 160, 71, 0.4),
            0 0 8px rgba(255, 179, 0, 0.4);
    }

    100% {
        box-shadow: 0 0 16px rgba(229, 57, 53, 0.8),
            0 0 16px rgba(67, 160, 71, 0.8),
            0 0 16px rgba(255, 179, 0, 0.8);
    }
}

/* ============================================
   THEME PREVIEW ICON
   ============================================ */
.theme-christmas {
    background: linear-gradient(135deg, #C41E3A 0%, #165B33 100%);
    border: 2px solid #FFD700;
    color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ============================================
   LAYOUT & CONTENT AREA STYLES
   ============================================ */

/* Feed container - center content and limit width */
#feed-container {
    max-width: 100%;
}

/* Post cards - ensure consistent sizing */
.post-card {
    max-width: 100%;
}

/* Post images - responsive sizing */
.post-card .post-image {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .post-card .post-image {
    background: rgba(255, 255, 255, 0.02);
}

/* Right sidebar cards - consistent look */
.col-lg-3 .glass-card {
    padding: 0;
}

.col-lg-3 .glass-card>div:first-child {
    padding: 1rem 1.25rem;
}

/* ============================================
   CHAT ENHANCEMENTS
   ============================================ */

/* Recording dot animation */
.recording-dot {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse-recording 1s ease-in-out infinite;
}

@keyframes pulse-recording {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Chat avatar styling */
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Hover effect for contact items */
.contact-item {
    transition: background-color 0.15s ease;
}

.contact-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Voice message audio player */
.chat-messages audio {
    width: 100%;
    max-width: 250px;
}

/* Media preview in chat */
#media-preview img {
    max-height: 100px !important;
}

/* Chat message images */
.chat-messages img {
    cursor: pointer;
}

/* Encryption badge */
#encryption-badge {
    font-size: 0.75rem;
}

/* Unread contact styling */
.contact-unread {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.contact-unread:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Sidebar message notification badge */
.sidebar-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact item hover states */
.contact-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

/* Dark mode adjustments for chat */
[data-theme="dark"] .contact-unread {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

[data-theme="dark"] .contact-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
}

/* ============================================
   ENCRYPTION STATUS STYLES
   ============================================ */

/* Chat Header Theme Support */
.chat-header-theme {
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .chat-header-theme {
    background-color: rgba(30, 30, 30, 0.5);
}

/* Chat Input Theme Support */
.chat-input-theme {
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .chat-input-theme {
    background-color: rgba(30, 30, 30, 0.5);
}

[data-theme="dark"] .chat-input-theme .form-control {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-theme="dark"] .chat-input-theme .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Encryption Status Bar */
.encryption-status-bar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

[data-theme="dark"] .encryption-status-bar {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Encryption Badge Styles with Transitions */
#encryption-badge {
    transition: all 0.3s ease;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

#encryption-badge i {
    font-size: 0.85rem;
}

/* Encrypted State */
#encryption-badge.encrypted-active {
    background-color: rgba(25, 135, 84, 0.15) !important;
    color: #198754 !important;
    animation: encryptedPulse 2s infinite;
}

[data-theme="dark"] #encryption-badge.encrypted-active {
    background-color: rgba(25, 135, 84, 0.25) !important;
    color: #22c55e !important;
}

@keyframes encryptedPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.2);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(25, 135, 84, 0);
    }
}

/* Pending State */
#encryption-badge.encryption-pending {
    animation: pendingPulse 1.5s infinite;
}

@keyframes pendingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Failed State */
#encryption-badge.encryption-failed {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

[data-theme="dark"] #encryption-badge.encryption-failed {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

/* Encryption Action Buttons */
#end-encryption-btn,
#reestablish-encryption-btn {
    transition: all 0.2s ease;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

#end-encryption-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

#reestablish-encryption-btn:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

/* Input Encryption Status Indicator */
#input-encryption-status {
    transition: all 0.3s ease;
}

#input-encryption-status .badge {
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Encrypted indicator (green) */
#input-encryption-status.encrypted .badge {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: #198754 !important;
}

[data-theme="dark"] #input-encryption-status.encrypted .badge {
    background-color: rgba(25, 135, 84, 0.2) !important;
    color: #22c55e !important;
}

/* Plain text indicator (gray/warning) */
#input-encryption-status.plain .badge {
    background-color: rgba(108, 117, 125, 0.1) !important;
    color: #6c757d !important;
}

[data-theme="dark"] #input-encryption-status.plain .badge {
    background-color: rgba(108, 117, 125, 0.2) !important;
    color: #adb5bd !important;
}

/* Typing indicator animation */
.typing-dots {
    animation: typingDots 1.4s infinite;
}

@keyframes typingDots {

    0%,
    20% {
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }

    60%,
    100% {
        opacity: 0.2;
    }
}

/* ============================================
   IMAGE MESSAGE STYLES (SEAMLESS FIT)
   ============================================ */

/* Remove extra styling from chat message images */
.chat-message-image {
    border-radius: 16px;
    overflow: hidden;
    max-width: 280px;
}

.chat-message-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

/* Image message bubble - no extra padding */
.message-image-bubble {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 16px !important;
}

.message-image-bubble img {
    margin: 0;
    display: block;
}

/* Time overlay on image messages */
.message-image-time {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}

/* Encrypted icon on image messages */
.message-image-time i {
    margin-right: 4px;
}

/* Voice message styling */
.voice-message-bubble {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1) 0%, rgba(var(--bs-primary-rgb), 0.05) 100%);
}

[data-theme="dark"] .voice-message-bubble {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.2) 0%, rgba(var(--bs-primary-rgb), 0.1) 100%);
}

/* Cursor pointer for all clickable items */
.cursor-pointer {
    cursor: pointer;
}

/* Media attachment dropdown */
.glass-dropdown {
    border-radius: 12px;
    overflow: hidden;
}

.glass-dropdown .dropdown-item {
    padding: 0.65rem 1rem;
}

.glass-dropdown .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Chat user profile link hover effect */
.chat-user-profile-link {
    transition: all 0.2s ease;
    border-radius: 12px;
    padding: 0.25rem;
    margin: -0.25rem;
    cursor: pointer !important;
    position: relative;
    z-index: 1;
}

.chat-user-profile-link:hover {
    opacity: 0.85;
    background-color: rgba(0, 0, 0, 0.05);
}

.chat-user-profile-link:hover h6 {
    text-decoration: underline;
}

[data-theme="dark"] .chat-user-profile-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   VOICE MESSAGE PLAYER - INSTAGRAM STYLE
   ============================================ */

.voice-message-player {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 200px;
    padding: 4px 0;
}

.voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voice-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.voice-play-btn i {
    font-size: 1.1rem;
}

.voice-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 24px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.voice-bar {
    width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    transition: background-color 0.15s ease;
}

.voice-bar.active {
    background: rgba(255, 255, 255, 0.9);
}

.voice-duration {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    min-width: 32px;
    text-align: right;
}

/* Received message voice player (lighter background) */
.chat-message-received .voice-play-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.chat-message-received .voice-play-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.chat-message-received .voice-bar {
    background: rgba(0, 0, 0, 0.2);
}

.chat-message-received .voice-bar.active {
    background: rgba(0, 0, 0, 0.6);
}

.chat-message-received .voice-duration {
    color: #555;
}

/* Dark mode received messages */
[data-theme="dark"] .chat-message-received .voice-play-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

[data-theme="dark"] .chat-message-received .voice-bar {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .chat-message-received .voice-bar.active {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .chat-message-received .voice-duration {
    color: rgba(255, 255, 255, 0.8);
}

/* Playing animation */
.voice-message-player.playing .voice-play-btn {
    animation: pulse-voice 1.5s infinite ease-in-out;
}

@keyframes pulse-voice {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* ============================================
   DOCUMENT MESSAGE PREVIEW STYLES
   ============================================ */

/* Document preview container */
.document-preview {
    padding: 10px;
    border-radius: 8px;
    transition: all 0.15s ease;
    min-width: 180px;
    max-width: 260px;
}

.document-preview:hover {
    opacity: 0.85;
}

/* Document icon */
.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-icon i {
    font-size: 1.25rem;
}

/* Document info */
.document-info {
    line-height: 1.3;
}

.document-name {
    font-size: 0.85rem;
    max-width: 160px;
}

.document-meta {
    font-size: 0.7rem;
}

/* Sent message document styling */
.chat-message-sent .document-preview {
    background: rgba(255, 255, 255, 0.1);
}

.chat-message-sent .document-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.chat-message-sent .document-icon i {
    color: white !important;
}

/* Received message document styling */
.chat-message-received .document-preview {
    background: rgba(0, 0, 0, 0.03);
}

/* Dark mode received messages */
[data-theme="dark"] .chat-message-received .document-preview {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chat-message-received .document-icon {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .chat-message-received .document-name {
    color: #e4e6eb;
}

[data-theme="dark"] .chat-message-received .document-meta {
    color: #b0b3b8;
}

/* ============================================
   MESSAGE CONTEXT MENU
   ============================================ */

.message-context-menu {
    position: fixed;
    z-index: 9999;
    animation: contextMenuFadeIn 0.15s ease;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.message-context-menu .list-group {
    min-width: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.message-context-menu .list-group-item {
    padding: 12px 16px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    background: white;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}

.message-context-menu .list-group-item i {
    font-size: 1rem;
    width: 20px;
}

.message-context-menu .list-group-item:hover {
    background: #f0f2f5;
    padding-left: 20px;
}

.message-context-menu .list-group-item.text-danger:hover {
    background: #fee2e2;
}

[data-theme="dark"] .message-context-menu .list-group {
    background: #242526;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .message-context-menu .list-group-item {
    background: #242526;
    color: #e4e6eb;
}

[data-theme="dark"] .message-context-menu .list-group-item:hover {
    background: #3a3b3c;
}

[data-theme="dark"] .message-context-menu .list-group-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ============================================
   EDIT & DELETE MESSAGE MODALS
   ============================================ */

#editMessageModal .modal-content,
#deleteMessageModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#editMessageModal .modal-header,
#deleteMessageModal .modal-header {
    padding: 16px 20px;
}

#editMessageModal .modal-title,
#deleteMessageModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#editMessageModal .modal-body,
#deleteMessageModal .modal-body {
    padding: 20px;
}

#edit-message-content {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px;
    resize: none;
    transition: all 0.2s;
}

#edit-message-content:focus {
    border-color: #0084ff;
    box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.1);
}

[data-theme="dark"] #edit-message-content {
    background: #3a3b3c;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}

#deleteMessageModal .btn {
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 500;
}

#delete-for-me-btn {
    border-width: 2px;
}

#delete-for-everyone-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
}

#delete-for-everyone-btn small {
    font-weight: 400;
    opacity: 0.8;
}

/* ============================================
   MESSAGE ACTIONS BUTTON (Chevron dropdown)
   ============================================ */

.message-bubble-container {
    max-width: 75%;
}

.message-actions-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    z-index: 10;
    padding: 0;
}

.message-actions-btn i {
    font-size: 0.75rem;
    color: inherit;
}

/* Show button on hover */
.message-bubble-container:hover .message-actions-btn {
    opacity: 1;
}

.message-actions-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Sent message - white icon on blue */
.chat-message-sent+.message-actions-btn,
.message-bubble-container:has(.chat-message-sent) .message-actions-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.message-bubble-container:has(.chat-message-sent) .message-actions-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Received message - dark icon */
.message-bubble-container:has(.chat-message-received) .message-actions-btn {
    color: #65676b;
    background: rgba(0, 0, 0, 0.08);
}

.message-bubble-container:has(.chat-message-received) .message-actions-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments */
[data-theme="dark"] .message-bubble-container:has(.chat-message-received) .message-actions-btn {
    color: #b0b3b8;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .message-bubble-container:has(.chat-message-received) .message-actions-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   MESSAGE AVATAR
   ============================================ */

.message-avatar {
    align-self: flex-end;
    margin-bottom: 2px;
}

.message-avatar img {
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .message-avatar img {
    border-color: #3a3b3c;
}

/* ============================================
   MESSAGE STATUS INDICATORS (Edited, Forwarded, Deleted)
   ============================================ */

.message-edited-label {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-right: 4px;
    font-style: italic;
}

.message-forwarded-label {
    font-size: 0.7rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    font-style: italic;
    color: inherit;
}

.message-forwarded-label i {
    font-size: 0.7rem;
}

/* WhatsApp-style deleted message placeholder */
.message-deleted-placeholder {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9rem;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-deleted-placeholder i {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Sent deleted message - subtle gray look */
.chat-message-sent .message-deleted-placeholder {
    color: rgba(255, 255, 255, 0.85);
}

/* Received deleted message */
.chat-message-received .message-deleted-placeholder {
    color: #65676b;
}

[data-theme="dark"] .chat-message-received .message-deleted-placeholder {
    color: #b0b3b8;
}

/* ============================================
   FORWARD MESSAGE MODAL
   ============================================ */

#forwardMessageModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#forwardMessageModal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#forwardMessageModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#forwardMessageModal #forward-user-search {
    border-radius: 20px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f0f2f5;
    transition: all 0.2s;
}

#forwardMessageModal #forward-user-search:focus {
    background: white;
    border-color: #0084ff;
    box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.1);
}

[data-theme="dark"] #forwardMessageModal #forward-user-search {
    background: #3a3b3c;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}

[data-theme="dark"] #forwardMessageModal #forward-user-search:focus {
    background: #2d2d2d;
    border-color: #0084ff;
}

.forward-user-list {
    padding: 8px 0;
    overflow-x: hidden;
}

.forward-user-item {
    border: none !important;
    border-radius: 12px !important;
    margin: 2px 4px;
    transition: all 0.15s ease;
    padding: 10px 12px !important;
}

.forward-user-item:hover {
    background: #f0f2f5 !important;
}

[data-theme="dark"] .forward-user-item {
    background: transparent;
    color: #e4e6eb;
}

[data-theme="dark"] .forward-user-item:hover {
    background: #3a3b3c !important;
}

.forward-user-item .rounded-circle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.forward-user-item .fw-semibold {
    font-size: 0.95rem;
}

.forward-user-item small {
    font-size: 0.8rem;
}

/* ============================================
   SHARED POST BUBBLE STYLES (Chat)
   ============================================ */

/* Remove padding from the bubble wrapper when it contains a shared post */
.shared-post-bubble {
    border-radius: 16px !important;
    background: transparent !important;
}

.shared-post-bubble.chat-message-sent {
    background: linear-gradient(135deg, #0084ff 0%, #0066cc 100%) !important;
}

.shared-post-bubble.chat-message-received {
    background: #e4e6eb !important;
}

/* Shared post header */
.shared-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.shared-post-avatar {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    flex-shrink: 0;
}

.shared-post-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
}

.shared-post-displayname {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-post-username {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post content */
.shared-post-content {
    margin: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: white;
    line-height: 1.4;
}

/* Post media */
.shared-post-media {
    margin-top: 0;
}

.shared-post-media img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.shared-post-media video {
    width: 100%;
    height: auto;
    min-height: 120px;
    max-height: 180px;
    object-fit: contain;
    display: block;
    border-radius: 0;
    background: #000;
}

/* Footer with time */
.shared-post-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.7rem;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
}

/* Received message colors */
.chat-message-received .shared-post-header {
    background: rgba(0, 0, 0, 0.08);
}

.chat-message-received .shared-post-displayname {
    color: #1a1a1a;
}

.chat-message-received .shared-post-username {
    color: #65676b;
}

.chat-message-received .shared-post-content {
    color: #1a1a1a;
}

.chat-message-received .shared-post-footer {
    color: #65676b;
}

/* Dark mode */
[data-theme="dark"] .shared-post-bubble.chat-message-received {
    background: #3a3b3c !important;
}

[data-theme="dark"] .chat-message-received .shared-post-header {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .chat-message-received .shared-post-displayname {
    color: #e4e6eb;
}

[data-theme="dark"] .chat-message-received .shared-post-username {
    color: #b0b3b8;
}

[data-theme="dark"] .chat-message-received .shared-post-content {
    color: #e4e6eb;
}

[data-theme="dark"] .chat-message-received .shared-post-footer {
    color: #b0b3b8;
}

/* Christmas theme */
[data-theme="christmas"] .shared-post-bubble.chat-message-sent {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%) !important;
}

[data-theme="christmas"] .shared-post-bubble.chat-message-received {
    background: #f5e6e8 !important;
}

[data-theme="christmas"] .chat-message-received .shared-post-displayname {
    color: #2d2d2d;
}

[data-theme="christmas"] .chat-message-received .shared-post-content {
    color: #2d2d2d;
}

/* ============================================
   CHAT MESSAGE BUBBLES - DARK MODE SUPPORT
   ============================================ */

/* Base chat message bubble styles */
.chat-message-sent,
.chat-message-received {
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 1rem 1.25rem !important;
    font-size: 1rem;
    min-width: 120px;
    line-height: 1.5;
}

.chat-message-sent p,
.chat-message-received p {
    margin: 0;
    line-height: 1.4;
    white-space: normal;
}

/* Chat message truncation for long messages */
.chat-msg-text.chat-message-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-msg-text.chat-message-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.chat-show-more-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

.chat-message-sent .chat-show-more-btn {
    color: rgba(255, 255, 255, 0.8);
}

.chat-message-received .chat-show-more-btn {
    color: var(--bs-primary);
}

.chat-show-more-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Sent messages (my messages) - primary blue */
.chat-message-sent {
    background-color: var(--bs-primary);
    color: #fff;
}

/* Received messages (other user) - light mode */
.chat-message-received {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Dark mode - received messages */
[data-theme="dark"] .chat-message-received {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Time text for received messages */
.chat-message-time {
    color: #6c757d;
}

[data-theme="dark"] .chat-message-time {
    color: #9ca3af;
}

/* Chat messages container dark mode */
[data-theme="dark"] #chat-messages {
    color: #e0e0e0;
}

/* Chat messages container padding */
#chat-messages {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Add spacing from edges for sent messages */
.justify-content-end .message-wrapper {
    margin-right: 70px;
}

/* Chat input dark mode */
[data-theme="dark"] #message-input {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #e0e0e0;
}

[data-theme="dark"] #message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Contacts list dark mode */
[data-theme="dark"] .contact-item {
    color: #e0e0e0;
}

[data-theme="dark"] .contact-item .text-truncate {
    color: #9ca3af;
}

/* Search input dark mode */
[data-theme="dark"] #contact-search {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #e0e0e0;
}

[data-theme="dark"] #contact-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Chat header text in dark mode */
[data-theme="dark"] #chat-user-name {
    color: #fff;
}

[data-theme="dark"] #chat-user-handle {
    color: #9ca3af;
}

/* New Chat Modal - Dark Mode */
[data-theme="dark"] #newChatModal .modal-content {
    background-color: #1e1e1e !important;
    color: #e0e0e0;
}

[data-theme="dark"] #newChatModal .modal-title {
    color: #fff;
}

[data-theme="dark"] #newChatModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="dark"] #newChatModal #user-search-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] #newChatModal #user-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] #newChatModal #user-search-results {
    color: #e0e0e0;
}

[data-theme="dark"] #newChatModal .text-muted {
    color: #9ca3af !important;
}

/* User search result items in dark mode */
[data-theme="dark"] #user-search-results .user-result-item,
[data-theme="dark"] #user-search-results>div {
    color: #e0e0e0;
}

[data-theme="dark"] #user-search-results .user-result-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   CONTACT LIST - SUBTLE SEPARATORS
   ============================================ */

/* Contact item separators - subtle in both modes */
.contact-item.border-bottom {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .contact-item.border-bottom {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Contact item hover effect */
.contact-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .contact-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Online friends list separators */
#online-friends-list .border-bottom {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] #online-friends-list .border-bottom {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Glass card borders in dark mode */
[data-theme="dark"] .glass-card {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Contact message preview - ensure visibility in dark mode */
[data-theme="dark"] .contact-item p.text-muted {
    color: #9ca3af !important;
}

[data-theme="dark"] .contact-item p.text-body {
    color: #e0e0e0 !important;
}

/* Contact name in dark mode */
[data-theme="dark"] .contact-item h6 {
    color: #fff !important;
}

/* Contact date/time in dark mode - improved readability */
[data-theme="dark"] .contact-item small.text-muted {
    color: #d1d5db !important;
    opacity: 0.9;
}

/* ============================================
   PROFILE PICTURE & BANNER CHANGE BUTTONS
   ============================================ */

/* Change avatar button */
.change-avatar-btn {
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid #fff !important;
}

.profile-avatar:hover .change-avatar-btn {
    opacity: 1;
}

/* Change banner button */
.change-banner-btn {
    bottom: 12px;
    right: 12px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    background: rgba(0, 0, 0, 0.6) !important;
    border: none !important;
}

.cover-photo:hover .change-banner-btn {
    opacity: 1;
}

/* Cropper modal styles */
.cropper-preview-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.border-dashed {
    border-style: dashed !important;
}

/* Dark mode cropper adjustments */
[data-theme="dark"] #cropperUploadArea {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] #cropperUploadArea:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Cropper.js dark mode overrides */
[data-theme="dark"] .cropper-modal {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ============================================
   FLAPPY BIRD EASTER EGG GAME
   ============================================ */

#flappy-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.flappy-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(102, 126, 234, 0.2);
    overflow: hidden;
}

.flappy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.flappy-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.flappy-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

#flappy-canvas {
    display: block;
    cursor: pointer;
}

.flappy-instructions {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #aaa;
}

.flappy-instructions p {
    margin: 0;
    font-size: 0.85rem;
}

.flappy-instructions kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: inherit;
}

.flappy-instructions .hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #ffd700;
    opacity: 0.7;
}

/* ============================================
   USER STATUS INDICATORS
   ============================================ */

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
}

.status-online,
.status-dot.status-online {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-away,
.status-dot.status-away {
    background-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.status-dnd,
.status-dot.status-dnd {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-invisible,
.status-dot.status-invisible {
    background-color: #6b7280;
    border: 2px solid #9ca3af;
}

.status-offline,
.status-dot.status-offline {
    background-color: transparent;
    border: 2px solid #9ca3af;
}

/* Status option active state */
.status-option {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0.5rem 0.75rem;
}

.status-option.active {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    font-weight: 600;
}

.status-option:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
}

/* Status submenu chevron rotation */
.status-chevron {
    transition: transform 0.2s ease;
}

[aria-expanded="true"] .status-chevron {
    transform: rotate(180deg);
}

/* Profile dropdown consistent sizing */
.dropdown-menu.glass-dropdown {
    min-width: 180px;
}

/* Status submenu smooth transition */
#status-submenu {
    transition: height 0.2s ease-out;
}

#status-submenu .dropdown-item {
    font-size: 0.9rem;
}

/* Online sidebar status indicators */
.online-user-item .status-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* Contact list status indicators */
.contact-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.contact-status-indicator.status-online {
    background-color: #198754;
    /* green */
}

.contact-status-indicator.status-away {
    background-color: #ffc107;
    /* yellow */
}

.contact-status-indicator.status-dnd {
    background-color: #dc3545;
    /* red */
}

.contact-status-indicator.status-invisible,
.contact-status-indicator.status-offline {
    background-color: #6c757d;
    /* gray */
}

/* Away status warning banner */
.away-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .away-warning {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fef3c7;
}

/* DND notification mute indicator */
.dnd-muted-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #ef4444;
    font-size: 0.75rem;
}

/* ============================================
   MENTION AUTOCOMPLETE
   ============================================ */
.mention-dropdown {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 280px;
    max-width: 320px;
    z-index: 10000;
    overflow: hidden;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.mention-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: bold;
    color: white;
    font-size: 0.85rem;
}

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

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

.mention-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-handle {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   CHRISTMAS HATS ON AVATARS
   ============================================ */

/* Avatar containers need relative positioning */
[data-theme="christmas"] .avatar-ig,
[data-theme="christmas"] .profile-avatar,
[data-theme="christmas"] .user-avatar,
[data-theme="christmas"] .contact-avatar,
[data-theme="christmas"] .chat-avatar,
[data-theme="christmas"] .composer-avatar {
    position: relative;
}

/* Default: All avatars get Santa hats - target the avatar container directly */
[data-theme="christmas"] .avatar-ig::before,
[data-theme="christmas"] .profile-avatar::before,
[data-theme="christmas"] .user-avatar::before,
[data-theme="christmas"] .contact-avatar::before,
[data-theme="christmas"] .chat-avatar::before,
[data-theme="christmas"] .composer-avatar::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -5px;
    width: 32px;
    height: 32px;
    background-image: url('/images/christmas/santa-hat.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 100;
    pointer-events: none;
}

/* Every other avatar gets Elf hat (alternating pattern) */
[data-theme="christmas"] .post-card-ig:nth-child(even) .avatar-ig::before,
[data-theme="christmas"] .avatar-ig:nth-child(even)::before,
[data-theme="christmas"] .profile-avatar:nth-child(even)::before,
[data-theme="christmas"] .user-avatar:nth-child(even)::before,
[data-theme="christmas"] .contact-avatar:nth-child(even)::before,
[data-theme="christmas"] .chat-avatar:nth-child(even)::before,
[data-theme="christmas"] .composer-avatar:nth-child(even)::before {
    background-image: url('/images/christmas/elf-hat.png');
}

/* ============================================
   CHAT REPLY FEATURE STYLES
   ============================================ */

/* Reply button visibility on hover */
.message-wrapper:hover .reply-msg-btn {
    opacity: 0.6 !important;
}

.message-wrapper:hover .reply-msg-btn:hover {
    opacity: 1 !important;
}

.reply-msg-btn {
    color: inherit;
    transition: opacity 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.reply-msg-btn:hover {
    color: var(--bs-primary);
}

/* Reply quote styling in messages */
.reply-quote {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 6px 8px;
    max-width: 200px;
}

.chat-message-sent .reply-quote {
    background: rgba(255, 255, 255, 0.15);
}

.chat-message-received .reply-quote {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .chat-message-received .reply-quote {
    background: rgba(255, 255, 255, 0.1);
}

/* Reply preview in chat input area */
#reply-preview {
    background: rgba(var(--bs-primary-rgb), 0.05);
}

[data-theme="dark"] #reply-preview {
    background: rgba(var(--bs-primary-rgb), 0.1);
}

#cancel-reply {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#cancel-reply:hover {
    opacity: 1;
}

/* Read receipt icons */
.bi-check,
.bi-check-all {
    font-size: 0.9rem;
}

/* Chat date separator badge */
.chat-date-badge {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: #495057 !important;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .chat-date-badge {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Message highlight animation for reply navigation */
.message-highlight {
    animation: messageHighlight 2s ease-out;
}

@keyframes messageHighlight {
    0% {
        background-color: rgba(var(--bs-primary-rgb), 0.3);
        transform: scale(1.02);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Reply quote hover effect */
.reply-quote.cursor-pointer:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

[data-theme="dark"] .reply-quote.cursor-pointer:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   CALL HISTORY ENTRY STYLES (Theme-aware)
   ============================================ */
.call-history-entry {
    background: rgba(240, 240, 245, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.call-history-entry .call-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.08);
}

.call-history-entry .call-direction-text {
    color: #333;
}

.call-history-entry .call-status-detail {
    color: #666;
}

/* Dark theme */
[data-theme="dark"] .call-history-entry {
    background: rgba(45, 45, 50, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .call-history-entry .call-icon {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .call-history-entry .call-direction-text {
    color: #e0e0e0;
}

[data-theme="dark"] .call-history-entry .call-status-detail {
    color: #aaa;
}

/* Christmas theme - Candy Cane style */
[data-theme="christmas"] .call-history-entry {
    background: rgba(220, 20, 60, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.3);
}

[data-theme="christmas"] .call-history-entry .call-icon {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="christmas"] .call-history-entry .call-direction-text {
    color: #fff;
}

[data-theme="christmas"] .call-history-entry .call-status-detail {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   VIDEO CALL STYLES
   ============================================ */

.video-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-call-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a1a;
}

.local-video-wrapper {
    position: absolute !important;
    bottom: 100px;
    left: auto !important;
    right: 20px !important;
    width: 180px;
    height: 135px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    z-index: 10;
}

#local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #2a2a2a;
    transform: scaleX(-1);
}

.video-call-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.video-call-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 16px 24px;
    border-radius: 40px;
    backdrop-filter: blur(10px);
}

.video-call-controls .btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.video-call-controls .btn:hover {
    transform: scale(1.1);
}

.video-call-controls .btn.muted {
    background-color: #dc3545 !important;
    color: #fff !important;
}

#end-call-btn {
    width: 64px;
    height: 64px;
}

/* Incoming call modal animations */
#incomingCallModal .modal-content {
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(40, 167, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.incoming-call-avatar {
    animation: incoming-pulse 1s ease-in-out infinite;
}

@keyframes incoming-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Call button states */
#video-call-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive video call */
@media (max-width: 576px) {
    .local-video-wrapper {
        width: 120px;
        height: 90px;
        bottom: 120px;
        left: auto !important;
        right: 10px !important;
    }

    .video-call-controls {
        padding: 12px 16px;
        gap: 12px;
    }

    .video-call-controls .btn {
        width: 48px;
        height: 48px;
    }

    #end-call-btn {
        width: 56px;
        height: 56px;
    }
}

/* ============================================
   PERFORMANCE MODE
   Disables expensive visual effects for better performance
   ============================================ */

/* When performance mode is enabled, disable all blur effects */
[data-performance-mode="on"] .glass-nav,
[data-performance-mode="on"] .glass-card,
[data-performance-mode="on"] .glass-dropdown,
[data-performance-mode="on"] .search-input,
[data-performance-mode="on"] .search-dropdown,
[data-performance-mode="on"] .auth-card,
[data-performance-mode="on"] .age-modal-overlay,
[data-performance-mode="on"] .toast-container,
[data-performance-mode="on"] .modal-content,
[data-performance-mode="on"] .video-call-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Replace glass backgrounds with solid backgrounds in performance mode */
[data-performance-mode="on"] .glass-nav {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-performance-mode="on"][data-theme="dark"] .glass-nav {
    background: rgba(30, 30, 30, 0.95) !important;
}

[data-performance-mode="on"] .glass-card {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

[data-performance-mode="on"][data-theme="dark"] .glass-card {
    background-color: rgba(30, 30, 30, 0.98) !important;
}

/* Disable non-essential animations in performance mode */
[data-performance-mode="on"] *,
[data-performance-mode="on"] *::before,
[data-performance-mode="on"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Keep essential UI feedback transitions (very short) */
[data-performance-mode="on"] .btn,
[data-performance-mode="on"] .nav-link,
[data-performance-mode="on"] .form-control {
    transition: background-color 0.05s, color 0.05s !important;
}

/* Reduce box-shadow complexity */
[data-performance-mode="on"] .glass-card,
[data-performance-mode="on"] .glass-nav,
[data-performance-mode="on"] .glass-dropdown {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   GLOBAL CALL NOTIFICATION BAR
   ============================================ */

.call-notification-bar {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 1060;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 12px 16px;
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-width: 380px;
}

.call-notification-bar.show {
    transform: translateX(0);
    opacity: 1;
}

[data-theme="dark"] .call-notification-bar {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Incoming call has green accent */
.call-notification-bar.call-incoming {
    border-left: 4px solid #28a745;
}

/* Outgoing call has blue accent */
.call-notification-bar.call-outgoing {
    border-left: 4px solid #0d6efd;
}

.call-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Caller Avatar */
.caller-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.caller-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.caller-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Pulse animation for outgoing calls */
.caller-avatar.calling-pulse {
    animation: callingPulse 1.5s ease-in-out infinite;
}

@keyframes callingPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(13, 110, 253, 0);
    }
}

/* Call direction badge */
.call-icon-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
    border: 2px solid #fff;
}

[data-theme="dark"] .call-icon-badge {
    border-color: #1e1e1e;
}

.call-icon-badge.incoming {
    background: #28a745;
}

.call-icon-badge.outgoing {
    background: #0d6efd;
}

/* Caller Info */
.caller-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.caller-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-status-text {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .call-status-text {
    color: rgba(255, 255, 255, 0.5);
}

/* Call Action Buttons */
.call-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.call-btn-accept,
.call-btn-decline,
.call-btn-end {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.call-btn-accept {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.call-btn-accept:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.call-btn-decline,
.call-btn-end {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.call-btn-decline:hover,
.call-btn-end:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Status text animations */
.call-status-text.answered {
    color: #28a745;
    font-weight: 600;
}

.call-status-text.declined {
    color: #dc3545;
}

.call-status-text.no-answer {
    color: #fd7e14;
}

/* Responsive */
@media (max-width: 480px) {
    .call-notification-bar {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 80px;
    }

    .caller-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .call-btn-accept,
    .call-btn-decline,
    .call-btn-end {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   DARK MODE DROPDOWN STYLES
   ============================================ */
[data-bs-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #444;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item,
[data-theme="dark"] .dropdown-menu .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item:focus,
[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
[data-theme="dark"] .dropdown-menu .dropdown-item:focus {
    background-color: #3d3d3d;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item.text-danger,
[data-theme="dark"] .dropdown-menu .dropdown-item.text-danger {
    color: #ea868f !important;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item.text-danger:hover,
[data-theme="dark"] .dropdown-menu .dropdown-item.text-danger:hover {
    background-color: #3d2d2d;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-divider,
[data-theme="dark"] .dropdown-menu .dropdown-divider {
    border-color: #444;
}

/* ============================================
   DARK MODE DATE PICKER / CALENDAR STYLES
   ============================================ */
[data-bs-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Native date picker popup - Chrome/Edge */
[data-bs-theme="dark"] ::-webkit-datetime-edit,
[data-theme="dark"] ::-webkit-datetime-edit {
    color: #e0e0e0;
}

/* Flatpickr and other date picker libraries */
[data-bs-theme="dark"] .flatpickr-calendar,
[data-theme="dark"] .flatpickr-calendar {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .flatpickr-day,
[data-theme="dark"] .flatpickr-day {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .flatpickr-day:hover,
[data-theme="dark"] .flatpickr-day:hover {
    background: #3d3d3d;
}

/* Bootstrap datepicker */
[data-bs-theme="dark"] .datepicker,
[data-theme="dark"] .datepicker {
    background: #2d2d2d;
    border-color: #444;
}

[data-bs-theme="dark"] .datepicker table,
[data-theme="dark"] .datepicker table {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .datepicker td,
[data-bs-theme="dark"] .datepicker th,
[data-theme="dark"] .datepicker td,
[data-theme="dark"] .datepicker th {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .datepicker td:hover,
[data-theme="dark"] .datepicker td:hover {
    background: #3d3d3d !important;
}

/* Pikaday date picker */
[data-bs-theme="dark"] .pika-single,
[data-theme="dark"] .pika-single {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .pika-label,
[data-theme="dark"] .pika-label {
    color: #e0e0e0;
    background: #2d2d2d;
}

[data-bs-theme="dark"] .pika-button,
[data-theme="dark"] .pika-button {
    color: #e0e0e0;
    background: transparent;
}

[data-bs-theme="dark"] .pika-button:hover,
[data-theme="dark"] .pika-button:hover {
    background: #3d3d3d !important;
    color: #fff;
}

[data-bs-theme="dark"] .pika-prev,
[data-bs-theme="dark"] .pika-next,
[data-theme="dark"] .pika-prev,
[data-theme="dark"] .pika-next {
    filter: invert(1);
}

/* Generic calendar widget styling */
[data-bs-theme="dark"] .calendar,
[data-bs-theme="dark"] [class*="calendar"],
[data-theme="dark"] .calendar,
[data-theme="dark"] [class*="calendar"] {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

/* ============================================
   DARK MODE TABLE STYLES (Admin Panel)
   ============================================ */
[data-bs-theme="dark"] .table,
[data-theme="dark"] .table {
    --bs-table-bg: #1e1e1e;
    --bs-table-color: #e0e0e0;
    --bs-table-border-color: #444;
    --bs-table-striped-bg: #252525;
    --bs-table-hover-bg: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
}

[data-bs-theme="dark"] .table thead,
[data-theme="dark"] .table thead {
    background-color: #252525;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table thead th,
[data-theme="dark"] .table thead th {
    background-color: #252525;
    color: #e0e0e0;
    border-color: #444;
}

[data-bs-theme="dark"] .table tbody tr,
[data-theme="dark"] .table tbody tr {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover {
    background-color: #2d2d2d;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th,
[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: #252525;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover,
[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: #333;
}

/* Card tables in admin */
[data-bs-theme="dark"] .card .table,
[data-theme="dark"] .card .table {
    margin-bottom: 0;
}

[data-bs-theme="dark"] .card,
[data-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .card-header,
[data-theme="dark"] .card-header {
    background-color: #252525;
    border-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card-body,
[data-theme="dark"] .card-body {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* ============================================
   DARK MODE FORM INPUTS & SELECTS
   ============================================ */
[data-bs-theme="dark"] .form-control,
[data-theme="dark"] .form-control {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-control:focus {
    background-color: #333;
    border-color: #0d6efd;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-control::placeholder {
    color: #888;
}

[data-bs-theme="dark"] .form-select,
[data-theme="dark"] .form-select {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #333;
    border-color: #0d6efd;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .form-select option,
[data-theme="dark"] .form-select option {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .input-group-text,
[data-theme="dark"] .input-group-text {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] label,
[data-theme="dark"] label {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-label,
[data-theme="dark"] .form-label {
    color: #e0e0e0;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1050;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Only show mobile nav on mobile screens - use flex display within media query */
@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 4px;
    text-decoration: none;
    color: #666;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    gap: 2px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-item i {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.mobile-nav-item span {
    font-weight: 500;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--bs-primary, #0d6efd);
}

.mobile-nav-item:hover i,
.mobile-nav-item:focus i {
    transform: scale(1.1);
}

.mobile-nav-item.active {
    color: var(--bs-primary, #0d6efd);
}

.mobile-nav-item.active i {
    transform: scale(1.15);
}

/* Create Post button - special styling */
.mobile-nav-create {
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), #0056b3);
    color: white !important;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    margin-top: -20px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    padding: 0;
}

.mobile-nav-create i {
    font-size: 1.6rem;
}

.mobile-nav-create span {
    display: none;
}

.mobile-nav-create:hover,
.mobile-nav-create:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.5);
    color: white !important;
}

/* Badge for unread messages */
.mobile-nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(100%);
    background: #dc3545;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Add padding to main content to prevent overlap with bottom nav */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px;
    }

    /* Hide sidebar toggle on mobile since we have bottom nav */
    #sidebar-toggle {
        display: none !important;
    }

    /* Chat page: reduce container height to account for bottom nav */
    .col-12.col-lg-10>.row.g-3[style*="height"] {
        height: calc(100vh - 290px) !important;
        min-height: 350px !important;
    }
}

/* Dark mode */
[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(30, 30, 30, 0.95);
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav-item {
    color: #aaa;
}

[data-theme="dark"] .mobile-nav-item:hover,
[data-theme="dark"] .mobile-nav-item:focus,
[data-theme="dark"] .mobile-nav-item.active {
    color: #60a5fa;
}

[data-theme="dark"] .mobile-nav-create {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4);
}

/* Christmas theme */
[data-theme="christmas"] .mobile-bottom-nav {
    background: rgba(30, 50, 35, 0.95);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

[data-theme="christmas"] .mobile-nav-item {
    color: #90cba0;
}

[data-theme="christmas"] .mobile-nav-item:hover,
[data-theme="christmas"] .mobile-nav-item:focus,
[data-theme="christmas"] .mobile-nav-item.active {
    color: #ffd700;
}

[data-theme="christmas"] .mobile-nav-create {
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

/* ============================================
   COMMENT ACTION BUTTONS
   ============================================ */
.comment-actions .btn-link {
    text-decoration: none !important;
}

.comment-actions .btn-link:hover {
    text-decoration: none !important;
    opacity: 0.8;
}

.comment-actions .like-comment-btn:hover,
.comment-actions .reply-comment-btn:hover,
.comment-actions .view-replies-btn:hover {
    color: var(--bs-primary) !important;
}

.comment-actions .like-comment-btn.text-danger:hover {
    color: #dc3545 !important;
    opacity: 0.8;
}

/* Comment item styling */
.comment-item {
    transition: background-color 0.15s ease;
}

.comment-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .comment-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}