/* Font Declarations - Optimized for Multiple Devices */
/* Only load UTFont for mobile devices */
@media screen and (max-width: 768px) {
    @font-face {
      font-family: 'UTFont';
      src: url('/assets/fonts/UT1.woff2') format('woff2');
      font-weight: normal;
      font-style: normal;
      font-display: swap;
    }
}

/* Load DMSans for desktop devices */
@media screen and (min-width: 769px) {
    @font-face {
      font-family: 'UTFont';
      src: url('/assets/fonts/UT1.woff2') format('woff2');
      font-weight: normal;
      font-style: normal;
      font-display: swap;
    }
}

:root {
    /* === Color Scheme === */
    /* Primary Colors */
    --primary-color: #ffc107;        /* Vàng - Màu chính của thương hiệu */
    --primary-hover: #ffca28;        /* Vàng nhạt - Khi di chuột vào */
    --primary-active: #ffb300;       /* Vàng đậm - Khi nhấn */

    /* Secondary Colors */
    --secondary-color: #3f51b5;      /* Xanh lam indigo - Màu phụ của thương hiệu */
    --secondary-hover: #5c6bc0;      /* Xanh lam indigo nhạt - Khi di chuột vào */

    /* Background Colors */
    --dark-bg: #121212;              /* Nền tối chính */
    --darker-bg: #080808;            /* Nền tối hơn, dùng để tạo sự tương phản */
    --lighter-bg: #1e1e1e;           /* Nền sáng hơn một chút */
    --dark-card: #1a1a1a;            /* Nền của thẻ tối */
    --dark-hover: #2a2a2a;           /* Nền khi di chuột vào thẻ */
	--darkdam--bg: #0a0a0a;           /* Màu đen đậm đặc */
	--secondary-dark: #1e1e1e;           /* Nền sáng hơn một chút */

    /* Transparent Backgrounds */
    --card-bg: rgba(18, 18, 18, 0.8); /* Nền thẻ bán trong suốt */
    --shop-bg: transparent;           /* Nền trong suốt cho cửa hàng */
    --shop-card-bg: rgba(26, 26, 26, 0.8); /* Nền bán trong suốt cho thẻ cửa hàng */

    /* Text Colors */
    --text-color: #ffffff;           /* Chữ chính - Màu trắng */
    --text-light: #ffffff;           /* Chữ nhẹ - Màu trắng */
    --text-secondary: #aaaaaa;       /* Chữ phụ - Màu xám nhạt */
    --text-muted: #666666;           /* Chữ mờ - Màu xám đậm */
    --secondary-text: #aaaaaa;       /* Alias cho chữ phụ */

    /* Border Colors */
    --border-color: #333333;         /* Màu đường viền chính */
    --dark-border: #333333;          /* Màu đường viền tối */
    --border-hover: #444444;         /* Màu đường viền khi di chuột vào */
    --shop-border: #333333;          /* Màu đường viền cửa hàng */

    /* Status Colors */
    --success-color: #2ed573;        /* Thành công - Màu xanh lá */
    --error-color: #ff4757;          /* Lỗi - Màu đỏ */
    --warning-color: #ffbd03;        /* Cảnh báo - Màu vàng cam */
    --info-color: #70a1ff;           /* Thông tin - Màu xanh lam nhạt */
    --shop-success: #4CAF50;         /* Thành công cửa hàng - Màu xanh lá */
    --shop-error: #F44336;           /* Lỗi cửa hàng - Màu đỏ */

    /* Ranking Colors */
    --gold-color: #ffd700;           /* Vàng - Cho hạng 1 */
    --silver-color: #c0c0c0;         /* Bạc - Cho hạng 2 */
    --bronze-color: #cd7f32;         /* Đồng - Cho hạng 3 */
    --shop-gold: #ffc107;            /* Vàng cửa hàng */
    --shop-gold-hover: #ffca28;      /* Vàng cửa hàng khi di chuột vào */
    --shop-text: #FFFFFF;            /* Chữ cửa hàng - Màu trắng */
    --shop-text-secondary: #BBBBBB;  /* Chữ phụ cửa hàng - Xám nhạt */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ffc107, #ffd54f);  /* Chuyển động màu vàng chính */
    --gradient-dark: linear-gradient(145deg, #141414, #1a1a1a);     /* Chuyển động màu tối */
    --gradient-item: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 213, 79, 0.2)); /* Chuyển động cho item với độ trong suốt */
    --gradient-gold: linear-gradient(135deg, #ffd700, #ffaa00);     /* Chuyển động màu vàng */
    --gradient-silver: linear-gradient(135deg, #e0e0e0, #a0a0a0);   /* Chuyển động màu bạc */
    --gradient-bronze: linear-gradient(135deg, #cd7f32, #a05a2c);   /* Chuyển động màu đồng */

    /* RGB Values for Design System */
    --dd-primary-400: 255, 215, 0;    /* RGB cho màu vàng */
    --dd-primary-500: 238, 197, 0;    /* RGB cho màu vàng trung bình */
    --dd-primary-600: 212, 175, 0;    /* RGB cho màu vàng đậm */
    --dd-secondary-400: 220, 53, 69;  /* RGB cho màu đỏ */
    --dd-secondary-500: 200, 35, 51;  /* RGB cho màu đỏ trung bình */
    --dd-secondary-600: 176, 16, 32;  /* RGB cho màu đỏ đậm */
    --dd-dark-bg: 18, 18, 18;         /* RGB cho nền tối */
    --dd-gray-800: 39, 39, 42;        /* RGB cho màu xám tối */
    --dd-gray-700: 63, 63, 70;        /* RGB cho màu xám trung bình */
    --dd-gray-400: 161, 161, 170;     /* RGB cho màu xám sáng */
    --dd-blue: 0, 149, 224;           /* RGB cho màu xanh lam */

    /* === Layout Dimensions === */
    --sidebar-width: 250px;          /* Chiều rộng thanh bên */
    --header-height: 60px;           /* Chiều cao header */
    --chatbox-right-width: 280px;    /* Chiều rộng chatbox bên phải */

    /* === Z-index Layers === */
    --z-index-overlay: 1050;         /* Lớp phủ */
    --z-index-header: 1100;          /* Lớp header */
    --z-index-sidebar: 1200;         /* Lớp thanh bên */
    --z-index-chatpanel: 1250;       /* Lớp bảng chat */
    --z-index-dropdown: 1300;        /* Lớp dropdown */
    --z-index-notification: 1400;    /* Lớp thông báo */
    --z-index-modal: 1500;           /* Lớp modal */

    /* === Shadows === */
    --box-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);     /* Bóng nhỏ */
    --box-shadow-md: 0 5px 15px rgba(0, 0, 0, 0.2);     /* Bóng vừa */
    --box-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.3);     /* Bóng lớn */
    --box-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.4);  /* Bóng khi di chuột vào */

    /* === Transitions === */
    --transition-normal: all 0.3s ease;  /* Chuyển động bình thường */
    --transition-fast: all 0.2s ease;    /* Chuyển động nhanh */

    /* === Border Radius === */
    --border-radius-sm: 4px;          /* Border radius nhỏ */
    --border-radius-md: 5px;          /* Border radius vừa */
    --border-radius-lg: 5px;          /* Border radius lớn */
    --border-radius-xl: 10px;         /* Border radius cực lớn */
    --border-radius-pill: 20px;       /* Border radius hình viên thuốc */

    /* === Spacing === */
    --spacing-xs: 5px;                /* Khoảng cách siêu nhỏ */
    --spacing-sm: 10px;               /* Khoảng cách nhỏ */
    --spacing-md: 15px;               /* Khoảng cách vừa */
    --spacing-lg: 20px;               /* Khoảng cách lớn */
    --spacing-xl: 30px;               /* Khoảng cách cực lớn */
	
	 /* === Điểm danh === */
	/* Primary color - Gold */
    --dd-primary-400: 255, 215, 0;  /* Vàng - Màu vàng sáng, màu chủ đạo */
    --dd-primary-500: 238, 197, 0;  /* Vàng trung bình */
    --dd-primary-600: 212, 175, 0;  /* Vàng đậm */

    /* Secondary color - Red */
    --dd-secondary-400: 220, 53, 69; /* Đỏ - Màu đỏ sáng */
    --dd-secondary-500: 200, 35, 51; /* Đỏ trung bình */
    --dd-secondary-600: 176, 16, 32; /* Đỏ đậm */

    /* Dark background colors */
    --dd-dark-bg: 18, 18, 18;        /* Nền tối - Màu đen gần như hoàn toàn */
    --dd-gray-800: 39, 39, 42;       /* Xám tối - Màu xám đen, tạo sự sâu thẳm */
    --dd-gray-700: 63, 63, 70;       /* Xám trung bình - Màu xám trung gian */
    --dd-gray-400: 161, 161, 170;    /* Xám sáng - Màu xám nhẹ, có chút sắc xanh */

    /* Blue accent */
    --dd-blue: 0, 149, 224;          /* Xanh lam - Màu xanh lam sáng, nổi bật */
	
}


/* Base font styles for Mobile Devices */
@media screen and (max-width: 768px) {
    html, body {
        font-family: 'UTFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        font-size: 15px;
        background-color: var(--darker-bg);
        color: var(--text-color);
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overflow-x: hidden;
        position: relative;
        min-height: 100vh;
    }
}

/* Base font styles for Desktop Devices */
@media screen and (min-width: 769px) {
    html, body {
        font-family: 'DMSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        font-size: 16px;
        background-color: var(--darker-bg);
        color: var(--text-color);
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overflow-x: hidden;
        position: relative;
        min-height: 100vh;
    }
}

/* Font class for special elements */
.ut-font {
    font-family: 'UTFont', sans-serif !important;
}

.dm-sans-font {
    font-family: 'DMSans', sans-serif !important;
}

/* Responsive font sizes for Mobile */
@media (max-width: 768px) {
    h1, .h1 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    h2, .h2 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.5rem;
        font-weight: 700;
    }
    
    h3, .h3 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.25rem;
        font-weight: 600;
    }
    
    h4, .h4 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.125rem;
        font-weight: 600;
    }
}

/* Responsive font sizes for Desktop */
@media (min-width: 769px) {
    h1, .h1 {
        font-family: 'UTFont', sans-serif;
        font-size: 2rem;
        font-weight: 700;
    }
    
    h2, .h2 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    h3, .h3 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.5rem;
        font-weight: 600;
    }
    
    h4, .h4 {
        font-family: 'UTFont', sans-serif;
        font-size: 1.25rem;
        font-weight: 600;
    }

}

/* Remaining styles... (rest of the previous CSS remains the same) */
/* Font smoothing improvements for specific browsers */
@supports (-webkit-overflow-scrolling: touch) {
    /* iOS specific font optimizations */
    body {
        -webkit-text-size-adjust: 100%;
    }
}

@supports (-moz-appearance: none) {
    /* Firefox specific font optimizations */
    body {
        font-feature-settings: "kern";
    }
}

/* Font performance optimizations */
@media screen and (min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi), 
       screen and (min-resolution: 2dppx) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Text truncation utilities */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom scrollbar with UTFont matching colors */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
/* ====================================== 
   BIẾN CSS VÀ THIẾT LẬP CƠ BẢN
====================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* Custom scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ======================================
   LAYOUT STRUCTURE
====================================== */

/* Main Content Structure */
.main-content {
    margin-left: var(--sidebar-width);
    margin-right: 0; /* Mặc định không có margin phải */
    padding-top: var(--header-height);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    transition: all 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Khi có chatbox bên phải */
.main-content.with-chatbox {
    margin-right: var(--chatbox-right-width);
    width: calc(100% - var(--sidebar-width) - var(--chatbox-right-width));
}

.content-wrapper {
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

.content-container {
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Content Center - Utility class for centered content */
.content-center {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ======================================
   SIDEBAR
====================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--darker-bg);
    z-index: var(--z-index-sidebar);
    transition: all 0.3s ease;
    overflow-y: auto;
    padding-bottom: 70px; /* Space for footer */
}

/* Thêm style cho buttons đăng nhập/đăng ký trên mobile */
.auth-buttons-mobile {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--dark-border);
}

.auth-button {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-button.primary {
    background-color: var(--primary-color);
    color: #000;
    border: none;
}

.auth-button.secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--dark-border);
}

.auth-button i {
    margin-right: 8px;
}

/* ======================================
   HEADER
====================================== */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: var(--z-index-header);
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    margin-right: 15px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    height: 40px;
    background-color: var(--dark-card);
    border: none;
    border-radius: 20px;
    padding: 0 40px 0 15px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background-color: var(--dark-hover);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.header-actions {
    display: flex;
    align-items: center;
    position: relative;
    z-index: var(--z-index-header);
}

.header-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background-color: #2a2a2a;
    border: 1px solid #333333;
    font-weight: bold;
}

.header-icon:hover {
    background-color: #333333;
    color: var(--primary-color);
}

.header-icon i {
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 0 1px #fff;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* World Channel */
.world-channel {
    display: flex;
    align-items: center;
    background-color: #222;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.world-channel:hover {
    background-color: #333;
}

.world-channel i.fa-comment-dots {
    margin-right: 8px;
    color: #808080;
    font-size: 0.8rem;
}

.world-channel i.fa-chevron-down {
    margin-left: 6px;
    font-size: 0.7rem;
    color: #808080;
}

/* Phần badge hiển thị số người */
.online-users-badge {
    display: flex;
    align-items: center;
    background-color: #333;
    border-radius: 12px;
    padding: 2px 5px;
    margin-left: 10px;
    color: #d4d4d4;
}

.online-users-badge i {
    margin-right: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.online-count {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 0.65rem;
    margin-left: 6px;
}

.globe-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.globe-btn i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.globe-btn:hover {
    background-color: var(--dark-hover);
}

/* ======================================
   DROPDOWN MENUS
====================================== */
.dropdown-panel {
    position: absolute;
    background-color: var(--dark-card);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: var(--z-index-dropdown);
    display: none;
    border: 1px solid var(--dark-border);
    top: calc(var(--header-height) + 5px);
    min-width: 220px;
}

.dropdown-panel.show {
    display: block;
}

#userDropdown {
    right: 60px;
}

#channelDropdown {
    right: 20px;
}

.user-dropdown-item,
.channel-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-dropdown-item:hover,
.channel-item:hover {
    background-color: var(--dark-hover);
    color: var(--primary-color);
}

.channel-item.active {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
}

.user-dropdown-item i,
.channel-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.user-dropdown-divider,
.channel-divider {
    height: 1px;
    background-color: var(--dark-border);
    margin: 5px 0;
}

/* ======================================
   NOTIFICATION TOAST
====================================== */
.notification-toast {
    position: fixed;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: var(--z-index-notification);
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: rgba(40, 40, 40, 0.9);
    white-space: nowrap;
}

.notification-toast.success {
    background-color: transparent;
    border-bottom: 3px solid #28a745;
}

.notification-toast.error {
    background-color: transparent;
    border-bottom: 3px solid #dc3545;
}

/* ======================================
   NOTIFICATION TOAST CSS ĐĂNG NHẬP
====================================== */
.dg-alert-container {
    position: fixed;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    background-color: rgba(40, 40, 40, 0.9);
    color: white;
    font-weight: 500;
    z-index: 9999;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: 280px;
    max-width: 90%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dg-alert-container.dg-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: dg-alert-bounce 0.5s ease;
}

.dg-alert-container.dg-hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

.dg-alert-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dg-alert-icon {
    margin-right: 12px;
    font-size: 18px;
}

.dg-alert-message {
    font-size: 14px;
    line-height: 1.4;
}

/* Type-specific styles */
.dg-alert-container.success {
    border-bottom: 3px solid #28a745;
}

.dg-alert-container.success .dg-alert-icon {
    color: #28a745;
}

.dg-alert-container.error {
    border-bottom: 3px solid #dc3545;
}

.dg-alert-container.error .dg-alert-icon {
    color: #dc3545;
}

.dg-alert-container.warning {
    border-bottom: 3px solid #ffc107;
}

.dg-alert-container.warning .dg-alert-icon {
    color: #ffc107;
}

.dg-alert-container.info {
    border-bottom: 3px solid #17a2b8;
}

.dg-alert-container.info .dg-alert-icon {
    color: #17a2b8;
}

@keyframes dg-alert-bounce {
    0% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 1; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ======================================
   HẾT CSS ĐĂNG NHẬP
====================================== */

/* ======================================
   CHAT PANELS - UNIFIED CHAT STYLES
====================================== */

/* Right sidebar chat panel - Khung chứa chat */
.right-chat-sidebar {
    position: fixed !important;
    top: var(--header-height) !important;
    right: 0 !important;
    width: var(--chatbox-right-width) !important;
    height: calc(100vh - var(--header-height)) !important;
    background-color: var(--darker-bg) !important;
    z-index: var(--z-index-chatpanel) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -1px 0 3px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease;
}

/* Header của chat */
.right-chat-header {
    padding: 8px 12px !important;
    background-color: var(--darker-bg) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Tiêu đề của chat */
.right-chat-title {
    display: flex !important;
    align-items: center !important;
    font-size: 0.8rem !important;
}

/* Biểu tượng trong tiêu đề */
.right-chat-title i {
    color: #ffc107 !important;
    margin-right: 6px !important;
    font-size: 0.75rem !important;
}

/* Tiêu đề text trong chat */
.right-chat-title span {
    color: #fff !important;
    font-size: 0.8rem !important;
}

/* Body của chat */
.right-chat-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 8px !important;
    background-color: var(--darker-bg) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

/* Tin nhắn người dùng */
.right-chat-message {
    display: flex !important;
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
    border: none;
    position: relative !important;
    align-items: flex-start !important;
    background-color: transparent !important;
}

/* Avatar container */
.avatar-container {
    position: relative !important;
    margin-right: 6px !important;
    width: 24px !important;
    height: 24px !important;
}

.avatar-container img {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.status-dot {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
}

/* Phần nội dung tin nhắn */
.message-content {
    flex: 1 !important;
}

/* Tên người dùng trong tin nhắn */
.right-chat-username, .congacon {
    color: #ffc107 !important;
    font-weight: bold !important;
    margin-bottom: 0 !important;
    display: inline !important;
    font-size: 0.7rem !important;
    margin-right: 5px !important;
    max-width: 150px !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow: visible !important;
}

/* Nội dung tin nhắn */
.right-chat-text {
    color: #eee !important;
    word-break: break-word !important;
    margin-bottom: 0 !important;
    display: inline !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
}

/* Thời gian tin nhắn */
.right-chat-time {
    color: #666 !important;
    font-size: 0.65rem !important;
    display: block !important;
    margin-top: 2px !important;
}

/* Nút trả lời */
.reply-button {
    color: #777 !important;
    font-size: 0.65rem !important;
    cursor: pointer !important;
    margin-top: 1px !important;
    display: inline-block !important;
}

.reply-button:hover {
    color: #ffc107 !important;
    text-decoration: underline !important;
}

/* Footer chat */
.right-chat-footer {
    padding: 8px !important;
    background-color: var(--darker-bg) !important;
}

/* Container input chat */
.right-chat-input-container {
    display: flex !important;
    align-items: center !important;
}

/* Trường nhập liệu */
.right-chat-input {
    flex: 1 !important;
    height: 32px !important;
    background-color: #222 !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 0 12px !important;
    color: #fff !important;
    font-size: 0.8rem !important;
}

/* Khi trường nhập liệu được focus */
.right-chat-input:focus {
    outline: none !important;
    background-color: #333 !important;
}

/* Nút gửi */
.right-chat-send {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background-color: #ffc107 !important;
    color: #000 !important;
    border: none !important;
    margin-left: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* Nút gửi khi hover */
.right-chat-send:hover {
    background-color: #ffb300 !important;
}

/* Icon trong nút gửi */
.right-chat-send i {
    font-size: 0.75rem !important;
}

/* Tin nhắn hệ thống */
.right-chat-body .system-message, .system-message, .mobile-system-message {
    background-color: rgba(255, 193, 7, 0.03) !important;
    border-radius: 4px !important;
    padding: 5px 8px !important;
    margin-bottom: 6px !important;
    color: #ccc !important;
    font-size: 0.75rem !important;
    text-align: center !important;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

/* Fixed Chat Panel (Desktop) */
.fixed-chat-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 320px;
    height: 400px;
    background-color: var(--darker-bg);
    display: flex;
    flex-direction: column;
    z-index: var(--z-index-chatpanel);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px -2px 10px rgba(0, 0, 0, 0.1);
}

.fixed-chat-panel.show {
    transform: translateY(0);
}

.chat-header {
    padding: 10px 15px;
    background-color: var(--dark-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.chat-title i {
    color: var(--primary-color);
    margin-right: 10px;
}

.chat-header-right {
    display: flex;
    align-items: center;
}

.online-users-indicator {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.online-users-indicator i {
    color: #28a745;
    margin-right: 5px;
}

.chat-settings-icon, 
.chat-close-icon {
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-settings-icon:hover, 
.chat-close-icon:hover {
    color: var(--primary-color);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-avatar {
    background-color: #541e1e;
}

.user-avatar {
    background-color: #1e2a4a;
}

.chat-avatar i {
    color: #fff;
    font-size: 0.8rem;
}

.chat-content {
    flex: 1;
}

.chat-header-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.admin-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.chat-sender {
    font-weight: 500;
    font-size: 0.8rem;
    color: #ffc107;
    display: inline;
    margin-right: 5px;
}

.admin-sender {
    color: #dc3545;
}

.chat-time {
    font-size: 0.75rem;
    color: #777;
    margin-left: 5px;
}

.chat-bubble {
    background-color: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    word-break: break-word;
    font-size: 0.9rem;
    border: none;
    box-shadow: none;
}

.admin-bubble {
    background-color: transparent;
}

.chat-footer {
    padding: 10px;
    background-color: var(--dark-card);
}

.chat-input-container {
    display: flex;
    align-items: center;
}

.chat-input {
    flex: 1;
    background-color: #333;
    border: none;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 0.9rem;
    color: white;
}

.chat-input:focus {
    outline: none;
    background-color: #444;
}

.chat-send {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* CSS cho prompt đăng nhập */
.chat-login-prompt {
    text-align: center;
}

.login-chat-btn {
    background-color: #ffc107 !important;
    color: #000 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    display: inline-block !important;
    text-align: center !important;
}

/* Mobile Chat Panel - Hợp nhất từ nhiều phần */
.mobile-chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    background-color: var(--darker-bg);
    z-index: var(--z-index-modal);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-chat-panel.show {
    transform: translateX(0);
}

.mobile-chat-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--darker-bg);
}

.mobile-chat-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e0e0e0;
    display: flex;
    align-items: center;
}

.mobile-chat-title i.fa-comment-alt {
    margin-right: 6px;
    color: #ffc107;
    font-size: 0.8rem;
}

.mobile-chat-title span {
    margin-right: 6px;
}

.mobile-chat-title i.fa-chevron-down {
    font-size: 0.7rem;
    color: #888;
}

.mobile-online-users {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.mobile-online-users i {
    color: #4a8cff;
    margin-right: 4px;
    font-size: 0.7rem;
}

.mobile-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    background-color: var(--darker-bg);
}

.mobile-chat-body::-webkit-scrollbar {
    width: 4px;
}

.mobile-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-chat-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.mobile-chat-footer {
    padding: 8px;
    background-color: var(--darker-bg);
}

.mobile-message {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
    background-color: transparent !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 2px !important;
    padding: 3px 0 !important;
}

.mobile-message:after,
.mobile-message:before {
    display: none !important;
    content: none !important;
}

.mobile-message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-message-content {
    flex: 1;
}

.mobile-message-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffc107;
    margin-bottom: 1px;
    display: inline;
}

.mobile-message-text {
    font-size: 0.75rem;
    color: #ffffff;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    word-break: break-word;
    border: none;
    display: inline;
    margin-left: 5px;
}

.mobile-message-time {
    font-size: 0.65rem;
    color: #777;
    margin-top: 1px;
    display: block;
}

.mobile-chat-input-container {
    display: flex;
    align-items: center;
    padding: 3px;
    position: relative;
}

.mobile-chat-input {
    flex: 1;
    background-color: #222;
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 0.8rem;
    height: 32px;
}

.mobile-chat-input:focus {
    outline: none;
    background-color: #333;
}

.mobile-chat-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffc107;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    border: none;
    cursor: pointer;
}

.mobile-chat-send i {
    font-size: 0.75rem;
}

/* Tin nhắn hệ thống */
.mobile-hethong,
.mobile-system-message {
    color: #ff9999 !important;
    text-align: center !important;
    padding: 3px !important;
    margin: 3px 0 !important;
    font-size: 12px !important;
    background-color: rgba(0,0,0,0.3) !important;
    border-radius: 3px !important;
}

/* Mobile Chat Username */
.mobile-chat-username {
    color: #ff9800 !important;
    max-width: 150px !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow: visible !important;
}

/* Định dạng cho header của tin nhắn admin */
.mobile-admin-header {
    color: #ff3e3e;
    animation: electricBorder 1.5s infinite;
}

/* Định dạng cho nội dung tin nhắn admin */
.mobile-admin-text {
    background-color: transparent !important;
}

/* Overlay khi chat panel hiển thị */
.mobile-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-index-modal) - 1);
    display: none;
}

/* Hiển thị overlay khi chat panel hiển thị */
.mobile-chat-overlay.show {
    display: block;
}

/* Nút "Trả lời" cho tin nhắn */
.mobile-reply-button {
    color: #777;
    font-size: 0.65rem;
    cursor: pointer;
    margin-top: 2px;
    display: inline-block;
}

.mobile-reply-button:hover {
    color: #ffc107;
    text-decoration: underline;
}

/* Animation cho admin */
@keyframes electricBorder {
    0% { text-shadow: 0 0 3px #ff0000, 0 0 5px #ff0000 !important; }
    50% { text-shadow: 0 0 5px #ff0000, 0 0 8px #ff8800, 0 0 12px #ffff00 !important; }
    100% { text-shadow: 0 0 3px #ff0000, 0 0 5px #ff0000 !important; }
}

.admin-electric {
    animation: electricBorder 1.5s infinite !important;
    color: #ff0000 !important;
    font-weight: bold !important;
    font-size: 0.7rem !important;
}
/* Ẩn thanh kéo bên trái cho right-chat-body */
.right-chat-body {
    scrollbar-width: none !important; /* Cho Firefox */
    -ms-overflow-style: none !important; /* Cho IE and Edge */
}

.right-chat-body::-webkit-scrollbar {
    display: none !important; /* Cho Chrome, Safari và Opera */
    width: 0 !important;
}
/* ======================================
   MODALS
====================================== */
.modal-content.bg-dark {
    background-color: var(--dark-card) !important;
    border: 1px solid var(--dark-border);
}

.modal-content .form-control {
    background-color: #333 !important;
    border-color: var(--dark-border);
    color: var(--text-color);
}

.modal-content .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Làm mờ nền khi modal hiển thị */
.modal-backdrop {
    opacity: 0.8 !important;
    background-color: #000 !important;
}

/* Nút đăng nhập/đăng ký màu vàng */
#login-button, #register-button {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: bold !important;
}

/* Link chuyển đổi giữa đăng nhập/đăng ký */
#registerLink, #loginLink {
    color: #ffc107 !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 5px 10px !important;
    border: 1px solid #ffc107 !important;
    border-radius: 4px !important;
    transition: all 0.3s !important;
}

#registerLink:hover, #loginLink:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Tiêu đề và text màu trắng đậm */
.modal-body h5,
.modal-body .text-white {
    color: #fff !important;
    font-weight: bold !important;
}

/* Counter text */
.username-counter,
.password-counter {
    color: #aaa !important;
    font-weight: normal !important;
}

/* Input fields */
.form-control {
    font-weight: bold !important;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important; /* Màu trắng nhạt hơn cho placeholder */
}

/* ======================================
   GAME CARDS & CONTENT ELEMENTS
====================================== */
/* Các card container cho game */
.game-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 0;
}

.game-card {
    background-color: var(--dark-card);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--dark-border);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    position: relative;
}

.game-card-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.game-card-tag {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-color);
}

.game-card-info {
    padding: 15px;
}

.game-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.game-card-subtitle {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 10px;
}

.game-card-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--secondary-text);
}

.game-card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Section titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

.section-title span {
    color: var(--primary-color);
}

/* Category pills */
.category-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-pill {
    background-color: var(--dark-card);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
    background-color: var(--primary-color);
    color: #000;
}

/* ======================================
   UTILITY CLASSES
====================================== */
.overflow-hidden {
    overflow: hidden !important;
}

/* ======================================
   MOBILE TAB BUTTONS
====================================== */
/* Mobile Tab Buttons - Nút xem thêm mobile */
.mobile-tab-buttons {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: var(--darker-bg);
    border-top: 1px solid var(--dark-border);
    z-index: var(--z-index-sidebar);
}

.mobile-tab-buttons .tab-button {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.mobile-tab-buttons .tab-button i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.mobile-tab-buttons .tab-button.active {
    color: var(--primary-color);
}

/* Mobile More Menu styles */
.mobile-more-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--darker-bg);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: var(--z-index-modal);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-more-menu.show {
    transform: translateY(0);
}

.mobile-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--dark-border);
}

.mobile-more-header h5 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
}

.mobile-more-header i {
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.mobile-more-content {
    padding: 15px;
}

.mobile-more-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.mobile-more-item:hover {
    background-color: var(--dark-hover);
    color: var(--primary-color);
}

.mobile-more-item i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    color: var(--primary-color);
}

.mobile-more-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: var(--z-index-overlay);
    display: none;
}

.mobile-more-overlay.show {
    display: block;
}

/* ======================================
   USER INFO & PROFILE POPUP
====================================== */
/* Profile Popup Styles */
.profile-popup {
    position: fixed !important;
    top: 60px !important;
    right: -350px !important;
    width: 280px !important;
    background-color: #121212 !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
    z-index: 999999 !important;
    transition: right 0.3s ease !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
}

.profile-popup.active {
    right: 20px !important;
}

/* Cập nhật CSS cho overlay làm mờ toàn bộ trang */
.profile-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    z-index: 999998 !important;
    display: none !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    transition: opacity 0.3s ease !important;
    opacity: 0 !important;
}

.profile-overlay.active {
    display: block !important;
    opacity: 1 !important;
}

.profile-content {
    padding: 15px !important;
}

/* Header theo ảnh mẫu */
.profile-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    position: relative !important;
    padding-bottom: 10px !important;
}

.profile-close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #fff !important;
    z-index: 2 !important;
}

.profile-avatar {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
    border: 2px solid #ffc107 !important;
}

.profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.profile-info {
    width: 100% !important;
    text-align: center !important;
}

.profile-username-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
}

.profile-username {
    font-size: 1rem !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.profile-rank {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.rank-label {
    font-weight: 600 !important;
}

.rank-title {
    font-weight: 600 !important;
}

/* Màu sắc cho từng cấp độ VIP */
.profile-rank[data-level="0"],
.profile-rank[data-level="1"],
.profile-rank[data-level="2"],
.profile-rank[data-level="3"] {
    background-color: rgba(79, 195, 247, 0.2) !important;
    color: #4fc3f7 !important;
}

.profile-rank[data-level="4"],
.profile-rank[data-level="5"],
.profile-rank[data-level="6"] {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107 !important;
}

.profile-rank[data-level="7"],
.profile-rank[data-level="8"],
.profile-rank[data-level="9"] {
    background-color: rgba(233, 30, 99, 0.2) !important;
    color: #e91e63 !important;
}

.profile-rank[data-level="10"] {
    background-color: rgba(156, 39, 176, 0.2) !important;
    color: #9c27b0 !important;
}

/* Stats */
.profile-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
}

.stat-item {
    background-color: #1a1a1a !important;
    padding: 8px !important;
    border-radius: 5px !important;
    text-align: center !important;
}

.stat-label {
    font-size: 0.75rem !important;
    color: #aaa !important;
    margin-bottom: 3px !important;
}

.stat-value {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #fff !important;
}

/* Lịch sử đăng nhập */
.profile-activities {
    margin-bottom: 15px !important;
}

.activity-title {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
    color: #ffc107 !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.activity-title::before {
    content: "\f017" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    color: #ffc107 !important;
}

.activity-list {
    margin-bottom: 10px !important;
}

.activity-item {
    padding: 8px 0 !important;
    font-size: 0.8rem !important;
}

.activity-item:last-child {
    border-bottom: none !important;
}

.activity-info {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 0.8rem !important;
    margin-bottom: 3px !important;
}

.activity-text {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    color: #fff !important;
}

/* IP có màu vàng */
.activity-text .ip-highlight {
    color: #ffc107 !important;
    font-weight: bold !important;
}

.activity-icon {
    color: #ffc107 !important;
}

.activity-time {
    color: #777 !important;
    font-size: 0.75rem !important;
}

/* Phân trang */
.login-pagination {
    display: flex !important;
    justify-content: center !important;
    gap: 5px !important;
    margin: 10px 0 !important;
}

.page-number, .page-btn {
    width: 25px !important;
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #1a1a1a !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    color: #aaa !important;
    transition: all 0.3s !important;
    border: none !important;
}

.page-number.active {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.page-number:hover:not(.active),
.page-btn:hover {
    background-color: #333 !important;
}

/* Nút hành động icon */
.profile-actions {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-top: 20px !important;
}

.action-icon-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.logout-btn {
    background-color: #f44336 !important;
    color: #fff !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2 !important;
    border-radius: 50% !important;
}

.settings-btn {
    background-color: #1e88e5 !important;
    color: #fff !important;
    display: none !important;
}

.logout-btn:hover {
    background-color: #d32f2f !important;
    transform: translateY(-2px) !important;
}

.settings-btn:hover {
    background-color: #1976d2 !important;
    transform: translateY(-2px) !important;
}

/* Spinner loading */
.loading-spinner {
    text-align: center !important;
    padding: 10px !important;
    color: #aaa !important;
    font-size: 0.8rem !important;
}

/* Kiểu cho tin nhắn Bot */
.bot-message {
    display: flex;
    margin-bottom: 15px;
    padding: 8px;
    border-radius: 10px;
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 3px solid #007bff;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.bot-avatar i {
    font-size: 20px;
}

.bot-content {
    flex: 1;
}

.bot-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.bot-badge {
    background-color: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 10px;
}

.bot-time {
    color: #6c757d;
    font-size: 11px;
}

.bot-bubble {
    background-color: #e3f2fd;
    padding: 10px;
    border-radius: 8px;
    border-top-left-radius: 0;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Thêm hiệu ứng hover cho tin nhắn bot */
.bot-message:hover .bot-bubble {
    background-color: #cce5ff;
}

/* ======================================
   RESPONSIVE STYLES
====================================== */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        width: 260px;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-toggle {
        display: block;
    }

    .search-container {
        width: 200px;
    }

    body.sidebar-open {
        overflow: hidden;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .main-content.with-chatbox {
        width: 100%;
        margin-right: 0;
    }
    
    .main-header {
        left: 0;
    }
    
    /* Hiển thị buttons đăng nhập/đăng ký trên mobile sidebar */
    .auth-buttons-mobile {
        display: flex;
    }
    
    .right-chat-sidebar {
        width: 280px !important;
    }
}

@media (max-width: 768px) {
    .search-container {
        width: 160px;
    }
    
    .world-channel {
        display: none !important;
    }
    
    .globe-btn {
        display: flex;
    }

    .fixed-chat-panel {
        width: 100%;
        height: 400px;
    }

    #userDropdown {
        right: 15px;
    }
    
    .game-card-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .mobile-tab-buttons {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 50px; /* Give space for mobile tab buttons */
    }
    
    .right-chat-sidebar {
        width: 100% !important;
        display: none !important;
    }
    
    .right-chat-sidebar.show {
        display: flex !important;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 0 10px;
    }
    
    .search-container {
        width: 120px;
    }
    
    #userDropdown,
    #channelDropdown {
        right: 10px;
        width: 180px;
    }

    .content-wrapper {
        padding: 15px 10px;
    }

    .content-center {
        padding: 15px 10px;
    }

    .mobile-chat-panel {
        width: 80%;
    }
    
    .game-card-container {
        grid-template-columns: 1fr;
    }
    
    .category-pills {
        padding-bottom: 5px;
    }
    
    .category-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .dg-alert-container {
        top: 20px;
        width: 90%;
        padding: 10px 15px;
        min-width: unset;
    }
    
    .dg-alert-icon {
        font-size: 16px;
    }
    
    .dg-alert-message {
        font-size: 13px;
    }
}

@media (min-width: 769px) {
    .mobile-more-menu,
    .mobile-more-overlay,
    .mobile-tab-buttons {
        display: none !important;
    }
}

/* Reset CSS đặc biệt cho Sidebar */
.sidebar * {
    border-bottom: none !important; /* Đảm bảo không có gạch chân */
    text-decoration: none !important; /* Đảm bảo không có gạch chân */
}

/* Base Variables */
:root {
    --sidebar-width: 250px;
    --darker-bg: #121212;
    --dark-bg: #1a1a1a;
    --primary-color: #ffc107;
    --primary-hover: #e0a800;
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.05);
    --dark-border: #333;
    --dark-hover: #2a2a2a;
    --dark-card: #1a1a1a;
    --secondary-text: #aaa;
    --header-height: 60px;
    --z-index-sidebar: 1200;
    --z-index-header: 1100;
    --z-index-dropdown: 1300;
    --z-index-notification: 1400;
    --z-index-modal: 1500;
    --z-index-overlay: 1050;
    --z-index-chatpanel: 1250;
    --chatbox-right-width: 280px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Sidebar Container */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--darker-bg);
    z-index: var(--z-index-sidebar);
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Make sure no legacy dividers are visible */
.sidebar hr,
.sidebar .divider,
.sidebar *[class*="divider"],
.sidebar *[class*="separator"] {
    display: none !important;
}

/* Brand/Logo */
.sidebar-brand {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.sidebar-brand img {
    height: 35px;
}

/* Action Buttons (Chơi Ngay & Liên Hệ) */
.sidebar-action-buttons {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0px;
    margin-top: 5px;
}

/* Nút Chơi Ngay với hiệu ứng tia sét/điện giải */
.sidebar-action-btn.primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #000;
    border: none;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: pulse 1.5s infinite alternate;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hiệu ứng nhấp nháy */
@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 165, 0, 0.4);
    }
}

/* Tia sét xung quanh nút */
.sidebar-action-btn.primary::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    z-index: -1;
    border-radius: 8px;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 35%, transparent 0%, transparent 50%, rgba(255, 255, 0, 0.8) 50%, transparent 52%),
        radial-gradient(circle at 80% 35%, transparent 0%, transparent 50%, rgba(255, 255, 0, 0.8) 50%, transparent 52%),
        radial-gradient(circle at 20% 65%, transparent 0%, transparent 50%, rgba(255, 255, 0, 0.8) 50%, transparent 52%),
        radial-gradient(circle at 80% 65%, transparent 0%, transparent 50%, rgba(255, 255, 0, 0.8) 50%, transparent 52%),
        linear-gradient(to right, transparent 0%, transparent 5%, rgba(255, 255, 0, 0.8) 5%, transparent 7%),
        linear-gradient(to right, transparent 93%, rgba(255, 255, 0, 0.8) 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, transparent 5%, rgba(255, 255, 0, 0.8) 5%, transparent 7%),
        linear-gradient(to bottom, transparent 93%, rgba(255, 255, 0, 0.8) 95%, transparent 100%);
    opacity: 0;
    animation: electricity 2s infinite;
}

/* Tia điện chạy xung quanh nút */
@keyframes electricity {
    0% { opacity: 0; }
    40% { opacity: 0; }
    45% { opacity: 0.8; }
    50% { opacity: 0; }
    55% { opacity: 0.4; }
    60% { opacity: 0; }
    70% { opacity: 0.8; }
    80% { opacity: 0; }
    85% { opacity: 0.4; }
    90% { opacity: 0; }
    100% { opacity: 0; }
}

/* Hiệu ứng khi hover */
.sidebar-action-btn.primary:hover {
    background: linear-gradient(135deg, #ffdf4c 0%, #ffb52e 100%);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 15px rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 165, 0, 0.5);
}

.sidebar-action-btn.primary:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.8);
    animation: lightning 0.8s infinite alternate;
}

/* Tia sét nhấp nháy nhanh khi hover */
@keyframes lightning {
    0% {
        box-shadow: 
            inset 0 0 10px rgba(255, 255, 255, 0.8),
            0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 
            inset 0 0 5px rgba(255, 255, 255, 0.5),
            0 0 15px rgba(255, 215, 0, 0.7);
    }
    100% {
        box-shadow: 
            inset 0 0 10px rgba(255, 255, 255, 0.8),
            0 0 25px rgba(255, 215, 0, 0.7);
    }
}

/* Nút Liên Hệ - thiết kế đơn giản hơn */
.sidebar-action-btn.secondary {
    background: linear-gradient(to bottom, #2a2a2a, #222222);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-action-btn.secondary:hover {
    background: linear-gradient(to bottom, #333333, #2a2a2a);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.sidebar-action-btn.secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Icon trong nút */
.sidebar-action-btn i {
    margin-right: 8px;
    font-size: 15px;
}

.sidebar-action-btn.primary i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sidebar-action-btn.primary:hover i {
    transform: scale(1.2);
}

/* Sidebar Category Heading */
.sidebar-category {
    padding: 15px 15px 8px;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
    margin-top: 5px;
}

/* Sidebar Item */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    margin: 2px 0;
    margin-left: 5px;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.sidebar-icon {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    color: #888888;
    font-size: 16px;
}

.sidebar-item:hover .sidebar-icon,
.sidebar-item.active .sidebar-icon {
    color: var(--text-color);
}

/* Contact Support Button (Bottom) */
.contact-support {
    margin-top: auto;
    padding: 15px;
}

.contact-support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #0099ff;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-support-btn:hover {
    background-color: #0088ee;
}

/* Divider */
.sidebar-divider {
    margin: 10px 15px;
    height: 1px;
    background-color: var(--border-color);
}

/* Auth Buttons */
.auth-buttons-mobile,
.auth-button,
#loginBtnMobile,
#registerBtnMobile,
.sidebar-footer {
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.auth-buttons-mobile {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.auth-button.primary {
    background-color: var(--primary-color);
    color: #000;
    border: none;
}

.auth-button.primary:hover {
    background-color: #e0a800;
}

.auth-button.secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: none;
}

.auth-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-button i {
    margin-right: 8px;
}

/* Overlay for Mobile */
#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-index-sidebar) - 1);
    display: none;
}

/* CSS cho Notification Panel */
.notif-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 320px;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    overflow: hidden;
    border: 1px solid #333;
}

/* Badge hiển thị khi có thông báo mới */
.notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background-color: #f44336;
    border-radius: 50%;
    display: none;
}

/* Header của panel */
.notif-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.notif-title {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

.notif-controls {
    display: flex;
    gap: 10px;
}

.notif-controls span {
    cursor: pointer;
    color: #888;
    padding: 5px;
    transition: color 0.2s;
}

.notif-controls span:hover {
    color: var(--primary-color);
}

/* Danh sách thông báo */
.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

/* Thêm thanh cuộn đẹp */
.notif-list::-webkit-scrollbar {
    width: 5px;
}

.notif-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.notif-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Item thông báo */
.notif-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notif-item:hover {
    background-color: #252525;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #007bff;
}

.notif-content {
    flex: 1;
}

.notif-text {
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.4;
}

.notif-time {
    font-size: 12px;
    color: #888;
}

/* Trạng thái không có thông báo */
.notif-empty {
    padding: 30px;
    text-align: center;
    color: #888;
}

/* Loading spinner */
.notif-loading {
    padding: 30px;
    text-align: center;
    color: #888;
}

.notif-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Phân trang - thống nhất */
.notif-pagination,
.notification-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 15px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    gap: 10px;
}

.notif-page-btn,
.page-nav {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-page-btn:hover:not(.disabled),
.page-nav:hover {
    background-color: #444;
}

.notif-page-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

.notif-current-page,
.page-item.active {
    background-color: var(--primary-color);
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.page-item {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    margin: 0 2px;
    cursor: pointer;
    font-size: 12px;
}

/* Hiển thị tổng số trang */
.notif-page-info {
    color: #888;
    font-size: 12px;
    margin: 0 10px;
}

/* CSS nâng cao cho thông báo admin */
.admin-notification {
    background-color: rgba(255, 152, 0, 0.08);
    border-left: 3px solid #ff9800;
    position: relative;
    margin-bottom: 3px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.admin-notification:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0) 70%);
    pointer-events: none;
}

.admin-badge {
    background-color: #ff9800;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-notification .notif-icon {
    background-color: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.admin-notification .notif-text {
    font-weight: 500;
}

/* CSS cho Search Popup */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    display: none;
    padding: 20px;
}

.search-popup-content {
    max-width: 600px;
    margin: 100px auto 0;
    background-color: #202020;
    border-radius: 8px;
    overflow: hidden;
}

.search-popup-header {
    padding: 15px;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
}

.search-popup-header .search-icon {
    position: static;
    margin-right: 10px;
    transform: none;
}

.search-popup-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 16px;
    outline: none;
}

.search-popup-close {
    color: #888;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

.search-popup-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.search-popup-empty {
    padding: 30px;
    text-align: center;
    color: #888;
}

.search-popup-empty img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

.search-result-group {
    margin-bottom: 15px;
}

.search-result-label {
    padding: 5px 15px;
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #e0e0e0;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.search-result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.search-result-tag {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #aaa;
}

/* Thành phần người dùng online */
.online-users-component {
    display: flex;
    align-items: center;
    background-color: #808080;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    overflow: hidden;
    padding: 0;
    margin-left: 10px;
}

.online-users-component:hover {
    opacity: 0.9;
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E74C3C;
    height: 100%;
    width: 32px;
}

.icon-container i {
    font-size: 16px;
    color: #fff;
}

.text-container {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background-color: #808080;
}

.text-container span {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.online-count {
    margin-left: 5px;
    font-weight: bold;
    color: #aaa;
}

/* Popup và overlay người dùng online */
.online-users-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9000;
    display: none;
    backdrop-filter: blur(3px);
}

.online-users-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    background-color: #1a1a1a;
    border-radius: 10px;
    z-index: 9001;
    display: none;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(to right, #FFD700, #FFA500);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.popup-title {
    font-weight: bold;
    color: #000;
    font-size: 16px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.3);
}

.popup-close {
    color: #000;
    cursor: pointer;
    font-size: 22px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background-color: rgba(0,0,0,0.2);
    transform: rotate(90deg);
}

.popup-content {
    max-height: 500px;
    overflow-y: auto;
}

/* Custom scrollbar cho popup */
.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* User Categories */
.user-category {
    border-bottom: 1px solid #333;
}

.user-category:last-child {
    border-bottom: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #222;
}

.category-header:hover {
    background-color: #2a2a2a;
}

.category-name {
    color: #fff;
    font-weight: 500;
}

.category-count {
    background-color: #FFD700;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #000;
    margin-right: 10px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.category-arrow {
    color: #aaa;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Category content - animation */
.category-users {
    display: none;
    background-color: #272727;
    max-height: 300px;
    overflow-y: auto;
}

.category-users.expanded {
    display: block;
    animation: expandDown 0.3s ease forwards;
}

@keyframes expandDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 300px; opacity: 1; }
}

/* User items */
.user-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    transition: background 0.2s ease;
}

.user-item:hover {
    background-color: #2c2c2c;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #000;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.user-info {
    flex: 1;
}

.user-name {
    color: #fff;
    margin-bottom: 4px;
    font-weight: 500;
}

.user-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: linear-gradient(to right, #ffc107, #ffab00);
    color: #000;
    font-weight: bold;
}

.admin-level {
    background: linear-gradient(to right, #f44336, #d32f2f);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px #E74C3C;
    animation: glowing 1.5s infinite alternate;
}

.admin-level:before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        transparent, 
        transparent, 
        transparent, 
        #fff
    );
    transform: rotate(45deg);
    animation: lightning 3s infinite;
    opacity: 0.3;
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px #E74C3C; }
    100% { box-shadow: 0 0 15px #E74C3C, 0 0 20px #FF5722; }
}

@keyframes lightning {
    0%, 100% { transform: rotate(45deg) translateY(100%); opacity: 0; }
    10%, 30% { opacity: 0; }
    50% { transform: rotate(45deg) translateY(0%); opacity: 0.5; }
    60% { opacity: 0; }
}

/* Admin user item - thêm hiệu ứng đặc biệt */
.user-item.admin-user {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.1), transparent);
    position: relative;
    overflow: hidden;
}

.user-item.admin-user:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(231, 76, 60, 0) 40%, 
        rgba(231, 76, 60, 0.1) 50%, 
        rgba(231, 76, 60, 0) 60%);
    z-index: 1;
    animation: adminGlow 3s infinite;
}

.user-item.admin-user .user-avatar {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: #fff;
    position: relative;
}

.user-item.admin-user .user-avatar:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.3)" stroke-width="2"><path d="M12 2L9 9H2l5.5 4L5 20l7-4.5L19 20l-2.5-7L22 9h-7l-3-7z"/></svg>') no-repeat center/70%;
    animation: rotate 10s linear infinite;
}

@keyframes adminGlow {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading và trạng thái trống */
.loading, .no-users-message {
    padding: 25px;
    text-align: center;
    color: #888;
    font-style: italic;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Nút hành động icon - hợp nhất mã */
.profile-actions {
    display: flex;
    justify-content: space-evenly;
    margin-top: 15px;
    padding: 10px 0;
}

.action-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: #ffc107;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-icon-btn:hover {
    background-color: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.logout-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,0,0,0.1);
    color: #ff5252;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 2 !important;
}

.logout-btn:hover {
    background-color: rgba(255,0,0,0.2);
    transform: scale(1.05);
}

.settings-btn {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    display: none !important;
}

.password-btn {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.reset-btn {
    background-color: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

/* CSS cho các popup đổi mật khẩu và đặt lại */
.password-popup, .reset-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
}

.password-popup.active, .reset-popup.active {
    display: flex !important; /* Hiển thị popup khi có class .active */
}

/* Nội dung của popup */
.password-content, .reset-content {
    background-color: #1a1a1a;
    border-radius: 10px;
    width: 50%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: popup-fade 0.3s ease;
    position: relative !important;
    z-index: 1000000 !important;
}

/* Hiệu ứng fade cho popup */
@keyframes popup-fade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@media (max-width: 576px) {
    .password-content, .reset-content {
        width: 95%;
    }
    
    .popup-title {
        font-size: 16px;
    }
    
    .form-control {
        font-size: 13px;
    }
    
    .submit-btn, .cancel-btn {
        padding: 7px 15px;
        font-size: 13px;
    }
}
.popup-header {
    padding: 15px;
    background-color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    border-radius: 20px 20px 0 0; /* Bo tròn chỉ 2 góc trên */
}
.popup-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.popup-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.2); /* Nền đỏ nhạt */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ff4444; /* Màu icon đỏ */
    transition: all 0.3s ease;
    font-size: 20px;
    border: 1px solid rgba(255, 0, 0, 0.3); /* Viền đỏ nhạt */
}

.popup-close:hover {
    background-color: rgba(255, 0, 0, 0.4); /* Nền đỏ đậm hơn khi hover */
    color: #ff0000; /* Màu icon đỏ sáng hơn */
    transform: rotate(90deg); /* Hiệu ứng xoay */
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); /* Thêm shadow */
}

.popup-close i {
    font-size: 18px; /* Điều chỉnh kích thước icon */
}

.popup-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #fff; /* Chuyển màu chữ thành trắng */
    font-size: 14px;
    font-weight: bold; /* Làm chữ in đậm */
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    background-color: #333;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.4);
}

.popup-footer {
    padding: 15px;
    background-color: #222;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #333;
}

.submit-btn {
    padding: 8px 20px;
    background-color: #ffc107;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background-color: #e0a800;
}

.cancel-btn {
    padding: 8px 20px;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.result-message {
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
}

.result-message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
    display: block;
}

.result-message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
    display: block;
}

.password-copy {
    display: flex;
    align-items: center;
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.password-text {
    flex: 1;
    color: #4CAF50;
    font-size: 16px;
    user-select: all;
}

.copy-btn:hover {
    background-color: rgba(76, 175, 80, 0.4);
}
}

.copy-btn:hover {
    background-color: rgba(76, 175, 80, 0.4);
}
/* Ngăn giãn trang trên mobile khi click vào phần tử - điều chỉnh an toàn */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ngăn text bị tràn ra ngoài container mà không ảnh hưởng đến popup */
p, div, span, h1, h2, h3, h4, h5, h6, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Sửa lỗi input size tốt hơn */
input, select, textarea {
    font-size: 16px; /* Ngăn iOS tự động zoom vào input */
    max-width: 100%;
}

/* Cải thiện tương tác chạm trên thiết bị mobile */
.sidebar-item, .sidebar-action-btn, .auth-button, .notif-item {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    touch-action: manipulation;
}

/* Đảm bảo các phần tử chính không tràn ra ngoài */
.main-content, .sidebar, .content-wrapper, .content-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ngăn các popup bị ảnh hưởng */
.password-popup, .reset-popup, .password-content, .reset-content, 
.popup-body, .popup-header, .popup-footer, .popup-content {
    overflow: visible !important;
    max-width: none !important; /* Đảm bảo popup không bị giới hạn kích thước */
}

/* Chỉ định rõ phần tử cần scroll */
.notif-list, .popup-content {
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* Media query cho thiết bị nhỏ */
@media (max-width: 576px) {
    /* Đảm bảo các nút không bị lấn ra ngoài */
    .profile-actions {
        gap: 8px;
        justify-content: center;
    }
    
    /* Đảm bảo form control vừa vặn trên mobile */
    .form-control {
        width: 100%;
        box-sizing: border-box;
    }
}
.container {
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Banner/Hero Section */
.dgt-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    height: auto;
    min-height: 350px; /* Reduced for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px; /* Reduced padding for mobile */
    margin-bottom: 30px;
}

.dgt-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.dgt-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.dgt-logo-container {
    width: 60px; /* Smaller for mobile */
    height: 60px; /* Smaller for mobile */
    margin: 0 auto 10px; /* Reduced margin */
}

.dgt-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dgt-title {
    font-size: 2rem; /* Smaller for mobile */
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.dgt-subtitle {
    font-size: 1rem; /* Smaller for mobile */
    margin-bottom: 15px;
    color: var(--text-muted);
}

.dgt-stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Reduced gap for mobile */
    margin-bottom: 20px; /* Reduced margin */
}

.dgt-stat-item {
    text-align: center;
}

.dgt-stat-number {
    font-size: 1.8rem; /* Smaller for mobile */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3px;
}

.dgt-stat-label {
    font-size: 0.85rem; /* Smaller for mobile */
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dgt-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Reduced gap */
}

.dgt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px; /* Smaller padding */
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-size: 0.9rem; /* Smaller font */
}

.dgt-btn i {
    margin-right: 8px;
}

.dgt-btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.dgt-btn-primary:hover {
    background-color: #e0a800;
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.dgt-btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.dgt-btn-outline:hover {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.1);
}
/* nút đăng ký*/
.dgt-outline-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.dgt-outline-btn:hover {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.1);
}

/* Section Styling */
.dgt-section {
    margin-bottom: 40px;
}

.dgt-section-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.dgt-section-title {
    font-size: 1.3rem; /* Smaller for mobile */
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dgt-view-more {
    margin-left: auto;
    background-color: var(--primary-color);
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.dgt-view-more:hover {
    background-color: #e0a800;
    color: var(--dark-color);
    transform: translateY(-2px);
}

.dgt-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dgt-tab {
    background: transparent;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dgt-tab:hover {
    color: var(--primary-color);
}

.dgt-tab.active {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
}

/* News Cards */
.dgt-news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Reduced for mobile */
    gap: 15px; /* Reduced gap */
}

.dgt-news-card {
    background-color: var(--dark-light-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dgt-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dgt-news-image {
    position: relative;
    height: 160px; /* Reduced height */
}

.dgt-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dgt-news-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dgt-news-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dgt-news-title {
    font-size: 1rem; /* Reduced size */
    margin-bottom: 10px;
    font-weight: 600;
}

.dgt-news-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dgt-news-title a:hover {
    color: var(--primary-color);
}

.dgt-news-excerpt {
    color: var(--text-muted);
    font-size: 0.85rem; /* Reduced size */
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.dgt-news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dgt-news-time, .dgt-news-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Game Grid */
.dgt-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Smaller for mobile */
    gap: 15px; /* Reduced gap */
}

.dgt-game-card {
    background-color: var(--dark-light-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dgt-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dgt-game-thumb {
    position: relative;
    height: 140px; /* Reduced height */
}

.dgt-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.dgt-game-card:hover .dgt-game-thumb img {
    transform: scale(1.05);
}

.dgt-game-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--dark-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
}

.dgt-game-hot {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4757;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dgt-game-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dgt-game-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.dgt-game-category, .dgt-game-type {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dgt-game-title {
    font-size: 1rem; /* Reduced size */
    margin-bottom: 8px;
    font-weight: 600;
}

.dgt-game-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dgt-game-title a:hover {
    color: var(--primary-color);
}

.dgt-game-desc {
    color: var(--text-muted);
    font-size: 0.85rem; /* Reduced size */
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.dgt-game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dgt-game-stats {
    display: flex;
    gap: 10px; /* Reduced gap */
}

.dgt-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
}

.like-btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-btn:hover {
    color: var(--primary-color);
}

.like-btn:hover i {
    transform: scale(1.2);
}

.dgt-game-play {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dgt-game-play:hover {
    background-color: #e0a800;
    transform: scale(1.1);
}

/* Server Cards */
.dgt-server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.dgt-server-card {
    display: flex;
    align-items: center;
    background-color: var(--dark-light-color);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.dgt-server-card:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.05);
}

.dgt-server-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.dgt-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dgt-server-info {
    flex: 1;
}

.dgt-server-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px;
    color: var(--text-color);
}

.dgt-server-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    align-items: center;
}

.dgt-server-id {
    color: var(--primary-color);
    font-weight: 500;
}

.dgt-server-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dgt-server-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.dgt-server-card:hover .dgt-server-link {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

/* Empty State */
.dgt-empty {
    background-color: var(--dark-light-color);
    padding: 30px 20px;
    text-align: center;
    border-radius: 10px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.dgt-empty-icon {
    font-size: 2rem;
    opacity: 0.5;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .dgt-banner {
        min-height: 300px;
        padding: 30px 15px;
    }
    
    .dgt-logo-container {
        width: 50px;
        height: 50px;
    }
    
    .dgt-title {
        font-size: 1.8rem;
    }
    
    .dgt-subtitle {
        font-size: 0.9rem;
    }
    
    .dgt-stats-container {
        gap: 10px;
    }
    
    .dgt-stat-number {
        font-size: 1.5rem;
    }
    
    .dgt-stat-label {
        font-size: 0.8rem;
    }
    
    .dgt-section-title {
        font-size: 1.2rem;
    }
    
    .dgt-news-container,
    .dgt-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .dgt-news-image,
    .dgt-game-thumb {
        height: 130px;
    }
}

@media (max-width: 480px) {
    .dgt-banner {
        min-height: 260px;
        padding: 25px 10px;
    }
    
    .dgt-logo-container {
        width: 40px;
        height: 40px;
    }
    
    .dgt-title {
        font-size: 1.5rem;
    }
    
    .dgt-subtitle {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .dgt-stats-container {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .dgt-stat-item {
        width: 45%;
        margin-bottom: 5px;
    }
    
    .dgt-stat-number {
        font-size: 1.3rem;
    }
    
    .dgt-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .dgt-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dgt-view-more {
        margin-left: 0;
    }
    
    .dgt-tabs {
        width: 100%;
        justify-content: space-between;
    }
    
    .dgt-news-container,
    .dgt-game-grid {
        grid-template-columns: 1fr;
    }
}
.dgt-hero-btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dgt-primary-btn {
    background-color: #ffc107;
    color: #000;
}

.dgt-primary-btn:hover {
    background-color: #e0a800;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}
/* Ẩn thanh kéo bên phải của sidebar */
.sidebar {
    scrollbar-width: none !important; /* Cho Firefox */
    -ms-overflow-style: none !important; /* Cho IE và Edge */
    border-right: none !important; /* Xóa đường viền bên phải */
    box-shadow: none !important; /* Xóa đổ bóng */
}

.sidebar::-webkit-scrollbar {
    display: none !important; /* Ẩn thanh kéo cho Chrome, Safari và Opera */
    width: 0 !important;
}

/* Xóa bỏ mọi đường viền có thể có */
.sidebar * {
    border-right: none !important;
}

/* Đảm bảo màu nền của sidebar khớp với màu nền website */
.sidebar {
    background-color: var(--darker-bg) !important;
}
/* Ẩn viền bên trái của chatbox */
.right-chat-sidebar {
    border-left: none !important; /* Xóa đường viền bên trái nếu có */
    box-shadow: none !important; /* Xóa đổ bóng */
}

/* Đảm bảo màu nền khớp với website */
.right-chat-sidebar, 
.right-chat-header,
.right-chat-body,
.right-chat-footer {
    background-color: var(--darker-bg) !important;
    border-left: none !important;
}

/* Xóa bỏ mọi đường viền bên trái có thể có trên các phần tử con */
.right-chat-sidebar *,
.right-chat-header *,
.right-chat-body *,
.right-chat-footer * {
    border-left: none !important;
}

/* Làm mềm mại góc bên trái nếu cần */
.right-chat-sidebar {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
/* Ẩn viền và làm tệp với màu nền */
.main-header {
    box-shadow: none !important; /* Xóa đổ bóng */
    border-bottom: none !important; /* Xóa đường viền dưới */
    background-color: var(--darker-bg) !important; /* Đảm bảo màu nền đúng */
}

/* Làm mềm mại ranh giới giữa header và nội dung */
.main-header::after {
    display: none !important; /* Xóa bỏ pseudo-element nếu có */
}

/* Đảm bảo màu nền của các phần tử con cũng khớp */
.header-left,
.header-actions {
    background-color: transparent !important;
}

/* Xóa bỏ các đường viền dưới có thể có ở các phần tử con */
.main-header * {
    border-bottom: none !important;
}
.sidebar-category {
    font-weight: 700;
    color: #FFD700; /* Màu vàng đồng nhất với những phần khác */
    border-left: 4px solid #FFD700;
    padding: 5px 15px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); /* Thêm hiệu ứng phát sáng nhẹ */
    display: inline-block;
    margin-left: 5px;
    letter-spacing: 0.5px; /* Tăng khoảng cách chữ */
    position: relative;
}

/* Thêm đường viền dưới mỏng */
.sidebar-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px; /* Căn chỉnh với padding-left */
    width: calc(100% - 20px);
    height: 1px;
    background: linear-gradient(to right, #FFD700, transparent);
}


/* Font đặc biệt CHỈ áp dụng cho desktop */
@media screen and (min-width: 1024px) {
	@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
    body, 
    .sidebar,
    .sidebar-item,
    .sidebar-category,
    .main-header,
    .right-chat-sidebar {
        font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
        letter-spacing: 0.2px !important;
    }
    
    /* Điều chỉnh kích thước và độ đậm cho desktop */
    .sidebar-item {
        font-size: 13px !important;
        font-weight: 500 !important;
    }
    
    .sidebar-category {
        font-size: 14px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Nút chơi ngay - font đẹp hơn cho desktop */
    .sidebar-action-btn.primary {
        font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0.7px !important;
    }
    
    /* Áp dụng font chữ cho span trong sidebar nhưng không in hoa - CHỈ desktop */
    .sidebar-item,
    .sidebar-item span,
    .sidebar a,
    .sidebar span {
        font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif !important;
        text-transform: none !important; /* Không in hoa */
        font-variant: normal !important; /* Không dùng small-caps */
        letter-spacing: 0.2px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
    }
}
/* Font đặc biệt CHỈ áp dụng cho desktop */

.dgt-game-card, .dgt-news-card {
    background: linear-gradient(to bottom, rgba(40, 40, 40, 0.7), rgba(30, 30, 30, 0.7)) !important;
    border: 1px solid rgba(255, 215, 0, 0.1) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

.dgt-game-card:hover, .dgt-news-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 5px rgba(255, 215, 0, 0.3) !important;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
}
.dgt-section-title {
    color: #FFD700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3) !important;
    position: relative !important;
    display: inline-block !important;
}

.dgt-section-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -5px !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(to right, #FFD700, transparent) !important;
}
.dgt-game-hot, .dgt-game-discount {
    background: linear-gradient(135deg, #ff4d00, #ffb100) !important;
    box-shadow: 0 0 10px rgba(255, 167, 0, 0.6) !important;
    animation: pulse-hot 2s infinite !important;
}

@keyframes pulse-hot {
    0% { box-shadow: 0 0 5px rgba(255, 167, 0, 0.6) !important; }
    50% { box-shadow: 0 0 15px rgba(255, 167, 0, 0.8) !important; }
    100% { box-shadow: 0 0 5px rgba(255, 167, 0, 0.6) !important; }
}
.dgt-game-play {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5) !important;
    transition: all 0.3s ease !important;
}

.dgt-game-play:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.7) !important;
}
.dgt-tab.active {
    background-color: transparent !important;
    color: #FFD700 !important;
    position: relative !important;
    border-bottom: 2px solid #FFD700 !important;
}
/* Cải thiện nút Xem Thêm */
.dgt-view-more, 
a.dgt-view-more, 
a[class*="xem-them"], 
.xem-them,
a.xem-them {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #000 !important;
    padding: 6px 15px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dgt-view-more:hover, 
a.dgt-view-more:hover, 
a[class*="xem-them"]:hover,
.xem-them:hover,
a.xem-them:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
    background: linear-gradient(135deg, #FFDF4C, #FFB52E) !important;
}

/* Hiệu ứng tia sét xung quanh nút */
.dgt-view-more::before, 
a.dgt-view-more::before, 
a[class*="xem-them"]::before,
.xem-them::before,
a.xem-them::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    border-radius: 22px !important;
    background: transparent !important;
    z-index: -1 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    background-image: linear-gradient(to right, transparent 0%, rgba(255, 255, 0, 0.3) 50%, transparent 100%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 2s infinite !important;
}

.dgt-view-more:hover::before, 
a.dgt-view-more:hover::before, 
a[class*="xem-them"]:hover::before,
.xem-them:hover::before,
a.xem-them:hover::before {
    opacity: 1 !important;
}

@keyframes shimmer {
    0% { background-position: 200% 0; opacity: 0; }
    30% { opacity: 0.5; }
    70% { opacity: 0.5; }
    100% { background-position: -200% 0; opacity: 0; }
}

/* Icon trong nút */
.dgt-view-more i, 
a.dgt-view-more i, 
a[class*="xem-them"] i,
.xem-them i,
a.xem-them i {
    margin-left: 5px !important;
    font-size: 0.8rem !important;
    transition: transform 0.3s ease !important;
}

.dgt-view-more:hover i, 
a.dgt-view-more:hover i, 
a[class*="xem-them"]:hover i,
.xem-them:hover i,
a.xem-them:hover i {
    transform: translateX(3px) !important;
}

.enhanced-avatar-container {
    position: relative !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 1 !important;
}

.avatar-frame-layer {
    position: absolute !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.original-avatar-icon {
    position: relative !important;
    z-index: 2 !important;
}

.badge-animation-container {
    position: relative !important;
    z-index: 3 !important;
}