/* 
 * Mukazanzi Forums - Premium Theme
 * Based on Mukazanzi Design System (Dark, cinematic, ox_lib influenced)
 */

:root {
    /* Color Palette - Dark Mode */
    --bg-main: #0c0c0c;
    --bg-secondary: #0e0e0e;
    --bg-tertiary: rgba(255, 255, 255, 0.02);
    --bg-elevated: #060606;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.60);
    --text-muted: rgba(255, 255, 255, 0.40);
    
    --accent-primary: #A6CE39; /* Lime */
    --accent-hover: #a3e635; /* Bright Lime */
    --accent-user: #a855f7; /* Purple for user avatars */
    
    --border-color: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.10);
    /* Fallback default background tokens for dark mode */
    --header-bg: rgba(14, 14, 14, 0.8);
    --nav-bg: rgba(0,0,0,0.2);
    --dropdown-bg: rgba(12, 12, 12, 0.95);
    --widget-bg: rgba(15, 23, 42, 0.4);
    --footer-bg: var(--bg-secondary);
    --btn-primary-bg: rgba(255, 255, 255, 0.05);
    --btn-primary-border: rgba(255, 255, 255, 0.1);
    --btn-primary-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-primary-text: #ffffff;
    --btn-subtle-bg: rgba(255, 255, 255, 0.05);
    --btn-subtle-hover-bg: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
    --font-unbounded: 'Unbounded', sans-serif;
    
    /* Layout */
    --container-width: 1600px;
    --sidebar-width: 320px;
    --gap-lg: 24px;
    --gap-md: 16px;
    --gap-sm: 8px;
    
    /* Radii */
    --radius-sharp: 4px; /* For HUD/Buttons/Inputs */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px; /* For Cards */
    
    /* Shadows */
    --shadow-dropdown: 0 10px 40px rgba(0,0,0,0.8);
    --shadow-widget: 0 20px 40px rgba(0,0,0,0.4);
    --shadow-box: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-input: 0 2px 4px rgba(0,0,0,0.2);
}

/* Color Palette - Light Mode */
[data-theme="light"] {
    --bg-main: #f1f5f9; /* slate-100 */
    --bg-secondary: #ffffff;
    --bg-tertiary: rgba(0, 0, 0, 0.03);
    --bg-elevated: #ffffff;
    
    --text-primary: #0f172a; /* slate-900 */
    --text-secondary: #475569; /* slate-600 */
    --text-muted: #94a3b8; /* slate-400 */
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.04);
    --border-strong: rgba(0, 0, 0, 0.15);
    
    /* Specific overrides for hardcoded dark mode colors */
    --header-bg: rgba(255, 255, 255, 0.85);
    --nav-bg: rgba(0, 0, 0, 0.03);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --widget-bg: #ffffff;
    --footer-bg: #ffffff;
    --btn-primary-bg: #0f172a;
    --btn-primary-border: #0f172a;
    --btn-primary-hover-bg: #1e293b;
    --btn-primary-text: #ffffff;
    --btn-subtle-bg: rgba(0, 0, 0, 0.05);
    --btn-subtle-hover-bg: rgba(0, 0, 0, 0.1);
    
    /* Shadows */
    --shadow-dropdown: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-widget: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-box: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-input: 0 1px 3px rgba(0,0,0,0.05);
}



/* Light Mode Toggle Icon Logic */
[data-theme="light"] .dark-icon { display: none !important; }
[data-theme="light"] .light-icon { display: inline-block !important; }

/* Theme Toggle Button Style */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sharp);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.btn-icon:hover {
    background: rgba(166, 206, 57, 0.1);
    color: var(--accent-primary);
    border-color: rgba(166, 206, 57, 0.3);
}

/* =========================================
   Base Reset & Global Scrollbars
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary, #A6CE39) rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #A6CE39 0%, #7da226 100%);
    border-radius: 8px;
    border: 2px solid rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b8e244 0%, #A6CE39 100%);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-inter);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-top: 0;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease-out;
}

a:hover {
    color: var(--accent-primary);
}

ul {
    list-style: none;
}

/* =========================================
   Layout Utilities
   ========================================= */
.ipsLayout_container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 24px);
}

@media (max-width: 768px) {
    .ipsLayout_container {
        padding: 0;
    }
}

.ipsLayout_container_full {
    width: 100%;
}

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Text Utilities */
.premium-gradient-text {
    background: linear-gradient(to right, var(--text-primary), rgba(166,206,57,0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
.brand-text {
    background: linear-gradient(to bottom, var(--text-primary) 30%, #a3e635 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.05em;
}

/* =========================================
   Header & Navigation (Sticky Top)
   ========================================= */
#ipsLayout_header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.focus-header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.focus-header-wrapper {
    position: relative;
    z-index: 101;
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
}

.focus-header-align {
    position: relative;
    z-index: 101;
    height: 64px;
    background: transparent;
    width: 100%;
}

.focus-header-breadcrumb {
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-color);
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.focus-logo {
    font-size: 24px;
    font-family: var(--font-unbounded);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease-out;
}
.focus-logo:hover {
    transform: scale(1.02);
}

.logo-accent {
    color: var(--accent-primary);
}

/* Primary Nav */
.focus-nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-color);
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    width: 100%;
}

.ipsNavBar_primary {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.ipsNavBar_primary > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 48px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    transition: color 0.2s ease-out;
}

.ipsNavBar_primary > li:hover > a, .ipsNavBar_primary > li.active > a {
    color: var(--text-primary);
}

.ipsNavBar_primary > li > a::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ipsNavBar_primary > li:hover > a::after, .ipsNavBar_primary > li.active > a::after {
    transform: scaleX(1);
}

/* Dropdown styling */
.ipsNavBar_primary > li {
    position: relative;
}
.ipsNavBar_secondary {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sharp);
    min-width: 180px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-out;
    box-shadow: var(--shadow-dropdown);
}
.ipsNavBar_primary > li:hover .ipsNavBar_secondary {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ipsNavBar_secondary li a {
    display: block;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border-radius: var(--radius-sharp);
}
.ipsNavBar_secondary li a:hover {
    background: rgba(166, 206, 57, 0.1);
    color: var(--accent-primary);
}

/* User Dropdown */
.user-dropdown-wrapper {
    position: relative;
    cursor: pointer;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sharp);
    transition: background 0.2s;
}

.user-dropdown:hover, .user-dropdown-wrapper.open .user-dropdown {
    background: var(--bg-tertiary);
}

/* Chevron rotation */
.user-dropdown .fa-chevron-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 10px;
}

.user-dropdown-wrapper.open .user-dropdown .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--dropdown-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sharp);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-dropdown);
    z-index: 100;
}

.user-dropdown-wrapper.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Staggered item entry animation */
.user-dropdown-wrapper.open .user-dropdown-menu .dropdown-item,
.user-dropdown-wrapper.open .user-dropdown-menu .dropdown-divider {
    animation: dropdownItemIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(1) { animation-delay: 0.03s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(2) { animation-delay: 0.06s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(3) { animation-delay: 0.09s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(4) { animation-delay: 0.12s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(5) { animation-delay: 0.15s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(6) { animation-delay: 0.18s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(7) { animation-delay: 0.21s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(8) { animation-delay: 0.24s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(9) { animation-delay: 0.27s; }
.user-dropdown-wrapper.open .user-dropdown-menu > :nth-child(10) { animation-delay: 0.30s; }

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border-radius: var(--radius-sharp);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dropdown-item:active {
    transform: scale(0.97);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.dropdown-item:hover i { opacity: 1; }

.dropdown-item-accent { color: var(--accent-primary); }
.dropdown-item-accent:hover { background: rgba(166, 206, 57, 0.1); color: var(--accent-hover); }

.dropdown-item-danger { color: #ef4444; }
.dropdown-item-danger:hover { background: rgba(239, 68, 68, 0.1); color: #f87171; }

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

/* User Nav */
.focus-user {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sharp);
    border: 1px solid var(--border-strong);
    transition: all 0.2s ease-out;
}

.user-dropdown:hover {
    background: var(--btn-subtle-bg);
    border-color: rgba(168,85,247,0.30); /* Purple user accent */
}

.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sharp);
    border: 1px solid rgba(168,85,247,0.30);
}

.username {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 36px;
    border-radius: var(--radius-sharp);
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    color: var(--text-primary);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-border);
    color: var(--btn-primary-text);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
}

.btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    border-color: rgba(166, 206, 57, 0.3);
    color: var(--accent-primary);
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-text:hover {
    color: var(--text-primary);
    background: var(--btn-subtle-bg);
    border-color: var(--border-color);
}

/* =========================================
   Main Area & Layout
   ========================================= */
#ipsLayout_body {
    padding: var(--gap-lg) 0;
    min-height: 60vh;
}

#ipsLayout_contentWrapper {
    display: flex;
    gap: var(--gap-lg);
    margin-top: var(--gap-lg);
}

#ipsLayout_mainArea {
    flex: 1;
    min-width: 0;
}

.ipsLayout_sidebarright {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

/* =========================================
   Breadcrumbs
   ========================================= */
.focus-precontent {
    margin-bottom: 20px;
}

.ipsBreadcrumb {
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 38px;
    font-size: 12px;
    font-weight: 600;
}

.ipsBreadcrumb a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.ipsBreadcrumb a:first-child {
    padding-left: 0;
}

.ipsBreadcrumb a:hover {
    color: var(--accent-primary);
}

.ipsBreadcrumb a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--text-muted);
    font-size: 10px;
    margin-left: 12px;
    display: inline-block;
}

.ipsBreadcrumb a:last-child::after {
    content: '';
    margin: 0;
}

.ipsBreadcrumb > span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    color: var(--text-muted);
    font-weight: 500;
}

/* =========================================
   Widgets / Cards (Sidebar & Forums)
   ========================================= */
.ipsWidget {
    background: var(--widget-bg);
    backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-widget);
    overflow: hidden;
    transition: all 0.3s ease-out;
}



.ipsWidget:hover {
    border-color: rgba(166, 206, 57, 0.3);
    box-shadow: 0 10px 40px rgba(166, 206, 57, 0.05);
    transform: translateY(-2px);
}

.ipsWidget_title {
    padding: 16px 20px;
    font-family: var(--font-unbounded);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.ipsWidget_title i {
    color: var(--accent-primary);
}

.ipsWidget_inner {
    padding: 20px;
}

.ipsWidget_inner.p-0 {
    padding: 0;
}

/* Utility Classes */
.mb-4 { margin-bottom: 24px; }
.mt-4 { margin-top: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-accent { color: var(--accent-primary); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-xs { font-size: 11px; }

/* =========================================
   Forum Index – Illuminate IPS Style
   ========================================= */

/* ── Category Box Container ── */
.ipsBox {
    background: var(--widget-bg);
    backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-box);
    overflow: hidden;
    margin-bottom: 20px;
}



/* ── Section Title (Category Header) ── */
.ipsBox_sectionTitle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 0;
    font-family: var(--font-inter);
    font-size: 16px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    /* Placeholder background image - replace url with actual image path */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/assets/images/category-bg.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.ipsBox_sectionTitle a {
    color: var(--text-primary);
}
.ipsBox_sectionTitle a:hover {
    color: var(--accent-primary);
}

.sectionTitle-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent-primary), #7da226);
    color: #000;
    font-size: 13px;
    flex-shrink: 0;
}

.sectionTitle-desc {
    font-family: var(--font-inter);
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-left: auto;
}

/* ── Data List (Forum Rows Container) ── */
.ipsDataList {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Individual Forum Row ── */
.ipsDataItem {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
    position: relative;
    transition: background-color 0.15s ease;
}

.ipsDataItem::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.2s ease-out;
}

.ipsDataItem:hover {
    background: rgba(255,255,255,0.015);
}

[data-theme="light"] .ipsDataItem:hover {
    background: rgba(0,0,0,0.015);
}

.ipsDataItem:hover::before {
    transform: scaleY(1);
}

.ipsDataItem:last-child {
    border-bottom: none;
}

/* ── Forum Status Icon ── */
.ipsDataItem_icon {
    flex-shrink: 0;
}

.ipsItemStatus {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ipsItemStatus_large {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-primary), #7da226);
    color: #000;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(166, 206, 57, 0.2);
    transition: all 0.25s ease;
}

.ipsDataItem:hover .ipsItemStatus_large {
    box-shadow: 0 4px 16px rgba(166, 206, 57, 0.35);
    transform: scale(1.05);
}

/* ── Forum Title & Description ── */
.ipsDataItem_main {
    flex: 1;
    min-width: 0;
}

.ipsDataItem_title {
    font-family: var(--font-inter);
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px;
    line-height: 1.3;
}

.ipsDataItem_title a {
    color: var(--text-primary);
}
.ipsDataItem_title a:hover {
    color: var(--accent-primary);
}

.ipsDataItem_desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 2px;
}

/* ── Subforum List ── */
.ipsDataItem_subList {
    font-size: 11px;
}

.ipsDataItem_subList li a {
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.15s ease;
}

.ipsDataItem_subList li a:hover {
    color: var(--accent-primary);
}

.ipsDataItem_subList li a i {
    font-size: 9px;
    margin-right: 2px;
    opacity: 0.6;
}

/* ── Stats ── */
.ipsDataItem_stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 80px;
    padding-right: 16px;
}

.ipsDataItem_stats .stat-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.ipsDataItem_stats .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Last Poster Column ── */
.ipsDataItem_lastPoster {
    width: 280px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

.desktop-last-post {
    display: flex;
    align-items: center;
    width: 100%;
}

.desktop-last-post-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.desktop-last-post-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* ── Responsive Utilities ── */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.ipsDataItem_lastPoster_inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipsUserPhoto_tiny {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    flex-shrink: 0;
}

.ipsDataItem_lastPoster_info {
    min-width: 0;
}

.ipsDataItem_lastPoster_title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: block;
}

.ipsDataItem_lastPoster_title a {
    color: var(--text-primary);
}
.ipsDataItem_lastPoster_title a:hover {
    color: var(--accent-primary);
}

.ipsDataItem_lastPoster_meta {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.mobile-drawer {
    display: none;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1100px) {
    /* We no longer hide ipsDataItem_lastPoster here */
    .ipsDataItem_stats {
        /* Keep stats slightly smaller if needed, but no longer hidden */
    }
    
    #ipsLayout_contentWrapper {
        flex-direction: column;
    }
    
    .ipsLayout_sidebarright {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
    .ipsDataItem {
        padding: 16px;
        align-items: flex-start;
    }
    .ipsDataItem_stats {
        /* Remove from flex row, float to the right */
        position: absolute;
        right: 16px;
        top: 16px;
        min-width: auto;
        padding-right: 0;
    }
    .ipsDataItem_stats .stat-label {
        display: inline;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-muted);
        margin-left: 4px;
    }
    .ipsDataItem_stats .stat-number {
        display: inline;
    }
    .ipsDataItem_stats {
        flex-direction: row;
        align-items: baseline;
    }
    .inline-last-post {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 12px;
        font-size: 12px;
        color: var(--text-muted);
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
}

@media (max-width: 768px) {
    .focus-logo {
        font-size: 18px;
    }
    .focus-user .username {
        display: none;
    }
    .user-dropdown {
        padding: 6px;
    }
    .ipsNavBar_primary {
        display: none; /* Hidden on mobile, replaced by hamburger drawer */
    }
    .mobile-menu-toggle {
        display: block !important;
    }
}

.desktop-nav-inline {
    margin: 0 20px;
    flex-grow: 1;
}

@media (max-width: 900px) {
    .desktop-nav-inline {
        display: none;
    }
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1101;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-drawer-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-drawer-signed-in {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1;
}

.mobile-drawer-username {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.mobile-drawer-actions {
    display: flex;
    gap: 16px;
    font-size: 18px;
}

.mobile-drawer-actions a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.mobile-drawer-actions a:hover {
    color: var(--text-primary);
}

.mobile-drawer-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .mobile-nav {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    .mobile-nav a {
        display: flex;
        align-items: center;
        padding: 16px 20px;
        color: var(--text-primary);
        font-weight: 500;
        text-decoration: none;
        font-size: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }
    .mobile-nav a .chevron {
        margin-left: auto;
        font-size: 12px;
        color: var(--text-muted);
    }
    .mobile-nav a:hover {
        background: rgba(255, 255, 255, 0.02);
    }
}

@media (max-width: 600px) {
    .ipsBox_sectionTitle {
        font-size: 12px;
        padding: 12px 16px;
    }
    .ipsItemStatus_large {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 6px;
    }
    .ipsDataItem_title {
        font-size: 13px;
    }
    .ipsDataItem_subList {
        display: none;
    }
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}
.stats-list li strong {
    color: var(--text-primary);
}
.stats-list li:last-child {
    border-bottom: none;
}

/* =========================================
   Footer
   ========================================= */
.focus-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding: clamp(56px, 6vw, 80px) 0 40px;
}

.megaFooter {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.megaFooter_col h4 {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.megaFooter_col p {
    color: var(--text-secondary);
    font-size: 14px;
}

.megaFooter_col ul li {
    margin-bottom: 12px;
}
.megaFooter_col ul a {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}
.megaFooter_col ul a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sharp);
    background: var(--btn-subtle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}
.social-btn:active {
    transform: scale(0.95);
}
.social-btn:hover {
    background: var(--btn-subtle-hover-bg);
    border-color: rgba(166,206,57,0.3);
    color: var(--accent-primary);
}

#ipsLayout_footer {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* =========================================
   Forms & Inputs
   ========================================= */

/* Shared Base for Text Inputs */
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-inter);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    background-clip: padding-box;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sharp);
    box-shadow: var(--shadow-input);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
    outline: none;
}

/* Hover State */
.form-control:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
input[type="tel"]:hover,
textarea:hover,
select:hover {
    border-color: rgba(166, 206, 57, 0.4);
    background-color: var(--widget-bg);
}

/* Focus State */
.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(166, 206, 57, 0.15);
    background-color: var(--bg-main);
}

/* Placeholder */
::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Disabled/Readonly */
input:disabled,
textarea:disabled,
select:disabled,
input[readonly],
textarea[readonly] {
    background-color: var(--bg-elevated);
    opacity: 0.6;
    cursor: not-allowed;
    border-color: var(--border-light);
}

/* Textarea Specifics */
textarea {
    resize: vertical;
    min-height: 80px;
}

/* Select Specifics */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a6ce39' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
    padding-right: 36px;
    cursor: pointer;
}

[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230f172a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Custom Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
}

.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: 0;
    margin-right: 12px;
    vertical-align: top;
    background-color: var(--bg-tertiary);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--border-strong);
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.form-check-input:hover {
    border-color: var(--accent-primary);
}

.form-check-input:focus {
    border-color: var(--accent-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(166, 206, 57, 0.15);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Checkbox specific */
.form-check-input[type="checkbox"] {
    border-radius: var(--radius-sharp);
}
.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Radio specific */
.form-check-input[type="radio"] {
    border-radius: 50%;
}
.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23000'/%3e%3c/svg%3e");
}

.form-check-label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* Labels and Form Groups */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Range Input (Slider) */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    padding: 0;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* ── Sleek Topic List ── */
.cTopicList.ipsDataList {
    margin: 0;
    padding: 0;
}
.cTopicList .ipsDataItem {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(147, 157, 172, 0.1);
    background: transparent;
    height: 77px;
    gap: 0; /* Override generic ipsDataItem gap */
}
.cTopicList .ipsDataItem_icon {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 16px 12px;
}
.cTopicList .ipsDataItem_main {
    padding: 16px 12px;
    flex: 1;
}
.cTopicList .ipsDataItem_title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 20px;
}
.cTopicList .ipsDataItem_title a {
    color: var(--text-primary);
    text-decoration: none;
}
.cTopicList .ipsDataItem_meta {
    font-size: 13px;
    color: var(--text-muted);
}
.cTopicList .ipsDataItem_meta a:not(.user-hovercard-trigger) {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}
.cTopicList .ipsDataItem_stats {
    padding: 16px 12px;
    width: 110px;
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.cTopicList .ipsDataItem_stats_number {
    font-weight: 600;
    color: var(--text-primary);
}
.cTopicList .ipsDataItem_stats_type {
    margin-left: 4px;
}
.cTopicList .ipsDataItem_lastPoster {
    padding: 16px 12px 16px 60px;
    width: 314px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 
        "name avatar"
        "date avatar";
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
}
.cTopicList .ipsDataItem_lastPoster > li:nth-child(1) {
    grid-area: avatar;
}
.cTopicList .ipsDataItem_lastPoster > li:nth-child(2) {
    grid-area: name;
    text-align: right;
    font-size: 13px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
}
.cTopicList .ipsDataItem_lastPoster > li:nth-child(3) {
    grid-area: date;
    text-align: right;
    font-size: 11px;
}
.cTopicList .ipsDataItem_lastPoster > li:nth-child(2) a:not(.user-hovercard-trigger) {
    color: var(--text-primary);
    text-decoration: none;
}
.cTopicList .ipsDataItem_lastPoster > li:nth-child(3) a.ipsType_blendLinks {
    color: var(--text-muted);
}

/* ── WYSIWYG Content Styles ── */
.post-content {
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
}

.post-content p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-family: var(--font-unbounded, 'Inter', sans-serif);
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.35rem;
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.85rem;
    margin-bottom: 0.4rem;
}

.post-content h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content ul {
    list-style-type: disc !important;
    padding-left: 28px !important;
    margin: 1rem 0 !important;
}

.post-content ol {
    list-style-type: decimal !important;
    padding-left: 28px !important;
    margin: 1rem 0 !important;
}

.post-content li {
    margin-bottom: 0.35rem;
    display: list-item !important;
}

.post-content ul ul {
    list-style-type: circle !important;
    margin: 0.35rem 0 !important;
}

.post-content ul ul ul {
    list-style-type: square !important;
    margin: 0.35rem 0 !important;
}

.post-content ol ol {
    list-style-type: lower-alpha !important;
    margin: 0.35rem 0 !important;
}

.post-content ol ol ol {
    list-style-type: lower-roman !important;
    margin: 0.35rem 0 !important;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: 12px 18px;
    margin: 1.2rem 0;
    background: rgba(0,0,0,0.15);
    color: var(--text-secondary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

[data-theme="light"] .post-content blockquote {
    background: rgba(0,0,0,0.04);
}

.post-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.post-content a:hover {
    color: var(--accent-hover);
    opacity: 0.9;
}

.post-content strong, .post-content b {
    font-weight: 700;
    color: inherit;
}

.post-content em, .post-content i {
    font-style: italic;
}

.post-content u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content s, .post-content strike, .post-content del {
    text-decoration: line-through;
    opacity: 0.75;
}

.post-content sub {
    vertical-align: sub;
    font-size: 0.75em;
    line-height: 0;
}

.post-content sup {
    vertical-align: super;
    font-size: 0.75em;
    line-height: 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.75rem 0;
}

.post-content code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
}

[data-theme="light"] .post-content code {
    background: rgba(0, 0, 0, 0.06);
    color: #4d7c0f;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-light);
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.25rem 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #f1f5f9;
}

[data-theme="light"] .post-content pre {
    background: #1e293b;
    color: #f8fafc;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 14px;
}

.post-content th, .post-content td {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.post-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: var(--text-primary);
}

[data-theme="light"] .post-content th {
    background: rgba(0, 0, 0, 0.04);
}

.post-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .post-content tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5rem 0;
    display: inline-block;
}

.post-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content span[style*="background-color"] {
    padding: 1px 4px;
    border-radius: 3px;
}

/* Hide TinyMCE API Key Warning */
.tox-notifications-container {
    display: none !important;
}

/* ── TinyMCE Premium Styling ── */
.tox-tinymce {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
    overflow: hidden !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.tox-tinymce:focus-within {
    border-color: rgba(166, 206, 57, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(166, 206, 57, 0.15), inset 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Override Iframe background */
.tox .tox-edit-area__iframe {
    background: transparent !important;
}

/* Fix TinyMCE Toolbar & Header */
.tox .tox-editor-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-strong) !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-toolbar__overflow,
.tox .tox-menubar {
    background: transparent !important;
}

/* Match the toolbar buttons to the theme */
.tox .tox-tbtn {
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.tox .tox-tbtn svg {
    fill: var(--text-secondary) !important;
    transition: fill 0.2s ease !important;
}

.tox .tox-tbtn:hover {
    background: rgba(166, 206, 57, 0.15) !important;
}

.tox .tox-tbtn:hover svg {
    fill: var(--accent-primary) !important;
}

.tox .tox-tbtn--enabled {
    background: rgba(166, 206, 57, 0.25) !important;
}

.tox .tox-tbtn--enabled svg {
    fill: var(--accent-primary) !important;
}
.tox .tox-tbtn--enabled svg {
    fill: var(--accent-primary) !important;
}

/* =========================================
   IPB Style Post Container
   ========================================= */

.cPostContainer {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    position: relative;
}

.cAuthorPane {
    width: 200px;
    padding: 20px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-right: 1px solid var(--border-light);
    border-top-left-radius: calc(var(--radius-md) - 1px);
    border-bottom-left-radius: calc(var(--radius-md) - 1px);
    flex-shrink: 0;
    text-align: center;
}

.cAuthorPane .cAuthorAvatar {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-sm);
    margin: 0 auto 12px;
    object-fit: cover;
    display: block;
    border: 2px solid var(--border-color);
}

.cAuthorPane .cAuthorName {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-break: break-word;
}

.cAuthorPane .cAuthorGroup {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cAuthorPane .cAuthorStats {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.cPostContent {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex blowout */
}

.cPostHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    font-size: 12px;
    color: var(--text-muted);
}

.cPostHeaderRight a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 12px;
}

.cPostHeaderRight a:hover {
    color: var(--text-primary);
}

.cPostBody {
    padding: 20px;
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
}

.cPostSignature {
    padding: 15px 20px;
    border-top: 1px dashed var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.8;
}

.cPostActions {
    padding: 10px 20px;
    background: transparent;
    display: flex;
    gap: 10px;
}

.cPostActionBtn {
    background: rgba(147, 157, 172, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border: none;
    cursor: pointer;
}

.cPostActionBtn:hover {
    background: rgba(147, 157, 172, 0.2);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .cPostContainer {
        flex-direction: column;
    }
    .cAuthorPane {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        display: flex;
        align-items: center;
        padding: 12px 16px;
        text-align: left;
        border-bottom-left-radius: 0;
        border-top-right-radius: calc(var(--radius-md) - 1px);
    }
    .cAuthorPane .cAuthorAvatar {
        width: 48px;
        height: 48px;
        margin: 0 12px 0 0;
    }
    .cAuthorPane .cAuthorName {
        margin-bottom: 2px;
    }
    .cAuthorPane .cAuthorGroup,
    .cAuthorPane .cAuthorStats {
        display: inline-flex;
        margin: 0;
        font-size: 11px;
    }
    .cAuthorPane .cAuthorGroup::after {
        content: "•";
        margin: 0 6px;
        color: var(--text-muted);
    }
    .cAuthorPane_meta {
        display: flex;
        flex-direction: column;
    }
    .ipsBox {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* =========================================
   Create Topic View
   ========================================= */
.cCreateTopicBox {
    background: var(--widget-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-widget);
    overflow: hidden;
    margin-bottom: 20px;
}

.cCreateTopicTabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.cCreateTopicTab {
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.cCreateTopicTab.active {
    color: var(--text-primary);
    background: var(--widget-bg);
    border-top: 3px solid var(--accent-primary);
    margin-top: -3px; /* visual bump */
}

.cCreateTopicContent {
    padding: 24px;
}

.cCreateTopicFooter {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Additions for Reaction System */
.cPostActions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cPostActionGroup {
    display: flex;
    gap: 10px;
}

.post-reactions-tally {
    display: flex;
    gap: 8px;
    align-items: center;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 13px;
    cursor: default;
    transition: all 0.2s ease;
}

.reaction-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.reaction-badge .count {
    margin-left: 4px;
    font-weight: 600;
    color: var(--text-primary);
}

.reaction-wrapper {
    position: relative;
    display: inline-block;
}

.react-btn {
    transition: color 0.2s ease;
}

.react-btn.has-reaction {
    color: var(--accent-primary);
}

.reaction-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    box-shadow: var(--shadow-dropdown);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
}

.reaction-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.reaction-icon {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s ease, filter 0.2s ease;
    border-radius: 50%;
    line-height: 1;
    filter: grayscale(100%) opacity(0.7);
}

.reaction-icon:hover {
    transform: scale(1.3);
    filter: grayscale(0%) opacity(1);
}

.reaction-icon.active {
    filter: grayscale(0%) opacity(1);
    background: rgba(255, 255, 255, 0.1);
}

/* Discord-style Widgets */
.discord-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.discord-widget-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.discord-widget-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.discord-widget-list {
    display: flex;
    flex-direction: column;
}

.discord-widget-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: background 0.2s ease;
}

.discord-widget-item:last-child {
    border-bottom: none;
}

.discord-widget-item:hover {
    background: var(--bg-tertiary);
}

.discord-item-avatar {
    flex-shrink: 0;
    margin-right: 12px;
}

.discord-item-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.discord-item-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.discord-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.discord-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-item-author {
    font-weight: 500;
}

.discord-item-badge {
    flex-shrink: 0;
    margin-left: 12px;
    background: rgba(100, 110, 120, 0.2);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    height: 24px;
    min-width: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Who's Online Widget */
.focus-whos-online {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 24px 0;
}

.whos-online-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 0;
}

.whos-online-content {
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
}

.whos-online-user {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.whos-online-user:hover {
    text-decoration: underline;
}

.whos-online-user.admin-user {
    color: #ef4444 !important;
}

.sparkles-text {
    position: relative;
    display: inline-block;
    color: inherit;
    font-weight: bold;
    text-shadow: 0 0 3px currentColor;
    z-index: 1;
}

.sparkles-text::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background-color: currentColor;
    -webkit-mask-image: url('/images/sparkles-white.gif');
    mask-image: url('/images/sparkles-white.gif');
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 50px 50px;
    mask-size: 50px 50px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.70;
    filter: drop-shadow(0 0 2px currentColor);
    border-radius: inherit;
}

/* User Hovercard */
.user-hovercard-wrapper {
    position: absolute;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
}

.user-hovercard-wrapper.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.cUserHovercard {
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.cUserHovercard_cover {
    height: 100px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.cUserHovercard_info {
    padding: 0 16px 16px;
    text-align: center;
    margin-top: -40px;
    position: relative;
}

.cUserHovercard_avatarWrapper {
    display: inline-block;
    padding: 4px;
    background: var(--bg-card);
    border-radius: 50%;
    margin-bottom: 8px;
}

.cUserHovercard_avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.cUserHovercard_name {
    font-family: var(--font-unbounded);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cUserHovercard_role {
    margin-bottom: 12px;
}

.cUserHovercard_meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cUserHovercard_stats {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.cUserHovercard_statItem {
    text-align: center;
}

.cUserHovercard_statItem .statValue {
    font-family: var(--font-unbounded);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.cUserHovercard_statItem .statLabel {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 2px;
}

.cUserHovercard_actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    justify-content: center;
}

/* ── Staff Directory ── */
.cStaffDirectory_group {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}
.cStaffDirectory_group > h2 {
    background-color: var(--bg-modifier-hover);
    padding: 12px 16px;
    margin: 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
}
.cStaffDirectory_blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px;
}
.cStaffCard {
    background-color: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.2s ease;
}
.cStaffCard:hover {
    background-color: var(--bg-modifier-hover);
    border-color: var(--border-strong);
}
.cStaffCard_avatar {
    display: inline-block;
    margin-bottom: 16px;
}
.cStaffCard h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}
.cStaffCard_messageBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 16px;
    padding: 8px 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s;
}
.cStaffCard_messageBtn:hover {
    background-color: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}
