/* ========================================
   NEXUS HUB - MyBB Dark Theme
   Future-proof CSS targeting MyBB classes
   ======================================== */

/* Nexus Hub - Premium GitHub Dark Theme */
:root {
    /* Dark Theme Colors - GitHub Inspired */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #22272e;
    --bg-border: #30363d;
    
    /* Accent Colors - Refined & Professional */
    --accent-primary: #58a6ff;
    --accent-secondary: #79c0ff;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --accent-danger: #f85149;
    --accent-purple: #bc8cff;
    
    /* Subtle Glows */
    --glow-primary: rgba(88, 166, 255, 0.15);
    --glow-secondary: rgba(188, 140, 255, 0.12);
    
    /* Text Colors */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

/* Premium Glassmorphism Effect */
.glass {
    background: linear-gradient(135deg, 
        var(--bg-card) 0%, 
        var(--bg-secondary) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid var(--bg-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, 
        rgba(88, 166, 255, 0.03) 0%, 
        transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass:hover::before {
    opacity: 1;
}

[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #d0d7de;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--glow-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--glow-primary);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* XP Progress Bar */
.xp-bar {
    position: relative;
    overflow: hidden;
}

.xp-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Hover Effects */
.card-interactive {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-interactive:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 
                0 0 40px rgba(88, 166, 255, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Dropdown & Popout Styles */
.dropdown-container {
    position: relative;
    z-index: 100;
}

.dropdown-menu,
.popout-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: linear-gradient(135deg, 
        var(--bg-card) 0%, 
        var(--bg-secondary) 100%);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.dropdown-menu.active,
.popout-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-border);
    background: var(--bg-secondary);
}

.dropdown-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-border);
    transition: background 0.15s ease;
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--bg-border);
    background: var(--bg-secondary);
    text-align: center;
}

.dropdown-footer a {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.dropdown-footer a:hover {
    opacity: 0.8;
}

/* User Dropdown Specific */
.user-dropdown {
    min-width: 240px;
}

.user-info {
    padding: 16px;
    border-bottom: 1px solid var(--bg-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--bg-border);
}

.user-details h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.user-details p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.menu-item i {
    width: 18px;
    color: var(--text-secondary);
    font-size: 14px;
}

.menu-item:hover {
    background: linear-gradient(90deg, 
        rgba(88, 166, 255, 0.08) 0%, 
        var(--bg-secondary) 100%);
}

.menu-item.danger {
    color: var(--accent-danger);
}

.menu-item.danger i {
    color: var(--accent-danger);
}

.menu-divider {
    height: 1px;
    background: var(--bg-border);
    margin: 4px 0;
}

/* Notification Specific */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-border);
    transition: background 0.15s ease;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 0%, 
        rgba(88, 166, 255, 0.05) 50%, 
        var(--bg-secondary) 100%);
}

.notification-item.unread {
    background: rgba(88, 166, 255, 0.05);
}

.notification-item.unread:hover {
    background: rgba(88, 166, 255, 0.08);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-icon.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-success);
}

.notification-icon.info {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-primary);
}

.notification-icon.warning {
    background: rgba(217, 153, 34, 0.15);
    color: var(--accent-warning);
}

.notification-icon.danger {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-danger);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content h5 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notification-badge {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, 
        var(--bg-card) 0%, 
        var(--bg-secondary) 50%, 
        var(--bg-primary) 100%);
    border: none;
    border-bottom: 1px solid var(--bg-border);
    padding: 32px 0;
    margin: -24px 0 24px 0;
    position: relative;
    z-index: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, 
        rgba(88, 166, 255, 0.08) 0%, 
        transparent 50%),
        radial-gradient(ellipse at bottom left, 
        rgba(188, 140, 255, 0.05) 0%, 
        transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-header .header-content {
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.header-text {
    flex: 1;
    min-width: 280px;
}

.header-greeting {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.header-greeting .user-name {
    color: var(--accent-primary);
}

.header-greeting .wave {
    display: inline-block;
    animation: wave 2.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
}

.header-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-success);
}

.header-badge i {
    font-size: 12px;
}

.header-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.header-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, 
        var(--bg-secondary) 0%, 
        var(--bg-card) 100%);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    min-width: 100px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.header-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(88, 166, 255, 0.08) 0%, 
        transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-stat-item:hover::before {
    opacity: 1;
}

.header-stat-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.header-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.header-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 6px 0 0 0;
}

/* Header Toggle Button */
.header-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header-toggle-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
}

/* Header Layouts */
.header-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.header-compact {
    width: 100%;
}

.header-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.header-stat-icon.primary {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-primary);
}

.header-stat-icon.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-success);
}

.header-stat-icon.warning {
    background: rgba(217, 153, 34, 0.15);
    color: var(--accent-warning);
}

.header-stat-icon.purple {
    background: rgba(188, 140, 255, 0.15);
    color: var(--accent-purple);
}

/* Quick Action Buttons in Header */
.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.header-action-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.header-action-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.header-action-btn.primary:hover {
    opacity: 0.9;
    background: var(--accent-primary);
}

.header-action-btn i {
    font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 24px 0;
    }
    
    .header-greeting {
        font-size: 22px;
    }
    
    .header-content {
        gap: 16px;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-stat-item {
        flex: 1;
        min-width: auto;
        padding: 10px 12px;
    }
    
    .header-stat-value {
        font-size: 20px;
    }
}

/* ===================================
   SIDEBAR COMPONENT STYLES
   =================================== */

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, 
        var(--bg-secondary) 0%, 
        var(--bg-primary) 100%);
    border-right: 1px solid var(--bg-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.active {
    left: 0;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--bg-border);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* User Section */
.sidebar-user-section {
    padding: 24px 20px;
    border-bottom: 1px solid var(--bg-border);
    background: linear-gradient(135deg, 
        rgba(88, 166, 255, 0.05) 0%, 
        rgba(188, 140, 255, 0.05) 100%);
}

.sidebar-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 16px var(--glow-primary);
    margin: 0 auto 12px;
    position: relative;
}

.user-status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: var(--accent-success);
    border: 2px solid var(--bg-secondary);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

.sidebar-user-info {
    text-align: center;
}

.sidebar-user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.sidebar-user-level {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

/* XP Bar */
.sidebar-user-xp {
    margin-top: 12px;
}

.xp-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--accent-primary) 0%, 
        var(--accent-secondary) 100%);
    border-radius: 3px;
    position: relative;
    transition: width 0.5s ease;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s linear infinite;
}

.xp-text {
    font-size: 11px;
    color: var(--text-muted);
    margin: 6px 0 0 0;
    text-align: center;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-nav-group {
    margin-bottom: 24px;
}

.sidebar-nav-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 20px;
    margin: 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.sidebar-nav-item span:first-of-type {
    flex: 1;
}

.sidebar-nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-nav-item:hover i {
    transform: scale(1.1);
    color: var(--accent-primary);
}

.sidebar-nav-item.active {
    background: linear-gradient(90deg, 
        rgba(88, 166, 255, 0.15) 0%, 
        transparent 100%);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
    padding-left: 17px;
}

.sidebar-nav-item.active i {
    color: var(--accent-primary);
}

/* Sidebar Badge */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 8px;
}

.sidebar-badge.pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--bg-border);
    padding: 16px 0;
    background: var(--bg-primary);
}

.sidebar-footer-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-footer-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.sidebar-footer-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.sidebar-toggle:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle.active i {
    transform: rotate(90deg);
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
        left: -100%;
    }
}

/* Forum-specific Animations */
@keyframes icon-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-5deg);
    }
}

.category-card:hover .w-12 {
    animation: icon-bounce 0.6s ease;
}

/* Unread Indicator Pulse */
@keyframes pulse-unread {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Mobile Responsive Forum */
@media (max-width: 1024px) {
    /* Stack forum layout on tablets */
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .lg\:col-span-2 {
        grid-column: span 1 !important;
    }
    
    /* Hide user stats in header on mobile */
    .md\:flex {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Make forum stats 2x2 grid on mobile */
    .grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Stack category content */
    .category-card .flex {
        flex-direction: column;
    }
    
    /* Adjust padding */
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hide secondary info in compact view */
    .category-row .gap-6 {
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Full mobile optimization */
    .px-4, .px-5, .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Single column for everything */
    .grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Smaller text */
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
    }
    
    /* Hide layout selectors on very small screens */
    .layout-btn {
        width: 2rem !important;
        height: 2rem !important;
    }
}

/* BBCode Styling */
.inline-code {
    background: rgba(110, 118, 129, 0.15);
    border: 1px solid rgba(110, 118, 129, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-secondary);
}

pre {
    background: linear-gradient(135deg, rgba(110, 118, 129, 0.08) 0%, rgba(13, 17, 23, 0.5) 50%, rgba(110, 118, 129, 0.08) 100%);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-primary);
    display: block;
    line-height: 1.5;
}

.forum-quote {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08) 0%, rgba(13, 17, 23, 0.5) 50%, rgba(88, 166, 255, 0.08) 100%);
    border: 1px solid var(--bg-border);
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    position: relative;
}

.quote-author {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-author i {
    font-size: 0.8em;
    opacity: 0.8;
}

.forum-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.forum-link:hover {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
}

.forum-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--bg-border);
    margin: 12px 0;
    display: block;
}

.forum-list {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-primary);
}

.forum-list li {
    margin: 8px 0;
    line-height: 1.6;
}

.forum-list ul,
.forum-list ol {
    margin: 8px 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--bg-border);
    margin: 16px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.forum-spoiler {
    background: linear-gradient(135deg, rgba(128, 128, 128, 0.08) 0%, rgba(13, 17, 23, 0.5) 50%, rgba(128, 128, 128, 0.08) 100%);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
}

.forum-spoiler summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-primary);
    user-select: none;
    transition: background 0.2s ease;
}

.forum-spoiler summary:hover {
    background: rgba(88, 166, 255, 0.1);
}

.forum-spoiler .spoiler-content {
    padding: 16px;
    border-top: 1px solid var(--bg-border);
}

.forum-spoiler[open] summary {
    background: rgba(88, 166, 255, 0.05);
}
tr td.trow1:first-child,
tr td.trow2:first-child,
tr td.trow_shaded:first-child {
	border-left: 0;
}

tr td.trow1:last-child,
tr td.trow2:last-child,
tr td.trow_shaded:last-child {
	border-right: 0;
}

.tborder {
	-moz-border-radius: 7px;
	-webkit-border-radius: 7px;
	border-radius: 7px;
}

.tborder tbody tr:last-child > td {
	border-bottom: 0;
}

.tborder tbody tr:last-child > td:first-child {
	-moz-border-radius-bottomleft: 6px;
	-webkit-border-bottom-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

.tborder tbody tr:last-child > td:last-child {
	-moz-border-radius-bottomright: 6px;
	-webkit-border-bottom-right-radius: 6px;
	border-bottom-right-radius: 6px;
}

.thead {
	-moz-border-radius-topleft: 6px;
	-moz-border-radius-topright: 6px;
	-webkit-border-top-left-radius: 6px;
	-webkit-border-top-right-radius: 6px;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}

.thead_collapsed {
	-moz-border-radius-bottomleft: 6px;
	-moz-border-radius-bottomright: 6px;
	-webkit-border-bottom-left-radius: 6px;
	-webkit-border-bottom-right-radius: 6px;
	border-bottom-left-radius: 6px;
	border-bottom-right-radius: 6px;
}

.thead_left {
	-moz-border-radius-topright: 0;
	-webkit-border-top-right-radius: 0;
	border-top-right-radius: 0;
}

.thead_right {
	-moz-border-radius-topleft: 0;
	-webkit-border-top-left-radius: 0;
	border-top-left-radius: 0;
}

.tcat_menu {
	-moz-border-radius: 0 !important;
	-webkit-border-radius: 0 !important;
	border-radius: 0 !important;
}

.tborder tbody:nth-last-child(2) .tcat_collapse_collapsed {
	-moz-border-radius-bottomleft: 6px !important;
	-moz-border-radius-bottomright: 6px !important;
	-webkit-border-bottom-left-radius: 6px !important;
	-webkit-border-bottom-right-radius: 6px !important;
	border-bottom-left-radius: 6px !important;
	border-bottom-right-radius: 6px !important;
}

button,
input.button,
input.textbox,
input.invalid_field,
input.valid_field,
select,
textarea,
.editor_control_bar,
blockquote,
.codeblock,
fieldset,
.pm_alert,
.red_alert,
.popup_menu,
.postbit_buttons > a,
a.button {
	-moz-border-radius: 6px;
	-webkit-border-radius: 6px;
	border-radius: 6px;
}

.post.classic .post_author {
	-moz-border-radius: 0 6px 6px 0;
	-webkit-border-radius: 0 6px 6px 0;
	border-radius: 0 6px 6px 0;
}

.popup_menu .popup_item_container:first-child .popup_item {
	-moz-border-radius-topleft: 6px;
	-moz-border-radius-topright: 6px;
	-webkit-border-top-left-radius: 6px;
	-webkit-border-top-right-radius: 6px;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}

.popup_menu .popup_item_container:last-child .popup_item {
	-moz-border-radius-bottomleft: 6px;
	-moz-border-radius-bottomright: 6px;
	-webkit-border-bottom-left-radius: 6px;
	-webkit-border-bottom-right-radius: 6px;
	border-bottom-left-radius: 6px;
	border-bottom-right-radius: 6px;
}

.pagination a {
	-moz-border-radius: 6px;
	-webkit-border-radius: 6px;
	border-radius: 6px;
}

.pollbar {
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
}

div.error {
	-moz-border-radius: 6px;
    	-webkit-border-radius: 6px;
   	 border-radius: 6px;
}