/* =========================================
   1. KHAI BÁO BIẾN MÀU SẮC (COLOR SYSTEM)
========================================= */
:root {
    /* Primary Colors (Màu chủ đạo) */
    --primary-bg: #0F0F0F;       /* Đen Vực Thẳm - Nền chính */
    --primary-dark: #1A1A1A;     /* Đen Nhạt - Nền menu */
    --primary-gold: #D4AF37;     /* Vàng Vinh Quang - Text nhấn, viền, icon */
    
    /* Accent Colors (Màu điểm nhấn đối kháng) */
    --accent-red: #C41E3A;       /* Đỏ Nhiệt Huyết */
    --accent-blue: #0047AB;      /* Xanh Trí Tuệ */
    
    /* Neutral Colors (Màu trung tính) */
    --text-light: #FFFFFF;
    --text-muted: #CCCCCC;

    /* HỆ THỐNG PHÔNG CHỮ (TYPOGRAPHY SYSTEM) */
    --font-headline: 'Russo One', sans-serif;
    --font-subhead: 'Anton', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

/* =========================================
   2. RESET CSS & TYPOGRAPHY
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body); /* Đã đổi thành biến CSS */
}

body {
    background-color: var(--primary-bg);
    color: var(--text-light);
    overflow-x: hidden; /* Tránh thanh cuộn ngang rác giao diện */
}

/* =========================================
   3. THANH ĐIỀU HƯỚNG (NAVBAR)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(15, 15, 15, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-gold);
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out;
}

/* Trạng thái 1: Lướt xuống -> Kéo thanh menu lên trên để ẩn đi */
.navbar.navbar--hidden {
    transform: translateY(-100%);
}

/* Trạng thái 2: Lướt ngược lên -> Hiện lại với nền trong suốt + hiệu ứng kính mờ (Glassmorphism) */
.navbar.navbar--transparent {
    background-color: rgba(15, 15, 15, 0.6); /* Giảm độ đặc xuống 60% */
    backdrop-filter: blur(12px); /* Làm mờ nội dung phía sau dải menu */
    -webkit-backdrop-filter: blur(12px); /* Hỗ trợ trình duyệt Safari */
    transform: translateY(0); /* Trả về vị trí ban đầu */
}

/* Trạng thái 3: Về lại điểm đầu trang -> Đặc lại như cũ */
.navbar.navbar--solid {
    background-color: rgba(15, 15, 15, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateY(0);
}

.logo a {
    display: flex; /* Căn giữa logo dọc/ngang nếu cần */
    align-items: center;
    text-decoration: none; /* Bỏ gạch chân thẻ <a> mặc định */
}

.logo img {
    /* LỆNH QUAN TRỌNG: Thiết lập chiều cao tối đa */
    /* Chiều cao Navbar chúng ta đang có là khoảng 80-90px (padding+content), 
       set max-height khoảng 50-60px là vừa đẹp, giữ lại khoảng trống padding */
    max-height: 55px; 
    
    width: auto; /* Chiều rộng tự động co giãn theo tỷ lệ ảnh */
    display: block; /* Tránh các khoảng trắng rác của thẻ img */
    transition: transform 0.3s ease; /* Hiệu ứng nhẹ khi hover */
}

/* Hiệu ứng hover cho logo (Tùy chọn) */
.logo img:hover {
    transform: scale(1.05); /* Phóng to nhẹ logo khi rê chuột vào */
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
    position: relative;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-family: var(--font-body); /* Áp dụng Anton */
    letter-spacing: 1.5px;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

/* --- MENU CẤP 1 --- */
.dropdown-menu {
    display: block; 
    visibility: hidden; /* Ẩn menu nhưng giữ nguyên cấu trúc */
    opacity: 0;         /* Độ trong suốt = 0 (tàng hình) */
    transform: translateY(15px); /* Đẩy menu xuống 15px để tạo đà trượt */
    transition: visibility 0.3s, opacity 0.3s ease, transform 0.3s ease; /* Thời gian chuyển động mượt mà 0.3 giây */

    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-dark);
    list-style: none;
    min-width: 250px; 
    border-top: 3px solid var(--primary-gold);
    padding: 10px 0;
    font-family: var(--font-body) !important; /* Áp dụng Anton */
    letter-spacing: 1.5px;
}

.dropdown-menu a {
    padding: 10px 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    white-space: nowrap; 
    text-transform: none; 
    font-family: var(--font-body) !important; /* Áp dụng Anton */
    letter-spacing: 1.5px;
}

.dropdown-menu a .arrow {
    font-size: 18px; 
    transition: transform 0.3s ease; 
}

.sub-dropdown:hover > a .arrow {
    transform: rotate(90deg);
}

.dropdown:hover .dropdown-menu {
    /* XÓA display: block; THAY BẰNG: */
    visibility: visible;
    opacity: 1;           /* Rõ dần lên 100% */
    transform: translateY(0); /* Trượt ngược về vị trí gốc */
}

.dropdown-menu a:hover {
    background-color: #333333;
}

/* --- MENU CẤP 2 (NESTED DROPDOWN) --- */
.dropdown-menu li {
    position: relative; 
    margin: 0;
}

.sub-dropdown-menu {
    display: block; 
    visibility: hidden;
    opacity: 0;
    transform: translateX(15px); /* Đẩy sang phải 15px để tạo đà trượt ngang */
    transition: visibility 0.3s, opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    top: 0;
    left: auto;  
    right: 100%; 
    background-color: var(--primary-dark);
    list-style: none;
    min-width: 180px;
    border-left: none; 
    border-right: 2px solid var(--primary-gold);
    padding: 10px 0;
    box-shadow: -5px 2px 10px rgba(0, 0, 0, 0.5); 
    font-family: var(--font-body) ; /* Áp dụng Anton */
    letter-spacing: 1.5px;
}

.sub-dropdown-menu a {
    padding: 10px 20px;
    display: block;
    text-transform: none; 
    font-size: 13px; 
}

.sub-dropdown-menu a:hover {
    background-color: #333333;
    color: var(--primary-gold);
}

.sub-dropdown:hover .sub-dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(0); /* Trượt ngang về vị trí gốc */
}

/* =========================================
   4. KÝ HIỆU MENU ĐIỆN THOẠI (BURGER)
========================================= */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-gold);
    margin: 5px;
    transition: all 0.3s ease;
}



/* =========================================
   7. RESPONSIVE GIAO DIỆN ĐIỆN THOẠI
========================================= */
@media screen and (max-width: 768px) {
    /* 1. Kích hoạt nút Hamburger */
    .burger {
        display: block;
    }

    /* 2. Cấu trúc lại thanh Menu chính thành dạng trượt (Sidebar) */
    .nav-links {
        position: absolute;
        right: 0;
        top: 65px; /* Chiều cao tương đối của Navbar */
        height: 100vh;
        width: 100%;
        background-color: rgba(15, 15, 15, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 30px;
        
        /* Đẩy menu ra khỏi màn hình mặc định */
        transform: translateX(100%); 
        transition: transform 0.4s ease-in;
    }

    /* Lớp nav-active sẽ được Javascript gọi để trượt menu vào */
    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    /* 3. Xử lý lại Dropdown đa cấp trên Mobile */
    /* Trên mobile, các menu con không nên bay lơ lửng (absolute) mà nên đẩy nội dung xuống (static) */
    .dropdown-menu, 
    .sub-dropdown-menu {
        position: static;
        min-width: 100%;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .dropdown-menu a, 
    .sub-dropdown-menu a {
        justify-content: center; /* Canh giữa chữ thay vì ép sang 2 bên */
        padding: 10px;
        font-size: 14px;
        color: #CCCCCC; /* Chữ menu con nhạt màu hơn menu cha một chút */
    }

    /* Hiển thị luôn các menu con trên mobile để dễ bấm, hoặc bạn có thể giữ nguyên hiệu ứng hover/click */
    .dropdown:hover .dropdown-menu,
    .sub-dropdown:hover .sub-dropdown-menu {
        display: block;
    }

    /* 4. Hiệu ứng Animation cho nút Hamburger biến thành dấu X */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}





/* =========================================
   9. FOOTER (CHÂN TRANG)
========================================= */
.site-footer {
    background-color: #050505; /* Màu đen sâu hơn nền trang một chút để phân tách */
    border-top: 3px solid var(--primary-gold);
    color: var(--text-muted);
    padding: 60px 50px 20px;
    font-family: var(--font-body);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* Chia làm 4 cột trên Desktop */
    grid-template-columns: 2fr 1fr 1.5fr 1fr; 
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-family: var(--font-subhead);
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Cột 1: Brand */
.footer-logo {
    max-height: 60px;
    margin-bottom: 15px;
}

.brand-col p { line-height: 1.6; font-size: 0.95rem; }

/* Cột 2: Links */
.link-col ul { list-style: none; }
.link-col li { margin-bottom: 12px; }
.link-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.link-col a:hover {
    color: var(--primary-gold);
    padding-left: 8px; /* Hiệu ứng đẩy chữ nhẹ sang phải khi hover */
}

/* Cột 3: Contact */
.contact-col p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-col i { color: var(--primary-gold); } /* Icon màu vàng */

/* Cột 4: Social Links */
.social-links {
    display: flex;
    gap: 15px;
}
.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary-dark);
    color: var(--text-light);
    border-radius: 50%; /* Bo tròn thành hình tròn */
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

/* Hiệu ứng màu thương hiệu thật khi hover vào icon mạng xã hội */
.social-icon.facebook:hover { background-color: #1877F2; border-color: #1877F2; transform: translateY(-5px); }
.social-icon.youtube:hover { background-color: #FF0000; border-color: #FF0000; transform: translateY(-5px); }
.social-icon.tiktok:hover { background-color: #000000; border-color: #25F4EE; color: #25F4EE; transform: translateY(-5px); }

/* Bản quyền (Bottom) */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.85rem;
}

/* RESPONSIVE CHO FOOTER & SPONSORS */
@media screen and (max-width: 992px) {
    .footer-container { grid-template-columns: 1fr 1fr; } /* Tablet: 2 cột */
}
@media screen and (max-width: 576px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; } /* Mobile: 1 cột */
    .contact-col p { justify-content: center; }
    .social-links { justify-content: center; }
}




.container {
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section-heading .section-title {
    font-family: var(--font-headline);
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 10px; /* Đẩy chữ nhỏ xuống một chút */
    letter-spacing: 2px;
}

.section-subtitle {
    color: #999;
    font-size: 1.1rem;
    max-width: 700px;
    /* Đã sửa dòng này: Đổi -30px thành 15px (Top) | auto (Left/Right) | 50px (Bottom) */
    margin: 15px auto 50px; 
    line-height: 1.6;
}





/* =========================================
   TRANG KẾT QUẢ THI ĐẤU
========================================= */
.results-section { padding: 40px 20px 100px; }

/* --- Nút Lọc Vòng Đấu --- */
.round-filters { margin-bottom: 40px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.round-btn {
    background-color: #111; border: 1px solid #333; color: #888;
    padding: 10px 25px; border-radius: 30px; font-weight: 700; cursor: pointer; transition: all 0.3s ease;
}
.round-btn:hover { border-color: #666; color: #FFF; }
.round-btn.active { background-color: #222; border-color: var(--primary-gold); color: var(--primary-gold); box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
.round-btn.final-round { border-color: var(--accent-red); color: var(--accent-red); }
.round-btn.final-round.active { background-color: rgba(196, 30, 58, 0.1); box-shadow: 0 0 15px rgba(196, 30, 58, 0.4); }

/* --- Thẻ Trận Đấu (Match Card) --- */
.matches-container { display: flex; flex-direction: column; gap: 25px; max-width: 800px; margin: 0 auto; }
.match-card {
    background-color: #111; border: 1px solid #333; border-radius: 10px; overflow: hidden; transition: transform 0.3s ease;
}
.match-card:hover { border-color: #555; transform: translateY(-3px); }

/* Trận đang trực tiếp có viền đỏ nhấp nháy */
.live-match { border-color: var(--accent-red); box-shadow: 0 0 20px rgba(196, 30, 58, 0.2); }

/* Header của Card */
.match-header {
    background-color: #1a1a1a; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; font-size: 0.9rem; font-weight: 600;
}
.match-time { color: #888; }
.status-ended { color: #666; }
.status-live { color: var(--accent-red); animation: pulse-text 1.5s infinite; }
.status-upcoming { color: #00A3E0; }
@keyframes pulse-text { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Body của Card (Chứa 2 đội) */
.match-body { padding: 20px; position: relative; }
.match-vs {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background-color: #222; color: #888; font-size: 0.8rem; font-weight: 700; padding: 5px 10px; border-radius: 20px; border: 1px solid #333; z-index: 2;
}

.team {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 0;
}
.team-info { display: flex; align-items: center; gap: 15px; font-family: var(--font-subhead); font-size: 1.2rem; }
.team-logo { width: 40px; height: 40px; background-color: #222; border-radius: 8px; display: flex; justify-content: center; align-items: center; color: #888; font-size: 1.2rem; }
.team-name { color: #FFF; }
.team-score { font-family: var(--font-headline); font-size: 2rem; color: #FFF; font-weight: 700; width: 40px; text-align: center; }

/* Style cho Đội Thắng / Thua */
.team-winner .team-name { color: var(--primary-gold); }
.team-winner .team-score { color: var(--primary-gold); }
.team-winner .team-logo { color: var(--primary-gold); border: 1px solid var(--primary-gold); }
.winner-crown { color: var(--primary-gold); font-size: 1.2rem; margin-left: 10px; }

.team-loser { opacity: 0.4; filter: grayscale(100%); transition: opacity 0.3s; }
.team-loser:hover { opacity: 0.8; filter: none; }

/* Footer của Card */
.match-footer { background-color: #151515; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #333; font-size: 0.9rem; }
.match-mvp { color: #AAA; }
.vod-btn { color: #FFF; text-decoration: none; background-color: #333; padding: 6px 15px; border-radius: 4px; transition: all 0.3s; font-weight: 600; }
.vod-btn:hover { background-color: var(--primary-gold); color: #000; }
.live-btn { background-color: var(--accent-red); color: #FFF; }
.live-btn:hover { background-color: #FFF; color: var(--accent-red); }

@media screen and (max-width: 576px) {
    .team-info { font-size: 1rem; }
    .team-logo { width: 30px; height: 30px; font-size: 1rem; }
    .team-score { font-size: 1.5rem; }
    .match-footer { flex-direction: column; gap: 10px; text-align: center; }
}


/* =========================================
   CẤU TRÚC TAB & LƯỚI 4x2 (TRANG KẾT QUẢ)
========================================= */

/* Ẩn tất cả các nội dung vòng đấu theo mặc định */
.round-content {
    display: none;
    animation: fadeInTab 0.5s ease;
}

/* Chỉ hiển thị vòng đấu đang được active */
.round-content.active {
    display: block;
}

/* Hiệu ứng trượt và mờ ảo khi đổi tab */
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lưới 4x2 cho Vòng 1/8 (2 cột, 4 hàng) */
.match-grid-4x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cột song song */
    gap: 25px;
}

/* Lưới 1 cột cho Tứ kết, Bán kết (hiển thị danh sách dọc) */
.match-grid-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Responsive cho điện thoại --- */
@media screen and (max-width: 992px) {
    /* Ép lưới 4x2 thành 1 cột trên iPad/Điện thoại */
    .match-grid-4x2 { 
        grid-template-columns: 1fr; 
        max-width: 700px;
        margin: 0 auto;
    }
}

/* =========================================
   THIẾT KẾ ĐẶC BIỆT: THẺ CHUNG KẾT TỔNG
========================================= */
.grand-final-card {
    border: 2px solid var(--primary-gold) !important;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.25) !important;
    background: linear-gradient(180deg, #1f1a00 0%, #0a0a0a 100%) !important;
    transform: scale(1.05); /* Ép thẻ to hơn bình thường 5% */
    margin: 20px 0;
}

.grand-final-card:hover {
    transform: scale(1.08); /* Phóng to hơn nữa khi rê chuột */
    box-shadow: 0 0 70px rgba(212, 175, 55, 0.4) !important;
}

.grand-header {
    background-color: #332b00 !important;
    padding: 20px 30px !important;
    font-size: 1.1rem !important;
    border-bottom: 2px solid var(--primary-gold) !important;
}

.grand-header .match-time {
    color: var(--primary-gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grand-body {
    padding: 50px 40px !important; /* Bơm phồng khoảng trống bên trong */
}

.grand-logo {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.8rem !important;
    background-color: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid var(--primary-gold) !important;
    color: var(--primary-gold) !important;
}

.grand-vs {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.2rem !important;
    background-color: var(--primary-gold) !important;
    color: #000 !important;
    border: 4px solid #111 !important;
    font-weight: 900 !important;
}

.grand-score {
    font-size: 3.5rem !important; /* Điểm số to khổng lồ */
    color: var(--primary-gold) !important;
}

@media screen and (max-width: 768px) {
    .grand-final-card { transform: scale(1); margin: 0; }
    .grand-final-card:hover { transform: scale(1.02); }
    .grand-body { padding: 30px 20px !important; }
    .grand-score { font-size: 2.5rem !important; }
}