/* ==============================================================================
   OXIN RolePlay Forum - assets/css/oxin-style.css
   UI Theme 2026: Cyber Neon, Glassmorphism, 100% Offline, Ultra-High Contrast
   Fully Responsive (Mobile, Tablet, Desktop, Ultra-Wide) - Zero CDN Dependencies
   Mobile-First & Pixel-Perfect Precision Architecture
   ============================================================================== */

/* ------------------------------------------------------------------------------
   1. Font Faces (Local & Offline Vazirmatn - 100% Self-Hosted)
   ------------------------------------------------------------------------------ */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazir/Vazirmatn-Regular.woff2') format('woff2'),
         url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazir/Vazirmatn-Bold.woff2') format('woff2'),
         url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ------------------------------------------------------------------------------
   2. Root Variables (WCAG AAA High-Contrast & Cyberpunk Theme)
   ------------------------------------------------------------------------------ */
:root {
    /* Background Hierarchy */
    --bg-base: #06040a;
    --bg-surface: rgba(18, 14, 30, 0.95);
    --bg-surface-hover: rgba(34, 25, 56, 0.98);
    --bg-card: rgba(22, 16, 38, 0.9);
    --bg-card-secondary: #130e22;
    --bg-glass: rgba(255, 255, 255, 0.05);

    /* Borders & Glows */
    --border-subtle: rgba(168, 85, 247, 0.35);
    --border-glow: rgba(192, 132, 252, 0.85);
    --border-highlight: rgba(255, 255, 255, 0.18);

    /* Neon Brand Colors */
    --primary-neon: #a855f7;
    --primary-glow: #9333ea;
    --secondary-neon: #38bdf8;
    --accent-cyan: #22d3ee;
    --accent-amber: #fbbf24;
    --accent-emerald: #10b981;
    --accent-rose: #ef4444;

    /* VIP Gold Flair */
    --vip-gold: #fbbf24;
    --vip-glow: rgba(251, 191, 36, 0.65);

    /* High-Contrast Typography */
    --text-pure: #ffffff;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-neon: 0 0 25px rgba(168, 85, 247, 0.45);
    --shadow-card: 0 12px 35px -10px rgba(0, 0, 0, 0.85);

    /* Layout Dimensions */
    --mobile-nav-height: 62px;
}

/* ------------------------------------------------------------------------------
   3. Base & Reset
   ------------------------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-base);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(125, 42, 232, 0.28) 0%, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 55%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Vazirmatn', 'Shabnam', 'IRANSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Tahoma, sans-serif;
    letter-spacing: -0.2px;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.75;
    padding-bottom: 0;
}

::selection {
    background: var(--primary-neon);
    color: #ffffff;
}

/* ------------------------------------------------------------------------------
   4. Custom Scrollbars
   ------------------------------------------------------------------------------ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #090712;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-neon), var(--secondary-neon));
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #c084fc;
}

/* ------------------------------------------------------------------------------
   5. Utility Classes & Typography (High-Contrast Guaranteed)
   ------------------------------------------------------------------------------ */
.hover-light {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.hover-light:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.text-break-all {
    word-break: break-word;
    overflow-wrap: break-word;
}

.text-muted, .text-secondary {
    color: var(--text-muted) !important;
}

.small-light-text {
    color: #f8fafc !important;
}

@media (min-width: 768px) {
    .border-end-md {
        border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    }
}

/* 5-Column Grid Layout */
.rp-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .rp-action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .rp-action-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .col-lg-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (min-width: 1200px) {
    .col-xl-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (max-width: 767.98px) {
    .rp-action-grid > *:last-child {
        grid-column: 1 / -1;
    }
}

.rp-action-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 54px;
}

.rp-action-card:hover {
    background: var(--bg-surface-hover) !important;
    border-color: var(--primary-neon) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

/* VIP Account Avatar Halo */
.vip-avatar-glow {
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.7), 0 0 12px rgba(245, 158, 11, 0.9) !important;
    border-color: #fbbf24 !important;
}

/* ------------------------------------------------------------------------------
   6. Header, Top Bar & Navigation
   ------------------------------------------------------------------------------ */
.oxin-navbar {
    background: rgba(14, 10, 26, 0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    padding: 10px 0;
    transition: all 0.3s ease;
}

.oxin-brand {
    font-weight: 800;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 20%, #d8b4fe 60%, var(--secondary-neon) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.server-badge {
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.55);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    font-size: 0.88rem;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    min-height: 38px;
}

.server-badge:hover {
    background: rgba(168, 85, 247, 0.35);
    border-color: var(--primary-neon);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    transform: translateY(-1px);
}

.status-dot {
    width: 9px;
    height: 9px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: serverStatusPulse 2s infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes serverStatusPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ------------------------------------------------------------------------------
   7. Mobile Bottom Navigation Bar (App-like Dock)
   ------------------------------------------------------------------------------ */
.oxin-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(14, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 10000;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.85);
}

.oxin-mobile-nav-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--mobile-nav-height);
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 4px 0;
    position: relative;
}

.mobile-nav-link .oxin-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: #ffffff !important;
}

.mobile-nav-link.active .oxin-icon {
    color: var(--primary-neon) !important;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8));
}

.mobile-nav-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(8px);
    background: var(--accent-rose);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    border: 1px solid #0e0a1a;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* ------------------------------------------------------------------------------
   8. Gaming Hero Banner
   ------------------------------------------------------------------------------ */
.gaming-hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(42, 26, 76, 0.92), rgba(20, 14, 38, 0.97));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 30px 34px;
    margin-bottom: 26px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card), 0 0 24px rgba(168, 85, 247, 0.2);
}

.gaming-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.88rem, 1.5vw, 0.98rem);
    max-width: 680px;
    line-height: 1.8;
}

/* ------------------------------------------------------------------------------
   9. Forum Category Cards, Collapsible Headers & Rows
   ------------------------------------------------------------------------------ */
.forum-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 22px;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.forum-category-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card), 0 0 25px rgba(168, 85, 247, 0.22);
}

.forum-category-header {
    background: linear-gradient(90deg, rgba(126, 34, 206, 0.85) 0%, rgba(46, 28, 82, 0.7) 100%);
    border-bottom: 1px solid var(--border-highlight);
    color: #ffffff;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.category-collapse-body {
    transition: max-height 0.35s ease, opacity 0.25s ease;
    overflow: hidden;
}

.category-collapse-body.is-collapsed,
.category-collapse-body.collapsed {
    display: none !important;
}

.category-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-toggle-icon.is-collapsed,
.category-toggle-icon.rotated {
    transform: rotate(180deg);
}

.forum-row {
    background: rgba(22, 17, 36, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.forum-row:last-child {
    border-bottom: none;
}

.forum-row:hover {
    background: var(--bg-surface-hover);
    transform: translateX(-4px);
}

.forum-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(168, 85, 247, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f3e8ff;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.forum-row:hover .forum-icon-box {
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
    color: #ffffff;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
    transform: scale(1.05);
}

.forum-title-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.forum-title-link:hover {
    color: #d8b4fe;
}

/* Subforums Hierarchy Styling */
.subforums-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-right: 4px;
}

.subforum-chip {
    background: rgba(14, 10, 24, 0.85);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.subforum-chip:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: var(--primary-neon);
    color: #ffffff;
    transform: translateY(-1px);
}

.forum-stats-pill {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
}

.forum-stats-pill strong {
    color: #ffffff;
    font-size: 1.05rem;
}

/* ------------------------------------------------------------------------------
   10. Sidebar & Statistics Widgets
   ------------------------------------------------------------------------------ */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
    transition: border-color 0.25s ease;
}

.sidebar-widget:hover {
    border-color: rgba(168, 85, 247, 0.55);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-value {
    color: #ffffff;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.28);
    padding: 3px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(168, 85, 247, 0.55);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    line-height: 1.4;
}

.online-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 600;
    background: rgba(22, 17, 36, 0.95);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    transition: all 0.25s ease;
    text-decoration: none;
}

.online-user-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.5);
}

/* ------------------------------------------------------------------------------
   11. Buttons & Interactive Controls (Touch-Friendly min-height: 42px)
   ------------------------------------------------------------------------------ */
.btn-oxin {
    background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-glow) 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 4px 18px rgba(147, 51, 234, 0.45);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    min-height: 42px;
}

.btn-oxin:hover {
    background: linear-gradient(135deg, #c084fc 0%, var(--primary-neon) 100%);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.7);
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    min-height: 42px;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.oxin-icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.22em;
    fill: currentColor;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------------------
   12. Forms & Form Inputs
   ------------------------------------------------------------------------------ */
.form-control,
.form-select {
    background-color: rgba(22, 17, 36, 0.94) !important;
    color: #ffffff !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(34, 26, 56, 0.98) !important;
    border-color: var(--primary-neon) !important;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.5) !important;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

/* RTL Form-Select Arrow Fix */
.form-select {
    background-position: left 0.75rem center !important;
    padding-left: 2.25rem !important;
    padding-right: 0.75rem !important;
}

/* ------------------------------------------------------------------------------
   13. Table Glassmorphism & Micro-Typography
   ------------------------------------------------------------------------------ */
.table-dark {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-hover-bg: rgba(168, 85, 247, 0.08) !important;
    color: var(--text-secondary) !important;
}

/* ------------------------------------------------------------------------------
   14. Post Typography, BBCode, Spoilers, Quotes & Code Blocks
   ------------------------------------------------------------------------------ */
blockquote,
.post-quote,
.rendered-quote-box {
    background: rgba(14, 10, 24, 0.8);
    border-right: 4px solid var(--primary-neon);
    padding: 14px 18px;
    margin: 14px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #f1f5f9;
    font-style: italic;
    line-height: 1.8;
}

pre,
code,
.rendered-code-box code {
    font-family: Consolas, 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

code {
    background: rgba(168, 85, 247, 0.15);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(168, 85, 247, 0.25);
    font-size: 0.9em;
}

.chat-code {
    background: rgba(14, 10, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, monospace;
    direction: ltr;
    display: inline-block;
}

/* Code Container with Copy Action */
.code-block-container {
    background: rgba(10, 7, 18, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.rendered-spoiler-box {
    background: rgba(18, 14, 30, 0.9);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 10px 0;
}

.rendered-spoiler-box summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--secondary-neon);
    user-select: none;
}

/* User Mentions Badges */
.mention-tag,
.chat-mention-tag,
.tg-mention-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    margin: 0 2px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8 !important;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none !important;
    transition: all 0.15s ease;
    cursor: pointer;
}

.mention-tag:hover,
.chat-mention-tag:hover,
.tg-mention-badge:hover {
    background: rgba(56, 189, 248, 0.4);
    color: #ffffff !important;
    transform: scale(1.05);
}

.tg-mention-badge.tg-mention-me {
    background: rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
    color: #fbbf24 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Mention Dropdown Popover */
.tg-mention-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    right: 12px;
    left: 12px;
    max-height: 230px;
    overflow-y: auto;
    background: rgba(18, 14, 32, 0.98);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 14px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1050;
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
}

.tg-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #f8fafc;
    user-select: none;
}

.tg-mention-item:hover, .tg-mention-item.active {
    background: rgba(168, 85, 247, 0.25);
    color: #ffffff;
}

.tg-mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------------------------
   15. Breadcrumbs Modern Glass Scroller
   ------------------------------------------------------------------------------ */
.oxin-breadcrumb {
    background: rgba(22, 17, 36, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem;
}

.oxin-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.oxin-breadcrumb a:hover {
    color: var(--primary-neon);
}

.oxin-breadcrumb-separator {
    color: #64748b;
    user-select: none;
}

/* ------------------------------------------------------------------------------
   16. OxinUI Notification Engine: Toasts & Modal Dialogs
   ------------------------------------------------------------------------------ */
.oxin-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.oxin-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    background: rgba(22, 17, 36, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    animation: oxinToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.oxin-toast.toast-success {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.3);
}

.oxin-toast.toast-error {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(239, 68, 68, 0.3);
}

.oxin-toast.toast-info {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.3);
}

@keyframes oxinToastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* OxinUI Modal Dialog */
.oxin-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 4, 10, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.25s ease;
}

.oxin-modal-box {
    background: rgba(22, 17, 36, 0.98);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 28px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(168, 85, 247, 0.35);
    animation: oxinModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: right;
}

@keyframes oxinModalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ------------------------------------------------------------------------------
   17. Unified Telegram 2026 Chat & Media Engine (Zero-Leak Solid Backgrounds)
   ------------------------------------------------------------------------------ */
.chat-app-card,
.tg-chat-app-card,
.embedded-tg-chat-card {
    height: calc(100vh - 120px);
    min-height: 560px;
    border: 1px solid var(--border-subtle);
    background: #0d0818 !important; /* رنگ سالید و کدر جهت پیشگیری از نشت پس‌زمینه */
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 45px rgba(0, 0, 0, 0.92);
    display: flex;
    position: relative;
    z-index: 5;
}

.chat-stream-viewport,
.tg-stream-container,
.embedded-tg-stream {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #0a0614 !important; /* رنگ سالید تیره */
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.dm-row-wrapper,
.tg-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    position: relative;
    padding: 2px 0;
    transition: background-color 0.4s ease;
}

.dm-row-mine,
.tg-msg-mine {
    justify-content: flex-end;
    flex-direction: row;
}

.dm-row-other,
.tg-msg-other {
    justify-content: flex-start;
    flex-direction: row;
}

.dm-bubble-box,
.tg-bubble {
    max-width: 74%;
    min-width: 120px;
    position: relative;
    border-radius: 18px;
    padding: 10px 14px 6px 14px;
    word-break: break-word;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
    cursor: pointer;
    user-select: text;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dm-bubble-mine,
.tg-bubble-mine {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.58), rgba(126, 34, 206, 0.8));
    border: 1px solid rgba(192, 132, 252, 0.6);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

.dm-bubble-other,
.tg-bubble-other {
    background: rgba(26, 20, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    border-bottom-right-radius: 4px;
}

.dm-bubble-box:has(.chat-media-embed),
.tg-bubble:has(.chat-media-embed) {
    padding: 6px 6px 6px 6px !important;
}

/* Media Cards & Strict Iframe Constraints */
.chat-media-embed {
    width: 100%;
    min-width: 200px;
    max-width: 460px;
    border-radius: 12px;
    overflow: hidden;
}

.chat-embedded-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: zoom-in;
    transition: transform 0.2s ease;
    display: block;
    border-radius: 10px;
}
.chat-embedded-img:hover { transform: scale(1.02); }

.chat-embedded-video {
    width: 100%;
    max-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: block;
    border-radius: 10px;
    background: #000000;
}

.chat-media-iframe-box {
    width: 100%;
    max-width: 480px;
    max-height: 280px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #000000;
}
.chat-media-iframe-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    max-height: 280px;
}

/* Lightbox Modal */
.chat-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 2, 8, 0.94);
    backdrop-filter: blur(16px);
    z-index: 10999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}
.chat-lightbox-overlay.active {
    display: flex;
}
.chat-lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 10px 45px rgba(0,0,0,0.9);
    cursor: default;
}

/* ------------------------------------------------------------------------------
   18. Admin Control Center, Navigation Scroller & Audit Logging
   ------------------------------------------------------------------------------ */
.admin-nav-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.admin-nav-scroller::-webkit-scrollbar {
    display: none;
}
.admin-nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 42px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-nav-btn:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}
.stat-card-glow {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.stat-card-glow:hover {
    transform: translateY(-3px);
    border-color: var(--primary-neon) !important;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.25);
}
.badge-perm {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    margin: 2px;
    display: inline-block;
    font-weight: 600;
}
.log-tab-btn {
    border-radius: var(--radius-sm);
    min-height: 42px;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.log-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-neon), var(--primary-glow)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.45);
}
.log-action-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: -0.2px;
}
.log-details-container {
    background: rgba(14, 10, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: #cbd5e1;
    font-family: Consolas, 'Courier New', monospace;
    direction: ltr;
    text-align: left;
    max-height: 220px;
    overflow-y: auto;
    word-break: break-all;
}
.founder-vault-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(26, 18, 44, 0.96)) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.18) !important;
}

/* ------------------------------------------------------------------------------
   19. Responsive Media Queries (Mobile, Tablet, Desktop, Ultra-Wide)
   ------------------------------------------------------------------------------ */

/* A. Tablets & Small Desktops (<= 991px) */
@media (max-width: 991.98px) {
    .gaming-hero-banner {
        padding: 24px;
    }
    .hero-title {
        font-size: 1.45rem;
    }
    .forum-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .forum-stats-pill {
        align-self: flex-start;
        min-width: 100%;
        text-align: right;
    }
    .conversations-scroll {
        max-height: 380px !important;
    }
}

/* B. Mobile Landscape & Portrait (<= 767.98px) */
@media (max-width: 767.98px) {
    body {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 14px) !important;
    }
    .oxin-mobile-bottom-nav {
        display: block !important;
    }

    /* Fixed Fullscreen Chat Room on Mobile */
    .chat-app-card,
    .tg-chat-app-card,
    body.faction-chat-mobile-fullscreen .embedded-tg-chat-card {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: calc(100dvh - 60px) !important;
        max-height: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        z-index: 1030 !important;
        background: #0d0818 !important;
    }

    body.faction-chat-mobile-fullscreen,
    body:has(.chat-app-card),
    body:has(.tg-chat-app-card) {
        padding-bottom: 0 !important;
        overflow: hidden !important;
    }

    body:has(.chat-app-card) .oxin-mobile-bottom-nav,
    body:has(.tg-chat-app-card) .oxin-mobile-bottom-nav,
    body:has(.chat-app-card) footer.footer,
    body:has(.tg-chat-app-card) footer.footer {
        display: none !important;
    }

    .col-md-3.col-xl-2.text-center.border-start,
    .col-md-3.col-xl-2.p-3.p-lg-4.text-center.border-start {
        border-left: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: right !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        background: rgba(14, 10, 24, 0.92) !important;
    }

    .col-md-3.col-xl-2 .position-relative.d-inline-block.mb-3 {
        margin-bottom: 0 !important;
    }

    .col-md-3.col-xl-2 img.rounded-circle {
        width: 48px !important;
        height: 48px !important;
    }

    .col-md-3.col-xl-2 .pt-2.border-top {
        display: none !important;
    }

    .col-md-3.col-xl-2 .badge {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
    }

    .server-badge {
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    .gaming-hero-banner {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .d-flex.flex-wrap.gap-2 .btn-oxin,
    .d-flex.flex-wrap.gap-2 .btn-glass {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .table-responsive {
        border-radius: var(--radius-sm);
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .admin-actions-cell {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 120px;
    }
    .admin-actions-cell .btn {
        width: 100%;
        justify-content: center;
        min-height: 38px;
    }
    .hero-admin-bar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .hero-admin-bar .badge {
        align-self: flex-start;
    }
    .quick-actions-flex {
        flex-direction: column;
        width: 100%;
    }
    .quick-actions-flex .btn {
        width: 100%;
        justify-content: center;
    }
}

/* C. Extra Small Devices & Compact Smartphones (<= 575.98px) */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.25rem;
    }
    .hero-subtitle {
        font-size: 0.84rem;
        line-height: 1.7;
    }
    .btn-oxin,
    .btn-glass {
        width: 100%;
        justify-content: center;
    }
    .oxin-toast-container {
        left: 10px;
        right: 10px;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
    }
    .oxin-toast {
        min-width: 100%;
        max-width: 100%;
    }
    .forum-category-header {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    .forum-row {
        padding: 14px;
    }
    .forum-icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    .oxin-breadcrumb {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .tg-floating-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100vw !important;
        min-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        padding: 16px 20px !important;
        animation: tgBottomSheetUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }
}

@keyframes tgBottomSheetUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* D. Ultra-Wide Screens (>= 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1340px;
    }
    .hero-title {
        font-size: 2.1rem;
    }
}