/*
Theme Name: Bahari Premium
Theme URI: https://baharipremium.com
Description: A highly premium, ultra-modern XenForo-style dark forum theme for WordPress. Built with glassmorphism, glowing cyan neon highlights, subnode capsule grids, and custom interactive widgets.
Author: Antigravity IDE
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: bahari-premium
*/

/* 1. Global Reset & Google Font Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #1d2435; /* Softer slate navy eye-care dark background */
    --bg-card: rgba(33, 43, 67, 0.78); /* Softer matching dark cards */
    --bg-card-hover: rgba(43, 55, 84, 0.9);
    --bg-glass-active: rgba(0, 240, 255, 0.08);
    --border-color: rgba(0, 240, 255, 0.12);
    --border-hover: rgba(0, 240, 255, 0.35);
    --accent-cyan: #00f0ff;
    --accent-cyan-dark: #00b4d8;
    --accent-orange: #e67e22;
    --accent-orange-dark: #d35400;
    --accent-purple: #8e44ad;
    --text-primary: #ffffff;
    --text-muted: #8b9bb4;
    --text-cyan: #00f0ff;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-cyan: 0 0 15px rgba(0, 240, 255, 0.35);
    --shadow-cyan-strong: 0 0 25px rgba(0, 240, 255, 0.6);
    --shadow-orange: 0 0 15px rgba(230, 126, 34, 0.4);
    --card-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1.2 Light Theme Variables & Overrides */
.light-theme, body.light-theme {
    --bg-dark: #f1f5f9; /* Soft light slate-blue background */
    --bg-card: #ffffff; /* Clean white card backgrounds */
    --bg-card-hover: #f8fafc;
    --bg-glass-active: rgba(0, 119, 182, 0.06);
    --border-color: rgba(0, 119, 182, 0.15);
    --border-hover: rgba(0, 119, 182, 0.35);
    --accent-cyan: #0077b6; /* Richer blue for visibility on light mode */
    --accent-cyan-dark: #0096c7;
    --text-primary: #0f172a; /* Slate 900 for extremely crisp light mode text */
    --text-muted: #475569; /* Slate 600 for secondary text */
    --text-cyan: #0077b6;
    
    --shadow-cyan: 0 4px 15px rgba(0, 119, 182, 0.08);
    --shadow-cyan-strong: 0 8px 25px rgba(0, 119, 182, 0.15);
}

.light-theme body::before {
    background: radial-gradient(circle at 50% 20%, rgba(0, 119, 182, 0.04) 0%, rgba(142, 68, 173, 0.02) 50%, rgba(255, 255, 255, 0) 100%) !important;
}

.light-theme .forum-node-row, 
.light-theme .postbit-card, 
.light-theme .category-card, 
.light-theme .widget-card {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

.light-theme .forum-node-row:hover {
    background: #f8fafc !important;
    border-color: var(--border-hover) !important;
}

.light-theme .xen-quick-reply-container {
    background: #ffffff !important;
    border-color: var(--border-color) !important;
}

.light-theme .avatar-circle {
    background: var(--bg-dark) !important;
    color: var(--accent-cyan) !important;
}

/* 2. Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.08) 0%, rgba(142, 68, 173, 0.05) 50%, rgba(5, 10, 20, 0) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #02050a;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.25);
    border-radius: 4px;
    transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-cyan);
}

/* Containers */
.bahari-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. Header & Navigation */
.bahari-header {
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}
.bahari-header.scrolled {
    background: rgba(2, 5, 10, 0.95);
    box-shadow: 0 4px 30px rgba(0, 240, 255, 0.08);
}
.header-wrapper {
    min-height: 70px;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.bahari-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.logo-icon {
    font-size: 24px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
    animation: pulse 3s infinite alternate;
}

/* Nav Menu */
.bahari-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
}
.nav-link {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.06);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 15%;
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-cyan-dark));
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

/* Search Bar */
.search-wrapper {
    position: relative;
    width: 260px;
}
.search-input {
    width: 100%;
    background: rgba(11, 20, 38, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 16px;
    padding-right: 40px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    transition: var(--transition);
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-cyan);
    background: rgba(11, 20, 38, 0.9);
}
.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}
.search-btn:hover {
    color: var(--accent-cyan);
}

/* User Menu Section */
.user-menu-section {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-avatar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}
.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan-dark), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050a14;
    font-weight: 900;
    font-size: 16px;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transition: var(--transition);
}
.header-avatar-btn:hover .avatar-circle {
    transform: scale(1.08);
    box-shadow: var(--shadow-cyan);
}

/* Hide Mobile Bars on Desktop by Default */
.mobile-logged-in-bar, .mobile-guest-bar {
    display: none !important;
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    width: 25px;
}
.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}

/* 4. Breadcrumbs & Banner Actions */
.forum-breadcrumbs {
    padding: 18px 0;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}
.forum-breadcrumbs a {
    color: var(--text-muted);
}
.forum-breadcrumbs span.separator {
    margin: 0 8px;
    color: rgba(0, 240, 255, 0.25);
}

/* Notice / Actions Bar */
.action-banner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 15px;
    flex-wrap: wrap;
}
.notice-card {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.08) 0%, rgba(142, 68, 173, 0.04) 100%);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05);
}
.notice-icon {
    font-size: 16px;
    animation: pulse 1.5s infinite;
}
.action-buttons {
    display: flex;
    gap: 12px;
}
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.btn-cyan {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
    color: #050a14;
    box-shadow: var(--shadow-cyan);
}
.btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-cyan-strong);
    color: #000;
}
.btn-dark {
    background: rgba(11, 20, 38, 0.7);
    border-color: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.btn-dark:hover {
    background: rgba(16, 29, 54, 0.9);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

/* 5. Main Layout Structure */
.forum-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-bottom: 40px;
}

/* 6. Forum Category Card & Node Listing */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}
.category-card:hover {
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 10px 35px rgba(0, 240, 255, 0.05);
}

.category-header {
    background: linear-gradient(90deg, rgba(11, 20, 38, 0.9) 0%, rgba(16, 29, 54, 0.8) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 3px solid var(--accent-cyan);
}
.category-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.category-toggle-icon {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.category-toggle-icon:hover {
    color: var(--accent-cyan);
}

/* Forum Node Row */
.forum-node-row {
    padding: 20px;
    display: grid;
    grid-template-columns: 50px 1fr 150px 220px;
    align-items: center;
    background: rgba(15, 22, 36, 0.55);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(0, 240, 255, 0.15);
}
.forum-node-row:last-child {
    margin-bottom: 0;
}
.forum-node-row:hover {
    background: rgba(22, 31, 51, 0.8);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.25);
    transform: translateY(-2px);
}

/* Node Icon */
.node-icon-col {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.node-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
    transition: var(--transition);
}
.forum-node-row:hover .node-icon-wrapper {
    background: rgba(0, 240, 255, 0.18);
    box-shadow: var(--shadow-cyan);
    transform: scale(1.08);
    color: #fff;
}

/* Node Info */
.node-info-col {
    padding-right: 20px;
}
.node-title-link {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}
.node-title-link:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.node-description {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Node Stats */
.node-stats-col {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.node-stats-col strong {
    color: #fff;
}

/* Node Last Post */
.node-lastpost-col {
    font-size: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.lastpost-thread-link {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
}
.lastpost-thread-link:hover {
    color: var(--accent-cyan);
}
.lastpost-meta {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.lastpost-author {
    color: var(--accent-cyan-dark);
    font-weight: 500;
}

/* 7. Subnodes Capsule Grid */
.subnodes-capsule-list {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.subnode-capsule {
    background: rgba(11, 20, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.subnode-capsule:hover {
    background: rgba(0, 240, 255, 0.06);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
    transform: translateY(-1px);
}
.subnode-capsule i {
    font-size: 10px;
    color: var(--accent-cyan);
    transition: var(--transition);
}
.subnode-capsule:hover i {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 5px var(--accent-cyan));
    transform: scale(1.15);
}

.node-icon-wrapper.active-glow {
    background: rgba(230, 126, 34, 0.15) !important;
    border-color: var(--accent-orange) !important;
    color: var(--accent-orange) !important;
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.6), inset 0 0 8px rgba(230, 126, 34, 0.3) !important;
    animation: nodePulseGlow 2s infinite alternate;
}
@keyframes nodePulseGlow {
    0% {
        box-shadow: 0 0 8px rgba(230, 126, 34, 0.4), inset 0 0 4px rgba(230, 126, 34, 0.2);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 18px rgba(230, 126, 34, 0.9), inset 0 0 10px rgba(230, 126, 34, 0.5);
        transform: scale(1.08);
    }
}


/* 8. Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}
.sidebar-widget:hover {
    border-color: rgba(0, 240, 255, 0.25);
}

.widget-header {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-header i, .widget-header .icon {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5));
}

/* User Card Widget */
.user-widget-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.user-avatar-glow-wrapper {
    position: relative;
    margin-bottom: 16px;
}
.user-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-dark), #101d36);
    border: 3px solid var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 900;
    color: var(--accent-cyan);
    box-shadow: var(--shadow-cyan);
    transition: var(--transition);
}
.user-avatar-glow-wrapper::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 240, 255, 0.3);
    animation: rotate 20s linear infinite;
}
.user-username {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.user-role-badge {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 180, 216, 0.25) 100%);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.user-stats-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}
.user-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.user-stat-val {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}
.user-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Recent Threads Widget */
.recent-threads-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.recent-thread-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.recent-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.1);
}
.recent-thread-info {
    flex-grow: 1;
    overflow: hidden;
}
.recent-thread-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
}
.recent-thread-title:hover {
    color: var(--accent-cyan);
}
.recent-thread-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 9. Bottom Forum Stats Counter Widget */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.stat-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
    transform: translateY(-2px);
}
.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.06);
    border: 1.5px solid rgba(0, 240, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 18px;
    transition: var(--transition);
}
.stat-card-item:hover .stat-card-icon {
    background: var(--accent-cyan);
    color: #050a14;
    box-shadow: var(--shadow-cyan);
}
.stat-card-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-card-num {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.stat-card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.stat-card-label-orange {
    background: var(--accent-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 5px;
    letter-spacing: 0;
    display: inline-block;
    width: max-content;
    box-shadow: var(--shadow-orange);
}

/* 10. Footer Styling */
.bahari-footer {
    background: #02050a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    padding-top: 60px;
    overflow: hidden;
}

/* Footer Wave Pattern Background */
.footer-wave-graphic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff 0%, #8e44ad 50%, #00f0ff 100%);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
    opacity: 0.8;
}

.footer-widgets-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}
.footer-column-brand {
    padding-right: 40px;
}
.footer-brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 18px;
    text-transform: uppercase;
}
.footer-brand-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.footer-disclaimer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.footer-column-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 22px;
    position: relative;
    display: inline-block;
}
.footer-column-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 25px;
    height: 2px;
    background: var(--accent-cyan);
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links-list a {
    color: var(--text-muted);
    font-size: 13px;
}
.footer-links-list a:hover {
    color: var(--accent-cyan);
    padding-left: 4px;
}

.footer-contacts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-contact-item i {
    color: var(--accent-cyan);
    font-size: 14px;
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}
.footer-bottom-bar a {
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom-bar a:hover {
    color: var(--accent-cyan);
}

/* 11. Modal thread & post simulation */
.bahari-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 5, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.bahari-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.bahari-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    width: 100%;
    max-width: 680px;
    box-shadow: 0 15px 50px rgba(0, 240, 255, 0.25);
    overflow: hidden;
    transform: translateY(30px);
    transition: var(--transition);
}
.bahari-modal-overlay.active .bahari-modal-card {
    transform: translateY(0);
}
.modal-header {
    background: rgba(11, 20, 38, 0.9);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 3px solid var(--accent-cyan);
}
.modal-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close-btn:hover {
    color: var(--accent-cyan);
}
.modal-body {
    padding: 24px;
}
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    margin-bottom: 8px;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: rgba(5, 10, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-cyan);
    background: rgba(5, 10, 20, 0.9);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* 12. Interactive Thread View Postbit Layout */
.forum-thread-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.thread-title-bar {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 10px;
}
.thread-headline {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.thread-meta-row {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
}
.post-item-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.post-author-column {
    background: rgba(11, 20, 38, 0.9);
    border-right: 1px solid var(--border-color);
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Staff diagonal ribbon badge */
.staff-ribbon-badge {
    position: absolute;
    top: 15px;
    right: -25px;
    background: linear-gradient(135deg, var(--accent-cyan-dark), var(--accent-cyan));
    color: #050a14;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 9px;
    padding: 4px 28px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0,240,255,0.4);
    letter-spacing: 0.5px;
}

.author-avatar-wrapper {
    position: relative;
    margin-bottom: 14px;
}
.author-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan-dark), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: #050a14;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}
.author-online-indicator {
    width: 14px;
    height: 14px;
    background: #2ecc71;
    border: 2.5px solid #0b1426;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 4px;
    box-shadow: 0 0 8px #2ecc71;
}
.author-username {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}
.author-user-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 15px;
}
.author-stats-mini {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
    font-size: 11px;
    color: var(--text-muted);
}
.author-stat-line {
    display: flex;
    justify-content: space-between;
}
.author-stat-line strong {
    color: #fff;
}

.post-body-column {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.post-header-meta {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}
.post-message-content {
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    flex-grow: 1;
}
.post-footer-actions {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 12px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.post-like-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-post-action {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-post-action:hover {
    color: var(--accent-cyan);
}
.btn-post-action.action-like:hover { color: #54a0ff !important; text-shadow: 0 0 10px rgba(84, 160, 255, 0.5); }
.btn-post-action.action-reply:hover { color: #00f0ff !important; text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
.btn-post-action.action-share:hover { color: #a29bfe !important; text-shadow: 0 0 10px rgba(162, 155, 254, 0.5); }
.btn-post-action.action-edit:hover { color: #eccc68 !important; text-shadow: 0 0 10px rgba(236, 204, 104, 0.5); }
.btn-post-action.action-tag:hover { color: #2ed573 !important; text-shadow: 0 0 10px rgba(46, 213, 115, 0.5); }
.btn-post-action.action-delete:hover { color: #ff4757 !important; text-shadow: 0 0 10px rgba(255, 71, 87, 0.5); }
.btn-post-action.action-report:hover { color: #ff7f50 !important; text-shadow: 0 0 10px rgba(255, 127, 80, 0.5); }
.btn-post-action.liked {
    color: var(--accent-orange);
    text-shadow: 0 0 10px rgba(230, 126, 34, 0.3);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.04);
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.8));
    }
}
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 13. Responsive Adaptations */
@media (max-width: 1024px) {
    .forum-main-layout {
        grid-template-columns: 1fr;
    }
    .stats-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-widgets-row {
        grid-template-columns: 1fr 1fr;
    }
    .footer-column-brand {
        grid-column: span 2;
        padding-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* 1. Base Dark Theme Preservation on Mobile */
    body {
        background-color: var(--bg-dark) !important;
    }
    .bahari-container {
        padding: 0 10px !important;
    }
    
    /* 2. Mobile Headers Parity with exact XenForo Layout but Dark Theme Colors */
    .desktop-header-inner {
        display: none !important;
    }
    .bahari-header {
        background: rgba(5, 10, 20, 0.92) !important;
        border-bottom: 1px solid var(--border-color) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        box-shadow: 0 4px 20px rgba(0, 240, 255, 0.12) !important;
        height: 52px !important;
        position: sticky !important;
        top: 0 !important;
    }
    .header-wrapper {
        height: 52px !important;
        padding: 0 !important;
    }
    
    /* Mobile Guest Header */
    .mobile-guest-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 0 12px !important;
    }
    .mobile-guest-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .mobile-hamburger-btn {
        background: none;
        border: none;
        color: #ffffff !important;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }
    .mobile-logo-xen {
        text-decoration: none;
        display: flex;
        align-items: center;
        font-family: var(--font-heading);
        font-size: 20px;
        letter-spacing: -0.5px;
    }
    .logo-xen-light {
        font-weight: 300;
        color: rgba(255, 255, 255, 0.85);
    }
    .logo-xen-bold {
        font-weight: 700;
        color: var(--accent-cyan);
        text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
    }
    .mobile-guest-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .mobile-login-text {
        font-family: var(--font-heading);
        font-size: 14px;
        font-weight: 600;
        color: var(--accent-cyan) !important;
        text-decoration: none;
        text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
    }
    .position-relative {
        position: relative !important;
    }
    .mobile-icon-link {
        color: var(--text-muted) !important;
        font-size: 16px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        position: relative !important;
        padding: 4px;
    }
    .mobile-icon-link:hover {
        color: var(--accent-cyan) !important;
        text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
    }
    
    /* Mobile Logged In Header */
    .mobile-logged-in-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    .mobile-logged-in-left {
        display: flex;
        align-items: center;
        height: 100%;
        background: rgba(0, 240, 255, 0.08);
        border-right: 1px solid var(--border-color);
        padding: 0 12px;
        gap: 8px;
    }
    .mobile-reports-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        font-family: var(--font-heading);
        font-size: 12.5px;
        font-weight: 700;
        color: var(--accent-cyan);
        text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
    }
    .mobile-badge-red {
        background: var(--accent-orange);
        color: #ffffff;
        font-size: 10px;
        font-weight: 800;
        padding: 1px 5px;
        border-radius: 4px;
        box-shadow: var(--shadow-orange);
    }
    .mobile-chevron {
        color: rgba(255, 255, 255, 0.4) !important;
        font-size: 9px !important;
        margin: 0 2px !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
    .mobile-avatar-circle {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent-cyan-dark), var(--accent-cyan));
        color: #050a14;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 10px;
        border: 1.5px solid var(--accent-cyan);
        box-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    }
    .mobile-logged-in-right {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-right: 12px;
    }
    .mobile-badge-bell {
        position: absolute;
        top: -4px;
        right: -6px;
        background: var(--accent-orange);
        color: #ffffff;
        font-size: 8.5px;
        font-weight: 800;
        padding: 1px 4px;
        border-radius: 10px;
        border: 1px solid rgba(5, 10, 20, 0.9);
        box-shadow: var(--shadow-orange);
        line-height: 1;
    }
    
    /* 3. Breadcrumbs & Banner Actions Responsive layout */
    .forum-breadcrumbs-bar {
        background: rgba(5, 10, 20, 0.6) !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding: 8px 0 !important;
    }
    .forum-breadcrumbs {
        padding: 0 !important;
        font-size: 12px !important;
    }
    .forum-breadcrumbs a {
        color: var(--text-muted) !important;
    }
    .forum-breadcrumbs a:hover {
        color: var(--accent-cyan) !important;
    }
    .forum-breadcrumbs span.separator {
        color: rgba(0, 240, 255, 0.25) !important;
    }
    
    /* Action Row Header (Title + Buttons) */
    .action-banner-row {
        background: none !important;
        border: none !important;
        padding: 10px 0 !important;
        margin-bottom: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    .notice-card {
        display: none !important;
    }
    .action-buttons {
        display: flex !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .action-buttons .btn-premium {
        flex: 1 !important;
        justify-content: center !important;
        font-size: 13px !important;
        padding: 10px 14px !important;
        border-radius: 6px !important;
        border: 1px solid transparent !important;
        font-weight: 700 !important;
        text-transform: none !important;
        transition: var(--transition) !important;
    }
    .action-buttons .btn-cyan {
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark)) !important;
        color: #050a14 !important;
        box-shadow: var(--shadow-cyan) !important;
    }
    .action-buttons .btn-dark {
        background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark)) !important;
        color: #ffffff !important;
        box-shadow: var(--shadow-orange) !important;
    }
    
    /* 4. Forum Category & Node Layout (XenForo structure with Premium Dark Neon colors) */
    .category-card {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--card-radius) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
        margin-bottom: 16px !important;
        overflow: hidden !important;
    }
    .category-header {
        background: linear-gradient(90deg, rgba(11, 20, 38, 0.95) 0%, rgba(16, 29, 54, 0.85) 100%) !important;
        border-bottom: 1px solid var(--border-color) !important;
        border-top: 3px solid var(--accent-cyan) !important;
        padding: 10px 14px !important;
    }
    .category-title {
        font-family: var(--font-heading) !important;
        font-size: 14.5px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        text-shadow: none !important;
    }
    .category-title i {
        color: var(--accent-cyan) !important;
        font-size: 13px !important;
    }
    
    /* Forum list layout responsive adjustments */
    .forum-node-row {
        grid-template-columns: 36px 1fr !important;
        gap: 14px !important;
        padding: 14px !important;
        background: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        align-items: flex-start !important;
    }
    .forum-node-row:last-child {
        border-bottom: none !important;
    }
    .node-icon-col {
        width: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .node-icon-wrapper {
        background: rgba(0, 240, 255, 0.06) !important;
        border: 1.5px solid rgba(0, 240, 255, 0.18) !important;
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
        color: var(--accent-cyan) !important;
        font-size: 16px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .node-info-col {
        padding-right: 0 !important;
    }
    .node-title-link {
        font-family: var(--font-heading) !important;
        font-size: 14.5px !important;
        font-weight: 700;
        color: #ffffff !important;
        margin-bottom: 2px !important;
    }
    .node-title-link:hover {
        color: var(--accent-cyan) !important;
        text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    }
    .node-description {
        color: var(--text-muted) !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    /* Node Stats Layout */
    .node-stats-col {
        grid-column: span 1 !important;
        margin-top: 4px !important;
        flex-direction: row !important;
        gap: 12px !important;
        font-size: 11px !important;
        border: none !important;
        padding-left: 0 !important;
        color: var(--text-muted) !important;
    }
    .node-stats-col span {
        display: inline-block !important;
    }
    .node-stats-col strong {
        color: #ffffff !important;
    }
    
    /* Last Post Area */
    .node-lastpost-col {
        grid-column: span 1 !important;
        margin-top: 8px !important;
        border-left: none !important;
        padding-left: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        width: 100% !important;
        font-size: 11px !important;
        color: var(--text-muted) !important;
    }
    .lastpost-avatar-mini {
        display: none !important;
    }
    .lastpost-thread-link {
        color: #ffffff !important;
        font-weight: 500 !important;
        font-size: 11.5px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        width: 100% !important;
        display: block !important;
    }
    .lastpost-thread-link:hover {
        color: var(--accent-cyan) !important;
    }
    .lastpost-meta {
        font-size: 11px !important;
        color: var(--text-muted) !important;
    }
    .lastpost-author {
        color: var(--accent-cyan-dark) !important;
        font-weight: 600 !important;
    }
    
    /* Subforums Pill capsules */
    .subnodes-capsule-list {
        margin-top: 8px !important;
        gap: 6px !important;
    }
    .subnode-capsule {
        background: rgba(11, 20, 38, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        color: var(--text-muted) !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
        border-radius: 4px !important;
    }
    .subnode-capsule:hover {
        background: rgba(0, 240, 255, 0.06) !important;
        border-color: var(--accent-cyan) !important;
        color: var(--accent-cyan) !important;
        box-shadow: 0 0 8px rgba(0, 240, 255, 0.2) !important;
    }
    .subnode-capsule::before {
        display: none !important;
    }
    
    /* Stats cards, postbits */
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .post-item-row {
        grid-template-columns: 1fr;
    }
    .post-author-column {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        text-align: left;
        padding: 15px;
    }
    .author-avatar-wrapper {
        margin-bottom: 0;
        margin-right: 15px;
    }
    .author-avatar-img {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .author-stats-mini {
        display: none;
    }
    .staff-ribbon-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-cards-grid {
        grid-template-columns: 1fr;
    }
    .footer-widgets-row {
        grid-template-columns: 1fr;
    }
    .footer-column-brand {
        grid-column: span 1;
    }
    .action-banner-row {
        flex-direction: column;
        align-items: stretch;
    }
    .action-buttons {
        flex-direction: column;
    }
    .search-wrapper {
        width: 100%;
    }
}

/* 14. WordPress Frontend wp_editor (TinyMCE) Custom Styling */
.wp-editor-wrap {
    background: rgba(11, 20, 38, 0.75) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--card-radius) !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}
.wp-editor-tools {
    background: rgba(11, 20, 38, 0.95) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 8px !important;
}
.wp-editor-tabs .wp-switch-editor {
    background: rgba(5, 10, 20, 0.8) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 5px 12px !important;
    margin-right: 4px !important;
}
.wp-editor-tabs .active .wp-switch-editor {
    background: var(--accent-orange) !important;
    color: #fff !important;
    border-color: var(--accent-orange) !important;
    text-shadow: 0 0 8px rgba(255,255,255,0.4) !important;
}

/* HTML Editor textarea styling */
.wp-editor-container textarea.wp-editor-area {
    background: #050a14 !important;
    color: #ffffff !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 16px !important;
    border: none !important;
}

/* TinyMCE visual editor custom styling rules */
.mce-container, .mce-container *, .mce-widget, .mce-widget * {
    font-family: var(--font-body) !important;
}
.mce-top-part {
    background: rgba(11, 20, 38, 0.95) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
.mce-toolbar-grp {
    background: none !important;
    border-bottom: none !important;
    padding: 6px !important;
}
.mce-statusbar {
    background: rgba(11, 20, 38, 0.95) !important;
    border-top: 1px solid var(--border-color) !important;
}
.mce-path-item, .mce-statusbar *, .mce-wordcount {
    color: var(--text-muted) !important;
}

/* Quicktags text toolbar input styling */
.quicktags-toolbar {
    background: rgba(11, 20, 38, 0.95) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}
.quicktags-toolbar input.button {
    background: rgba(5, 10, 20, 0.8) !important;
    color: var(--accent-orange) !important;
    border: 1px solid rgba(230, 126, 34, 0.3) !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    padding: 4px 10px !important;
    transition: var(--transition) !important;
}
.quicktags-toolbar input.button:hover {
    background: var(--accent-orange) !important;
    color: #fff !important;
    border-color: var(--accent-orange) !important;
    box-shadow: var(--shadow-orange) !important;
}

/* TinyMCE buttons customization */
.mce-btn {
    background: rgba(5, 10, 20, 0.6) !important;
    border: 1px solid rgba(230, 126, 34, 0.2) !important;
    border-radius: 4px !important;
    margin: 2px !important;
    transition: var(--transition) !important;
}
.mce-btn button i, .mce-btn button span, .mce-btn-group .mce-btn i, .mce-menubtn span {
    color: var(--accent-orange) !important;
}
.mce-btn:hover, .mce-btn.mce-active, .mce-btn-group .mce-btn:hover {
    background: var(--accent-orange) !important;
    border-color: var(--accent-orange) !important;
}
.mce-btn:hover button i, .mce-btn:hover button span, .mce-btn.mce-active i, .mce-btn.mce-active span {
    color: #ffffff !important;
}

.mce-panel {
    border: none !important;
    background: none !important;
}
.mce-edit-area {
    background: #050a14 !important;
}
.mce-edit-area iframe {
    background: #050a14 !important;
}

/* XenForo Style Quick Reply Styling */
.xen-quick-reply-container {
    background: #181c25 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

/* Tool Buttons inside XenForo toolbar */
.xen-tool-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--transition) !important;
}
.xen-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Custom Dropdown Container */
.xen-dropdown {
    position: relative !important;
    display: inline-block !important;
}
.xen-dropdown-content {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #14171d !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    border-radius: 4px !important;
    z-index: 100 !important;
    min-width: 140px !important;
    padding: 6px 0 !important;
    margin-top: 4px !important;
}
.xen-dropdown:hover .xen-dropdown-content {
    display: block !important;
}
.xen-dropdown-content a, .xen-dropdown-content button {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    font-family: var(--font-body) !important;
    transition: var(--transition) !important;
}
.xen-dropdown-content a:hover, .xen-dropdown-content button:hover {
    background: rgba(0, 240, 255, 0.1) !important;
    color: var(--accent-cyan) !important;
}

/* Colors drop down specific styles */
.color-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    padding: 10px !important;
    width: 140px !important;
}
.color-dot {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
}
.color-dot:hover {
    transform: scale(1.15) !important;
}

/* Emoji Picker Dropdown specific styles */
.emoji-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    padding: 10px !important;
    width: 160px !important;
}
.emoji-item {
    font-size: 18px !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: var(--transition) !important;
}
.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.15) !important;
}

/* Visual / Code Mode Toggle Buttons */
.xen-mode-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
}
.xen-mode-btn:hover {
    color: #fff !important;
}
.xen-mode-btn.active {
    background: #4a5b78 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.08) !important;
}

/* Visual Div styling */
.xen-reply-editable {
    width: 100% !important;
    min-height: 180px !important;
    background: #0f1218 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    outline: none !important;
    overflow-y: auto !important;
}
.xen-reply-editable img {
    max-width: 100% !important;
    border-radius: 8px !important;
    margin: 10px 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
}

/* Attach files button */
.xen-attach-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: var(--transition) !important;
}
.xen-attach-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15) !important;
}

/* Secondary Button (Preview) */
.xen-btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-right: 12px !important;
    transition: var(--transition) !important;
}
.xen-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15) !important;
}

/* Primary Button (Post reply) */
.xen-btn-primary {
    background: #4a5b78 !important; /* Muted slate/indigo button just like XenForo */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: var(--transition) !important;
}
.xen-btn-primary:hover {
    background: #5d7193 !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* =============================================================================
   10. ULTIMATE XENFORO-STYLE PREMIUM MOBILE RESPONSIVE ENGINE
   ============================================================================= */

@media (max-width: 1024px) {
    .forum-main-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .forum-sidebar-area {
        margin-top: 10px !important;
    }
}

@media (max-width: 768px) {
    /* 1. Reset Global Containers */
    .bahari-container {
        padding: 0 12px !important;
    }
    
    /* 2. Responsive Header Optimization */
    .header-wrapper {
        min-height: 60px !important;
        padding: 0 5px !important;
    }
    .bahari-logo {
        font-size: 18px !important;
    }
    .logo-icon {
        font-size: 20px !important;
    }
    .search-wrapper {
        display: none !important; /* Hide on small screen headers, can be accessed elsewhere */
    }
    .bahari-nav {
        display: none !important; /* Managed by mobile toggle drawers */
    }
    
    /* 3. Action Rows & Breadcrumbs */
    .action-banner-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    .action-buttons {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    .action-buttons a, .action-buttons button {
        flex: 1 !important;
        justify-content: center !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    .notice-card {
        padding: 10px 14px !important;
        font-size: 12px !important;
        justify-content: center !important;
    }
    
    /* 4. Forum Node Rows - OVERRIDE INLINE GRIDS FOR ULTRACLEAN BLOK STYLE */
    .forum-node-row {
        display: grid !important;
        grid-template-columns: 38px 1fr !important;
        grid-template-rows: auto auto auto !important;
        gap: 3px 12px !important;
        padding: 16px 12px !important;
        align-items: start !important;
        background: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    .node-icon-col {
        grid-column: 1 !important;
        grid-row: 1 / span 3 !important; /* Spans across Title, Stats, and Last Post vertically */
        display: block !important;
    }
    
    .node-icon-wrapper {
        position: relative !important;
        width: 38px !important;
        height: 38px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Background decorative squares representing category color in Blok */
    .node-icon-wrapper::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 22px !important;
        height: 22px !important;
        background: rgba(0, 240, 255, 0.12) !important;
        border-radius: 4px !important;
        z-index: 1 !important;
        transition: var(--transition) !important;
    }
    
    .node-icon-wrapper.active-glow::before {
        background: rgba(230, 126, 34, 0.22) !important;
        box-shadow: 0 0 10px rgba(230, 126, 34, 0.3) !important;
    }
    
    .node-icon-wrapper i {
        font-size: 20px !important;
        color: var(--text-muted) !important;
        z-index: 2 !important;
        position: relative !important;
        margin-top: 8px !important;
        margin-left: 8px !important;
        filter: none !important;
    }
    
    .node-icon-wrapper.active-glow i {
        color: var(--accent-orange) !important;
    }
    
    .node-info-col {
        grid-column: 2 !important;
        grid-row: 1 !important;
        padding-right: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        width: 100% !important;
        min-width: 0 !important; /* Prevents flex/grid parent container overflow */
    }
    
    .node-title-link {
        font-family: var(--font-heading) !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #fff !important;
        display: block !important;
        width: 100% !important;
        white-space: normal !important; /* Allow title to wrap normally on mobile */
        word-wrap: break-word !important;
    }
    
    .node-description {
        display: none !important; /* Hide descriptions on mobile for absolute cleanliness */
    }
    
    .subnodes-capsule-list {
        margin-top: 5px !important;
        gap: 4px !important;
        display: none !important; /* Hide subforums list on mobile list to maintain ultra clean Blok layout */
    }
    
    /* Stats displayed directly under the title */
    .node-stats-col {
        grid-column: 2 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        font-size: 11px !important;
        color: var(--text-muted) !important;
        margin: 2px 0 !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }
    
    .node-stats-col span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .node-stats-col span:first-child::before {
        content: '\f075' !important; /* fa-regular fa-comment outline */
        font-family: 'Font Awesome 6 Free' !important;
        font-weight: 400 !important;
        color: var(--text-muted) !important;
    }
    
    .node-stats-col span:last-child::before {
        content: '\f086' !important; /* fa-regular fa-comments outline */
        font-family: 'Font Awesome 6 Free' !important;
        font-weight: 400 !important;
        color: var(--text-muted) !important;
    }
    
    /* Latest post snippet in clean text block */
    .node-lastpost-col {
        grid-column: 2 !important;
        grid-row: 3 !important;
        border-left: none !important;
        padding-left: 0 !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .lastpost-avatar-mini {
        display: none !important; /* Hide avatar for maximum cleanliness just like Blok */
    }
    
    .lastpost-thread-link {
        font-size: 13px !important;
        color: #fff !important;
        font-weight: 400 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        display: block !important;
        width: 100% !important;
        line-height: 1.4 !important;
    }
    
    .lastpost-meta {
        font-size: 11px !important;
        color: var(--text-muted) !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
    }
    
    .lastpost-author {
        color: var(--text-muted) !important;
        font-weight: 500 !important;
    }
    
    .lastpost-author::before {
        content: '· ' !important;
    }
    
    .lastpost-author::before {
        content: '· ' !important;
    }
    
    /* 5. Forum Stats Cards Counter Widgets */
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 24px !important;
    }
    .stat-card-item {
        padding: 16px 10px !important;
        gap: 8px !important;
    }
    .stat-card-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    .stat-card-item span {
        font-size: 11px !important;
    }
    .stat-card-item strong {
        font-size: 18px !important;
    }
    
    /* 6. Profile Template Columns stacking */
    .profile-page-wrapper {
        padding: 0 !important;
    }
    .profile-page-wrapper > div[style*="display: flex"],
    .profile-page-wrapper > div[style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .profile-page-wrapper form {
        display: flex !important;
        flex-direction: column !important;
    }
    .profile-page-wrapper div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* 7. Thread View (Postbit/Comments) Responsiveness */
    .thread-post-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin-bottom: 20px !important;
    }
    
    /* Author sidebar column (Postbit Column) - Stack on top */
    .thread-post-author-col {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1.5px solid rgba(255, 255, 255, 0.06) !important;
        padding: 15px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 16px !important;
        background: linear-gradient(135deg, rgba(11,20,38,0.95) 0%, rgba(5,10,20,0.95) 100%) !important;
    }
    
    .thread-post-author-col .author-avatar-large {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
        margin-bottom: 0 !important;
        border-width: 2px !important;
    }
    
    .thread-post-author-col .author-meta-details {
        display: none !important; /* Hide extra stats on phone postbit to keep it ultra compact */
    }
    
    /* Make username and title display beautifully inline in mobile postbit */
    .thread-post-author-col > div:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 4px !important;
    }
    
    .author-username {
        font-size: 14.5px !important;
        margin-bottom: 0 !important;
        justify-content: flex-start !important;
    }
    
    .author-user-title {
        font-size: 11px !important;
        margin-bottom: 0 !important;
    }
    
    /* Content column (Postbit Right Pane) */
    .thread-post-content-col {
        padding: 16px 14px !important;
        width: 100% !important;
    }
    
    .post-actions-row {
        flex-wrap: wrap !important;
        gap: 10px !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.05) !important;
        padding-top: 12px !important;
        margin-top: 15px !important;
    }
    
    .post-action-btn {
        font-size: 11.5px !important;
        padding: 5px 8px !important;
    }
}

/* 19. Responsive overrides for bottom stats cards grid */
@media (max-width: 1100px) {
    .stats-cards-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .stats-cards-grid .stat-card-item:first-child {
        grid-column: span 2 !important;
    }
}
@media (max-width: 680px) {
    .stats-cards-grid {
        grid-template-columns: 1fr !important;
    }
    .stats-cards-grid .stat-card-item:first-child {
        grid-column: span 1 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .stats-cards-grid .stat-card-item:first-child .stat-card-label-orange {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
    }
}

/* 20. Questions & Answers (Q&A) Forum Styling */
.bahari-best-answer-card {
    border: 2px solid var(--accent-orange) !important;
    box-shadow: 0 0 20px rgba(255, 127, 80, 0.25), inset 0 0 10px rgba(255, 127, 80, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.bahari-best-answer-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 45px 45px 0;
    border-color: transparent var(--accent-orange) transparent transparent;
    z-index: 5;
    pointer-events: none;
}

.bahari-best-answer-card::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 10px;
    color: #050a14;
    font-size: 14px;
    font-weight: 900;
    z-index: 6;
    pointer-events: none;
}

/* Q&A Voting button states and animations */
.bahari-vote-container {
    transition: var(--transition);
}

.bahari-vote-btn {
    opacity: 0.7;
}

.bahari-vote-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.bahari-vote-btn.vote-up:hover {
    color: var(--accent-orange) !important;
}

.bahari-vote-btn.vote-down:hover {
    color: var(--accent-cyan) !important;
}

/* Clarification comments block */
.bahari-clarification-item {
    transition: var(--transition);
    animation: fadeInClarification 0.4s ease forwards;
}

@keyframes fadeInClarification {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bahari-clarify-form-block textarea:focus {
    outline: none;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

/* Premium Comments Pagination Styles */
.bahari-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
}
.bahari-page-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bahari-page-link:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-1px);
    box-shadow: var(--shadow-cyan);
}
.bahari-page-link.active-page {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    border-color: var(--accent-orange);
    color: #fff;
    box-shadow: var(--shadow-orange);
    cursor: default;
    pointer-events: none;
}
.bahari-page-link.prev-next-btn {
    background: rgba(5, 10, 20, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
    font-size: 12.5px;
    gap: 6px;
}




