/* Ultimate Lekhak Theme - X.com Inspired Styles */
:root {
    --x-blue: #1d9bf0;
    --x-black: #000000;
    --x-dark-gray: #16181c;
    --x-border: #2f3336;
    --x-text-main: #e7e9ea;
    --x-text-muted: #71767b;
}

body.ultimate_lekhak {
    background-color: #fff;
    color: #0f1419;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    scrollbar-gutter: stable;
}

body.ultimate_lekhak.dark-mode {
    background-color: var(--x-black);
    color: #e7e9ea;
}

/* Removed .dark-mode-text-white { color: inherit; } to fix Light Mode */
body.ultimate_lekhak.dark-mode .dark-mode-text-white {
    color: #e7e9ea !important;
}

body.ultimate_lekhak.dark-mode .text-dark {
    color: #e7e9ea !important;
}

body.ultimate_lekhak.dark-mode .post-details-meta,
body.ultimate_lekhak.dark-mode .breadcrumb-item,
body.ultimate_lekhak.dark-mode .page-title,
body.ultimate_lekhak.dark-mode .post-title,
body.ultimate_lekhak.dark-mode .post-summary {
    color: #e7e9ea !important;
}

body.ultimate_lekhak.dark-mode .breadcrumb-item a {
    color: var(--x-blue) !important;
}

/* Layout Wrapper */
.ultimate-wrapper {
    display: flex;
    max-width: 1300px;
    /* Increased to allow more room for main content */
    margin: 0 auto;
    min-height: 100vh;
    justify-content: center;
    gap: 0;
    /* Remove gap to prevent horizontal gaps between borders */
}


/* Left Sidebar - Navigation */
.ultimate-left-sidebar {
    width: 275px;
    flex: 0 0 275px;
    padding: 0 8px;
    /* Reduced for tighter fit */
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eff3f4;
    overflow-y: auto;
}

.ultimate-left-sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

body.ultimate_lekhak.dark-mode .ultimate-left-sidebar {
    border-right: 1px solid var(--x-border);
}

/* Main Content */
.ultimate-main-content {
    flex: 1;
    max-width: 680px;
    /* Wider main content */
    width: 100%;
    border-right: 1px solid #eff3f4;
    min-height: 100vh;
    background-color: #fff;
}

body.ultimate_lekhak.dark-mode .ultimate-main-content {
    border-right: 1px solid var(--x-border);
    background-color: var(--x-black);
}

/* Right Sidebar - Widgets */
.ultimate-right-sidebar .row,
.ultimate-right-sidebar .col-12 {
    padding: 0 !important;
    margin: 0 !important;
}

.ultimate-right-sidebar {
    width: 345px;
    flex: 0 0 345px;
    padding: 12px 16px;
    /* Reduced padding */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid transparent;
    /* Edge spacer */
}


/* Adjustments for existing elements */
.ultimate_lekhak #header {
    display: none !important;
    /* Hide original header */
}

.ultimate_lekhak .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Left Nav Items */
.ultimate-nav {
    margin-top: 4px;
}

.ultimate-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 20px;
    color: inherit;
    text-decoration: none;
    border-radius: 9999px;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

.ultimate-nav-item:hover {
    background-color: #eff3f4;
}

body.ultimate_lekhak.dark-mode .ultimate-nav-item:hover {
    background-color: #16181c;
}

.user-pill-hover:hover {
    background-color: #eff3f4 !important;
}

body.ultimate_lekhak.dark-mode .user-pill-hover:hover {
    background-color: #16181c !important;
}

.ultimate-nav-item i,
.ultimate-nav-item svg {
    margin-right: 15px;
    width: 26px;
    height: 26px;
}

.ultimate-nav-item.active {
    font-weight: 700;
    color: #0f1419;
    background-color: rgba(15, 20, 25, 0.08);
}

body.ultimate_lekhak.dark-mode .ultimate-nav-item.active {
    color: #e7e9ea;
    background-color: rgba(231, 233, 234, 0.1);
}

/* Notification Bell Styles */
.notification-link {
    transition: background-color 0.2s;
    outline: none;
}

.notification-link:hover {
    background-color: rgba(15, 20, 25, 0.1) !important;
}

body.ultimate_lekhak.dark-mode .notification-link:hover {
    background-color: rgba(231, 233, 234, 0.1) !important;
}

.notification-link svg {
    color: #0f1419;
}

body.ultimate_lekhak.dark-mode .notification-link svg {
    color: #e7e9ea;
}

/* Sidebar Search Adjustments */
.search-form-ultimate input:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 1px var(--x-blue) !important;
}

body.ultimate_lekhak.dark-mode .search-form-ultimate input:focus {
    background-color: var(--x-black) !important;
}

.ultimate-nav-item.active svg {
    color: #0f1419;
}

body.ultimate_lekhak.dark-mode .ultimate-nav-item.active {
    color: #e7e9ea;
    background-color: rgba(231, 233, 234, 0.1);
}

body.ultimate_lekhak.dark-mode .ultimate-nav-item.active svg {
    color: #e7e9ea;
}

/* Post styling for X-look */
.ultimate-post-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eff3f4;
    transition: background-color 0.2s;
}

body.ultimate_lekhak.dark-mode .ultimate-post-item {
    border-bottom: 1px solid var(--x-border);
}

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

body.ultimate_lekhak.dark-mode .ultimate-post-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Hide some default UI parts in this theme */
.ultimate_lekhak .section-newsticker,
.ultimate_lekhak .footer {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 1265px) {
    .ultimate_lekhak .ultimate-left-sidebar {
        width: 88px;
        flex: 0 0 88px;
    }

    .ultimate_lekhak .ultimate-nav-item span,
    .ultimate_lekhak .sidebar-user-info,
    .ultimate_lekhak .sidebar-btn-text {
        display: none;
    }
}

@media (max-width: 991px) {
    .ultimate-mobile-header {
        display: flex;
    }

    .ultimate-left-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 2005;
        background: #fff !important;
        width: 280px !important;
        flex: 0 0 280px !important;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid #eff3f4;
        display: flex !important;
    }

    .ultimate-left-sidebar .ultimate-nav-item span,
    .ultimate-left-sidebar .sidebar-user-info,
    .ultimate-left-sidebar .sidebar-btn-text {
        display: inline !important;
    }

    body.dark-mode .ultimate-left-sidebar {
        background: #000 !important;
        border-right: 1px solid var(--x-border);
    }

    .ultimate-right-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        z-index: 2005;
        background: #fff !important;
        width: 320px !important;
        flex: 0 0 320px !important;
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid #eff3f4;
        display: block !important;
        padding-top: 60px !important;
        /* Space for close button if added */
    }

    body.dark-mode .ultimate-right-sidebar {
        background: #000 !important;
        border-left: 1px solid var(--x-border);
    }

    .ultimate-main-content {
        max-width: 100% !important;
        border-right: none !important;
        width: 100%;
        flex: 1;
    }

    .ultimate-wrapper {
        display: block !important;
        /* Stack columns or allow main to grow */
    }

    /* Toggle states */
    body.show-left-sidebar {
        overflow: hidden;
    }

    body.show-left-sidebar .ultimate-left-sidebar {
        transform: translateX(0);
    }

    body.show-right-sidebar {
        overflow: hidden;
    }

    body.show-right-sidebar .ultimate-right-sidebar {
        transform: translateX(0);
    }

    body.show-left-sidebar .ultimate-overlay,
    body.show-right-sidebar .ultimate-overlay {
        display: block;
    }
}

/* User Dropdown Polish */
.ultimate-user-dropdown .dropdown-menu {
    background-color: #ffffff !important;
    /* Ensure opaque in Light Mode */
    border-radius: 16px;
    box-shadow: rgba(101, 119, 134, 0.2) 0px 0px 15px, rgba(101, 119, 134, 0.15) 0px 0px 3px 1px;
    border: none;
    padding: 12px 0;
    min-width: 260px;
}

body.ultimate_lekhak.dark-mode .ultimate-user-dropdown .dropdown-menu {
    background-color: var(--x-black) !important;
    box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 15px, rgba(255, 255, 255, 0.1) 0px 0px 3px 1px;
    border: 1px solid var(--x-border);
}

body.ultimate_lekhak.dark-mode .ultimate-user-dropdown .dropdown-item {
    color: #e7e9ea !important;
}

body.ultimate_lekhak.dark-mode .ultimate-user-dropdown .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.ultimate-user-dropdown .dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.ultimate-user-dropdown .dropdown-item .icon {
    margin-right: 12px;
}

/* Sidebar Action Buttons */
.btn-add-post-ultimate,
.btn-add-status-ultimate {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9999px !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    padding: 12px 20px !important;
    transition: all 0.2s ease-in-out !important;
    width: 100% !important;
    border: 1px solid transparent !important;
}

.btn-add-post-ultimate {
    background-color: var(--x-blue) !important;
    color: #fff !important;
    border: none !important;
}

.btn-add-post-ultimate:hover {
    background-color: #1a8cd8 !important;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.2);
}

.btn-add-status-ultimate {
    background-color: transparent !important;
    color: #0f1419 !important;
    border: 1px solid #cfd9de !important;
    margin-top: 10px;
}

body.ultimate_lekhak.dark-mode .btn-add-status-ultimate {
    color: #e7e9ea !important;
    border-color: #2f3336 !important;
}

.btn-add-status-ultimate:hover {
    background-color: rgba(15, 20, 25, 0.05) !important;
}

body.ultimate_lekhak.dark-mode .btn-add-status-ultimate:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Dark Mode Toggle Button in Nav */
.ultimate-nav-item .btn.bg-transparent,
.ultimate-nav-item button.bg-transparent {
    color: inherit !important;
    text-align: left;
}

.ultimate-left-sidebar .ultimate-nav-item button {
    font-size: 19px;
}

.ultimate-left-sidebar .ultimate-nav-item button span {
    margin-left: 15px;
}

.fs-15 {
    font-size: 15px;
}

/* In-feed Ads */
.ad-in-feed {
    border-bottom: 1px solid #eff3f4;
    background-color: transparent;
}

body.ultimate_lekhak.dark-mode .ad-in-feed {
    border-bottom-color: var(--x-border);
}

.ad-post-item {
    padding: 12px 16px;
    border-bottom: none !important;
}

body.ultimate_lekhak.dark-mode .ad-avatar-circle {
    background-color: #2f3336 !important;
}

body.ultimate_lekhak.dark-mode .ad-avatar-circle svg {
    fill: #71767b !important;
}

.ad-content-wrapper iframe,
.ad-content-wrapper img {
    max-width: 100% !important;
    border-radius: 12px;
}

/* Sidebar X-Style Cards */
.sidebar-ultimate-card {
    background: #fff;
    border: 1px solid #eff3f4;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-ultimate-card .card-head {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f9fa;
}

.sidebar-ultimate-card .card-head h4 {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: #0f1419;
}

.card-thought-modern {
    border: 1px solid #eff3f4 !important;
    border-left: 1px solid #eff3f4 !important;
    /* Remove colorful left border */
    border-radius: 12px !important;
    transition: all 0.2s ease;
    text-align: left !important;
}

.card-thought-modern .card-body {
    text-align: left !important;
}
.card-thought-modern .card-body > * {
    text-align: left !important;
    margin-left: 0 !important;
}

.card-thought-modern:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

body.dark-mode .card-thought-modern {
    background-color: #1a1a1a !important;
    border-color: #2f3336 !important;
}

body.dark-mode .card-thought-modern .btn-light {
    background-color: #2f3336 !important;
    color: #eff3f4 !important;
}

body.dark-mode .card-thought-modern .border-top {
    border-color: #2f3336 !important;
}

/* Logos and Header Visibility Fixes */
body.dark-mode .logo-section .logo,
body.ultimate_lekhak.dark-mode .logo-section .logo,
body.dark-mode .header-title img,
body.ultimate_lekhak.dark-mode .header-title img {
    filter: none !important;
    background-color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    display: inline-block !important;
}

/* Thoughts header image is already a white box, keeping it clean */
body.dark-mode .section-thoughts .header-title img,
body.ultimate_lekhak.dark-mode .section-thoughts .header-title img {
    filter: none !important;
}

body.dark-mode .badge.bg-light.text-dark {
    background-color: #2f3336 !important;
    color: #eff3f4 !important;
    border-color: #444 !important;
}

/* Dark Mode Utility Classes */
body.dark-mode .dark-mode-bg-dark {
    background-color: #000 !important;
}

body.dark-mode .dark-mode-text-white {
    color: #fff !important;
}

body.dark-mode .notifications-header.border-bottom {
    border-color: #2f3336 !important;
}

body.ultimate_lekhak.dark-mode .notifications-header {
    background-color: #000 !important;
}

body.dark-mode .notifications-header h1,
body.ultimate_lekhak.dark-mode .notifications-header h1 {
    color: #e7e9ea !important;
}

body.dark-mode .notifications-list .border-bottom {
    border-color: #2f3336 !important;
}

/* Popular Lekhak Dark Mode Fixes */
body.dark-mode #popular-lekhak-page {
    background-color: #000 !important;
}

body.dark-mode .popular-lekhak-card {
    background-color: #16181c !important;
    border-color: #2f3336 !important;
    box-shadow: none !important;
}

body.dark-mode .popular-lekhak-card.is-top-3 {
    background: linear-gradient(135deg, #16181c 0%, #2c2510 100%) !important;
    border-color: #FFC107 !important;
}

body.dark-mode .stat-pill {
    background-color: #1e1e1e !important;
    border-color: #2f3336 !important;
    color: #e7e9ea !important;
}

body.dark-mode .stat-pill .text-dark {
    color: #e7e9ea !important;
}

body.dark-mode .popular-lekhak-card:hover .stat-pill {
    background-color: #2f3336 !important;
}

body.dark-mode .popular-lekhak-card .badge.bg-light {
    background-color: #2a2a2a !important;
    color: #71767b !important;
    border-color: #2f3336 !important;
}

body.dark-mode .popular-lekhak-card .avatar-wrapper {
    background: #333 !important;
}

body.dark-mode .popular-lekhak-card img.bg-white {
    background-color: #16181c !important;
}

.sidebar-ultimate-card .card-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background 0.2s;
    border-top: 1px solid #eff3f4;
}

.sidebar-ultimate-card .card-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sidebar-ultimate-card .item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

.sidebar-ultimate-card .item-info {
    flex: 1;
    min-width: 0;
}

.sidebar-ultimate-card .item-name {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #0f1419;
    font-size: 15px;
}

.sidebar-ultimate-card .item-name .verified-icon {
    width: 18px;
    height: 18px;
    margin-left: 4px;
}

.sidebar-ultimate-card .item-meta {
    color: #536471;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-ultimate-card .status-text {
    font-size: 14px;
    color: #0f1419;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-ultimate-card .card-footer {
    padding: 12px 16px;
    border-top: 1px solid #eff3f4;
}

.sidebar-ultimate-card .card-footer a {
    color: var(--x-blue);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

/* Dark Mode Sidebar Cards */
body.ultimate_lekhak.dark-mode .sidebar-ultimate-card {
    background: #16181c;
    border-color: #2f3336;
}

body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .card-head h4,
body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .item-name,
body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .status-text {
    color: #e7e9ea;
}

body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .card-item {
    border-color: #2f3336;
}

body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .card-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .item-meta {
    color: #71767b;
}

body.ultimate_lekhak.dark-mode .sidebar-ultimate-card .card-footer {
    border-color: #2f3336;
}

/* Category Pills Styling */
.ultimate-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid #eff3f4;
    border-radius: 20px;
    font-size: 14px;
    color: #0f1419;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: rgba(0, 0, 14, 0.05);
    border-color: #d1d9dd;
    color: var(--x-blue);
}

.category-pill.active {
    background: var(--x-blue);
    color: #fff;
    border-color: var(--x-blue);
    font-weight: 600;
}

body.ultimate_lekhak.dark-mode .category-pill {
    background: #16181c;
    border-color: #2f3336;
    color: #eff3f4;
}

body.ultimate_lekhak.dark-mode .category-pill:hover {
    background: #202327;
    border-color: #536471;
    color: var(--x-blue);
}

body.ultimate_lekhak.dark-mode .category-pill.active {
    background: var(--x-blue);
    color: #fff;
    border-color: var(--x-blue);
}

.ultimate-nav-item span {
    margin-left: 15px;
    font-size: 19px;
}

.ultimate-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .ultimate-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ultimate-nav-item.dropdown-languages .dropdown-toggle::after {
    margin-left: auto;
}

.ultimate-nav-item.dropdown-languages .dropdown-menu {
    width: 200px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 8px 0;
}

body.dark-mode .ultimate-nav-item.dropdown-languages .dropdown-menu {
    background: #000;
    border: 1px solid var(--x-border);
}

body.dark-mode .ultimate-nav-item.dropdown-languages .dropdown-item {
    color: #fff;
}

body.dark-mode .ultimate-nav-item.dropdown-languages .dropdown-item:hover {
    background: #16181c;
}

body.dark-mode .search-form-ultimate input {
    background: #202327 !important;
    color: #fff !important;
}

body.dark-mode .search-form-ultimate input::placeholder {
    color: #71767b;
}

body.dark-mode .ultimate-nav-divider {
    background: var(--x-border) !important;
}

.ultimate-right-sidebar .widget {
    background: #f7f9f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: none;
}

body.ultimate_lekhak.dark-mode .ultimate-right-sidebar .widget {
    background: #16181c;
}

.ultimate-right-sidebar .widget-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    border: none;
    padding: 0;
}

/* Post Icons Hover */
.post-icons .icon-item:hover {
    color: var(--x-blue);
    cursor: pointer;
}

.post-icons .icon-item i {
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.post-icons .icon-item:hover i {
    background-color: rgba(29, 155, 240, 0.1);
}

/* Scrollbar Polish */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Sticky Header and Slider Layout */
.ultimate-main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--x-border);
}

.dark-mode .ultimate-main-header {
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid var(--x-border);
}

.header-title {
    font-size: 20px;
    font-weight: 800;
    padding: 12px 16px;
    margin: 0;
}

.category-slider-wrapper {
    background: transparent !important;
    border-bottom: none !important;
    padding: 5px 0 10px 0 !important;
}

.category-pill {
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--x-border);
}

.category-pill:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .category-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-pill.active {
    background: var(--x-blue);
    color: #fff !important;
    border-color: var(--x-blue);
}

/* Fix: Profile and section pages inside ultimate-main-content */
.ultimate-main-content .section-profile,
.ultimate-main-content .section-page {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Override container-fluid and container-xl inside narrow main content */
.ultimate-main-content .container-fluid,
.ultimate-main-content .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Single-column profile layout inside ultimate_lekhak narrow pane */
.ultimate-main-content .section-profile .col-lg-4,
.ultimate-main-content .section-profile .col-lg-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.ultimate-main-content .profile-header {
    margin: 0 !important;
}

.ultimate-main-content .container-profile {
    padding: 0 16px !important;
}

/* Fix: Section pages inside ultimate-main-content */
.ultimate-main-content .section>.container-xl {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Categories Index Page */
.categories-index .category-section {
    background: transparent;
}

.categories-index .promoted-section {
    background: rgba(var(--x-blue-rgb), 0.03);
}

.categories-index .sponsored-badge {
    letter-spacing: 0.5px;
    font-size: 13px;
}

.categories-index .ad-index-wrapper {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 15px;
}

body.dark-mode .categories-index .ad-index-wrapper {
    background: rgba(255, 255, 255, 0.03);
}

.categories-index .category-title {
    font-size: 20px;
    font-weight: 800;
}

.categories-index .view-all {
    color: var(--x-blue);
    text-decoration: none;
    font-weight: 600;
}

.categories-index .view-all:hover {
    text-decoration: underline;
}

.categories-index .category-post-item {
    border: 1px solid transparent;
}

.categories-index .category-post-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .categories-index .category-post-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.fw-extrabold {
    font-weight: 900 !important;
}

/* PROFILE PAGE LAYOUT */
body.page-profile .ultimate-main-content {
    /* Keep as flex child — do NOT set display:block or max-width:100% here */
    flex: 1;
    max-width: 640px;
}

body.page-profile .ultimate-main-content .container-xl,
body.page-profile .ultimate-main-content .container-fluid {
    padding: 0 !important;
}

/* Profile Social Icons */
.profile-social-links {
    margin-top: 12px;
}

.profile-social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(15, 20, 25, 0.05);
    color: #536471;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 18px;
    border: 1px solid transparent;
}

.profile-social-icon-link:hover {
    background-color: rgba(15, 20, 25, 0.08);
    color: var(--x-blue);
    border-color: rgba(29, 155, 240, 0.3);
    transform: translateY(-2px);
}

body.dark-mode .profile-social-icon-link {
    background-color: rgba(231, 233, 234, 0.05);
    color: #71767b;
}

body.dark-mode .profile-social-icon-link:hover {
    background-color: rgba(231, 233, 234, 0.1);
    color: var(--x-blue);
    border-color: rgba(29, 155, 240, 0.5);
}

/* APP-STYLE PROFILE REDESIGN */
body.page-profile .ultimate-main-content .section-profile .col-lg-4,
body.page-profile .ultimate-main-content .section-profile .col-lg-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}



.profile-header {
    height: 150px !important;
}

.profile-cover-image {
    height: 150px !important;
}

.profile-avatar-container {
    display: block;
}

.profile-image-app {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    object-fit: cover;
}

body.dark-mode .profile-image-app {
    border-color: var(--x-black);
    background-color: var(--x-black);
}

.pro-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ffc107;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.username-app {
    color: #0f1419;
}

body.dark-mode .username-app {
    color: #e7e9ea;
}

.verified-tick-app {
    width: 22px !important;
    height: 22px !important;
    margin-left: 4px;
    vertical-align: middle;
}

.profile-stats-row {
    margin-top: 5px;
}

.profile-stats-row .stat-box {
    min-width: 70px;
}

body.dark-mode .profile-stats-row .stat-value {
    color: #e7e9ea !important;
}

.profile-app-tabs {
    border-bottom: 1px solid #eff3f4 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    white-space: nowrap !important;
    padding: 0 15px !important;
    scroll-snap-type: x mandatory !important;
    margin-bottom: 15px !important;
    cursor: grab;
    user-select: none;
}

.profile-app-tabs.active-drag {
    cursor: grabbing;
    background-color: rgba(0, 0, 0, 0.02);
}

body.dark-mode .profile-app-tabs.active-drag {
    background-color: rgba(255, 255, 255, 0.02);
}

.profile-app-tabs::-webkit-scrollbar {
    display: none !important;
}

body.dark-mode .profile-app-tabs {
    border-bottom: 1px solid var(--x-border);
}

.profile-app-tabs .nav-item {
    display: block !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
}

.profile-app-tabs .nav-link {
    color: #536471;
    border: none;
    background: transparent;
    position: relative;
    transition: background 0.2s;
    white-space: nowrap;
}

body.dark-mode .profile-app-tabs .nav-link {
    color: #71767b;
}

.profile-app-tabs .nav-link:hover {
    background: rgba(15, 20, 25, 0.1);
    color: #0f1419;
}

body.dark-mode .profile-app-tabs .nav-link:hover {
    background: rgba(231, 233, 234, 0.1);
    color: #e7e9ea;
}

.profile-app-tabs .nav-link.active {
    color: #0f1419;
    background: transparent;
    border: none;
}

body.dark-mode .profile-app-tabs .nav-link.active {
    color: #e7e9ea;
}

.profile-app-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 4px;
    background-color: var(--x-blue);
    border-radius: 9999px;
}


/* BIO */
.profile-bio {
    font-size: 15px;
    line-height: 1.5;
}

body.dark-mode .profile-bio {
    color: #e7e9ea !important;
}

/* ===================================
   POST DETAILS PAGE - App Style
   =================================== */

/* Hero image */
.post-hero-image {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background: #000;
}

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

/* Title and summary */
.post-detail-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f1419;
}

body.ultimate_lekhak.dark-mode .post-detail-title {
    color: #e7e9ea;
}

.post-detail-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: #536471;
}

/* Author bio card at the bottom of article */
.author-bio-card {
    background-color: #f7f9f9;
}

body.ultimate_lekhak.dark-mode .author-bio-card {
    background-color: #16181c;
}

/* Post text body */
.post-text {
    font-size: 1rem;
    line-height: 1.75;
    color: #0f1419;
    word-break: break-word;
}

body.ultimate_lekhak.dark-mode .post-text {
    color: #e7e9ea;
}

.post-text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 8px 0;
}

/* Related posts heading strip */
.related-posts-section>.px-3 h3 {
    font-size: 1rem;
    font-weight: 800;
}

/* Comments section */
.section-comments {
    padding-bottom: 24px;
}

/* ===================================
   SHARE BAR - PILL BUTTONS
   =================================== */

.ultimate-share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.share-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.share-pill svg {
    flex-shrink: 0;
}

/* Facebook */
.share-facebook {
    background-color: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.share-facebook:hover {
    background-color: #166fe5;
    color: #fff;
}

/* Twitter / X */
.share-twitter {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.share-twitter:hover {
    background-color: #333;
    color: #fff;
}

/* WhatsApp */
.share-whatsapp {
    background-color: #25d366;
    color: #fff;
    border-color: #25d366;
}

.share-whatsapp:hover {
    background-color: #1ebe5d;
    color: #fff;
}

/* LinkedIn */
.share-linkedin {
    background-color: #0a66c2;
    color: #fff;
    border-color: #0a66c2;
}

.share-linkedin:hover {
    background-color: #0959ab;
    color: #fff;
}

/* Copy Link */
.share-copy {
    background-color: transparent;
    color: #536471;
    border-color: #eff3f4;
}

.share-copy:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #0f1419;
    border-color: #cfd9de;
}

/* Print */
.share-print {
    background-color: transparent;
    color: #536471;
    border-color: #eff3f4;
}

.share-print:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #0f1419;
    border-color: #cfd9de;
}

/* Save / Bookmark */
.share-save {
    background-color: transparent;
    color: #536471;
    border-color: #eff3f4;
}

.share-save:hover {
    background-color: rgba(29, 155, 240, 0.08);
    color: var(--x-blue);
    border-color: var(--x-blue);
}

.share-saved {
    background-color: rgba(29, 155, 240, 0.08);
    color: var(--x-blue);
    border-color: var(--x-blue);
}

/* Dark mode overrides */
body.ultimate_lekhak.dark-mode .share-copy,
body.ultimate_lekhak.dark-mode .share-print,
body.ultimate_lekhak.dark-mode .share-save {
    color: #71767b;
    border-color: #2f3336;
}

body.ultimate_lekhak.dark-mode .share-copy:hover,
body.ultimate_lekhak.dark-mode .share-print:hover,
body.ultimate_lekhak.dark-mode .share-save:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e7e9ea;
    border-color: #536471;
}

body.ultimate_lekhak.dark-mode .share-saved {
    background-color: rgba(29, 155, 240, 0.15);
    color: var(--x-blue);
    border-color: var(--x-blue);
}

/* ===================================
   AUTHENTICATION PAGES (Login / Register)
   =================================== */

.auth-page-wrapper {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    margin: 0;
    padding: 0;
    z-index: 99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.ultimate_lekhak.dark-mode .auth-page-wrapper {
    background-color: #000;
}

/* Left Panel - Branding */
.auth-left-panel {
    flex: 1;
    background-color: #e74c3c;
    /* Default Brand Red */
    background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(0, 0, 0, 0.25) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-left-panel .brand-content {
    position: relative;
    z-index: 10;
    max-width: 85%;
    padding: 2rem;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-brand-img img {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-brand-img img:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Floating Elements */
.auth-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.auth-floating-elements .element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: floatAnim 25s infinite alternate ease-in-out;
}

.auth-floating-elements .circle-1 {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -100px;
}

.auth-floating-elements .circle-2 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: -50px;
    animation-delay: -7s;
}

@keyframes floatAnim {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(40px, 60px) rotate(15deg); }
}

/* Right Panel - Form Container */
.auth-right-panel {
    flex: 1;
    max-width: 600px;
    background-color: #fff;
}

body.ultimate_lekhak.dark-mode .auth-right-panel {
    background-color: #000;
}

/* Inputs and Buttons within Auth */
.auth-input {
    border-radius: 12px;
    padding: 10px 16px;
    border: 1.5px solid #eff3f4;
    font-size: 14.5px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    color: #0f1419;
}

.auth-input:focus {
    border-color: #e74c3c;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    outline: none;
}

.auth-right-panel label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #536471;
    margin-bottom: 6px;
    display: block;
}

body.ultimate_lekhak.dark-mode .auth-input {
    background-color: #16181c;
    border-color: #2f3336;
    color: #e7e9ea;
}

body.ultimate_lekhak.dark-mode .auth-input:focus {
    border-color: #e74c3c;
    background-color: #000;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2);
}

.auth-submit-btn {
    border-radius: 9999px;
    background-color: #e74c3c;
    border: none;
    color: #fff;
    transition: background-color 0.2s;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
    background-color: #c0392b;
    color: #fff;
}

/* Social Login Override for Auth Pages */
.social-login-wrapper .btn-social {
    border-radius: 12px;
    margin-bottom: 12px;
    width: 100%;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: 1.5px solid #eff3f4;
    background-color: #fff;
    color: #0f1419;
}

.social-login-wrapper .btn-social:hover {
    background-color: #f8f9fa;
    border-color: #cfd9de;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.social-login-wrapper .btn-social-google svg {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #536471;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1.5px solid #eff3f4;
}

.auth-divider::before {
    margin-right: .75em;
}

.auth-divider::after {
    margin-left: .75em;
}

body.ultimate_lekhak.dark-mode .social-login-wrapper .btn-social {
    background-color: transparent;
    border-color: #2f3336;
    color: #e7e9ea;
}

body.ultimate_lekhak.dark-mode .social-login-wrapper .btn-social:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: #536471;
}

body.ultimate_lekhak.dark-mode .auth-divider::before,
body.ultimate_lekhak.dark-mode .auth-divider::after {
    border-bottom-color: #2f3336;
}

/* Icon Only Social Buttons */
.social-login-icons-only {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-login-icons-only .btn-social {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
}

.social-login-icons-only .btn-social svg {
    margin: 0 !important;
}

/* Store Buttons */
.btn-store {
    background: #000;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 14px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    min-width: 170px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-store:hover {
    background: #1a1a1a;
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.btn-store i {
    color: #fff;
}

/* Mobile specific overrides */
@media (max-width: 991px) {
    .auth-page-wrapper {
        position: fixed;
        z-index: 99999;
    }

    .auth-right-panel {
        max-width: 100%;
        padding-top: 40px !important;
    }

    .auth-left-panel {
        display: none !important;
    }
}

/* Mobile Featured Slider Styles */
.featured-slider-scroll {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.featured-card-wrapper {
    scroll-snap-align: start;
}

.section-title.fw-800 {
    font-size: 18px;
    letter-spacing: -0.2px;
}

/* Promoted Badge */
.promoted-badge {
    background-color: rgba(231, 76, 60, 0.08);
    display: inline-block;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.dark-mode .promoted-badge {
    background-color: rgba(231, 76, 60, 0.15);
}

/* Trending Sidebar Styles */
.trending-posts-card .card-head h4 {
    font-size: 1.1rem;
    font-weight: 800;
}

.trending-item {
    position: relative;
    padding-bottom: 5px;
}

.trending-rank-container {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trending-rank {
    font-size: 24px;
    font-weight: 900;
    color: rgba(231, 76, 60, 0.2);
    line-height: 1;
}

.dark-mode .trending-rank {
    color: rgba(255, 255, 255, 0.15);
}

.trending-content {
    padding-top: 2px;
}

.trending-meta .author-name {
    font-size: 13px;
    font-weight: 600;
}

.trending-title {
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.trending-title a:hover {
    color: #e74c3c !important;
}

.trending-item:last-child {
    margin-bottom: 0 !important;
}

/* Global Modal Visibility */
.modal-content {
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

body.dark-mode .modal-content {
    background-color: var(--x-black) !important;
    border: 1px solid var(--x-border) !important;
}

/* Sidebar Login Button Refinement */
.ultimate-user-dropdown .btn-outline-dark {
    background-color: #0f1419 !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-mode .ultimate-user-dropdown .btn-outline-dark {
    background-color: transparent !important;
    color: #e7e9ea !important;
    border: 1px solid #e7e9ea !important;
}

/* Generic Button Contrast (Example for Edit Profile) */
.btn-outline-dark,
.btn-outline-dark.show,
.btn-outline-dark:active {
    border-color: #cfd9de !important;
    color: #0f1419 !important;
    background-color: #ffffff !important;
}

.btn-outline-dark:hover {
    background-color: #e74c3c !important;
    border-color: #e74c3c !important;
    color: #ffffff !important;
}

body.dark-mode .btn-outline-dark,
body.dark-mode .btn-outline-dark.show,
body.dark-mode .btn-outline-dark:active {
    border-color: #536471 !important;
    color: #e7e9ea !important;
    background-color: transparent !important;
}

body.dark-mode .btn-outline-dark:hover {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border-color: #e74c3c !important;
    color: #e74c3c !important;
}

/* Post Card Mobile Parity Refinements */
.promoted-badge-mobile {
    color: #e53935;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1.5px solid #e53935;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1;
    display: inline-block;
}

.spotlight-badge-mobile {
    color: #e53935;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1.5px solid #e53935;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1;
    display: inline-block;
}

.post-icons .icon-item {
    transition: all 0.2s ease;
    padding: 8px;
    margin: -8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-icons .icon-item:hover {
    background-color: rgba(15, 20, 25, 0.1);
    color: #0f1419 !important;
}

body.dark-mode .post-icons .icon-item:hover {
    background-color: rgba(231, 233, 234, 0.1);
    color: #e7e9ea !important;
}

/* Specific Hover for Like (Red) */
.post-icons .icon-item.btn-feed-post-reaction:hover {
    background-color: rgba(229, 57, 53, 0.1);
    color: #e53935 !important;
}

.reaction-icon-like.text-danger {
    color: #e53935 !important;
}

/* Specific Hover for Save (Yellow/Gold) */
.post-icons .icon-item.share-save:hover {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107 !important;
}

.post-icons .icon-item svg {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-icons .icon-item:active svg {
    transform: scale(0.85);
}

/* === COMMENT SECTION STYLING === */
.section-comments {
    border-radius: 12px;
}

.comment-list {
    padding: 0;
    list-style: none;
}

.comment-list li {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .comment-list li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.comment-list li .left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.comment-list li .right {
    flex-grow: 1;
}

.comment-list .username {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f1419;
    text-decoration: none;
}

body.dark-mode .comment-list .username {
    color: #e7e9ea;
}

.comment-list .comment {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 2px;
    color: #0f1419;
}

body.dark-mode .comment-list .comment {
    color: #e7e9ea;
}

.comment-meta {
    margin-top: 8px;
    gap: 15px;
    font-size: 0.85rem;
}

.comment-meta .item-reply a,
.comment-meta .item-like a {
    color: #536471;
    text-decoration: none;
    font-weight: 600;
}

.comment-meta .item-reply a:hover,
.comment-meta .item-like a:hover {
    color: var(--theme-color);
}

/* Comment Form */
#add_comment_registered .form-control,
#add_comment .form-control {
    border: 1px solid #cfd9de;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    background-color: #fff;
}

body.dark-mode #add_comment_registered .form-control,
body.dark-mode #add_comment .form-control {
    background-color: #15202b;
    border-color: #38444d;
    color: #fff;
}

#add_comment_registered .btn-custom,
#add_comment .btn-custom {
    background-color: var(--theme-color);
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 700;
    color: #fff;
    margin-top: 10px;
    transition: filter 0.2s;
}

#add_comment_registered .btn-custom:hover,
#add_comment .btn-custom:hover {
    filter: brightness(0.9);
}

/* ===================================
   APP-STYLE SETTINGS MENU
   =================================== */
.settings-menu-app {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #eff3f4;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-mode .settings-menu-app {
    background-color: #16181c;
    border-color: #2f3336;
}

.settings-menu-app .list-group-item {
    border: none;
    border-bottom: 1px solid #eff3f4;
    padding: 16px 20px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

body.dark-mode .settings-menu-app .list-group-item {
    border-bottom-color: #2f3336;
}

.settings-menu-app .list-group-item:last-child {
    border-bottom: none;
}

.settings-menu-app .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

body.dark-mode .settings-menu-app .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.settings-menu-app .list-group-item.active {
    background-color: rgba(29, 155, 240, 0.05);
    /* very light blue */
}

body.dark-mode .settings-menu-app .list-group-item.active {
    background-color: rgba(29, 155, 240, 0.1);
}

.settings-menu-app .list-group-item a {
    color: #0f1419;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
}

body.dark-mode .settings-menu-app .list-group-item a {
    color: #e7e9ea;
}

.settings-menu-app .list-group-item.active a {
    color: var(--x-blue);
}

.settings-menu-app .icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    background-color: rgba(29, 155, 240, 0.1);
    color: var(--x-blue);
    flex-shrink: 0;
}

body.dark-mode .settings-menu-app .icon-wrapper {
    background-color: rgba(29, 155, 240, 0.15);
}

/* Logout Button Special Styling */
.settings-menu-app .list-group-item.text-danger .icon-wrapper {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

body.dark-mode .settings-menu-app .list-group-item.text-danger .icon-wrapper {
    background-color: rgba(220, 53, 69, 0.15);
    color: #e53935;
}

.settings-menu-app .list-group-item.text-danger a {
    color: #dc3545;
}

body.dark-mode .settings-menu-app .list-group-item.text-danger a {
    color: #e53935;
}

/* Lekh of the Day Card Refined */
.sidebar-ultimate-card .lekh-of-day-container {
    padding: 0 16px 16px 16px;
}

.lekh-of-day-card {
    position: relative;
    background: #fff;
    border: 1px solid #eff3f4;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.ultimate_lekhak.dark-mode .lekh-of-day-card {
    background: #16181c;
    border-color: #2f3336;
}

.lekh-of-day-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #f7f9f9;
}

.lekh-of-day-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.lekh-day-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 800;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lekh-of-day-body {
    padding: 12px;
}

.lekh-of-day-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 8px;
}

.lekh-of-day-title a {
    color: #0f1419;
    text-decoration: none;
}

body.ultimate_lekhak.dark-mode .lekh-of-day-title a {
    color: #e7e9ea;
}

.lekh-of-day-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lekh-of-day-author {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.lekh-of-day-author img {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    object-fit: cover !important;
}

.lekh-of-day-author span {
    font-size: 13px;
    font-weight: 700;
    color: #1d9bf0;
    line-height: 1;
    /* Match badge centering */
}

/* Alignment Fixes for Badges */
.lekh-of-day-author .user-badges-container {
    line-height: 1;
    height: 16px;
    margin-left: 4px;
}

.verified-badge-container img {
    display: block;
}

.lekh-of-day-stats {
    font-size: 12px;
    color: #536471;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.ultimate_lekhak.dark-mode .lekh-of-day-stats {
    color: #71767b;
}

.lekh-of-day-stats svg {
    margin-right: 2px;
}

/* Scroll to Top Button */
.scrollup {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scrollup:hover {
    transform: scale(1.1);
}

.scrollup:active {
    transform: scale(0.9);
}

.scrollup i {
    width: 48px;
    height: 48px;
    line-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--x-blue);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
    border: none;
}

body.ultimate_lekhak.dark-mode .scrollup i {
    background-color: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Button Overrides for Follow/Unfollow */
.ultimate_lekhak .btn-danger {
    background-color: #e53935 !important;
    border-color: #e53935 !important;
    color: #fff !important;
}

.ultimate_lekhak .btn-danger:hover {
    background-color: #d32f2f !important;
    border-color: #d32f2f !important;
}

.ultimate_lekhak .btn-outline-danger {
    background-color: transparent !important;
    border-color: #e53935 !important;
    color: #e53935 !important;
}

.ultimate_lekhak .btn-outline-danger:hover {
    background-color: rgba(229, 57, 53, 0.1) !important;
    color: #e53935 !important;
}

body.ultimate_lekhak.dark-mode .btn-outline-danger {
    border-color: #e53935 !important;
    color: #e53935 !important;
}

body.ultimate_lekhak.dark-mode .btn-outline-danger:hover {
    background-color: rgba(229, 57, 53, 0.15) !important;
}

/* Verified Badge - Red Tick */


.verified-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    vertical-align: middle;
}

/* Mobile Header Styles */
.ultimate-mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eff3f4;
    padding: 8px 16px;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

body.dark-mode .ultimate-mobile-header {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--x-border);
}

.ultimate-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    backdrop-filter: blur(2px);
}

.mobile-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    color: #0f1419;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 50%;
    cursor: pointer;
    outline: none !important;
}

body.dark-mode .mobile-menu-btn {
    color: #e7e9ea;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-logo-text {
    font-weight: 900;
    font-size: 19px;
    color: var(--x-blue);
    margin: 0;
    text-decoration: none;
}

/* Punte Lekhak repositioning */
.punte-lekhak-wrapper {
    background: #fff;
    border-bottom: 1px solid #eff3f4;
}

body.dark-mode .punte-lekhak-wrapper {
    background: #000;
    border-bottom: 1px solid var(--x-border);
}

.sticky-header-group {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Fix for main content sticking header */
@media (max-width: 991px) {
    .ultimate-mobile-header {
        display: flex !important;
    }

    .ultimate-main-header {
        top: 56px !important;
        /* Below mobile header */
    }

    .sticky-header-group {
        top: 56px !important;
    }
}

.mobile-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0 10px;
}

.mobile-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.notification-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .notification-count {
    border-color: #000;
}

/* Mobile Typography Refinement */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.25rem !important;
    }

    .page-title svg {
        width: 24px !important;
        height: 24px !important;
    }

    .header-title {
        font-size: 18px !important;
    }

    .post-detail-title {
        font-size: 1.25rem !important;
    }

    .btn-primary.rounded-pill,
    .btn-add-post-ultimate,
    .btn-add-status-ultimate {
        font-size: 13px !important;
        padding: 8px 16px !important;
    }

    .ultimate-nav-item {
        font-size: 17px !important;
    }

    .mobile-logo-img {
        height: 27px;
    }

    .fs-15 {
        font-size: 14px !important;
    }

    .username-app,
    .sidebar-ultimate-card .item-name {
        font-size: 14px !important;
    }

    .profile-bio {
        font-size: 14px !important;
    }
}

/* Force left alignment for diary text */
.diary-text,
.diary-text p,
.diary-text div,
.diary-text span,
.diary-text strong,
.diary-text em,
.diary-text u,
.diary-text s,
.diary-text a,
.diary-text h1,
.diary-text h2,
.diary-text h3,
.diary-text h4,
.diary-text h5,
.diary-text h6,
.diary-text ul,
.diary-text li,
.diary-text ol,
.diary-text blockquote {
    text-align: left !important;
    text-indent: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* .diary-text center {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
} */