
.carousel-item img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    max-height: 300px; /* Giới hạn chiều cao */
    object-fit: contain; /* Giữ tỷ lệ ảnh */
}
/* Căn giữa nút Prev và Next */


/* Hiệu ứng hover */

/* Vị trí của nhóm nút */
.contact-buttons {
    position: fixed;
    bottom: 15px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Khoảng cách giữa các nút */
    z-index: 999; /* Nổi lên trên */
}
#gameAvatar {
    width: 120px;                  /* Chiều rộng cố định cho hình ảnh */
    height: 120px;                 /* Chiều cao cố định cho hình ảnh */
    border-radius: 8px;            /* Bo góc hình ảnh */
    margin-bottom: 16px;           /* Khoảng cách bên dưới hình ảnh */
}

#playGameBtn {
    display: flex;                 /* Đặt nút thành một container flex */
    align-items: center;           /* Căn giữa icon và text theo trục dọc */
    justify-content: center;       /* Căn giữa nội dung */
    background-color: #dc3545;     /* Màu nền đỏ */
    color: #fff;                   /* Màu chữ trắng */
    font-size: 16px;               /* Kích thước chữ */
    padding: 10px 20px;            /* Khoảng cách bên trong nút */
    border-radius: 4px;            /* Bo góc nút */
    text-decoration: none;         /* Loại bỏ gạch chân của liên kết */
    font-weight: bold;             /* In đậm chữ */
}

#playGameBtn img {
    margin-right: 8px;             /* Khoảng cách giữa icon và text */
    height: 20px;                  /* Kích thước icon */
}

/* Thiết kế từng nút */
.contact-button img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Hiệu ứng khi hover */
.contact-button img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.contact-buttons {
    margin-bottom: 10px;  /* Thêm khoảng cách dưới 15px */
}
#playGameBtn{
    background-color: #FF0000;
    color: #fff;
}

/* Giao diện trên Mobile */
/* Giao diện Desktop giữ nguyên */
#gameModal .modal-dialog {
    max-width: 800px;
}

#gameModal .modal-content {
    padding: 20px;
}
/* Xử lý mô tả tự động xuống dòng */
.gameDescription-mobile, .gameDescription-pc {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 10px;
}
/* Áp dụng cho phần mô tả game */
.gameDescription-pc, .gameDescription-mobile {
    overflow-y: auto;
}
.gameDescription-pc::-webkit-scrollbar {
    width: 5px;
}

/* Track */
.gameDescription-pc::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px #f8f8f8;

    border-radius: 5px;
}

/* Handle */
.gameDescription-pc::-webkit-scrollbar-thumb {
    background: #cd0000;
    border-radius: 10px;
}

/* Handle on hover */
.gameDescription-pc::-webkit-scrollbar-thumb:hover {
    background: #cd0000;
}

.contact-left_description{
    padding-left: 20px !important;
    padding-right: 20px !important;
}
#gameTitle{
    margin: 0 10px;
}
/* Điều chỉnh ảnh trong slider */
#carouselImages img {
    width: 100%;       /* Ảnh chiếm toàn bộ chiều ngang */
    height: 100%;
    border-radius: 15px;      /* Bo góc ảnh */
    margin: 0 5px;            /* Tạo khoảng cách giữa các ảnh */
    padding: 0 10px;
    object-fit: contain;
}

/* Căn giữa slider */
.carousel-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-icon {
    position: absolute;
    top: 0px; /* Điều chỉnh khoảng cách từ trên */
    right: -2px; /* Điều chỉnh khoảng cách từ phải */
    width: 50px;
    height: 50px;
    transition: transform 0.2s ease, background-color 0.2s ease; /* Hiệu ứng hover */
    cursor: pointer; /* Thay đổi con trỏ chuột khi hover */
}
.modal-body {
    padding: 0 !important;
}

/* Tooltip text */
.tooltip-text {
    visibility: hidden; /* Ẩn mặc định */
    background-color: rgba(0, 0, 0, 0.75); /* Màu nền */
    color: #fff; /* Màu chữ */
    text-align: center;
    border-radius: 4px;
    padding: 5px 10px;
    position: absolute;
    top: 30px; /* Vị trí bên dưới biểu tượng "i" */
    right: 0;
    white-space: nowrap;
    font-size: 12px;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

/* Hiển thị tooltip khi hover */
.info-icon:hover .tooltip-text {
    visibility: visible; /* Hiện tooltip */
    opacity: 1; /* Hiện đầy đủ */
}
.game-img {
    position: relative;
    display: inline-block;
    overflow: hidden; /* Đảm bảo biểu tượng không bị lệch ra ngoài */
    border-radius: 12px; /* Làm tròn góc của ảnh nếu cần */
    overflow: unset;
}

.game-block {
    max-height: 395px; /* Chiều cao cho 2 dòng */
    overflow: hidden;
    transition: max-height 0.3s ease;

}

.game-block.expanded {
    max-height: none; /* Hiển thị toàn bộ danh mục */
}

.header-game {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 20px;
}
.item-game {
    background:#f8f8f8; /* Nền màu đen */
    padding:25px 20px 0 30px; /* Thêm khoảng cách */
    border-radius: 15px; /* Bo góc nhẹ */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Khoảng cách đều giữa các phần tử */
    gap: 5px; /* Khoảng cách giữa các ô */
}

.header-game__left h3 {
    margin: 0;
    font-size: 20px;
}
.img-icon_inf{
    border-radius: 0 30px 0 0 !important;
}

.btn-see-more {
    color: #FF4500; /* Màu chữ trắng */
    font-size: 18px; /* Cỡ chữ */
    padding: 5px 10px; /* Khoảng cách trong nút */
    border: none; /* Bỏ viền mặc định */
    border-radius: 5px; /* Bo góc nút */
    cursor: pointer; /* Hiển thị con trỏ khi hover */
    transition: all 0.3s ease; /* Hiệu ứng mượt khi hover */
    display: inline-block;
}

.btn-see-more:hover {
    color: #FF4500; /* Giữ màu chữ khi hover */
    text-decoration: none; /* Xóa gạch chân khi hover */
}

.btn-see-more:focus {
    outline: none; /* Bỏ border outline khi focus */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Hiệu ứng sáng khi focus */
}
section.game-list {
    margin: 15px 0 40px 0;
}
.game-title {
    display: block;               /* Hiển thị tiêu đề như một khối */
    white-space: nowrap;          /* Không cho phép xuống dòng */
    overflow: hidden;             /* Ẩn nội dung tràn */
    text-overflow: ellipsis;      /* Thay nội dung bị ẩn bằng "..." */
    max-width: 220px;            /* Giới hạn chiều rộng tối đa */
    text-align: center;           /* Canh giữa tiêu đề */
}



/* 🎨 PC: Hiển thị chuẩn đẹp */
#categories{
    padding: 40px 0 16px 0;
}
#categories .row {
    display: flex; /* Sử dụng flexbox */
    flex-wrap: nowrap; /* Không cho phép xuống dòng */
    justify-content: space-evenly; /* Khoảng cách giữa các item bằng nhau */
    gap: 3px; /* Khoảng cách cố định giữa các mục */
}
.button-wrapper {
    display: flex; /* Sử dụng flexbox để bố trí icon và text theo hàng ngang */
    align-items: center; /* Căn giữa icon và text theo chiều dọc */
    background-color: #ff7f50; /* Màu nền của nút */
    border-radius: 50px; /* Bo tròn nút */
    text-decoration: none; /* Loại bỏ gạch chân */
    color: #fff; /* Màu chữ */
    padding-right: 10px; /* Tạo khoảng cách bên phải */
    font-size: 14px; /* Kích thước chữ */
    white-space: nowrap; /* Không cho chữ xuống dòng */
    transition: all 0.3s ease; /* Hiệu ứng mượt khi hover */
    min-width: 160px; /* Đảm bảo kích thước tối thiểu */
    position: relative; /* Để kiểm soát tốt hơn vị trí của icon-wrapper */
}

.button-wrapper:hover {
    background-color: #ff5722; /* Màu nền khi hover */
    text-decoration: none;
    color: #fff !important;
}

#gameImagesCarousel {
    display: flex;                   /* Sử dụng Flexbox cho container */
    align-items: center;             /* Căn giữa theo chiều dọc */
    justify-content: space-between;  /* Đặt khoảng cách đều giữa các phần tử */
}

#prevBtn, #nextBtn {
    border: none;
    background-color: #fff;
}

#carouselImages {
    flex: 1 1 auto;                  /* Để phần `carousel-inner` chiếm phần còn lại */
    text-align: center;              /* Căn giữa nội dung bên trong */
}


.icon-wrapper {
    display: flex; /* Dùng flex để căn giữa icon */
    justify-content: center; /* Căn ngang */
    align-items: center; /* Căn dọc */
    background-color: #FF4500; /* Màu nền icon */
    border-radius: 50%; /* Icon dạng hình tròn */
    width: 40px; /* Chiều rộng của icon-wrapper */
    height: 40px; /* Chiều cao của icon-wrapper */
    margin-right: 10px; /* Khoảng cách giữa icon và text */
    flex-shrink: 0; /* Đảm bảo icon không co lại */
}

.icon-wrapper img {
    width: 20px; /* Kích thước icon bên trong */
    height: 20px;
}

.button-label {
    font-size: 14px;
    font-weight: bold;
    text-align: left; /* Căn chữ sang trái */
    white-space: nowrap; /* Không cho chữ xuống dòng */
}


.game-block .item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    min-height: 205px;
}
/* Nút cuộn lên đầu trang */
.scroll-to-top {
    position: fixed; /* Định vị cố định */
    top: 20px; /* Cách đỉnh màn hình 20px */
    right: 20px; /* Cách phải màn hình 20px */
    background-color: #ff5722; /* Màu nền */
    color: #fff; /* Màu chữ */
    border: none; /* Xóa viền */
    border-radius: 50%; /* Bo tròn nút */
    padding: 10px 15px; /* Kích thước nút */
    font-size: 18px; /* Cỡ chữ */
    cursor: pointer; /* Con trỏ dạng tay */
    display: none; /* Ẩn nút mặc định */
    z-index: 1000; /* Hiển thị trên cùng */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Đổ bóng */
}

.scroll-to-top:hover {
    background-color: #e64a19; /* Đổi màu khi hover */
}
.gameDescription-mobile{
    max-height: 250px;
}
.block-info{
    height: auto !important;
}
.game-block li.item{
    margin-bottom: 20px !important;
}
#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}
/* Tùy chỉnh modal */
#modalOverlay .custom-modal {
    border-radius: 10px;
    text-align: center;
    max-width: 1000px;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#modalOverlay .btn-close-modal {
    position: absolute;
    top: 10px;
    right: 55px;
    cursor: pointer;
    font-size: 28px;
    color: red;
    font-weight: bold;
}
#modalOverlay img {
    max-width: 100%;
    height: auto;
}
#modalOverlay .reward-text {
    position: absolute;
    top: 39%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: 18%;
}
#modalOverlay .btn-receive_reward{
    position: absolute;
    top: 60%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 36%;
}
#modalOverlay .btn-receive_reward:hover{
    cursor: pointer;
}
#modalOverlay-received_promotion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}
/* Tùy chỉnh modal */
#modalOverlay-received_promotion .custom-modal_received {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 1000px;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#modalOverlay-received_promotion .btn-close-modal {
    position: absolute;
    top: 10px;
    right: 55px;
    cursor: pointer;
    font-size: 28px;
    color: red;
    font-weight: bold;
}
#modalOverlay-received_promotion img {
    max-width: 100%;
    height: auto;
}
#modalOverlay-received_promotion .reward-text {
    position: absolute;
    top: 42%;
    left: 49%;
    transform: translate(-50%, -50%);
    width: 20%;
}
#modalOverlay-received_promotion .btn-receive_reward{
    position: absolute;
    top: 62%;
    left: 51%;
    transform: translate(-50%, -50%);
    width: 25%;
}
#modalOverlay-received_promotion .btn-receive_reward:hover{
    cursor: pointer;
}
.list-game-pc{
    background-color: #FBAD90;
    padding: 5px;
}
.list-game{
    margin-top: 10px;
    padding-bottom: 5px;
}
.list-game .logo-game img {
    width: 100% !important;
}
.leaderboard .time-block{
    padding: 35px 0 30px 0 !important;
}
.leaderboard .select-time-header nav, .select-time-header .previous-next-week {
    width: 755px !important;
}
/* 1. Màn hình nhỏ hơn 768px (Mobile nhỏ và trung bình) */
@media (max-width: 767px) {
    .contact-buttons {
        bottom: 100px;
    }
    .leaderboard .select-time-header nav, .select-time-header .previous-next-week {
        padding-right: 10px !important;
    }
    .leaderboard .time-block{
        padding:10px 0 0 0 !important;
    }
    #modalOverlay-received_promotion .btn-close-modal {
        right: 40px !important;
    }
    #modalOverlay .btn-close-modal {
        right: 20px !important;
        top: -10px !important;
    }
    #modalOverlay .reward-text{
        left: 49% !important;
        width: 18%;
    }
    #modalOverlay-received_promotion .reward-text {
        left: 49% !important;
        width: 18%;
    }
    #modalOverlay-received_promotion .btn-receive_reward{
        width: 22%;
    }
    #modalOverlay .btn-receive_reward{
        top: 58%;
        width: 30%;
    }
    .leaderboard{
        margin-top: 10px;
    }
    .game-block li.item{
        margin-bottom: 20px !important;
    }
    .item-game {
        padding:10px 10px 0 10px !important; /* Thêm khoảng cách */
    }
    .btn-play{
        white-space: nowrap;
    }
    ul.feature li:nth-child(1) a img{
        width: 28px !important;
        height: 32px !important;
    }
    .info-icon {
        width: 40px;
        height: 40px;
    }
    .carousel-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px; /* Khoảng cách giữa các ảnh */
        padding: 10px 0; /* Thêm khoảng cách trên và dưới */
    }

    .carousel-scroll::-webkit-scrollbar {
        display: none; /* Ẩn thanh cuộn cho trình duyệt Webkit */
    }

    .carousel-scroll {
        -ms-overflow-style: none; /* Ẩn thanh cuộn cho IE và Edge */
        scrollbar-width: none; /* Ẩn thanh cuộn cho Firefox */
    }


    .list-games .item p{
        padding-left: 5px !important;
        padding-right: 5px !important;
        height: auto;
    }
    .game-block {
        max-height: 180px; /* Chiều cao cố định cho các mục */
    }
    .block-info{
        margin: 0 !important;
    }
    .game-block .item {
        justify-content: normal;
        min-height: 170px;
        margin-bottom: 10px;
    }
    .game-title {
        max-width: 100px;          /* Giới hạn chiều rộng tối đa */
        margin: 10px 0;
    }
    section.game-list {
        margin: 10px 0 30px 0;
    }
    #categories .row {
        display: flex;
        flex-wrap: wrap; /* Cho phép xuống dòng */
        justify-content: center; /* Căn giữa các mục */
        gap: 10px; /* Khoảng cách giữa các mục */
    }
    .gameDescription-pc{
        display: none;
    }
    #gameModal .modal-header{
        padding: 0 !important;
    }
    .gameDescription-mobile{
        margin: 20px 0 !important;
    }

    .header-game {
        margin: 5px 0 5px 0;
    }

    .btn-see-more {
        font-size: 15px;
    }
    #carouselImages img {
        width: 100%;
        height: 100%;
        padding: 0 !important;
    }
}

/* 2. Màn hình từ 768px đến 1023px (Tablet) */
@media (min-width: 768px) and (max-width: 1024px) {
    .game-block {
        max-height: 395px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 5px;
    }

    #categories .row {
        display: flex;
        flex-wrap: wrap; /* Cho phép xuống dòng */
        justify-content: space-evenly; /* Khoảng cách đều giữa các mục */
        gap: 15px; /* Khoảng cách tăng lên cho tablet */
    }
    .gameDescription-mobile{
        display: none;
    }

    .game-block li.item {
        margin-right: 0 !important;
    }
}

/* 3. Màn hình từ 1024px trở lên (Laptop và Desktop) */
@media (min-width: 1025px) {
    .game-block {
        max-height: 395px; /* Không giới hạn chiều cao */
    }
    .gameDescription-mobile{
        display: none;
    }

}




