/*
Theme Name: NexusBoard
Theme URI: https://wa.me/+923110860361
Author: MH Tech Solutions
Author URI: https://wa.me/+923110860361
Description: A ultra-lightweight, high-performance WordPress forum theme using custom tables, raw SQL queries, native auth canvas, and seamless non-blocking jQuery AJAX.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: nexusboard
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Core Theme Variables --- */
:root {
    /* Color Palette */
    --bg-gradient: linear-gradient(135deg, #07050d 0%, #110e1c 50%, #0c0817 100%);
    --surface-bg: rgba(22, 18, 38, 0.65);
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-border-focus: rgba(99, 102, 241, 0.5);

    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-glow: rgba(99, 102, 241, 0.4);

    --secondary-color: #06b6d4;
    --secondary-hover: #0891b2;
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;

    /* Layout & Styling */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    --blur-intensity: 16px;

    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base & Reset Rules --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* --- Layout Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Global Layout Wrapper --- */
.nb-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Glassmorphic Surface --- */
.nb-glass {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    box-shadow: var(--shadow-premium);
}

/* --- Header component --- */
.nb-header {
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--surface-border);
    background: rgba(11, 8, 20, 0.4);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 99999;
}

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

.nb-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-brand span {
    color: var(--primary-color);
    -webkit-text-fill-color: initial;
    font-weight: 900;
}

.nb-user-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nb-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    padding: 6px 16px 6px 8px;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.nb-profile:hover {
    border-color: var(--surface-border-focus);
}

.nb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.nb-username {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.btn-signout {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.btn-signout:hover {
    color: var(--accent-red);
}

/* --- Premium Buttons --- */
.nb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nb-btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.nb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
    filter: brightness(1.1);
}

.nb-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.nb-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nb-btn:active {
    transform: translateY(0);
}

/* --- Core Forum Dashboard --- */
.nb-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Topic Creator Form Card */
.nb-composer-card {
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.nb-composer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.composer-title {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nb-form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nb-label {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nb-input,
.nb-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nb-input:focus,
.nb-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.nb-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Guest Promo CTA Box */
.nb-promo-card {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    position: relative;
}

.nb-promo-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-promo-card p {
    color: var(--text-muted);
    max-width: 500px;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

/* Thread Row Listings */
.threads-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.thread-row {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
    border: 1px solid var(--surface-border);
}

.thread-row:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(22, 18, 38, 0.85);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.thread-main {
    flex: 1;
    min-width: 0;
    /* Ensures overflow text ellipsis works */
    padding-right: 20px;
}

.thread-title-link {
    display: inline-block;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
    word-break: break-word;
}

.thread-title-link:hover {
    color: var(--primary-color);
}

.thread-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.thread-meta-item strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.thread-meta-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.thread-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    width: 65px;
    height: 60px;
    transition: var(--transition-smooth);
}

.thread-row:hover .stat-bubble {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Empty State */
.nb-empty-state {
    padding: 60px 40px;
    text-align: center;
    border: 1px dashed var(--surface-border);
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
}

.nb-empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* --- Discussion Interface (single-thread.php) --- */
.back-btn-wrap {
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

.thread-detail-header {
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.thread-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.thread-detail-header h1 {
    margin-bottom: 12px;
}

/* --- Thread Starter Card (Original Post) --- */
.thread-starter-card {
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 24px;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    background: rgba(99, 102, 241, 0.03) !important;
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.03) !important;
    position: relative;
    overflow: hidden;
}

.thread-starter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.starter-avatar-col {
    flex-shrink: 0;
}

.starter-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.starter-body-col {
    flex: 1;
    min-width: 0;
}

.starter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.starter-author-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

.author-badge {
    background: var(--primary-gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 50px;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.starter-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.starter-message {
    color: #f1f5f9;
    line-height: 1.7;
    word-break: break-word;
    font-size: 1.05rem;
}

.starter-message p {
    margin-bottom: 16px;
}

.starter-message p:last-child {
    margin-bottom: 0;
}

/* --- Responses / Comments Divider --- */
.replies-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.replies-divider span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.reply-card {
    padding: 24px;
    display: flex;
    gap: 20px;
    border: 1px solid var(--surface-border);
    transition: var(--transition-smooth);
}

.reply-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px -15px rgba(0, 0, 0, 0.3);
}

.reply-avatar-col {
    flex-shrink: 0;
}

.reply-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.reply-body-col {
    flex: 1;
    min-width: 0;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.reply-author-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.reply-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.reply-message {
    color: var(--text-secondary);
    line-height: 1.6;
    word-break: break-word;
    font-size: 0.95rem;
}

/* Reply Editor Card */
.reply-composer-card {
    padding: 30px;
    margin-bottom: 50px;
}

/* --- Native User Authentication System (page-auth.php) --- */
.auth-page-container {
    max-width: 900px;
    margin: 40px auto 80px auto;
}

.auth-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    min-height: 520px;
}

.auth-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-login-panel {
    border-right: 1px solid var(--surface-border);
}

.auth-signup-panel {
    background: rgba(99, 102, 241, 0.02);
}

.auth-panel-heading {
    margin-bottom: 24px;
}

.auth-panel-heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-panel-heading p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Alerts System */
.nb-alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 500;
}

.nb-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.nb-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

/* Form Helper Layout overrides */
.auth-panel .nb-form-group {
    margin-bottom: 16px;
}

.auth-panel .nb-btn {
    margin-top: 10px;
    width: 100%;
}

/* --- Footer component --- */
.nb-footer {
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--surface-border);
    background: rgba(11, 8, 20, 0.2);
}

.nb-footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nb-footer-links {
    display: flex;
    gap: 24px;
}

.nb-footer-links a {
    color: var(--text-muted);
}

.nb-footer-links a:hover {
    color: var(--primary-color);
}

/* Dynamic AJAX feedback items with subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ajax-new-thread {
    animation: fadeInUp 0.5s ease forwards;
}

.ajax-new-reply {
    animation: fadeInUp 0.5s ease forwards;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .auth-dual-grid {
        grid-template-columns: 1fr;
    }

    .auth-login-panel {
        border-right: none;
        border-bottom: 1px solid var(--surface-border);
    }

    .thread-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .thread-stats {
        width: 100%;
        justify-content: flex-end;
    }

    .nb-header-wrap {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .nb-user-nav {
        width: 100%;
        justify-content: space-between;
    }

    .nb-footer-wrap {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* --- Phase 2: Live Search, Filter Tabs & Likes --- */
.nb-filter-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nb-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--surface-border);
}

.nb-tab-btn {
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nb-tab-btn:hover {
    color: var(--text-primary);
}

.nb-tab-btn.active {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.nb-search-box {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.nb-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    padding: 10px 16px 10px 38px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: var(--transition-smooth);
}

.nb-search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.nb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.nb-search-input:focus + .nb-search-icon {
    color: var(--secondary-color);
}

/* Reply Reactions (Likes) styling */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    padding: 4px 10px;
    border-radius: 50px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
    position: relative;
}

.like-btn svg {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.2s;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.like-btn:hover {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: rgba(239, 68, 68, 0.05);
}

.like-btn:hover svg {
    transform: scale(1.2);
}

.like-btn.liked {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.like-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
    transform: scale(1.1);
}

.like-btn:active svg {
    transform: scale(0.9);
}

.like-count {
    line-height: 1;
}

@media (max-width: 480px) {
    .nb-filter-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nb-search-box {
        max-width: 100%;
    }
}

/* --- Phase 3: Sorter Dropdowns, Markdown & Moderation --- */
.nb-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.nb-sort-select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.nb-sort-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nb-sort-select option {
    background: #110e1c;
    color: var(--text-secondary);
}

/* Moderation Buttons */
.moderator-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
    transform: scale(1.1);
}

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

/* Markdown and Code syntax variables styling */
.inline-code {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.88em;
    color: var(--secondary-color);
    word-break: break-word;
}

.code-block-wrap {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    padding: 18px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.9em;
    color: #e2e8f0;
    line-height: 1.5;
    position: relative;
}

.code-block-wrap::before {
    content: 'CODE';
    position: absolute;
    top: 0;
    right: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom-left-radius: 4px;
}

.code-block-wrap code {
    display: block;
    white-space: pre;
    tab-size: 4;
}

/* Ensure parsed outputs margins inside message containers */
.reply-message strong {
    color: var(--text-primary);
    font-weight: 600;
}

.reply-message em {
    font-style: italic;
    color: #e2e8f0;
}

/* --- Phase 4: Forums Statistics Banner --- */
.nb-stats-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 10px;
}

.nb-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
    border-top: 3px solid transparent;
}

.nb-stat-card-topics {
    border-top-color: var(--primary-color);
}

.nb-stat-card-posts {
    border-top-color: var(--secondary-color);
}

.nb-stat-card-members {
    border-top-color: var(--accent-orange);
}

.nb-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(22, 18, 38, 0.85);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

.nb-stat-card:hover.nb-stat-card-topics {
    box-shadow: 0 10px 25px -10px rgba(99, 102, 241, 0.15);
}

.nb-stat-card:hover.nb-stat-card-posts {
    box-shadow: 0 10px 25px -10px rgba(6, 182, 212, 0.15);
}

.nb-stat-card:hover.nb-stat-card-members {
    box-shadow: 0 10px 25px -10px rgba(245, 158, 11, 0.15);
}

.nb-stat-val {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-stat-card-topics .nb-stat-val {
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-stat-card-posts .nb-stat-val {
    background: linear-gradient(135deg, #ffffff 0%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-stat-card-members .nb-stat-val {
    background: linear-gradient(135deg, #ffffff 0%, #fde047 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nb-stat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

@media (max-width: 600px) {
    .nb-stats-banner {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* --- Phase 5: Header Main Navigation styling --- */
.nb-main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 10px;
}

.nb-nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
    transition: var(--transition-smooth);
}

.nb-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
    box-shadow: 0 0 10px var(--primary-glow);
}

.nb-nav-link:hover {
    color: var(--text-primary);
}

.nb-nav-link:hover::after {
    width: 100%;
}

.nb-nav-link.active {
    color: var(--primary-color);
}

.nb-nav-link.active::after {
    width: 100%;
    background: var(--primary-gradient);
}

@media (max-width: 768px) {
    .nb-main-nav {
        display: none; /* Hide main links on mobile and rely on standard CTA buttons */
    }
}

/* --- Dynamic Custom Menu Styling overrides --- */
.nb-main-nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nb-main-nav li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.nb-main-nav li a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
    transition: var(--transition-smooth);
}

.nb-main-nav li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
    box-shadow: 0 0 10px var(--primary-glow);
}

.nb-main-nav li a:hover {
    color: var(--text-primary);
}

.nb-main-nav li a:hover::after {
    width: 100%;
}

.nb-main-nav li.current-menu-item > a,
.nb-main-nav li.current_page_item > a {
    color: var(--primary-color);
}

.nb-main-nav li.current-menu-item > a::after,
.nb-main-nav li.current_page_item > a::after {
    width: 100%;
    background: var(--primary-gradient);
}

/* --- Premium Forum Category Badges --- */
.nb-category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 50px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

/* Category HSL Accents */
.nb-category-badge.badge-color-0 {
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.05);
}

.nb-category-badge.badge-color-1 {
    background: rgba(6, 182, 212, 0.08);
    color: #67e8f9;
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.05);
}

.nb-category-badge.badge-color-2 {
    background: rgba(139, 92, 246, 0.08);
    color: #d8b4fe;
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.05);
}

.nb-category-badge.badge-color-3 {
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.05);
}

.nb-category-badge.badge-color-4 {
    background: rgba(245, 158, 11, 0.08);
    color: #fde047;
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

/* Category Micro-Interactions on Row Hover */
.thread-row:hover .nb-category-badge.badge-color-0 {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.thread-row:hover .nb-category-badge.badge-color-1 {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.thread-row:hover .nb-category-badge.badge-color-2 {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.thread-row:hover .nb-category-badge.badge-color-3 {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.thread-row:hover .nb-category-badge.badge-color-4 {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

/* --- Phase 10: Dynamic Sidebar & Moderator Command Center --- */

.nb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget-card {
    padding: 24px;
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-md);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.widget-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.4;
}

/* Category List styles */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

.sidebar-category-link:hover,
.sidebar-category-link.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateX(4px);
}

.sidebar-category-link.active {
    border-color: var(--primary-color);
}

.category-count {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

.sidebar-category-link:hover .category-count,
.sidebar-category-link.active .category-count {
    color: var(--text-primary);
    background: var(--primary-color);
}

/* Moderator Command Center User Rows */
.moderator-user-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.moderator-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.moderator-user-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mod-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mod-user-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Moderator Action Toggle Buttons */
.btn-toggle-ban {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-toggle-ban.btn-active {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-toggle-ban.btn-active:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.btn-toggle-ban.btn-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.btn-toggle-ban.btn-banned:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-toggle-ban.loading {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 991px) {
    .nb-sidebar {
        margin-top: 40px;
    }
}

/* --- Phase 11 & 12: Professional Upgrades (Sticky, Locks, Markdown Preview) --- */
.thread-row.is-pinned {
    border-color: rgba(234, 179, 8, 0.45) !important;
    background: linear-gradient(135deg, rgba(22, 18, 38, 0.75) 0%, rgba(234, 179, 8, 0.03) 100%) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(234, 179, 8, 0.08) !important;
}

.btn-toggle-pin, .btn-toggle-lock {
    transition: var(--transition-smooth);
    border-radius: 4px;
}

.btn-toggle-pin:hover {
    color: #eab308 !important;
    background: rgba(234, 179, 8, 0.1);
    transform: scale(1.1);
}

.btn-toggle-lock:hover {
    color: #f43f5e !important;
    background: rgba(244, 63, 94, 0.1);
    transform: scale(1.1);
}

.btn-toggle-pin.is-pinned {
    color: #eab308 !important;
    text-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}

.btn-toggle-lock.is-locked {
    color: #f43f5e !important;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

/* Markdown preview code segments */
#nb-markdown-preview code, #nb-markdown-preview-reply code {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background: rgba(0,0,0,0.3);
    padding: 3px 6px;
    border-radius: 4px;
    color: #06b6d4;
    border: 1px solid rgba(255,255,255,0.05);
}

#nb-markdown-preview .code-block-wrap, #nb-markdown-preview-reply .code-block-wrap {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0;
    overflow-x: auto;
}

#nb-markdown-preview .code-block-wrap code, #nb-markdown-preview-reply .code-block-wrap code {
    background: transparent;
    padding: 0;
    border: none;
    color: #e2e8f0;
}

/* --- Premium Frontend Toast Notifications --- */
.nexus-frontend-toast {
    position: fixed;
    top: 24px;
    right: -340px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    padding: 10px 14px;
    background: rgba(11, 8, 20, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.15) !important;
    color: #fff !important;
    font-family: var(--font-body);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.nexus-frontend-toast.show {
    right: 24px;
}

.nexus-frontend-toast.hide {
    right: -340px;
    opacity: 0;
}

.nexus-frontend-toast .nexus-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.nexus-frontend-toast.nexus-toast-success {
    border-left: 4px solid #10b981 !important;
}

.nexus-frontend-toast.nexus-toast-error {
    border-left: 4px solid #ef4444 !important;
}

.nexus-frontend-toast .nexus-toast-content {
    flex: 1;
    min-width: 0;
}

.nexus-frontend-toast .nexus-toast-title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 0px;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.nexus-frontend-toast .nexus-toast-message {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.76rem !important;
    color: #94a3b8 !important;
    line-height: 1.4 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nexus-frontend-toast .nexus-toast-close {
    background: transparent;
    border: none;
    color: #ef4444 !important;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.nexus-frontend-toast .nexus-toast-close:hover {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    opacity: 1;
}

.nexus-frontend-toast .nexus-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transform-origin: left;
    animation: shrinkProgress 4s linear forwards;
}

.nexus-frontend-toast.nexus-toast-success .nexus-toast-progress {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.nexus-frontend-toast.nexus-toast-error .nexus-toast-progress {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* --- Premium Custom Modal Overlay --- */
.nexus-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 2, 10, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nexus-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.nexus-modal-card {
    width: 400px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(15, 11, 28, 0.9) !important;
    border-radius: var(--border-radius-md);
}

.nexus-modal-overlay.show .nexus-modal-card {
    transform: scale(1);
}

.nexus-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.nexus-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.nexus-modal-body p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.nexus-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.nexus-modal-footer .nb-btn {
    padding: 10px 20px;
    font-size: 0.88rem;
}

/* --- Premium Custom Member Profiles Canvas Styles --- */
.nexus-profile-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 10px;
    margin-bottom: 40px;
}

.nexus-profile-banner {
    padding: 30px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(15, 11, 28, 0.6) !important;
    position: relative;
    overflow: hidden;
}

.nexus-profile-header-cols {
    display: flex;
    align-items: center;
    gap: 30px;
}

@media (max-width: 768px) {
    .nexus-profile-header-cols {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

.nexus-profile-avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
}

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

.nexus-profile-banner-info {
    flex: 1;
}

.nexus-profile-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.nexus-profile-stats-bar {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 576px) {
    .nexus-profile-stats-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .nexus-profile-stat-box {
        border: none !important;
        padding: 0 !important;
    }
}

.nexus-profile-stat-box {
    display: flex;
    flex-direction: column;
}

.nexus-profile-stat-box .stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.nexus-profile-stat-box .stat-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 4px;
}

.nexus-profile-sections-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .nexus-profile-sections-row {
        grid-template-columns: 1fr;
    }
}

.nexus-profile-tabs {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: var(--border-radius-md);
    background: rgba(15, 11, 28, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.nexus-profile-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nexus-profile-tab-btn svg {
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.nexus-profile-tab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nexus-profile-tab-btn:hover svg {
    color: #fff;
}

.nexus-profile-tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.nexus-profile-tab-btn.active svg {
    color: #818cf8;
}

.nexus-profile-tab-panel {
    display: none;
}

.nexus-profile-tab-panel.active {
    display: block;
}

.nexus-profile-card {
    padding: 30px;
    border-radius: var(--border-radius-lg);
    background: rgba(15, 11, 28, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.profile-thread-row {
    transition: all 0.25s ease;
}

.profile-thread-row:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    transform: translateY(-1px);
}

.avatar-upload-area {
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: var(--border-radius-md);
    background: rgba(0,0,0,0.2);
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.avatar-upload-area:hover, .avatar-upload-area.dragover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.03);
}

.avatar-upload-area svg {
    transition: transform 0.25s ease;
}

.avatar-upload-area:hover svg {
    transform: translateY(-4px);
    color: #818cf8 !important;
}

/* ==========================================================================
   Premium Mobile Responsiveness Overrides & Verification Modal Adjustments
   ========================================================================== */

/* Fluid Glassmorphic Modals Sizing (iPhone SE & smaller compatability) */
.nexus-modal-card {
    width: 90% !important;
    max-width: 420px !important;
    margin: 0 auto;
}

/* Base Spacing for Small Devices */
@media (max-width: 480px) {
    .nb-container {
        padding: 0 16px !important;
    }
}

/* Header Optimization: Inline wrap bar instead of simple vertical block */
@media (max-width: 768px) {
    .nb-header-wrap {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 16px !important;
    }
    
    /* Hide desktop user nav on header bar on mobile */
    .nb-header-wrap > div > .nb-user-nav {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .nb-header-wrap {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* Starter Card & Reply Card Responsiveness */
@media (max-width: 600px) {
    .thread-starter-card, 
    .reply-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
        padding: 20px !important;
    }
    
    .starter-avatar-col, 
    .reply-avatar-col {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    .starter-avatar {
        width: 44px !important;
        height: 44px !important;
    }
    
    .reply-avatar {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Make starter-header display inline next to stacked avatar */
    .starter-avatar-col::after {
        content: attr(data-author-badge);
        display: none;
    }
}

/* Sorters & Sorter Rows Controls Alignment */
@media (max-width: 768px) {
    .nb-controls-row {
        justify-content: flex-start !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
}

/* Category Filter Layout adjustments */
@media (max-width: 576px) {
    .nb-filter-wrap {
        gap: 12px !important;
    }
    
    .nb-tabs {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    
    .nb-tab-btn {
        flex: 1 !important;
        text-align: center !important;
    }
}

/* Profile Name Wrapper Centering on Mobile */
.nexus-profile-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nexus-profile-bio {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

@media (max-width: 768px) {
    .nexus-profile-banner-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .nexus-profile-name-wrap {
        justify-content: center !important;
        width: 100% !important;
    }
}

/* Premium Mobile Menu Toggle & Drawer styling */
.nb-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nb-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid var(--surface-border) !important;
        color: var(--text-primary) !important;
        cursor: pointer;
        padding: 10px !important;
        border-radius: var(--border-radius-sm) !important;
        transition: var(--transition-smooth) !important;
    }
    
    .nb-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: var(--primary-color) !important;
    }
    
    .nb-menu-toggle svg {
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-open .nb-menu-toggle svg {
        transform: rotate(90deg);
    }
    
    /* Ensure the header relative for absolute mobile menu positioning */
    .nb-header {
        position: relative !important;
    }
    
    /* Drawer animation */
    @keyframes slideDownMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Mobile Drawer */
    .nb-header.mobile-menu-open .nb-main-nav {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(11, 8, 20, 0.96) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-bottom: 1px solid var(--surface-border) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
        padding: 14px 24px !important;
        z-index: 999999 !important;
        gap: 8px !important;
        align-items: flex-start !important;
        margin-left: 0 !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
        animation: slideDownMenu 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards !important;
    }
    
    .nb-header.mobile-menu-open .nb-main-nav ul {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
    }
    
    .nb-header.mobile-menu-open .nb-main-nav li {
        width: 100% !important;
        display: block !important;
    }
    
    .nb-header.mobile-menu-open .nb-main-nav a:not(.nb-btn):not(.nb-profile),
    .nb-header.mobile-menu-open .nb-main-nav li a:not(.nb-btn):not(.nb-profile) {
        display: block !important;
        width: 100% !important;
        font-size: 1.02rem !important;
        padding: 6px 0 !important;
        color: var(--text-primary) !important;
    }
    
    .nb-header.mobile-menu-open .nb-main-nav a.active,
    .nb-header.mobile-menu-open .nb-main-nav li.current-menu-item > a {
        color: var(--primary-color) !important;
    }
}

/* ==========================================================================
   Holistic Mobile Responsive Overhauls (Dashboard, Stats, Forms & Layout Cards)
   ========================================================================== */

/* Optimization: Fluid Statistics Banner Grid (iPhone SE, Tablets, and Desktop Compatability) */
@media (max-width: 992px) {
    .nb-stats-banner {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .nb-stats-banner {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* Optimization: Card padding adjustments to avoid wasting space on small viewports */
@media (max-width: 480px) {
    .nb-composer-card,
    .reply-composer-card,
    .thread-detail-header,
    .nexus-profile-banner,
    .nexus-profile-card,
    .auth-panel {
        padding: 20px 16px !important;
    }
}

/* Optimization: Stack Profile Thread rows on ultra-small viewport widths */
@media (max-width: 480px) {
    .profile-thread-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }
    
    .profile-thread-row div:nth-child(2) {
        text-align: left !important;
        width: 100% !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-top: 8px !important;
    }
}

/* Optimization: Style mobile user nav when appended dynamically inside mobile drawer */
@media (max-width: 768px) {
    .nb-main-nav .nb-user-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 12px !important;
        margin-top: 12px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-top: 12px !important;
    }
    
    .nb-main-nav .nb-user-nav .nb-profile {
        width: 100% !important;
        justify-content: flex-start !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid var(--surface-border) !important;
        box-sizing: border-box !important;
    }
    
    .nb-main-nav .nb-user-nav .btn-signout {
        font-size: 1.05rem !important;
        color: var(--accent-red) !important;
        padding: 6px 0 !important;
        display: block !important;
        width: 100% !important;
        font-weight: 600 !important;
        transition: var(--transition-smooth) !important;
    }
    
    .nb-main-nav .nb-user-nav .btn-signout:hover {
        color: #fca5a5 !important;
        filter: brightness(1.2) !important;
    }
    
    .nb-main-nav .nb-user-nav .nb-btn-primary {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        padding: 14px 20px !important;
        font-size: 1.05rem !important;
    }
}