/* WOK Reddit Clone — Self-contained, zero conflicts */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    --bg: #0E1114;
    --card: #0E1114;
    --card-hover: #131F23;
    --border: #212527;
    --border-hover: #2A4448;
    --text: #DBE4E9;
    --text2: #818384;
    --text3: #576F76;
    --link: #4DB8FF;
    --upvote: #FF4500;
    --downvote: #7193FF;
    --blue: #0079D3;
    --input: #0E1D21;
    --hover: rgba(215,218,220,0.06);
    --r: 12px;
    --rs: 8px;
    --font: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
    --media-h: 512px;
}

html { scroll-behavior: smooth; }
body { background: var(--bg) !important; color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--blue); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ============ HEADER ============ */
.r-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg) !important; border-bottom: 1px solid var(--border);
    height: 48px;
}
.r-header-inner {
    max-width: 100%; height: 48px; display: flex; align-items: center;
    padding: 0 16px; gap: 16px;
}
.r-header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.r-logo img { height: 32px; }
.r-header-center { flex: 1; max-width: 600px; margin: 0 auto; text-align: center; }
.r-search-wrap { position: relative; }
.r-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.r-search {
    width: 100%; height: 38px; padding: 0 16px 0 38px;
    background: var(--input); border: 1px solid var(--border); border-radius: 20px;
    color: var(--text); font-size: 14px; outline: none; transition: border-color 0.15s;
}
.r-search:focus { border-color: var(--text2); background: var(--bg); }
.r-header-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; width: auto; padding-right: 0; justify-content: flex-end; }
.r-header-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; color: var(--text2);
    font-size: 16px; text-decoration: none; transition: background 0.15s;
}
.r-header-icon:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.r-header-avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ============ SIDEBAR ============ */
.r-sidebar {
    position: fixed; top: 57px; left: 0; width: 270px;
    height: calc(100vh - 57px); background: #000 !important;
    border-right: 1px solid var(--border); z-index: 50;
    overflow-y: auto; padding: 8px 0;
    transition: left 0.25s cubic-bezier(.4,0,.2,1);
}
.r-sidebar.closed { left: -280px; }
.r-overlay {
    display: none; position: fixed; inset: 48px 0 0 0;
    background: rgba(0,0,0,0.6); z-index: 199;
}
.r-overlay.active { display: block; }

.r-nav { list-style: none; padding: 4px 8px 4px 33px; }
.r-nav li a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--rs); color: var(--text);
    font-size: 15px; font-weight: 400; transition: background 0.1s;
    text-decoration: none;
}
.r-nav li a:hover { background: var(--hover); text-decoration: none; }
.r-nav li a.active { background: rgba(255,69,0,0.12); color: var(--upvote); font-weight: 500; }
.r-nav li a i { width: 22px; text-align: center; font-size: 16px; opacity: 0.8; display: inline-flex; align-items: center; justify-content: center; }
.r-nav li a i.fa-circle { font-size: 8px; }
.r-nav-divider { height: 1px; background: #212527; margin: 8px 16px; }
.r-nav-label { padding: 16px 24px 6px 49px; font-size: 14px; font-weight: 700; color: #5A5955; letter-spacing: 0.8px; text-transform: uppercase; }

/* ============ PAGE LAYOUT ============ */
.r-page {
    margin-left: 220px; padding: 20px 24px;
    display: flex; gap: 24px; justify-content: center;
    transition: margin-left 0.25s cubic-bezier(.4,0,.2,1);
    max-width: 1060px;
}
.r-page.expanded { margin-left: 0; }
.r-feed { flex: 1; max-width: none; min-width: 0; }

/* ============ CREATE POST ============ */
.r-create-post {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: none; border-radius: 0;
    padding: 10px 14px; margin-bottom: 10px;
}
.r-create-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.r-create-input {
    flex: 1; height: 38px; padding: 0 16px;
    background: var(--input); border: 1px solid var(--border); border-radius: 20px;
    color: var(--text); font-size: 14px; outline: none; cursor: pointer;
    transition: border-color 0.15s;
}
.r-create-input:hover { border-color: var(--text2); }

/* ============ SORT TABS ============ */
.r-sort-tabs {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 8px;
    background: var(--bg); border: none; border-radius: 0;
    margin-bottom: 10px;
}
.r-sort-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 20px;
    font-size: 14px; font-weight: 600; color: var(--text2);
    background: none; border: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.r-sort-tab:hover { background: var(--hover); color: var(--text); }
.r-sort-tab.active { background: rgba(255,69,0,0.12); color: var(--upvote); }
.r-sort-tab i { font-size: 12px; }

/* ============ POST CARDS ============ */
.r-post {
    background: var(--bg) !important; border: none; border-radius: 0;
    margin-bottom: 0; overflow: visible;
    transition: border-color 0.15s;
}


.r-post-header {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px 10px; flex-wrap: wrap;
}
.r-post-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.r-post-avatar-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-left: 4px; }
.r-post-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; color: var(--text2); }
.r-post-username { color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.r-post-username:hover { text-decoration: underline; }
.r-post-target { color: var(--link); font-weight: 500; font-size: 13px; text-decoration: none; }
.r-post-target:hover { text-decoration: underline; }
.r-dot { color: var(--text3); font-size: 10px; }
.r-post-action { color: var(--text2); font-size: 13px; }
.r-post-time { color: var(--text3); font-size: 13px; }
.r-post-age { color: var(--text3); font-size: 13px; }
.r-post-location { color: var(--text3); font-size: 13px; }

.r-community-badge {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--blue); display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0;
}
.r-post-community { color: var(--text); font-weight: 700; font-size: 13px; text-decoration: none; }
.r-post-community:hover { text-decoration: underline; }

.r-post-body { padding: 6px 16px 10px; font-size: 16px; line-height: 1.55; color: var(--text); word-wrap: break-word; }

.r-discussion-link {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 16px 8px; font-size: 13px;
    color: var(--link); text-decoration: none;
    background: rgba(77,184,255,0.04);
    border-left: 3px solid var(--link);
    margin: 0 12px 8px; border-radius: 4px; padding: 8px 12px;
}
.r-discussion-link:hover { text-decoration: none; background: none; }
.r-discussion-link i { font-size: 12px; opacity: 0.7; flex-shrink: 0; }

/* ============ POST MEDIA — BLURRED BACKGROUND ============ */
.r-post-media {
    position: relative;
    width: 100%;
    height: var(--media-h);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
}

/* Blurred background layer */
.r-media-blur {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(16px) brightness(0.5) saturate(1.3);
    z-index: 0;
    pointer-events: none;
}

/* Image link layer */
.r-media-link {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.r-post-media img {
    max-width: 100%;
    max-height: var(--media-h);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.r-post-media video {
    width: 100%; max-height: var(--media-h); display: block;
    background: #000; position: relative; z-index: 1;
}

/* ============ POST ACTIONS BAR ============ */
.r-post-actions {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 12px 8px;
}

.r-vote-group {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    overflow: hidden;
}
.r-vote-group .r-action-btn {
    border-radius: 0;
}
.r-vote-group .vote-up-btn { border-radius: 20px 0 0 20px; padding: 6px 6px 6px 10px; }
.r-vote-group .vote-down-btn { border-radius: 0 20px 20px 0; padding: 6px 10px 6px 6px; }
.r-vote-count {
    font-size: 12px; font-weight: 700; color: var(--text);
    min-width: 20px; text-align: center; padding: 0 2px;
}

.r-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600; color: var(--text2);
    background: none; border: none; cursor: pointer;
    text-decoration: none; transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}
.r-action-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.r-action-btn svg { flex-shrink: 0; }

.vote-up-btn:hover, .vote-up-btn:hover svg { color: var(--upvote); stroke: var(--upvote); }
.vote-down-btn:hover, .vote-down-btn:hover svg { color: var(--downvote); stroke: var(--downvote); }

.r-comment-btn { background: rgba(255,255,255,0.04); }
.r-share-btn { background: rgba(255,255,255,0.04); }
.r-readmore { margin-left: auto; color: var(--link); }

/* ============ RIGHT SIDEBAR ============ */
.r-right {
    width: 300px; flex-shrink: 0;
    position: sticky; top: 68px;
    max-height: calc(100vh - 88px); overflow-y: auto;
}
.r-right-card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r); padding: 16px; overflow: hidden;
}
.r-right-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 0 12px; border-bottom: 1px solid var(--border);
    font-size: 11px; font-weight: 700; color: var(--text2);
    text-transform: uppercase; letter-spacing: 0.8px;
}
.r-right-clear { font-size: 12px; font-weight: 400; color: var(--link); text-transform: none; letter-spacing: 0; }

.r-right-item {
    display: block; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none; transition: opacity 0.1s;
}
.r-right-item:last-child { border-bottom: none; }
.r-right-item:hover { opacity: 0.85; text-decoration: none; }
.r-right-item-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.r-right-sub { color: var(--text2); font-weight: 600; }
.r-right-time { color: var(--text3); }
.r-right-item-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; margin-bottom: 4px; }
.r-right-item-stats { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 4px; }

/* ============ LOAD MORE ============ */
.r-load-more { text-align: center; padding: 20px 0; }
.r-load-btn {
    padding: 10px 24px; border-radius: 20px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: 14px; font-weight: 700;
    cursor: pointer; transition: border-color 0.15s;
}
.r-load-btn:hover { border-color: var(--text2); }

/* ============ SIDEBAR TOGGLE ============ */
#sidebarToggle.r-sidebar-toggle {
    position: fixed !important;
    left: 284px !important;
    top: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    border: 1px solid #212527 !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 51 !important;
    transition: left 0.25s cubic-bezier(.4,0,.2,1) !important;
    overflow: visible !important;
}
#sidebarToggle.r-sidebar-toggle:hover {
    background: #111 !important;
    border-color: #2a2c2d !important;
}
#sidebarToggle.collapsed { left: 10px !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1060px) {
    .r-right { display: none; }
}
@media (max-width: 960px) {
    .r-sidebar { left: -280px; }
    .r-sidebar.open { left: 0; z-index: 200; }
    .r-page { margin-left: 0; }
    #sidebarToggle.r-sidebar-toggle { left: 10px !important; }
    #sidebarToggle.r-sidebar-toggle:not(.collapsed) { left: 254px !important; }
}
@media (max-width: 700px) {
    .r-page { padding: 10px 8px; gap: 0; margin-left: 0 !important; }
    .r-header-center { display: none; }
    .r-header-inner { padding: 0 10px; }
    .r-header-right { width: auto; gap: 2px; } .r-header-inner { gap: 8px; justify-content: space-between; }
    
    /* Mobile sidebar toggle */
    .r-sidebar-toggle { display: none !important; }
    .r-sidebar { transform: translateX(-100%); }
    .r-nav li a { font-size: 16px; }
    .r-sidebar.open { transform: translateX(0); }
    /* Header icons fit on mobile */
    .r-header-right { width: auto; gap: 2px; padding-right: 8px; }
    .r-header-right .r-header-icon { width: 28px; height: 28px; font-size: 13px; }
    .r-header-right .chat-header-btn { width: 28px; height: 28px; font-size: 13px; }
    .r-header-avatar img { width: 26px; height: 26px; }
    .r-header-left { padding-left: 8px; }
    .r-logo img { height: 28px; }

    .r-post { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }
    .r-create-post { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }
    .r-sort-tabs { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }
    .r-post-media { --media-h: none; }
    .r-post-header { padding: 10px 12px 4px; }
    .r-post-body { padding: 4px 12px 8px; }
    .r-post-actions { padding: 2px 8px 6px; }
    .r-action-btn span { display: none; }
    .r-comment-btn span { display: inline !important; }
}

.r-post { border-bottom: 1px solid #212527; padding-bottom: 4px; }
.r-post:last-child { border-bottom: none; }

.r-create-post { display: none; }

/* ============ SORT BAR & DROPDOWNS ============ */
.r-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 12px;
}

.r-sort-dropdown {
    position: relative;
}

.r-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.r-sort-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}
.r-sort-dropdown.open .r-sort-btn {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: var(--border);
}
.r-sort-btn i {
    font-size: 12px;
}
.r-sort-btn-time {
    color: var(--text3);
    font-size: 13px;
}
.r-sort-chevron {
    transition: transform 0.2s;
    opacity: 0.5;
}
.r-sort-dropdown.open .r-sort-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.r-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: #1A1D21;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: dropIn 0.15s ease-out;
}
.r-sort-dropdown.open .r-dropdown-menu {
    display: block;
}

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

.r-dropdown-label {
    padding: 10px 16px 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.r-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 0.1s;
    cursor: pointer;
}
.r-dropdown-item:hover {
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}
.r-dropdown-item.active {
    background: rgba(77,184,255,0.08);
    color: var(--link);
    border-left: 3px solid var(--link);
}
.r-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* ============ SORT BAR & DROPDOWNS ============ */
.r-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 12px;
}

.r-sort-dropdown {
    position: relative;
}

.r-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.r-sort-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}
.r-sort-dropdown.open .r-sort-btn {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: var(--border);
}
.r-sort-btn i {
    font-size: 12px;
}
.r-sort-btn-time {
    color: var(--text3);
    font-size: 13px;
}
.r-sort-chevron {
    transition: transform 0.2s;
    opacity: 0.5;
}
.r-sort-dropdown.open .r-sort-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.r-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: #1A1D21;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: dropIn 0.15s ease-out;
}
.r-sort-dropdown.open .r-dropdown-menu {
    display: block;
}

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

.r-dropdown-label {
    padding: 10px 16px 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.r-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 0.1s;
    cursor: pointer;
}
.r-dropdown-item:hover {
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}
.r-dropdown-item.active {
    background: rgba(77,184,255,0.08);
    color: var(--link);
    border-left: 3px solid var(--link);
}
.r-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* ============ SORT BAR & DROPDOWNS ============ */
.r-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 12px;
}
.r-sort-dropdown {
    position: relative;
}
.r-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #818384;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.r-sort-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #D7DADC;
}
.r-sort-dropdown.open .r-sort-btn {
    background: rgba(255,255,255,0.08);
    color: #D7DADC;
    border-color: #1F3236;
}
.r-sort-btn i { font-size: 12px; }
.r-sort-btn-time { color: #576F76; font-size: 13px; }
.r-sort-chevron { transition: transform 0.2s; opacity: 0.5; }
.r-sort-dropdown.open .r-sort-chevron { transform: rotate(180deg); opacity: 1; }
.r-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: #1A1D21;
    border: 1px solid #212527;
    border-radius: 8px;
    padding: 6px 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: dropIn 0.15s ease-out;
}
.r-sort-dropdown.open .r-dropdown-menu { display: block; }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.r-dropdown-label {
    padding: 10px 16px 8px;
    font-size: 15px;
    font-weight: 700;
    color: #D7DADC;
    border-bottom: 1px solid #1F3236;
    margin-bottom: 4px;
}
.r-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #D7DADC;
    text-decoration: none;
    transition: background 0.1s;
    cursor: pointer;
}
.r-dropdown-item:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.r-dropdown-item.active { background: rgba(77,184,255,0.08); color: #4DB8FF; border-left: 3px solid #4DB8FF; }
.r-dropdown-item i { width: 18px; text-align: center; font-size: 13px; opacity: 0.7; }

/* Hide sort bar for now */
.r-sort-bar { display: none; }

/* ============ CAROUSEL ============ */
.r-carousel { position: relative; }
.r-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}
.r-carousel-slide {
    min-width: 100%;
    height: var(--media-h);
    display: flex;
    align-items: center;
    justify-content: center;
}
.r-carousel-slide img {
    max-width: 100%;
    max-height: var(--media-h);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.r-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.r-carousel-arrow:hover { background: rgba(0,0,0,0.85); }
.r-carousel-prev { left: 12px; }
.r-carousel-next { right: 12px; }
.r-carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 12px;
}
.r-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: background 0.2s;
}
.r-carousel-dot.active { background: #fff; }

/* Image caption - like Reddit post title */
.r-post-caption { padding: 4px 16px 8px; font-size: 17px; font-weight: 700; line-height: 1.4; color: #D7DADC; word-wrap: break-word; }

/* Action buttons background */
.r-vote-group { background: #2A3236; }
.r-comment-btn { background: #2A3236; }
.r-share-btn { background: #2A3236; }

/* Post divider lines - white */
.r-post { border-bottom-color: #212527; }

/* Tighter vote group spacing */
.r-vote-group .vote-up-btn { padding: 6px 4px 6px 10px; }
.r-vote-group .vote-down-btn { padding: 6px 10px 6px 4px; }
.r-vote-count { padding: 0; min-width: 14px; }

/* White text and icons in action buttons */
.r-action-btn { color: #FFFFFF; }
.r-action-btn svg { stroke: #FFFFFF; }
.r-vote-count { color: #FFFFFF; }

/* Padding above action buttons */
.r-post-actions { padding-top: 5px; }

/* ============ FEED SETTINGS ============ */
.r-feed-settings {
    padding: 8px 16px 8px 33px;
}
.r-feed-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    user-select: none;
}
.r-feed-toggle input[type="checkbox"] {
    display: none;
}
.r-feed-toggle-slider {
    width: 36px;
    height: 20px;
    background: #212527;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.r-feed-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #818384;
    top: 2px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
}
.r-feed-toggle input:checked + .r-feed-toggle-slider {
    background: #FF4500;
}
.r-feed-toggle input:checked + .r-feed-toggle-slider::after {
    transform: translateX(16px);
    background: #FFFFFF;
}
.r-feed-toggle-label {
    font-size: 13px;
    color: #D7DADC;
    font-weight: 400;
}

/* Narrow sidebar nav items so they don't touch hamburger */
.r-nav li a { margin-right: 40px; }

/* Widen sidebar and fix text wrapping */
.r-sidebar { width: 300px; }
.r-nav li a { margin-right: 45px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-page { margin-left: 300px; }
#sidebarToggle.r-sidebar-toggle { left: 295px; }
#sidebarToggle.collapsed { left: 10px; }

/* Logo padding and header spacing */
.r-logo { padding-left: 25px; }
.r-header { margin-top: 8px; }

/* More space between feed and right sidebar */
.r-page { gap: 40px; }
.r-right { margin-left: 10px; }

/* Search box - Reddit style dark with subtle border */
.r-search {
    background: #1A1D21 !important;
    border: 1px solid #212527 !important;
    border-radius: 24px !important;
    color: #D7DADC !important;
}
.r-search:focus {
    border-color: #D7DADC !important;
    background: #1A1D21 !important;
}
.r-search::placeholder {
    color: #818384 !important;
}

/* Search box - Reddit orange-to-yellow gradient border */
.r-search-wrap {
    position: relative;
    background: linear-gradient(90deg, #FF4500, #FF8717, #FFD635);
    border-radius: 26px;
    padding: 2px;
}
.r-search {
    background: #1A1D21 !important;
    border: none !important;
    border-radius: 24px !important;
}
.r-search:focus {
    background: #1A1D21 !important;
}
.r-search-icon {
    z-index: 1;
}

/* More space below header border */
.r-header { border-bottom: none; }
.r-header::after {
    display: none;
}

/* Padding above header too */
.r-header { margin-top: 0; padding-top: 8px; }

/* Center search box properly */

/* Fix header - solid background, no bleed through */
.r-header {
    background: #000 !important;
    z-index: 100 !important;
    position: sticky !important;
    top: 0 !important;
    height: auto !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #212527 !important;
}
.r-header-inner {
    height: 48px !important;
}

/* Match right side padding to left */

/* Remove gap between header and first post */
.r-page { padding-top: 0; }
.r-feed > .r-sort-bar:first-child, .r-feed > div:first-child { margin-top: 0; padding-top: 0; }

/* Remove top gap between header and content */
.r-page { padding-top: 0 !important; }

/* Remove top gap between header and content */
.r-page { padding-top: 0 !important; }

/* ============ EXPOSED PAGE ============ */
.r-exposed-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #212527;
    margin-bottom: 12px;
}
.r-exposed-tab {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #818384;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.r-exposed-tab:hover { background: rgba(255,255,255,0.06); color: #D7DADC; text-decoration: none; }
.r-exposed-tab.active { background: rgba(255,69,0,0.12); color: #FF4500; }

.r-exposed-grid { columns: 6; column-gap: 4px; }
@media (max-width: 768px) { .r-exposed-grid { columns: 3 !important; } }
@media (max-width: 480px) { .r-exposed-grid { columns: 2 !important; } }






.r-exposed-card {
    border-radius: 6px;
    overflow: hidden;
    border: none;
    transition: opacity 0.15s;
    background: #000;
    margin-bottom: 4px;
    break-inside: avoid;
    position: relative;
}
.r-exposed-card:hover { opacity: 0.9; }
.r-exposed-media {
    position: relative;
    overflow: hidden;
    background: #212527;
}
.r-exposed-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
.r-exposed-media video {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.r-exposed-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}
.r-exposed-info { padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.85)); z-index: 2; }


.r-exposed-user {
    font-size: 12px;
    font-weight: 600;
    color: #D7DADC;
    text-decoration: none;
}
.r-exposed-user:hover { text-decoration: underline; }
.r-exposed-stats {
    display: flex;
    gap: 10px;
}
.r-exposed-stat {
    font-size: 12px;
    color: #818384;
    display: flex;
    align-items: center;
    gap: 4px;
}
.r-exposed-stat.liked { color: #FF4500; }
.r-exposed-stat i { font-size: 11px; }

@media (max-width: 700px) {

    .r-exposed-info { padding: 6px 8px; }
}


/* Exposed page layout - wider grid, left-aligned */
.r-page-exposed { justify-content: flex-start; padding-left: 2% !important; }
.r-page-exposed .r-feed { max-width: 100%; }

/* ============ MOBILE FIXES ============ */
@media (max-width: 700px) {
    .r-feed { width: 100%; max-width: 100%; }
    .r-page { flex-direction: column; width: 100%; padding: 0; }
    .r-right { display: none; }
    .r-header-right { gap: 4px; }
    .r-header-right .r-header-icon { width: 32px; height: 32px; font-size: 16px; }
    .r-header-right .chat-header-btn { width: 32px; height: 32px; }
    .r-post-media img, .r-post-media video { max-height: 400px; }
}
@media (max-width: 480px) {
    .r-header-left img { height: 28px; }
    .r-header-right { gap: 2px; }
}

/* ============ MOBILE SIDEBAR FIX ============ */
@media (max-width: 960px) {
    .r-page { margin-left: 0 !important; width: 100% !important; }
}


@media (max-width: 960px) {
    #sidebarToggle.r-sidebar-toggle {
        left: 4px !important;
        top: 80px !important;
    }
    #sidebarToggle.r-sidebar-toggle:not(.collapsed) {
        left: 4px !important;
    }
    .r-sidebar.open ~ #sidebarToggle.r-sidebar-toggle {
        left: 254px !important;
    }
}

@media (max-width: 700px) {
    .r-feed { padding-left: 16px; padding-right: 16px; }
}

.r-header-left { width: 260px !important; }

/* Mobile exposed cards */
@media (max-width: 600px) {
    .r-exposed-info { flex-direction: column; align-items: flex-start; gap: 2px; }
    .r-exposed-user { font-size: 11px; }
    .r-exposed-stats { font-size: 10px; }
    .r-exposed-user { font-size: 11px; }
    .r-exposed-stats { font-size: 10px; }
}

/* === Liked images thumbnail grid === */
.r-liked-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px 4px;
}
.r-liked-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}
.r-liked-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s;
}
.r-liked-thumb:hover img {
    opacity: 0.8;
}
@media (max-width: 480px) {
    .r-liked-thumb {
    position: relative;
        width: 64px;
        height: 64px;
    }
}


/* Video play icon on thumbnails */
.r-liked-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    pointer-events: none;
}

/* Hide post actions on community feed */
.r-post .r-post-actions {
    display: none !important;
}


/* Truncate group descriptions to one line on profiles */
.group-box .comment-description {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.5em;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .r-liked-thumb {
    position: relative;
        width: 64px;
        height: 64px;
    }
}

/* Upgrade button in sidebar */
.r-upgrade-btn {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #CC1A5D, #e84393) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 8px;
    padding: 10px 16px !important;
    margin: 0 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(204, 26, 94, 0.3);
}
.r-upgrade-btn:hover {
    background: linear-gradient(135deg, #e01e69, #fd79a8) !important;
    box-shadow: 0 4px 16px rgba(204, 26, 94, 0.5);
    transform: translateY(-1px);
}
.r-upgrade-btn i {
    color: #ffd700 !important;
}

/* Mobile feed: hide location, inline avatar with name/age */
@media (max-width: 768px) {
    .r-post-location { display: none !important; }
    .r-post-header { display: flex; align-items: center; gap: 8px; }
    .r-post-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .r-post-avatar { width: 28px; height: 28px; }
}

/* Mobile header - hamburger left, logo center, profile right */
@media (max-width: 768px) {
    .r-header-inner { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 0 8px !important; position: relative !important; }
    .r-header-left { flex: 0 0 auto !important; padding-left: 0 !important; }
    .r-header-right { flex: 0 0 auto !important; display: flex !important; padding-right: 0 !important; gap: 0 !important; }
    .r-header-right .r-header-icon { display: none !important; }
    .r-header-right .chat-header-btn { display: none !important; }
    .r-header-right .r-header-avatar { display: flex !important; }
    .r-header-right .r-header-avatar img { width: 32px !important; height: 32px !important; border-radius: 50% !important; object-fit: cover !important; }
    .r-header-center { display: none !important; }
    .r-logo { position: absolute !important; left: 47% !important; transform: translateX(-50%) !important; }
    #sidebarToggle.r-sidebar-toggle { display: none !important; visibility: hidden !important; width: 0 !important; height: 0 !important; }
}


.r-mobile-menu-btn { display: none; background: none; border: none; color: #d7dadc; padding: 4px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 768px) { .r-mobile-menu-btn { display: flex !important; align-items: center !important; justify-content: center !important; } }

/* Mobile fix for groups/topics/kink pages */
@media (max-width: 768px) {
    .group-page, .groups-main-bg, .ban-wrap, .container-xl, .container-fluid, .r-feed, .r-page {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .groups-main-bg { padding: 12px 0 !important; margin: 0 !important; }
    .group-list-item, .group-card, .group-box, .groups-main-bg .card {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
    }
    .group-page .container-xl { padding: 0 8px !important; }
    body { overflow-x: hidden !important; }
}

/* Fix group cards right side cut off */
@media (max-width: 768px) {
    .groups-main-bg .card,
    .groups-main-bg > div,
    .group-list-item,
    .groups-main-bg .mb-4,
    .groups-main-bg .mb-3,
    .groups-main-bg [class*="col-"] {
        width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Fix group box cards overflow on mobile */
@media (max-width: 768px) {
    .groups-main-bg .col-md-6,
    .groups-main-bg .col-12,
    .group-box,
    .group-box-details,
    .group-box a {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .groups-main-bg .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

/* Reduce padding on group cards for more width */
@media (max-width: 768px) {
    .group-page .container-xl { padding: 0 2px !important; }
    .group-box { padding: 12px !important; }
}

/* Make group boxes wider - less container padding */
@media (max-width: 768px) {
    .group-page .container-xl { padding: 0 !important; }
    .group-box { margin: 0 4px 12px !important; }
    .r-feed { padding: 0 !important; }
    .r-page { padding: 8px 0 !important; }
}

/* Fix left padding on group boxes */
@media (max-width: 768px) {
    .groups-main-bg .col-md-6,
    .groups-main-bg .col-12 {
        padding-left: 4px !important;
        padding-right: 0 !important;
    }
    .groups-main-bg .row {
        padding: 0 !important;
    }
}


/* Equal padding on group boxes */
@media (max-width: 768px) {
    .groups-main-bg .col-md-6,
    .groups-main-bg .col-12 {
        padding-left: 4px !important;
        padding-right: 0 !important;
    }
}

/* Remove page gap and extend group boxes full width on mobile */
@media (max-width: 768px) {
    .r-page { gap: 0 !important; padding: 8px 4px !important; }
    .groups-main-bg { padding: 12px 0 !important; }
    .groups-main-bg .row { width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .group-box { margin: 0 0 12px 0 !important; width: 100% !important; }
}

/* Mobile fix for profile page */
@media (max-width: 768px) {
    .profile-block { display: block !important; padding: 3px !important; }
    .profile-img-box { width: 100% !important; text-align: center !important; margin-bottom: 16px !important; }
    .profile-image { width: 200px !important; height: 200px !important; margin: 0 auto !important; display: block !important; }
    .profile-about-box { padding-right: 0 !important; }
    .profile-about-box > div:last-child { position: static !important; margin-top: 12px !important; }
    .user-stats { grid-template-columns: 1fr !important; }
    .user-stats li { font-size: 13px !important; }
    .user-name-box2 h2 { font-size: 20px !important; justify-content: center !important; }
    .profile-tabs { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; justify-content: center !important; gap: 8px !important; }
    .profile-tabs li { width: auto !important; }
}

/* Fix profile stats table overflow on mobile */
@media (max-width: 768px) {
    .user-stats { grid-template-columns: 1fr 1fr !important; gap: 4px !important; }
    .user-stats li { font-size: 12px !important; }
    .user-stats-t, .user-stats-v { font-size: 12px !important; }
    .profile-block { overflow: hidden !important; word-wrap: break-word !important; }
    .profile-about-box { overflow: hidden !important; }
}

/* Fix profile stats - single column on mobile */
@media (max-width: 768px) {
    .user-stats {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    .user-stats li {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        font-size: 13px !important;
    }
    .user-name-box2 h2 {
        font-size: 20px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}

/* Community page - expand with viewport */
.r-page { max-width: 1250px; }


/* Match header right padding to left */
.r-header-right { padding-right: 25px; }

/* Change blue links to lighter gray shade */
.r-post a, .r-feed a { color: #a8aaab; }
.r-post a:hover, .r-feed a:hover { color: #d7dadc; }

/* Responsive community feed thumbnails - min 80px, max 8 per row, fill width */
.r-liked-thumbs { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(calc(100% / 8 - 4px), 1fr)); gap: 4px; padding: 8px 12px 4px; }
.r-liked-thumb {
    position: relative; width: auto; height: auto; aspect-ratio: 1; }

/* Replace envelope icon with chat icon in header */
.r-header-right .fa-envelope::before { content: "\f4ad" !important; }

/* Make all header icons white to match community page */
.r-header-right .r-header-icon { color: #d7dadc !important; }
.r-header-right .r-header-icon:hover { color: #fff !important; }

/* Profile page - fill available width like community feed */
.ban-wrap { max-width: none !important; }

/* Profile page - remove container-xl width cap */
.ban-wrap .container-xl { max-width: none !important; }

/* Profile page - align content to left, max 1300px with right padding */
.sidebar-layout-community { justify-content: flex-start !important; }
.sidebar-layout-community .ban-wrap { max-width: 1250px !important; padding-right: 20px; margin: 0 !important; }

/* Mobile profile - full width with 5% side padding */
@media (max-width: 768px) {
    .sidebar-layout-community-profile {
        width: 100% !important;
        padding: 0 !important;
    }
    .sidebar-layout-community-profile .ban-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .sidebar-layout-community-profile .max-width-90,
    .sidebar-layout-community-profile .margin-left-profile-page,
    .sidebar-layout-community-profile section.profile-page-bg {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    .sidebar-layout-community-profile .container-xl {
        max-width: 100% !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .sidebar-layout-community-profile .profile-row {
        margin: 0 !important;
        width: 100% !important;
    }
    .sidebar-layout-community-profile .profile-wide {
        max-width: 100% !important;
        width: 100% !important;
        padding: 5px !important;
    }
    .sidebar-layout-community-profile .profile-block {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .sidebar-layout-community-profile section.profile-page-bg .profile-wide {
        border-radius: 0 !important;
    }
}

/* ---- Mobile profile stats redesign ---- */
@media (max-width: 768px) {
    .user-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 8px 0 0 !important;
        columns: unset !important;
        grid-template-columns: unset !important;
        width: 100% !important;
    }
    .user-stats li {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid #2a2c2d !important;
        gap: 12px !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        width: 100% !important;
    }
    .user-stats li:last-child {
        border-bottom: none !important;
    }
    .user-stats-t {
        color: #818384 !important;
        white-space: nowrap !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }
    .user-stats-v {
        color: #d7dadc !important;
        font-weight: 500 !important;
        text-align: right !important;
        font-size: 14px !important;
        word-break: break-word !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .user-stats-v a {
        color: #d7dadc !important;
    }
    .user-role-value {
        max-width: 180px !important;
        text-align: right !important;
        display: inline-block !important;
        white-space: normal !important;
    }
    /* Name + age centered on mobile */
    .user-name-box2 {
        text-align: center !important;
    }
    .user-name-box2 h2 {
        justify-content: center !important;
        text-align: center !important;
    }
    .user-name-box2 > div {
        text-align: center !important;
    }
}

/* ---- Mobile about me fixes ---- */
@media (max-width: 768px) {
    .about-me-block {
        text-align: left !important;
    }
    .about-me-description {
        text-align: left !important;
    }
    .about-me-block.collapsed::after {
        display: none !important;
        background: none !important;
        height: 0 !important;
    }
    .about-me-block.collapsed {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ---- Mobile photos/videos grid - 5 per row ---- */
@media (max-width: 768px) {
    .grid.profile {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }
    .grid.profile .video-inner-box img,
    .grid.profile .video-inner-box video {
        height: auto !important;
    }
    .new-maso-card-bg .grid.profile {
        grid-template-columns: 1fr !important;
    }
    .new-maso-card-bg .grid.profile img,
    .video-list-item-link img {
        height: auto !important;
    }
}

/* ---- Mobile groups - 1 per row ---- */
@media (max-width: 768px) {
    .group-list {
        flex-direction: column !important;
    }
    .group-list > * {
        width: 100% !important;
        margin: 0 0 12px 0 !important;
    }
}

/* ---- Fix mobile profile card content alignment ---- */
@media (max-width: 768px) {
    .profile-about-box {
        width: 100% !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    .profile-about-box > div {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    .profile-about-box .profile-wide-padding {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    .profile-block.flex-wrap-wrap {
        width: 100% !important;
        overflow: visible !important;
    }
    .profile-block .profile-img-box {
        width: 100% !important;
    }
    /* Fix buttons wrapping */
    .profile-block ul {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    .profile-block ul li {
        max-width: 48% !important;
    }
    .user-action-btn {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* ---- Fix mobile profile stats + buttons full width ---- */
@media (max-width: 768px) {
    .profile-about-box.d-flex {
        display: block !important;
        width: 100% !important;
    }
    .profile-about-box > div:first-child {
        width: 100% !important;
    }
    .profile-about-box > div:first-child > div {
        width: 100% !important;
    }
    .user-stats {
        width: 100% !important;
    }
    .user-stats li {
        width: 100% !important;
    }
    /* Fix action buttons full width */
    .profile-block ul.profile-tabs {
        width: 100% !important;
    }
    .profile-block ul.profile-tabs li {
        max-width: 48% !important;
        flex: 0 0 48% !important;
        overflow: hidden !important;
    }
    .profile-block ul.profile-tabs li a {
        display: block !important;
        text-align: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 13px !important;
    }
}

/* ---- Mobile profile - final overrides ---- */
@media (max-width: 768px) {
    .profile-block.flex-wrap-wrap,
    .profile-block {
        padding: 0 !important;
    }
    .profile-about-box,
    .profile-about-box.d-flex {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        text-align: center !important;
    }
    .profile-about-box > div {
        width: 100% !important;
        max-width: 100% !important;
    }
    .user-name-box2 {
        text-align: center !important;
    }
    .user-name-box2 h2 {
        justify-content: center !important;
        text-align: center !important;
    }
    .user-name-box2 > div {
        text-align: center !important;
    }
    div[style*="flex-grow"] {
        width: 100% !important;
    }
    .profile-wide-padding,
    .profile-wide.profile-wide-padding {
        width: 100% !important;
    }
}

/* ---- Fix photo grid height cutoff on mobile ---- */
@media (max-width: 800px) {
    .new-maso-card-bg .grid.profile {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .grid.profile.overflow-scroll {
        overflow: visible !important;
        height: auto !important;
    }
}

/* ---- Mobile: limit photos/videos/friends to 2 rows of 5 ---- */
@media (max-width: 768px) {
    .grid.profile .item:nth-child(n+11) {
        display: none !important;
    }
    .grid.profile .video-items-box:nth-child(n+11) {
        display: none !important;
    }
}

/* ---- Mobile friends grid: 5 per row, max 2 rows ---- */
@media (max-width: 768px) {
    .all-members-area .row.g-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }
    .all-members-area .row.g-3 > .col-md-6,
    .all-members-area .row.g-3 > .col-12 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    .all-members-area .row.g-3 > *:nth-child(n+11) {
        display: none !important;
    }
}

/* ---- Force stats full width on mobile ---- */
@media (max-width: 768px) {
    .profile-about-box,
    .profile-about-box.d-flex {
        display: block !important;
        width: 100% !important;
    }
    .profile-about-box > div,
    .profile-about-box > div > div,
    .profile-about-box > div > div > div {
        width: 100% !important;
        max-width: 100% !important;
    }
    .profile-wide.profile-wide-padding {
        width: 100% !important;
        max-width: 100% !important;
    }
    .user-stats {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ---- Force profile stats full width mobile (ID specificity) ---- */
@media (max-width: 768px) {
    #profile-about-mobile {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    #profile-about-mobile > div {
        width: 100% !important;
        max-width: 100% !important;
    }
    #profile-about-mobile > div > div {
        width: 100% !important;
    }
    #profile-about-mobile .profile-wide-padding {
        width: 100% !important;
    }
    #profile-about-mobile .user-stats {
        width: 100% !important;
    }
    #profile-about-mobile .user-stats li {
        width: 100% !important;
    }
}


/* === REDDIT-STYLE TYPOGRAPHY === */
.r-post-username {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #e8e6e1 !important;
}
.r-post-age {
    font-size: 15px !important;
    color: rgb(100, 105, 108) !important;
}
.r-post-location {
    font-size: 15px !important;
    color: rgb(100, 105, 108) !important;
}
.r-dot {
    font-size: 14px !important;
    color: rgb(100, 105, 108) !important;
}
.r-post-action {
    font-size: 15px !important;
    color: rgb(100, 105, 108) !important;
}
.r-post-time,
.r-post-timestamp {
    font-size: 15px !important;
    color: rgb(100, 105, 108) !important;
}
.r-post-body,
.r-post-body p,
.r-post-text {
    font-size: 18px !important;
    line-height: 1.5 !important;
}
.r-post-body b,
.r-post-body strong,
.r-post-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}
.text-uppercase {
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
}
.r-sidebar-link,
.list-group-item {
    font-size: 17px !important;
}
.card a {
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
}
.card .text-muted,
.card small {
    font-size: 14px !important;
    color: rgb(100, 105, 108) !important;
}
.text-success {
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Fix hover image resize on location page */
.all-members-area .friend-box .fri-img,
.all-members-area .friend-box:hover .fri-img { width: 100% !important; max-width: 100% !important; min-width: unset !important; height: auto !important; flex: none !important; aspect-ratio: 1; }
.all-members-area .friend-box .fri-img img,
.all-members-area .friend-box:hover .fri-img img { width: 100% !important; height: 100% !important; border-radius: 4px !important; object-fit: cover !important; }
.all-members-area .row.g-3 { display: grid !important; grid-template-columns: repeat(10, 1fr) !important; gap: 5px !important; }
.all-members-area .row.g-3 > .col-md-6 { width: 100% !important; max-width: 100% !important; flex: none !important; padding: 0 !important; }
.all-members-area .friend-box { padding: 0 !important; border: none !important; background: transparent !important; }
.all-members-area .friend-box .fri-info, .all-members-area .friend-box .fri-btn { display: none !important; }
.friend-box, .friend-box:hover { transition: none !important; }


/* Kill all hover effects on member cards at mobile width */
@media (max-width: 932px) {
    .friend-box:hover, .friend-box { padding: 10px !important; }
    .friend-box:hover .fri-img, .friend-box .fri-img { width: 80px !important; max-width: 80px !important; min-width: 80px !important; height: 80px !important; flex: 0 0 80px !important; }
    .friend-box:hover .fri-img img, .friend-box .fri-img img { width: 80px !important; height: 80px !important; max-width: 80px !important; max-height: 80px !important; }
    .friend-box:hover .fri-img a, .friend-box .fri-img a { width: 80px !important; height: 80px !important; }
    .friend-box:hover { background: inherit !important; border-color: inherit !important; }
}





/* Fix kinks page grey bar and full width */
.edit-kink-tabs-block { background: transparent !important; background-color: transparent !important; }
.edit-kink-tabs-content-area { background: transparent !important; }
.edit-kink-page .r-page { max-width: 100% !important; }


/* Force 1 column on kink-members page mobile */
@media (max-width: 932px) {
    .kink-members-wrap .row, .kink-members-wrap .row.g-3 { grid-template-columns: 1fr !important; display: grid !important; }
    .kink-members-wrap { padding: 10px 5px !important; overflow-x: hidden !important; }
}


/* Force 1 column kink-members mobile */
@media (max-width: 932px) {
    .kink-members-wrap .row,
    .kink-members-wrap .row.g-3 {
        display: block !important;
    }
    .kink-members-wrap .row > div,
    .kink-members-wrap .row.g-3 > div {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 8px !important;
        padding: 0 !important;
    }
    .kink-members-wrap { padding: 10px 5px !important; overflow-x: hidden !important; }
}


/* Remove underline on hover for kink member topics */
.topics-item-box a:hover, .blog-entry-box:hover, .blog-entry-box:hover * { text-decoration: none !important; }


/* Line 2 wrapper for action text + time */
.r-post-line2 { display: inline; }
.r-post-line2 .r-dot { font-size: 12px; color: rgb(100, 105, 108); }
@media (max-width: 768px) {
    .r-post-line2 { display: flex; align-items: center; gap: 5px; width: 100%; margin-top: 1px; }
}
.r-header-right .r-header-icon.r-icon-alert, .r-header-right .r-header-icon.r-icon-alert:hover { color: #CC1A5D !important; }
@media (max-width: 768px) { .r-sidebar { border-right: none !important; } .r-nav { padding: 4px 8px 4px 8px !important; } .r-nav-label { padding-left: 24px !important; } }

/* Desktop profile stats label size */
.user-stats-t { font-size: 14px !important; }
.user-stats-v { font-size: 14px !important; }
