/* ==========================================================================
   Modern Developer Community & Technical Forum Stylesheet (Cyber Tech Edition)
   ========================================================================== */

:root {
    --font-ar: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-en: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --app-font: var(--font-en);
    --mono-font: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;

    /* Base Dimensions */
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] {
    --app-font: var(--font-ar);
}

[dir="ltr"] {
    --app-font: var(--font-en);
}

/* --------------------------------------------------------------------------
   THEME STYLES & COMPLETE COLOR ECOSYSTEMS (5 Master Executive Personas)
   -------------------------------------------------------------------------- */

/* 1. MIDNIGHT OBSIDIAN (Refined Enterprise Slate Navy - Natural & Eye-Friendly) */
[data-theme="dark"],
[data-bs-theme="dark"],
[data-theme-style="obsidian"] {
    --bg-base: #0b1120;
    --surface: #131d33;
    --surface-card: #16223b;
    --surface-muted: #1c2b4a;
    --surface-glass: rgba(11, 17, 32, 0.82);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(96, 165, 250, 0.28);
    --border-focus: #3b82f6;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-soft: rgba(59, 130, 246, 0.12);
    --primary-border: rgba(96, 165, 250, 0.25);
    --primary-gradient: linear-gradient(135deg, #3b82f6, #4f46e5);
    --primary-glow: rgba(59, 130, 246, 0.22);
    --badge-glow: rgba(59, 130, 246, 0.2);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-secondary: #cbd5e1;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.45);
}

/* 2. CORPORATE EXECUTIVE LIGHT (Warm Pearl Slate Daylight - Eye Fatigue Relieved) */
[data-theme="light"],
[data-bs-theme="light"],
[data-theme-style="corporate-light"] {
    --bg-base: #f1f5f9 !important;
    --surface: #ffffff !important;
    --surface-card: #ffffff !important;
    --surface-muted: #e2e8f0 !important;
    --surface-glass: rgba(241, 245, 249, 0.88) !important;
    --border-subtle: rgba(15, 23, 42, 0.08) !important;
    --border-highlight: rgba(37, 99, 235, 0.3) !important;
    --border-focus: #2563eb !important;
    --primary: #2563eb !important;
    --primary-hover: #1d4ed8 !important;
    --primary-soft: rgba(37, 99, 235, 0.08) !important;
    --primary-border: rgba(37, 99, 235, 0.2) !important;
    --primary-gradient: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    --primary-glow: rgba(37, 99, 235, 0.2) !important;
    --badge-glow: rgba(37, 99, 235, 0.12) !important;
    --text-main: #1e293b !important;
    --text-muted: #64748b !important;
    --text-secondary: #475569 !important;
    --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(15, 23, 42, 0.05) !important;
}

/* 3. DEEP TWILIGHT CYBER (Cosmic Indigo & Violet) */
[data-theme-style="twilight"] {
    --bg-base: #090a16 !important;
    --surface: #0e1222 !important;
    --surface-card: #101426 !important;
    --surface-muted: #191f3a !important;
    --surface-glass: rgba(9, 10, 22, 0.9) !important;
    --border-subtle: rgba(129, 140, 248, 0.16) !important;
    --border-highlight: rgba(168, 85, 247, 0.4) !important;
    --border-focus: #818cf8 !important;
    --primary: #6366f1 !important;
    --primary-hover: #4f46e5 !important;
    --primary-soft: rgba(99, 102, 241, 0.18) !important;
    --primary-border: rgba(129, 140, 248, 0.35) !important;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    --primary-glow: rgba(99, 102, 241, 0.45) !important;
    --badge-glow: rgba(99, 102, 241, 0.3) !important;
    --text-main: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --text-secondary: #c7d2fe !important;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6) !important;
}

/* 4. HIGH-TECH EMERALD TERMINAL (Enterprise Systems & Database Security) */
[data-theme-style="emerald"] {
    --bg-base: #06100d !important;
    --surface: #081713 !important;
    --surface-card: #0b1c17 !important;
    --surface-muted: #132e26 !important;
    --surface-glass: rgba(6, 16, 13, 0.9) !important;
    --border-subtle: rgba(52, 211, 153, 0.16) !important;
    --border-highlight: rgba(16, 185, 129, 0.4) !important;
    --border-focus: #34d399 !important;
    --primary: #10b981 !important;
    --primary-hover: #059669 !important;
    --primary-soft: rgba(16, 185, 129, 0.18) !important;
    --primary-border: rgba(52, 211, 153, 0.35) !important;
    --primary-gradient: linear-gradient(135deg, #10b981, #06b6d4) !important;
    --primary-glow: rgba(16, 185, 129, 0.45) !important;
    --badge-glow: rgba(16, 185, 129, 0.3) !important;
    --text-main: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --text-secondary: #a7f3d0 !important;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6) !important;
}

/* 5. OBSIDIAN PRESTIGE AMBER (Executive Warm Amber & Luxury Gold) */
[data-theme-style="amber"] {
    --bg-base: #0e0c08 !important;
    --surface: #13100a !important;
    --surface-card: #18140e !important;
    --surface-muted: #262016 !important;
    --surface-glass: rgba(14, 12, 8, 0.9) !important;
    --border-subtle: rgba(245, 158, 11, 0.18) !important;
    --border-highlight: rgba(251, 191, 36, 0.4) !important;
    --border-focus: #fbbf24 !important;
    --primary: #f59e0b !important;
    --primary-hover: #d97706 !important;
    --primary-soft: rgba(245, 158, 11, 0.18) !important;
    --primary-border: rgba(251, 191, 36, 0.35) !important;
    --primary-gradient: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    --primary-glow: rgba(245, 158, 11, 0.45) !important;
    --badge-glow: rgba(245, 158, 11, 0.3) !important;
    --text-main: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --text-secondary: #fde68a !important;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6) !important;
}

/* Dynamic Brand Accent Palettes for backward compatibility */
[data-accent="blue"] {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.35);
    --border-focus: #3b82f6;
    --badge-glow: rgba(37, 99, 235, 0.2);
}

[data-accent="indigo"] {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --border-focus: #818cf8;
    --badge-glow: rgba(99, 102, 241, 0.2);
}

[data-accent="emerald"] {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.35);
    --border-focus: #34d399;
    --badge-glow: rgba(16, 185, 129, 0.2);
}

[data-accent="amber"] {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.35);
    --border-focus: #fbbf24;
    --badge-glow: rgba(245, 158, 11, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
p,
a,
span,
h1, h2, h3, h4, h5, h6,
.markdown-body,
.markdown-body p,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body li,
.markdown-body blockquote,
.markdown-body div,
.author-card,
.forum-card,
button,
input,
select,
textarea {
    font-family: var(--app-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

code,
pre,
pre code,
.markdown-body pre,
.markdown-body code,
.markdown-body pre *,
.markdown-body code *,
.font-mono {
    font-family: var(--mono-font) !important;
    direction: ltr !important;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Glassmorphism & Cyber Tech Header */
.forum-nav {
    background-color: var(--surface-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: all 0.25s ease;
    padding: 0.65rem 0 !important;
}

[data-theme="light"] .forum-nav {
    background-color: var(--surface-glass);
    border-bottom-color: var(--border-subtle);
}

.forum-nav .nav-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.forum-nav .nav-link-pill:hover {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.08);
}

.forum-nav .nav-link-pill.active {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.12);
    font-weight: 700;
}

[data-theme="dark"] .forum-nav .nav-link-pill {
    color: #94a3b8;
}

[data-theme="dark"] .forum-nav .nav-link-pill:hover {
    color: #818cf8;
    background-color: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .forum-nav .nav-link-pill.active {
    color: #818cf8;
    background-color: rgba(99, 102, 241, 0.2);
}

.forum-nav .btn-nav-action {
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap !important;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 1;
}

.forum-nav .btn-cyber-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    white-space: nowrap !important;
}

.forum-nav .btn-cyber-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.forum-nav .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.forum-nav .lang-switch-btn {
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1;
}

.forum-nav .avatar-frame {
    width: 36px;
    height: 36px;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.forum-nav .avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-card {
    background-color: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.forum-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(99, 102, 241, 0.12);
}

/* Luxury Cyber Tech Badges */
.badge-architect {
    background: linear-gradient(135deg, #7c3aed, #4f46e5 50%, #2563eb);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.45);
    border: 1px solid rgba(199, 210, 254, 0.35);
}

.badge-moderator {
    background: linear-gradient(135deg, #0d9488, #059669 60%, #10b981);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(167, 243, 208, 0.35);
}

.badge-specialist {
    background: linear-gradient(135deg, #d97706, #f59e0b 60%, #ea580c);
    color: #0b0f19;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
    border: 1px solid rgba(254, 240, 138, 0.5);
}

.badge-coredev {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
    border: 1px solid rgba(186, 230, 253, 0.35);
}

/* Avatar Holographic Ring */
.avatar-frame {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    padding: 3px;
}

.avatar-frame.ring-architect,
.avatar-frame.ring-admin {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.avatar-frame.ring-moderator {
    background: linear-gradient(135deg, #14b8a6, #10b981);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.5);
}

.avatar-frame.ring-specialist,
.avatar-frame.ring-expert {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.avatar-frame.ring-coredev,
.avatar-frame.ring-core_dev {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.avatar-frame.ring-member {
    background: var(--border-subtle);
}

.avatar-img {
    border-radius: 50%;
    display: block;
    object-fit: cover;
    background-color: var(--surface-muted);
}

/* Syntax Highlight Code Card Styling */
.markdown-body pre,
pre {
    background-color: #0b0f19 !important;
    color: #f1f5f9 !important;
    border: 1px solid #1e293b !important;
    border-radius: 14px !important;
    padding: 1.4rem 1.6rem !important;
    margin: 1.8rem 0 !important;
    position: relative !important;
    overflow-x: auto !important;
    direction: ltr !important;
    text-align: left !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.markdown-body pre code,
pre code {
    background-color: transparent !important;
    color: #f1f5f9 !important;
    font-family: var(--mono-font) !important;
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
    white-space: pre !important;
    word-spacing: normal !important;
    word-break: normal !important;
    tab-size: 4 !important;
    direction: ltr !important;
    text-align: left !important;
}

.copy-code-btn {
    position: absolute;
    top: 12px;
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

[dir="rtl"] .copy-code-btn {
    left: 12px;
    right: auto;
}

[dir="ltr"] .copy-code-btn {
    right: 12px;
    left: auto;
}

.copy-code-btn:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    transform: translateY(-1px);
}

/* High-Definition Markdown Reader & Typography */
.markdown-body {
    font-size: 1.15rem !important;
    line-height: 2.1 !important;
    color: var(--text-main) !important;
}

[dir="rtl"] .markdown-body,
[dir="rtl"] .markdown-body p,
[dir="rtl"] .markdown-body h1,
[dir="rtl"] .markdown-body h2,
[dir="rtl"] .markdown-body h3,
[dir="rtl"] .markdown-body h4,
[dir="rtl"] .markdown-body ul,
[dir="rtl"] .markdown-body ol,
[dir="rtl"] .markdown-body li,
[dir="rtl"] .markdown-body blockquote {
    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

[dir="ltr"] .markdown-body,
[dir="ltr"] .markdown-body p,
[dir="ltr"] .markdown-body h1,
[dir="ltr"] .markdown-body h2,
[dir="ltr"] .markdown-body h3,
[dir="ltr"] .markdown-body h4,
[dir="ltr"] .markdown-body ul,
[dir="ltr"] .markdown-body ol,
[dir="ltr"] .markdown-body li,
[dir="ltr"] .markdown-body blockquote {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

/* Bi-directional Content Auto-Alignment (Universal Auto-Detection) */
/* When in RTL mode, auto-align LTR content (English paragraphs, quotes, list items) to the left */
[dir="rtl"] .markdown-body :is(p, li, blockquote, h1, h2, h3, h4):dir(ltr) {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
}

/* When in LTR mode, auto-align RTL content (Arabic paragraphs, quotes, list items, headings) to the right with correct BiDi punctuation */
[dir="ltr"] .markdown-body :is(p, li, blockquote, h1, h2, h3, h4):dir(rtl) {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: isolate !important;
}

/* Code blocks and pre tags must strictly always be LTR and aligned left */
.markdown-body pre,
.markdown-body pre code,
.markdown-body code {
    direction: ltr !important;
    text-align: left !important;
}

bdi {
    display: inline-block;
    unicode-bidi: isolate;
}

.markdown-body > h1:first-child,
.markdown-body h1:first-of-type {
    display: none !important;
}

.markdown-body p {
    font-size: 1.15rem !important;
    line-height: 2.1 !important;
    margin-bottom: 1.6rem !important;
    color: var(--text-main) !important;
}

.markdown-body strong, .markdown-body b {
    color: var(--text-main) !important;
    font-weight: 800 !important;
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3, 
.markdown-body h4 {
    font-weight: 800 !important;
    color: var(--text-main) !important;
    margin-top: 2.4rem !important;
    margin-bottom: 1.1rem !important;
    letter-spacing: -0.01em;
}

.markdown-body h1 {
    font-size: 2.1rem !important;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 0.75rem;
}

.markdown-body h2 {
    font-size: 1.65rem !important;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.6rem;
    color: var(--primary) !important;
}

[data-theme="dark"] .markdown-body h2 {
    color: #818cf8 !important;
}

.markdown-body h3 {
    font-size: 1.35rem !important;
}

.markdown-body ul, .markdown-body ol {
    font-size: 1.125rem !important;
    line-height: 2.1 !important;
    margin-bottom: 1.6rem !important;
    padding-inline-start: 2rem !important;
    color: var(--text-main) !important;
}

.markdown-body li {
    margin-bottom: 0.6rem !important;
}

/* Quotes & Highlighted Summary Cards */
.markdown-body blockquote {
    border-inline-start: 4px solid var(--primary) !important;
    border-inline-end: 0 !important;
    padding: 1.25rem 1.6rem !important;
    margin: 1.8rem 0 !important;
    background: rgba(99, 102, 241, 0.08) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    font-size: 1.05rem !important;
    line-height: 2 !important;
    font-style: normal !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .markdown-body blockquote {
    background: rgba(99, 102, 241, 0.14) !important;
    border-color: #818cf8 !important;
    color: #e2e8f0 !important;
}

.markdown-body blockquote p {
    margin-bottom: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    font-style: normal !important;
}

.markdown-body hr {
    border: 0;
    height: 1px;
    background: var(--border-subtle);
    margin: 2.5rem 0 !important;
    opacity: 0.8;
}

/* High-Contrast Technical Pill Tags (Inline Code) */
.markdown-body :not(pre) > code {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #4f46e5 !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 6px !important;
    font-size: 0.92em !important;
    font-family: var(--mono-font) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    font-weight: 700 !important;
    display: inline-block;
    direction: ltr !important;
    vertical-align: middle;
}

[data-theme="dark"] .markdown-body :not(pre) > code {
    background: rgba(99, 102, 241, 0.22) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* Action Buttons */
.btn-cyber-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-cyber-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.forum-brand-name {
    color: var(--text-main) !important;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    background-color: var(--surface);
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-switch-btn:hover {
    background-color: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary);
}

[data-theme="dark"] .lang-switch-btn {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--surface-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-main) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: rgba(99, 102, 241, 0.15) !important;
    color: var(--primary) !important;
}

[data-theme="dark"] .dropdown-item.active {
    background-color: rgba(99, 102, 241, 0.25) !important;
    color: #818cf8 !important;
    font-weight: 700;
}

/* High Contrast Muted Texts in Forum Dark Mode */
[data-theme="dark"] .text-muted,
[data-theme="dark"] p.text-muted,
[data-theme="dark"] span.text-muted,
[data-theme="dark"] div.text-muted {
    color: #cbd5e1 !important;
}

/* ==========================================================================
   Theme Toggle Button & Pure CSS Icon Switcher (Zero-Lag Synchronization)
   ========================================================================== */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background-color: var(--surface);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

.theme-toggle-btn:hover {
    background-color: var(--surface-muted);
    border-color: var(--border-focus);
    color: var(--primary);
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.08);
}

.theme-icon-sun, .theme-icon-moon {
    font-size: 1rem;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .theme-icon-sun {
    display: inline-block !important;
    color: #f59e0b;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none !important;
}

html:not([data-theme="dark"]) .theme-icon-sun,
html[data-theme="light"] .theme-icon-sun {
    display: none !important;
}

html:not([data-theme="dark"]) .theme-icon-moon,
html[data-theme="light"] .theme-icon-moon {
    display: inline-block !important;
    color: #64748b;
}

/* ==========================================================================
   Forum Call-to-Action Executive Conversion Banner (Dual-Mode Responsive)
   ========================================================================== */
.forum-cta-banner {
    position: relative;
    border-radius: 1.25rem !important;
    overflow: hidden;
    margin: 3rem 0;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #131d33 0%, #0f172a 60%, #0b1120 100%);
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

.forum-cta-banner .cta-glow {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}

.forum-cta-banner .cta-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
}

.forum-cta-banner .cta-badge i {
    color: #818cf8;
}

.forum-cta-banner .cta-title {
    color: #ffffff;
}

.forum-cta-banner .cta-desc {
    color: #cbd5e1;
}

.forum-cta-banner .btn-cta-secondary {
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: transparent;
}

.forum-cta-banner .btn-cta-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

/* Light Mode & Corporate Light: Luxury Executive Pearl Slate with Sapphire Highlights */
[data-theme="light"] .forum-cta-banner,
[data-bs-theme="light"] .forum-cta-banner,
[data-theme-style="corporate-light"] .forum-cta-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #f1f5f9 100%) !important;
    border: 1px solid rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 10px 30px -4px rgba(37, 99, 235, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .forum-cta-banner .cta-glow,
[data-bs-theme="light"] .forum-cta-banner .cta-glow,
[data-theme-style="corporate-light"] .forum-cta-banner .cta-glow {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, transparent 70%) !important;
}

[data-theme="light"] .forum-cta-banner .cta-badge,
[data-bs-theme="light"] .forum-cta-banner .cta-badge,
[data-theme-style="corporate-light"] .forum-cta-banner .cta-badge {
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.25) !important;
    color: #2563eb !important;
}

[data-theme="light"] .forum-cta-banner .cta-badge i,
[data-bs-theme="light"] .forum-cta-banner .cta-badge i,
[data-theme-style="corporate-light"] .forum-cta-banner .cta-badge i {
    color: #2563eb !important;
}

[data-theme="light"] .forum-cta-banner .cta-title,
[data-bs-theme="light"] .forum-cta-banner .cta-title,
[data-theme-style="corporate-light"] .forum-cta-banner .cta-title {
    color: #0f172a !important;
}

[data-theme="light"] .forum-cta-banner .cta-desc,
[data-bs-theme="light"] .forum-cta-banner .cta-desc,
[data-theme-style="corporate-light"] .forum-cta-banner .cta-desc {
    color: #475569 !important;
}

[data-theme="light"] .forum-cta-banner .btn-cta-secondary,
[data-bs-theme="light"] .forum-cta-banner .btn-cta-secondary,
[data-theme-style="corporate-light"] .forum-cta-banner .btn-cta-secondary {
    color: #2563eb !important;
    border: 1px solid rgba(37, 99, 235, 0.35) !important;
    background-color: transparent !important;
}

[data-theme="light"] .forum-cta-banner .btn-cta-secondary:hover,
[data-bs-theme="light"] .forum-cta-banner .btn-cta-secondary:hover,
[data-theme-style="corporate-light"] .forum-cta-banner .btn-cta-secondary:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

/* Helpful Vote Button Micro-interactions */
.helpful-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.helpful-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

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


