/* ==================================================
   1. CẤU HÌNH BIẾN (VARIABLES) & RESET
   ================================================== */
:root {
    --primary: #ff6200;
    --primary-hover: #e65c00;
    --primary-gradient: linear-gradient(90deg, #F22E03 0%, #FF8C05 100%);
    --bg-main: #fffaf6;
    --bg-card: #ffffff;
    --bg-dark: #1b110b;
    --text-dark: #000000;
    --text-light: #6a574f;
    --border-color: #f7dfce;
}

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

/* KHẮC PHỤC LỖI KÉO SANG 2 BÊN (OVERFLOW-X) VÀ ĐẢM BẢO CHIỀU RỘNG */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* FIX: Tự động điều chỉnh kích thước ảnh theo kích thước màn hình */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Hoặc contain tùy trường hợp */
}

/* Container giới hạn chiều rộng */
.container {
    margin: 0 auto;
}

/* Các class tiện ích */
.text-orange { color: #FFB31A !important; }
.fw-600 { font-weight: 600; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Ngăn lỗi chữ quá dài bẻ gãy layout trên Mobile */
h1, h2, h3, p, span, div, li {
    word-break: break-word;
}

/* Nút bấm Primary */
.btn-primary {
    display: inline-block;
    background: var(--primary-gradient);
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
    text-align: center;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.5);
    color: #fff;
}

/* Nút tải App (Đen) có chứa Logo Ảnh */
.btn-app {
    width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #2b2b2b, #0a0a0a);
    color: #fff;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    border: 2px solid #ffcc00; /* Viền vàng như hình */
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 2px 5px rgba(255,255,255,0.15);
    font-size: 1.1rem;
    white-space: nowrap;
    gap: 8px;
}
.btn-app img {
    height: 28px; /* Icon android/apple to hơn */
    width: auto;
    object-fit: contain;
}
.btn-app .icon-next {
    height: 16px; /* Mũi tên nhỏ */
    margin-left: 5px;
}
.btn-app:hover {
    background: linear-gradient(to bottom, #3b3b3b, #1a1a1a);
    box-shadow: 0 6px 15px rgba(0,0,0,0.5), inset 0 2px 5px rgba(255,255,255,0.2);
}

/* ==================================================
   2. HEADER (HERO SECTION)
   ================================================== */
.hero-section {
    /* Thay thế URL background nếu bạn có ảnh nền chính xác */
    background: url('./images/88ibet-PC.png') center/cover no-repeat;
    position: relative;
    text-align: center;
    overflow: hidden; /* Cắt bớt phần tử thừa */
}

.hero-container {
    position: relative;
}

.logo {
    display: inline-block;
}
.logo img {
    max-height: 120px; /* Tránh logo quá to */
}

.floating-sidebar {
    position: absolute;
    right: 40px;
    top: 43%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}
.float-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    gap: 5px;
}
.float-btn img {
    max-width: 100px;
    object-fit: cover;
}
.float-btn span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #111;
}
.float-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hero-characters img {
    margin: 0 auto;
    max-width: 100%; /* Sẽ tự động vừa màn hình */
    max-height: 450px;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 7rem;
}
.hero-links-mobile {
    display: none;
}
.hero-links-mobile {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.hero-links-mobile .btn-link-custom {
    width: 100px;
    height: 90px;
    .ping-time {
        font-size: 0.7rem;
        top: 25%;
    }
    .link-name {
        bottom: 10%;
        font-size: 0.6rem;
    }
}
.btn-link-custom {
    position: relative;
    display: block;
    width: 200px; /* Điều chỉnh chiều rộng theo tỷ lệ ảnh */
    height: 110px; /* Điều chỉnh chiều cao theo tỷ lệ ảnh */
    /* background: url('./images/link-button.png') center/contain no-repeat; */
    transition: transform 0.2s ease, filter 0.2s ease;
    text-decoration: none;
}
.btn-link-custom:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}
.btn-link-custom .ping-time {
    position: absolute;
    top: 15%; /* Căn chỉnh độ cao của chữ 999ms vào giữa vùng màu đen */
    right: 30%; /* Căn chỉnh đẩy chữ về bên trái chút so với viền */
    color: #fff;
    font-weight: 800;
    font-size: 1.6rem;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.5px;
}
.btn-link-custom .link-name {
    position: absolute;
    bottom: 1%; /* Căn chỉnh độ cao vào trong tab màu cam dưới cùng */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
}

.hero-download-banner-mobile {
    display: none;
}
.hero-download-banner-mobile .download-title {
    color: var(--primary);
    text-align: center;
    font-family: Montserrat;
    font-size: 30px;
    font-style: italic;
    font-weight: 900;
    line-height: normal;
    letter-spacing: -0.621px;
}
.hero-download-banner-mobile .download-buttons {
    align-items: center;
    margin: 0 10px;
    border-radius: 16px;
    border: 1px solid #FEE6D3;
    background: linear-gradient(176deg, #FDEAD0 8.09%, #FD8F2E 97.12%);
    box-shadow: 0 4px 15px 0 rgba(255, 98, 0, 0.75) inset;
    .app-image img {
        height: 140px;
        padding-top: 10px;
    }
    .app-image-icon {
        max-width: 50%;
        .btn-app {
            margin: 5px 0;
        }
    }
}
.hero-download-banner-mobile .icon-mobile {
    display: flex;
    justify-content: center;
    padding: 15px;
    img {
        height: 65px;
    }
}
/* Hero Download Banner mới */
.hero-download-banner {
    background: linear-gradient(176deg, #FDEAD0 8.09%, #FD8F2E 97.12%);
    border-radius: 90px 90px 0 0;
    border: 3px solid #FEE6D3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    max-width: 750px;
    margin: 0 auto;
    position: relative;
}

.hero-download-banner .app-image {
    margin-bottom: 10px;
}
.hero-download-banner .app-image img {
    height: 130px; /* Chiều cao điện thoại trên mobile */
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.hero-download-banner .app-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* align-items: center; */
}

.hero-download-banner .download-title {
    color: #ff5a00;
    font-size: 1.8rem;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.download-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Tránh rớt nút gây tràn màn hình */
    gap: 15px;
    margin-bottom: 10px;
}
.download-buttons.align-left {
    justify-content: flex-start;
}

/* ==================================================
   3. CÁC SECTION CHUNG
   ================================================== */
section {
    padding: 30px 160px;
    max-width: 100vw;
    overflow-x: hidden;
}

.security-section {
    background: #FFF0E5;


}

h1, h2, h3 {
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}
h1 { font-size: 2.2rem; }
h2.section-title {
     font-size: 1.8rem;
}
h3 { font-size: 1.4rem; }

p.section-desc {
    color: var(--text-dark);
    margin: 20px auto 25px;
}

/* Tiêu đề căn trái có vạch cam */
.section-header-left {
    text-align: left;
    margin-bottom: 3rem;
}
.section-title-left {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 15px;
}
.title-divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin-bottom: 25px;
    border-radius: 2px;
}
.section-desc-left {
    color: #000000;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Phần giới thiệu mới */
.intro-main-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.intro-tag {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.intro-highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 15px;
}
.intro-desc {
    color: #444;
    margin-bottom: 25px;
    font-weight: 500;
}
.intro-image img {
    margin: 0 auto;
}

/* Lưới thông tin mới */
.new-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 3rem;
}
.new-info-grid .info-box {
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border: none;
}
.white-box {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.beige-box {
    background: #fcf1e5;
}
.new-info-grid .info-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.new-info-grid .info-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==================================================
   4. CARDS & LAYOUTS BÊN TRONG MAIN
   ================================================== */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    width: 100%;
}
.feature-card.cream-bg {
    border-radius: 37.333px;
    background: #FFF8F2; /* Màu kem nhạt như hình */
    border: 1.3px solid #FFD0B3;
}
.feature-card.support {
    border: none;
}
.card-img img {
    width: 100%;
    object-fit: contain;
}
.card-img p {
    text-align: center;
    color: #FFB31A !important;
}
.card-body {
    padding: 2rem;
}
.tag {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
.tag i {
    color: #444; /* Icon quả bóng màu tối như trong hình */
}
.card-body h3 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}
.card-body p {
    color: #000000;
    margin-bottom: 20px;
    line-height: 1.8;
}
.card-body p:last-child {
    margin-bottom: 0;
}

/* Card Đen (Bảo mật) */
.dark-card {
    background: linear-gradient(180deg, #0F0F14 0%, #211208 58%, rgba(61, 16, 0, 0.90) 100%);
    color: #fff;
    border-color: #333;
}
.dark-card h3 { color: #fff; }
.dark-card p { color: #fff; }

/* Banner các bước đăng ký */
.steps-banner {
    background: var(--primary-gradient);
    border-radius: 32px;
    color: #fff;
    margin-bottom: 2rem;
    width: 100%;
    text-align: center;
}
.banner-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
}
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 29.333px;
}
.step-item {
    font-weight: 500;
}

/* Bảng Giao Dịch */
.table-wrapper {
    overflow-x: auto; /* Cuộn ngang nếu bảng lớn hơn màn hình điện thoại */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
}
.transaction-table {
    width: 100%;
    min-width: 400px; /* Ép bảng luôn có form đẹp, nếu hẹp quá sẽ sinh thanh scroll */
    border-collapse: collapse;
    background: var(--bg-card);
}
.transaction-table th, .transaction-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.transaction-table th {
    background: var(--primary);
    color: #fff;
}
.transaction-table tr:last-child td { border-bottom: none; }

/* Khu vực liên hệ (Support) */
.contact-methods {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid var(--primary);
    background: #FFF0E5;
}
.contact-methods p {
    font-size: 15px;
    font-style: normal;
    font-weight: 800;
    color: var(--primary);
}
.contact-item {
    color: var(--text-dark);
    margin-bottom: 10px;
}
.contact-item:last-child { margin-bottom: 0; }
.contact-item i { color: var(--primary); width: 20px; }

/* ==================================================
   5. PHẦN TẢI APP MÀU TỐI & LỜI KẾT
   ================================================== */
.download-section-dark {
    background: var(--bg-dark);
    color: #fff;
}
.download-text h2 { color: #fff; }
.download-text p { color: #aaa; margin-bottom: 1rem; }
.download-text .highlight-yellow { color: #FFB31A; font-weight: 800; font-size: 20px; }
.download-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Lời kết */
.conclusion-card {
    background: var(--bg-card);
    border: 1px solid #FFD0B3;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
.conclusion-text p { color: var(--text-light); }
.conclusion-logo img {
    max-height: 300px;
    object-fit: contain;
}
.conclusion-logo {
    display: flex;
    justify-content: center;
}

/* ==================================================
   6. FOOTER - SỬA LỖI MẤT FOOTER
   ================================================== */
.site-footer {
    background: #441A00;
    color: #888;
    padding:55px 270px;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 50; /* Đưa footer lên lớp trên cùng để không bị đè */
    display: block;
    clear: both;
}
.partner-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.partner-logos img {
    height: 35px; /* Giới hạn chiều cao cho các logo đối tác */
    width: auto;
    object-fit: cover;
    margin: 10px;
}
.partner-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.footer-copyright {
    padding-top: 1.5rem;
}
.image-support {
    display: flex;
    justify-content: center;
}
.image-support img {
    height: 35px;
    margin: 10px 0;
}
.small-text { font-size: 0.8rem; margin-top: 5px; }

/* ==================================================
   7. MEDIA QUERIES (DÀNH CHO ĐIỆN THOẠI NHỎ & DESKTOP)
   ================================================== */

/* Điện thoại màn hình rất hẹp (dưới 480px) */
@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr; /* Đưa về 1 cột để tránh chữ dài gây tràn UI */
    }
    h1 { font-size: 1.7rem; }
    .download-buttons.align-left {
        justify-content: center; /* Đưa nút tải app ra giữa trên mobile */
    }
    .partner-logos img {
        height: 25px; /* Thu nhỏ logo trên thiết bị cực hẹp */
    }
}

/* mobile */ 
@media screen and (max-width: 768px) {
    .hero-section {
        /* Thay thế URL background nếu bạn có ảnh nền chính xác */
        background: url('./images/88ibet-mobile.png') center/cover no-repeat;
    }
    section {
        padding: 30px 20px;
    }
    .site-footer {
        padding: 20px 10px;
    }
    .floating-sidebar,
    .hero-download-banner,
    .hero-links {
        display: none;
    }
    .hero-download-banner-mobile {
        display: block;
    }
    .hero-links-mobile {
        display: flex;
    }
    .logo img {
        max-height: 100px;
    }
}

/* ipab */
/* @media screen and (max-width: 1032px) {
    section {
        padding: 30px 20px;
    }
    .site-footer {
        padding: 20px 10px;
    }
    .floating-sidebar {
        display: none !important;
    }
} */


/* Desktop */
@media (min-width: 1032px) {
    /* Header Desktop */
    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    /* .logo {
       
    } */
    .floating-sidebar {
        display: flex;
    }

    /* Bố cục flex 2 cột cho các thẻ */
    .intro-main-wrapper,
    .feature-card,
    .download-inner,
    .conclusion-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    
    .feature-card.reverse {
        flex-direction: row-reverse;
    }

    .intro-content, .intro-image,
    .card-body, .card-img,
    .download-text, .download-image,
    .conclusion-text, .conclusion-logo {
        flex: 1;
    }
    .download-image {
        border-radius: 906.667px;
        background: radial-gradient(50% 50% at 50% 50%, rgba(255, 87, 5, 0.66) 0%, rgba(255, 87, 5, 0.00) 100%);
    }

    .intro-content { padding-right: 4rem; }
    .download-text { padding-right: 4rem; }
    .conclusion-text { text-align: left; }

    /* Lưới Intro lên 4 cột */
    .new-info-grid { grid-template-columns: repeat(4, 1fr); }

    /* Banner ngang trên Desktop */
    .steps-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 40px;
    }
    .banner-title { margin-bottom: 0; text-align: left; }
    .steps-list { flex-direction: row; gap: 30px; }
    
    .hero-download-banner {
        flex-direction: row;
        padding: 10px 90px;
        justify-content: flex-start;
    }
    .hero-download-banner .app-image {
        margin-right: 40px;
        margin-bottom: 0;
    }
    .hero-download-banner .app-image img {
        max-height: 130px;
    }
    .hero-download-banner .app-content {
        /* align-items: flex-start; */
        text-align: left;
    }
    .hero-download-banner .download-title {
        font-size: 2.2rem;
    }

    .download-buttons.align-left {
        justify-content: flex-start;
    }
}
/* Áp dụng cho cả iPad dọc và iPad ngang */
@media screen and (min-width: 768px) and (max-width: 960px) {
  /* Viết CSS cho iPad/Tablet ở đây */
    .hero-section {
        /* Thay thế URL background nếu bạn có ảnh nền chính xác */
        background: url('./images/88ibet-mobile.png') center/cover no-repeat;
    }
    section {
        padding: 30px 20px;
    }
    .site-footer {
        padding: 20px 10px;
    }
    .floating-sidebar,
    .hero-download-banner,
    .hero-links {
        display: none;
    }
    .hero-download-banner-mobile {
        display: block;
    }
    .hero-links-mobile {
        display: flex;
    }
    .logo img {
        max-height: 100px;
    }
    .hero-links-mobile .btn-link-custom {
        width: 200px;
        height: 160px;
    }
    .hero-links-mobile .btn-link-custom {
        .ping-time {
            font-size: 1.3rem;
            top: 20%;
        }
        .link-name {
            bottom: 4%;
            font-size: 1rem;
        }
    }
    .hero-download-banner-mobile .icon-mobile {
        img {
            height: 110px;
        }
    }
    .hero-download-banner-mobile .download-buttons {
        margin: 0 110px;
    }
}

@media screen and (min-width: 960px) and (max-width: 1032px) {
  /* Viết CSS cho iPad/Tablet ở đây */
    .hero-section {
        /* Thay thế URL background nếu bạn có ảnh nền chính xác */
        background: url('./images/88ibet-mobile.png') center/cover no-repeat;
    }
    section {
        padding: 30px 20px;
    }
    .site-footer {
        padding: 20px 10px;
    }
    .floating-sidebar,
    .hero-download-banner,
    .hero-links {
        display: none;
    }
    .hero-download-banner-mobile {
        display: block;
    }
    .hero-links-mobile {
        display: flex;
    }
    .logo img {
        max-height: 100px;
    }
    .hero-links-mobile .btn-link-custom {
        width: 270px;
        height: 220px;
    }
    .hero-links-mobile .btn-link-custom {
        .ping-time {
            font-size: 1.3rem;
            top: 20%;
        }
        .link-name {
            bottom: 4%;
            font-size: 1rem;
        }
    }
    .hero-download-banner-mobile .icon-mobile {
        img {
            height: 170px;
        }
    }
    .hero-download-banner-mobile .download-buttons {
        margin: 0 110px;
    }
    .hero-download-banner-mobile .download-buttons {
        .app-image img {
            height: 240px;
        }
    }
    .hero-download-banner-mobile .download-title{
        font-size: 50px;
    }
    .btn-app img {
        height: 50px;
    }
    .btn-app {
        width: 280px;
        font-size: 1.8rem;
        .icon-next {
            height: 30px;
        }
    }
}

