/* =========================================================
   1. BIẾN & THIẾT LẬP CƠ BẢN
========================================================= */
:root {
    --bg-dark: #121212;
    --bg-header: #1a1a1a;
    --primary-color: #f5c71a;
    --text-light: #ffffff;
    --card-bg: #222;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* =========================================================
   2. HEADER CHUNG
========================================================= */
.header {
    background-color: var(--bg-header);
    border-bottom: 2px solid #202020;
    padding: 10px 0;
    width: 100%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 80px;
}

.header-left-banners, 
.header-right-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right-section {
    justify-content: flex-end;
    color: #fff;
}

/* Logo */
.logo {
    flex-shrink: 0;
    margin: 0 15px;
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

/* Khối Quảng Cáo CSS */
.css-promo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}

.promo-text-top {
    color: #ffffff;
    font-weight: 900;
    font-size: 16px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
}

.promo-box-red {
    background: linear-gradient(180deg, #ff0000, #990000);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #ff6666;
    color: #ffffff;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    white-space: nowrap;
}

.text-yellow { 
    color: #ffeb3b; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); 
}

/* Thời Gian & Nút Bấm */
.header-info-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin: 0 15px;
}

.time-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    color: #ffffff;
}

.star-icon {
    background-color: #ff0000;
    color: #ffeb3b;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-buttons .btn {
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Times New Roman', Times, serif;
    transition: 0.3s;
    border: 1px solid #ffffff;
}

.btn-login { background-color: #333333; color: #ffffff; }
.btn-login:hover { background-color: #444; }

.btn-register { background-color: #ffaa00; color: #ffffff; }
.btn-register:hover { background-color: #e69900; }

.mobile-menu-btn {
    display: none;
    color: #cccccc;
    font-size: 24px;
    margin-left: 8px;
    cursor: pointer;
}

/* =========================================================
   3. MENU DESKTOP
========================================================= */
.desktop-nav { 
    background-color: #000; 
    padding: 12px 0; 
    border-bottom: 1px solid #222;
}

.desktop-nav ul { 
    list-style: none; 
    display: flex; 
    justify-content: center; 
    gap: 45px; 
    margin: 0;
    padding: 0;
}

.desktop-nav li {
    position: relative; 
}

.desktop-nav a { 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 13px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    transition: color 0.3s ease;
}

.desktop-nav a i {
    font-size: 24px; 
}

.desktop-nav a:hover {
    color: var(--primary-color);
}

/* Huy hiệu (Badge) trên Menu */
.has-badge {
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -15px;
    background: linear-gradient(to right, #ff0000, #cc0000);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    font-style: italic;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none; 
}

/* =========================================================
   4. BANNER SLIDER
========================================================= */
.banner-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden; 
    background-color: #000;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out; 
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.slider-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-indicators .dot {
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    opacity: 0.5;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.slider-indicators .dot.active {
    background-color: #ffcc00;
    opacity: 1;
    transform: scale(1.2); 
}

/* =========================================================
   5. CÁC THÀNH PHẦN GIAO DIỆN MÁY TÍNH
========================================================= */
/* Phần Tính Năng Vượt Trội */
.features-section {
    background-color: #121212;
    padding: 30px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.features-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 15px;
    text-align: center;
}

.features-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Phần Sảnh Trò Chơi */
.game-lobby-section {
    background-color: #121212;
    padding: 40px 15px;
    text-align: center;
    width: 100%;
}

.lobby-title {
    color: #ffcc00; 
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.lobby-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    max-width: 1100px;
    margin: 0 auto;
}

.lobby-item {
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.lobby-item:hover {
    transform: translateY(-5px) scale(1.02);
    filter: brightness(1.15);
}

.lobby-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.item-wide {
    grid-column: span 2;
}

/* =========================================================
   6. CÁC THÀNH PHẦN GIAO DIỆN ĐIỆN THOẠI 
   (Ẩn trên máy tính, chỉ hiện trên Mobile)
========================================================= */
/* Ẩn vùng chứa trên Desktop */
.main-container { 
    display: none; 
}

/* Các thành phần sẽ được định dạng bên trong @media */
.mobile-sidebar { display: none; }
.mobile-bottom-nav { display: none; }

/* =========================================================
   7. RESPONSIVE (MEDIA QUERIES)
========================================================= */
@media (max-width: 1100px) {
    .css-promo-block { display: none; }
    .header-container { justify-content: space-between; }
}

@media (max-width: 768px) {
    body { padding-bottom: 60px; background-color: #2b1f15; /* Màu nền nâu sẫm giống ảnh */ }
    
    /* Header Mobile (Đã có sẵn) */
    .header { padding: 8px 0; border-bottom: 1px solid #333; }
    .header-container { height: auto; padding: 0 10px; }
    .header-left-banners, .time-wrapper { display: none; }
    .header-info-group { margin: 0; }
    .logo { margin: 0; flex-grow: 1; }
    .logo-img { height: 42px; }
    .auth-buttons { gap: 6px; }
    .auth-buttons .btn { padding: 8px 12px; font-size: 11px; font-family: Arial, sans-serif; border-radius: 4px; }
    .btn-login { background-color: transparent; }
    .btn-register { background: linear-gradient(180deg, #ffdb4d, #ff9900); }
    .mobile-menu-btn { display: block; }
    .slider-indicators { bottom: 8px; }
    .slider-indicators .dot { width: 6px; height: 6px; }

    /* Ẩn các phần của Desktop */
    .desktop-nav { display: none; }
    .features-section { display: none; }
    .game-lobby-section { display: none; }

    /* ---------------------------------------------------
       BỐ CỤC CHÍNH MOBILE (SIDEBAR + NỘI DUNG)
    --------------------------------------------------- */
    .main-container {
        display: flex;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    /* Sidebar (Cột danh mục bên trái) */
    .mobile-sidebar { 
        width: 85px; 
        display: flex; 
        flex-direction: column; 
        background-color: #1c1510; /* Màu nền sidebar */
        border-right: 1px solid #3d2c1d;
        flex-shrink: 0;
    }
    
    .mobile-sidebar ul {
        list-style: none;
        padding: 10px 0;
    }

    .mobile-sidebar li { 
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 5px; 
        cursor: pointer; 
        font-size: 11px;
        color: #aaaaaa;
        border-bottom: 1px solid #2a1f16;
    }

    /* Vòng tròn chứa icon */
    .mobile-sidebar .icon-circle {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 1px solid #555;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
        font-size: 18px;
    }

    /* Style cho mục đang chọn (HOT NHẤT) */
    .mobile-sidebar li.active { 
        color: #ffcc00; 
    }
    .mobile-sidebar li.active .icon-circle.highlight {
        background: radial-gradient(circle, #ff9900, #990000);
        border: 2px solid #ffcc00;
        color: #ffffff;
    }

    /* Khu vực bên phải */
    .game-content-area {
        flex-grow: 1;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-x: hidden;
    }

    /* Menu ngang phụ (CSKH, Tin tức...) */
    .mobile-top-menu {
        display: flex;
        justify-content: space-between;
        background-color: #1a1a1a;
        border: 1px solid #ffcc00;
        border-radius: 6px;
        padding: 10px 5px;
    }

    .mobile-top-menu a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #ffffff;
        text-decoration: none;
        font-size: 10px;
        gap: 5px;
        flex: 1;
    }

    .mobile-top-menu i {
        font-size: 18px;
    }

    /* ---------------------------------------------------
       LƯỚI GAME (Hiển thị 3 cột)
    --------------------------------------------------- */
    .game-grid { 
        display: grid; 
        grid-template-columns: repeat(3, 1fr); /* 3 cột game */
        gap: 8px; 
    }

    .game-card { 
        display: flex;
        flex-direction: column;
        border-radius: 6px; 
        overflow: hidden; 
        text-align: center; 
        background-color: transparent;
    }

    /* Phần ảnh game có viền bo tròn */
    .game-card-inner {
        position: relative;
        border: 2px solid #ffcc00; /* Viền vàng */
        border-radius: 6px 6px 0 0;
        background-color: #000;
        padding: 2px;
        aspect-ratio: 1 / 1; /* Hình vuông */
    }

    .provider-logo img {
        width: 100%;
        display: block;
    }

    .game-img-main {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px 4px 0 0;
        display: block;
    }

    /* Tiêu đề game nền vàng */
    .game-title { 
        padding: 6px 2px; 
        font-size: 10px; 
        font-weight: bold;
        color: #000000; 
        background-color: #ffcc00; /* Nền vàng */
        border-radius: 0 0 6px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Banner Mobile */
    .slider-indicators { bottom: 8px; }
    .slider-indicators .dot { width: 6px; height: 6px; }
    /* ---------------------------------------------------
       BOTTOM NAVIGATION (GIAO DIỆN ĐIỆN THOẠI)
    --------------------------------------------------- */
    .mobile-bottom-nav { 
        display: flex; 
        position: fixed; 
        bottom: 0; 
        left: 0; 
        width: 100%; 
        background-color: #1a1a1a; /* Nền xám đen giống ảnh gốc */
        justify-content: space-around; 
        align-items: flex-end; /* Đẩy các phần tử xuống dưới để chừa chỗ cho nút giữa */
        padding: 10px 0 8px 0; 
        z-index: 100; 
    }

    .mobile-bottom-nav a { 
        color: #ffcc00; /* Đổi toàn bộ chữ và icon sang màu vàng */
        text-decoration: none; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        font-size: 10px; 
        font-weight: bold;
        gap: 6px; 
        flex: 1;
        position: relative;
    }

    .mobile-bottom-nav a i {
        font-size: 22px;
    }

    /* --- Huy hiệu (Badge) cho Mobile --- */
    .nav-item-badge {
        position: relative;
    }

    .mobile-badge {
        position: absolute;
        top: -8px;
        right: 10%;
        background: linear-gradient(180deg, #ff0000, #cc0000);
        color: #ffffff;
        font-size: 9px;
        font-weight: 900;
        font-style: italic;
        padding: 2px 4px;
        border-radius: 4px;
        border: 1px solid #ffffff;
        z-index: 2;
    }

    /* --- Nút trung tâm nổi lên (Thể Thao) --- */
    .mobile-bottom-nav .center-btn {
        position: relative;
        justify-content: flex-end; 
    }

    .center-icon-wrapper {
        position: absolute;
        top: -28px; /* Đẩy icon lên trên khỏi thanh nav */
        left: 50%;
        transform: translateX(-50%);
        background-color: #222; /* Màu nền hình tròn khớp với ảnh */
        border-radius: 50%;
        width: 55px;
        height: 55px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .center-icon-wrapper i {
        font-size: 34px;
        color: #ffcc00;
    }

    .center-btn span {
        margin-top: 32px; /* Đẩy chữ Thể Thao xuống dưới vòng tròn */
    }

    
}
/* =========================================================
   MODAL ĐĂNG NHẬP / ĐĂNG KÝ
========================================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: none; /* Ẩn mặc định */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.auth-modal-content {
    background-color: #1c1c1c;
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    padding: 20px 25px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    position: relative;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-header h3 {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.close-modal {
    background: #333;
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-tabs {
    display: flex;
    background-color: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #444;
    overflow: hidden;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.auth-tab.active {
    background-color: #ffaa00; /* Màu vàng đang active */
    color: #ffffff;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.input-group {
    position: relative;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    background-color: #3b3b3b; /* Nền ô input xám */
    border-radius: 6px;
    border: 1px solid #555;
    padding: 0 12px;
}

.input-group i {
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    color: #fff;
    outline: none;
    font-size: 13px;
}

.input-group input::placeholder { color: #888; }
.input-group.no-icon input { padding-left: 0; }
.input-group.no-icon i { margin: 0; }

.form-links {
    margin-bottom: 15px;
    font-size: 12px;
}

.form-links a {
    color: #999;
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    margin-bottom: 15px;
    color: #aaa;
}

.checkbox-group input { cursor: pointer; }
.checkbox-group a { color: #fff; text-decoration: underline; }

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: #ffaa00;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 15px;
    font-size: 15px;
}

/* Nút đăng nhập nền đen viền vàng */
.btn-login-submit { border: 1px solid #ffaa00; }

/* Nút đăng ký tương tự */
.btn-register-submit { border: 1px solid #444; }

.switch-prompt {
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

.switch-prompt .text-yellow {
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    margin: 25px 0 15px 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #555, transparent);
}

.auth-divider span {
    background-color: #1c1c1c;
    padding: 0 15px;
    color: #ffaa00;
    position: relative;
    font-size: 12px;
}

.auth-quick-links {
    display: flex;
    justify-content: space-around;
}

.auth-quick-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #aaa;
    text-decoration: none;
    font-size: 11px;
    gap: 8px;
}

.auth-quick-links i {
    font-size: 22px;
    color: #fff;
}