/* 
 * =============================================================================
 * APP.CSS - ROSES FRAMEWORK STYLES v3.0 — REDESIGNED
 * =============================================================================
 * 
 * CSS Variables cho theme switching
 * Font: Oswald
 * Icons: Font Awesome
 * 
 * @package     BiDragonOnline
 */

/* ============================================================================
   CSS VARIABLES - LIGHT THEME (Default)
   ============================================================================ */

:root {
    /* Màu chủ đạo - có thể thay đổi bằng JS */
    --accent: #e94560;
    --accent-hover: #d63850;
    --accent-light: rgba(233, 69, 96, 0.1);
    --accent-color: var(--accent);
    /* alias for admin compatibility */
    --accent-color-alpha: var(--accent-light);
    --accent-readable: var(--accent);
    /* contrast-safe version for text — overridden by JS */
    --accent-text: #ffffff;
    /* text color ON accent backgrounds — overridden by JS */

    /* Background — clear layer separation */
    --bg-body: #edf0f5;
    --bg-sidebar: #ffffff;
    --bg-main: #edf0f5;
    --bg-card: #ffffff;
    --bg-hover: #f5f7fa;
    --bg-input: #e4e9f2;

    /* Text — high contrast */
    --text-primary: #0a0a1e;
    --text-secondary: #3d4a5c;
    --text-muted: #7a8698;

    /* Borders — visible but subtle */
    --border-color: #c8d2df;
    --border-light: #dde3ed;

    /* Shadows — dramatic multi-layered */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08), 0 24px 56px rgba(0, 0, 0, 0.14);

    /* Sidebar sizes */
    --sidebar-width: 272px;
    --sidebar-collapsed-width: 72px;
    --mobile-header-height: 60px;

    /* Radius tokens */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions — premium curves */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.23, 1, 0.32, 1);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-blur: 20px;

    /* Highlight alpha */
    --highlight-alpha: rgba(0, 0, 0, 0.04);
    --highlight-alpha-strong: rgba(0, 0, 0, 0.08);

    /* ===== ROLE COLORS (single source of truth) ===== */
    --role-boss: #f43f5e;
    --role-superadmin: #ef4444;
    --role-admin: #f97316;
    --role-smod: #8b5cf6;
    --role-mod: #10b981;
    --role-tmod: #8b4513;
    --role-svip: #eab308;
    --role-vip: #f59e0b;
    --role-member: var(--text-secondary);
}

/* ============================================================================
   DARK THEME
   ============================================================================ */

[data-theme="dark"] {
    --bg-body: #080816;
    --bg-sidebar: #10102a;
    --bg-main: #0c0c1e;
    --bg-card: #181840;
    --bg-hover: #20204e;
    --bg-input: #14143a;

    --text-primary: #f0f2f8;
    --text-secondary: #a0a8c0;
    --text-muted: #687090;

    --border-color: #2a2a58;
    --border-light: #202048;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.48);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.45), 0 24px 56px rgba(0, 0, 0, 0.55);

    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;

    --highlight-alpha: rgba(255, 255, 255, 0.05);
    --highlight-alpha-strong: rgba(255, 255, 255, 0.1);

    --role-member: #a0a8c0;
    --role-svip: #fdf08a;
}

/* ============================================================================
   CUSTOM THEME (User-configurable)
   Khi accent color thay đổi qua JS, theme tự động adapt
   ============================================================================ */

[data-theme="custom"] {
    --bg-body: #060612;
    --bg-sidebar: #0c0c22;
    --bg-main: #08081a;
    --bg-card: #141438;
    --bg-hover: #1c1c48;
    --bg-input: #101030;

    --text-primary: #e4e8f2;
    --text-secondary: #9098b2;
    --text-muted: #5c6480;

    --border-color: #222250;
    --border-light: #1a1a40;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.55), 0 24px 56px rgba(0, 0, 0, 0.65);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 20px;

    --highlight-alpha: rgba(255, 255, 255, 0.04);
    --highlight-alpha-strong: rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   SWEETALERT2 — Viewport fix
   .main-content uses transform on mobile which breaks position:fixed inside it
   ============================================================================ */

.swal2-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global overflow protection */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

pre,
code {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-all;
}

/* Flex children overflow protection */
[class*="-info"],
[class*="-body"],
[class*="-content"],
[class*="-text"],
[class*="-name"] {
    min-width: 0;
}

/* ============================================================================
   LAYOUT STRUCTURE
   ============================================================================ */

/* Container chính */
.main-content {
    min-height: 100vh;
    background: var(--bg-main);
    transition: margin var(--transition-normal), transform var(--transition-normal);
}

/* Desktop: Main nằm giữa 2 sidebar */
@media (min-width: 992px) {
    .main-content {
        margin-left: var(--sidebar-width);
        margin-right: var(--sidebar-width);
    }

    /* Khi sidebar collapsed */
    body.sidebar-left-collapsed .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    body.sidebar-right-collapsed .main-content {
        margin-right: var(--sidebar-collapsed-width);
    }
}

/* Mobile: Fullscreen */
@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
        margin-right: 0;
        padding-top: var(--mobile-header-height);
        width: 100%;
        /* Đảm bảo luôn chiếm trọn chiều ngang */
    }

    /* Khi menu mở - đẩy content sang (subtle movement, no scaling to prevent distortion) */
    body.sidebar-left-open .main-content {
        transform: translateX(280px);
        /* Đẩy đúng bằng chiều rộng sidebar */
        overflow: hidden;
    }

    body.sidebar-right-open .main-content {
        transform: translateX(-280px);
        overflow: hidden;
    }
}

/* Global Mobile Scaling - Giảm kích thước chữ và khoảng cách */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-x: hidden !important;
    }

    .page-wrapper {
        padding: 0 !important;
    }

    .page-content {
        padding: 10px 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .container,
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #main-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 4px;
    }
}

/* ============================================================================
   SIDEBAR STYLES
   ============================================================================ */

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-left {
    left: 0;
    border-right: 1px solid var(--border-light);
}

.sidebar-right {
    right: 0;
    border-left: 1px solid var(--border-light);
}

/* Mobile: Sidebar ẩn ngoài màn hình */
@media (max-width: 991px) {
    .sidebar-left {
        transform: translateX(-100%);
    }

    .sidebar-right {
        transform: translateX(100%);
    }

    body.sidebar-left-open .sidebar-left {
        transform: translateX(0);
    }

    body.sidebar-right-open .sidebar-right {
        transform: translateX(0);
    }
}

/* Desktop: Collapsed state */
@media (min-width: 992px) {
    body.sidebar-left-collapsed .sidebar-left {
        width: var(--sidebar-collapsed-width);
    }

    body.sidebar-right-collapsed .sidebar-right {
        width: var(--sidebar-collapsed-width);
    }

    body.sidebar-left-collapsed .sidebar-left .nav-item span,
    body.sidebar-left-collapsed .sidebar-left .logo span,
    body.sidebar-left-collapsed .sidebar-left .theme-settings,
    body.sidebar-left-collapsed .sidebar-left .sidebar-header span {
        display: none;
    }

    body.sidebar-right-collapsed .sidebar-right .nav-item span,
    body.sidebar-right-collapsed .sidebar-right .sidebar-header span {
        display: none;
    }

    /* Collapse toggle icon flip */
    body.sidebar-left-collapsed .sidebar-left .sidebar-collapse i {
        transform: rotate(180deg);
    }

    body.sidebar-right-collapsed .sidebar-right .sidebar-collapse i {
        transform: rotate(180deg);
    }

    /* Right sidebar extra elements hidden when collapsed */
    body.sidebar-right-collapsed .sidebar-right .user-profile-header,
    body.sidebar-right-collapsed .sidebar-right .user-stats,
    body.sidebar-right-collapsed .sidebar-right .user-sidebar-bio,
    body.sidebar-right-collapsed .sidebar-right .guest-panel,
    body.sidebar-right-collapsed .sidebar-right .nav-divider {
        display: none;
    }
}

/* Sidebar Collapse Button — inline in header, Desktop only */
.sidebar-collapse {
    display: none;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (min-width: 992px) {
    .sidebar-collapse {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        cursor: pointer;
        padding: 6px 8px;
        font-size: 0.75rem;
        transition: all var(--transition-fast);
    }

    .sidebar-collapse:hover {
        background: var(--bg-hover);
        color: var(--accent-readable);
        border-color: var(--accent-readable);
    }

    .sidebar-collapse i {
        transition: transform 0.3s ease;
    }
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent-readable);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo i {
    font-size: 1.8rem;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-close:hover {
    background: var(--bg-hover);
    color: var(--accent-readable);
}

@media (max-width: 991px) {
    .sidebar-close {
        display: block;
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 15px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform var(--transition-fast);
}

.nav-item:hover {
    background: var(--accent-light);
    color: var(--accent-readable);
}

.nav-item:hover i {
    transform: scale(1.15);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--accent-text);
    font-weight: 600;
    box-shadow: 0 4px 16px var(--accent-light), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Footer - Theme Settings */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-light);
}

@media (min-width: 992px) {
    .sidebar-footer {
        margin-top: auto;
    }
}

.theme-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-toggle {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.theme-btn:hover,
.theme-btn.active {
    border-color: var(--accent);
    color: var(--accent-readable);
}

.accent-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.accent-btn {
    width: 26px;
    height: 26px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.accent-btn:hover {
    transform: scale(1.2);
}

.accent-btn.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--bg-sidebar);
}

/* Sidebar Collapse Button */
.sidebar-collapse {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 50px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 1001;
    font-size: 0.8rem;
}

.sidebar-left .sidebar-collapse {
    right: -24px;
    border-radius: 0 8px 8px 0;
}

.sidebar-right .sidebar-collapse {
    left: -24px;
    border-radius: 8px 0 0 8px;
}

.sidebar-collapse:hover {
    width: 30px;
    box-shadow: 0 2px 12px var(--accent-light);
}

@media (min-width: 992px) {
    .sidebar-collapse {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

body.sidebar-left-collapsed .sidebar-left .sidebar-collapse i {
    transform: rotate(180deg);
}

body.sidebar-right-collapsed .sidebar-right .sidebar-collapse i {
    transform: rotate(180deg);
}

/* ============================================================================
   MOBILE HEADER
   ============================================================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: var(--bg-sidebar);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 991px) {
    .mobile-header {
        display: flex;
    }
}

.mobile-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-readable);
    text-decoration: none;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent-readable);
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

@media (max-width: 991px) {

    body.sidebar-left-open .menu-overlay,
    body.sidebar-right-open .menu-overlay {
        display: block;
        opacity: 1;
    }
}

/* ============================================================================
   PAGE CONTENT
   ============================================================================ */

.page-content {
    padding: 28px;
    min-height: calc(100vh - 200px);
}

@media (max-width: 991px) {
    .page-content {
        padding: 20px 15px;
    }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.main-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-light);
    padding: 36px 28px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-section ul a:hover {
    color: var(--accent-readable);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--accent-text);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 15px 28px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 5px;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-readable);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--accent-text);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-light), 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-muted);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-accent {
    color: var(--accent-readable);
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.d-flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* ==========================================================================
   ANIMATIONS FOR ROLES
   ========================================================================== */
@keyframes rainbow {
    from {
        background-position: 0%;
    }

    to {
        background-position: 300%;
    }
}

/* ==========================================================================
   ROLE DEFINITIONS (Colors & Badges)
   ========================================================================== */
.role-boss {
    font-weight: 900;
    background-image: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 8s linear infinite;
}

.role-superadmin {
    font-weight: 800;
    color: var(--role-superadmin);
    background-image: linear-gradient(110deg, var(--role-superadmin) 0%, var(--role-superadmin) 47%, #ffffff 50%, var(--role-superadmin) 53%, var(--role-superadmin) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-admin {
    font-weight: 800;
    color: var(--role-admin);
    background-image: linear-gradient(110deg, var(--role-admin) 0%, var(--role-admin) 47%, #ffffff 50%, var(--role-admin) 53%, var(--role-admin) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-smod {
    font-weight: 700;
    color: var(--role-smod);
    background-image: linear-gradient(110deg, var(--role-smod) 0%, var(--role-smod) 47%, #ffffff 50%, var(--role-smod) 53%, var(--role-smod) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-mod {
    font-weight: 700;
    color: var(--role-mod);
    background-image: linear-gradient(110deg, var(--role-mod) 0%, var(--role-mod) 47%, #ffffff 50%, var(--role-mod) 53%, var(--role-mod) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-tmod {
    font-weight: 700;
    color: var(--role-tmod);
    background-image: linear-gradient(110deg, var(--role-tmod) 0%, var(--role-tmod) 47%, #ffffff 50%, var(--role-tmod) 53%, var(--role-tmod) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-svip {
    font-weight: 800;
    color: var(--role-svip);
    background-image: linear-gradient(110deg, var(--role-svip) 0%, var(--role-svip) 47%, #ffffff 50%, var(--role-svip) 53%, var(--role-svip) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: roleShift 4s linear infinite;
}

.role-vip {
    font-weight: 700;
    color: var(--role-vip);
    background-image: linear-gradient(90deg, var(--role-vip), #fbbf24, var(--role-vip));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-member {
    color: var(--role-member);
    font-weight: 700;
}

.news-role-tag {
    display: inline-flex;
    position: relative;
    overflow: hidden;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    vertical-align: middle;
    margin-left: 3px;
    text-shadow: none;

    /* Reset any inherited text clipping from role text classes */
    -webkit-background-clip: padding-box !important;
    background-clip: padding-box !important;
    -webkit-text-fill-color: currentcolor !important;
}

/* Sweeping light animation for badges (only for SVIP and above) */
.news-role-tag:not(.role-member):not(.role-vip)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: shineLight 5s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shineLight {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

@keyframes roleShift {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.news-role-tag.role-boss {
    background: linear-gradient(to right, var(--role-boss), var(--role-admin), var(--role-svip), var(--role-mod), #3b82f6);
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-superadmin {
    background: var(--role-superadmin) !important;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-admin {
    background: var(--role-admin) !important;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-smod {
    background: var(--role-smod) !important;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-mod {
    background: var(--role-mod) !important;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-tmod {
    background: var(--role-tmod) !important;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-svip {
    background: var(--role-svip) !important;
    color: #fff;
    font-weight: 800;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-vip {
    background: var(--role-vip) !important;
    color: #fff;
    font-weight: 800;
    -webkit-text-fill-color: #fff;
}

.news-role-tag.role-member {
    background: var(--border-light) !important;
    color: var(--text-muted) !important;
    display: none;
}

/* ============================================================================
   RIGHT SIDEBAR - USER PROFILE PANEL
   ============================================================================ */

.user-profile-panel {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-light);
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light), 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.user-avatar-img:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 5px var(--accent-light), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.user-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    /* Offline - Gray */
    border: 2px solid var(--bg-sidebar);
    transition: background 0.3s;
}

.user-online-dot.online {
    background: #10b981;
    /* Online - Green */
    animation: pulseOnline 2s infinite;
}

@keyframes pulseOnline {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

.user-info-text {
    flex: 1;
    min-width: 0;
}

.user-display-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--accent-readable);
}

/* User Stats */
.user-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.stat-item:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--bg-hover));
    transform: translateX(5px);
    box-shadow: 0 2px 8px var(--accent-light);
}

.stat-item i {
    font-size: 1rem;
    color: var(--accent-readable);
    width: 20px;
    text-align: center;
}

.stat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* User Sidebar Bio - Simple Bordered Style */
.user-sidebar-bio {
    margin-bottom: 15px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: center;
}

.user-sidebar-bio span {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
}

/* Role Colors - using CSS variables defined above */
/* role definitions consolidated in ROLE DEFINITIONS section above */

/* Nav Utilities */
.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 15px;
}

.nav-item-danger {
    color: #ef4444 !important;
}

.nav-item-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Guest Panel */
.guest-panel {
    padding: 30px 20px;
    text-align: center;
}

.guest-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    opacity: 0.6;
}

.guest-panel p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Mobile Avatar in Header */
.mobile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

/* Collapsed sidebar hides user profile content */
@media (min-width: 992px) {

    body.sidebar-right-collapsed .sidebar-right .user-profile-panel,
    body.sidebar-right-collapsed .sidebar-right .guest-panel,
    body.sidebar-right-collapsed .sidebar-right .nav-divider {
        display: none;
    }
}

/* ============================================================================
   PAGE TRANSITION ANIMATIONS
   ============================================================================ */

.page-content {
    animation: pageFadeIn 0.3s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   SKELETON LOADING
   ============================================================================ */

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-hover) 25%,
            var(--border-light) 50%,
            var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

/* ============================================================================
   COMING SOON PAGE
   ============================================================================ */

.coming-soon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 30px;
}

.coming-soon-card {
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    max-width: 480px;
    width: 100%;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.coming-soon-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent-text);
    box-shadow: 0 10px 30px var(--accent-light);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow: 0 10px 30px var(--accent-light);
    }

    50% {
        box-shadow: 0 15px 40px var(--accent-light), 0 0 0 8px var(--accent-light);
    }
}

.coming-soon-card h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.coming-soon-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.coming-soon-card .btn {
    margin-top: 10px;
}

@media (max-width: 480px) {
    .coming-soon-card {
        padding: 35px 25px;
    }

    .coming-soon-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* =============================================================================
   UNREAD MESSAGE BADGE (Sidebar)
   ============================================================================= */
.nav-item-messages {
    position: relative;
}

.nav-item .unread-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    min-width: 18px;
    text-align: center;
    margin-left: auto;
    line-height: 1.4;
    animation: unreadPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.nav-item .unread-dot {
    display: none;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    animation: unreadBlink 1s infinite;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
}

/* Sidebar thu gọn: ẩn badge text, hiện dot (chỉ khi có unread) */
body.sidebar-right-collapsed .nav-item.has-unread .unread-badge {
    display: none !important;
}

body.sidebar-right-collapsed .nav-item.has-unread .unread-dot {
    display: block !important;
}

@keyframes unreadPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@keyframes unreadBlink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
    }

    50% {
        opacity: 0.3;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
    }
}

/* ============================================================================
   UI/UX ENHANCEMENTS - Glassmorphism, Micro-animations, Premium Effects
   ============================================================================ */

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Sidebar gradient overlay — dramatic accent glow */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(0deg, var(--bg-sidebar) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

/* Glassmorphism enhancement — merged into main .card definition above */

/* Nav item micro-animations */
.nav-item {
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
    border-radius: 0 2px 2px 0;
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: scaleY(1);
}

/* Card hover glow */
.card:hover {
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-4px);
}

/* Button press effect */
.btn:active {
    transform: translateY(1px) scale(0.97);
}

.btn-primary:active {
    box-shadow: 0 2px 8px var(--accent-light);
}

/* Stat item interactive glow */
.stat-item {
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, var(--accent-light) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.stat-item:hover::after {
    opacity: 1;
}

/* Theme button active glow */
.theme-btn.active {
    box-shadow: 0 0 16px var(--accent-light), 0 0 4px var(--accent-light);
    border-color: var(--accent);
}

/* Accent button selected ring */
.accent-btn.active {
    box-shadow: 0 0 0 2px var(--bg-sidebar), 0 0 8px var(--accent-light);
}

/* Smooth focus rings for accessibility */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Footer link micro-animation */
.footer-section ul a {
    display: inline-block;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-section ul a:hover {
    transform: translateX(4px);
}

/* User avatar hover glow ring */
.user-avatar-img:hover {
    box-shadow: 0 0 0 4px var(--accent-light), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sidebar collapse smooth rotate */
.sidebar-collapse i {
    transition: transform var(--transition-normal);
}

/* Mobile header glass effect */
@media (max-width: 991px) {
    .mobile-header {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        background: color-mix(in srgb, var(--bg-sidebar) 80%, transparent);
    }
}

/* ============================================================================
   PREMIUM KEYFRAME ANIMATIONS
   ============================================================================ */

/* Float Up - For cards and elements appearing */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glow Pulse - For accent elements */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px var(--accent-light), 0 0 10px transparent;
    }

    50% {
        box-shadow: 0 0 10px var(--accent-light), 0 0 25px var(--accent-light);
    }
}

/* Shimmer - Loading or highlight effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Ripple - Button press feedback */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Scale In - Modal/popup entrance */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Left - Sidebar/panel entrance */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right - Right panel entrance */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Border Glow - Hover effect for cards/panels */
@keyframes borderGlow {

    0%,
    100% {
        border-color: var(--border-light);
    }

    50% {
        border-color: var(--accent);
        box-shadow: 0 0 15px var(--accent-light);
    }
}

/* Breathe - Subtle living effect */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

/* Stagger Fade In - For list items */
@keyframes staggerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Gradient Shift - For headings */
@keyframes textGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Bounce In - For notifications/badges */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================================
   ANIMATION UTILITY CLASSES
   ============================================================================ */

.animate-float-up {
    animation: floatUp 0.5s ease-out both;
}

.animate-scale-in {
    animation: scaleIn 0.35s ease-out both;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease-out both;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease-out both;
}

.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

.animate-glow {
    animation: glowPulse 2.5s ease-in-out infinite;
}

.animate-breathe {
    animation: breathe 4s ease-in-out infinite;
}

/* Stagger delays for list animations */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

/* Scroll reveal - hidden by default, animated when visible */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   ENHANCED INTERACTIVE EFFECTS
   ============================================================================ */

/* Premium card hover with subtle lift */
.card,
.news-card,
.stat-card,
.clan-card,
.news-article,
.news-comments {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    will-change: transform;
}

/* Smooth theme transitions — scoped, not global wildcard */
.sidebar,
.main-content,
.card,
.btn,
.nav-item,
.page-content,
.alert,
.stat-item,
.footer {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Smooth scrollbar for WebKit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection highlight */
::selection {
    background: var(--accent);
    color: var(--accent-text);
}

/* ============================================================================
   GLASSMORPHISM ENHANCED UTILITIES
   ============================================================================ */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============================================================================
   PERFORMANCE HINTS
   ============================================================================ */

.sidebar,
.mobile-header,
.main-content,
.menu-overlay {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}