/* ========================================= */
/* CSS DÙNG CHUNG (RESET, BACKGROUND, FOOTER)*/
/* ========================================= */
body {
    /* Set ảnh nền tĩnh, bao phủ toàn trang và không bị lặp */
    background: url('images/imgs/tft.png') center center / cover no-repeat fixed #0d1117;
    color: #f8fafc;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1; /* Đẩy footer xuống dưới cùng */
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER & LAST UPDATED */
.header-nav {
    background-color: rgba(30, 41, 59, 0.9);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    /* backdrop-filter: blur(10px); */
}
.last-updated {
    font-size: 14px;
    color: #fbbf24; /* Màu vàng nổi bật */
    font-weight: bold;
}

/* FOOTER */
.site-footer {
    background-color: rgba(15, 23, 42, 0.95);
    border-top: 1px solid #334155;
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 14px;
    margin-top: 40px;
}

/* ========================================= */
/* GIAO DIỆN TIER LIST TRANG CHỦ (15+ COMPS) */
/* ========================================= */
.tier-row {
    display: flex;
    background-color: rgba(17, 24, 39, 0.85); /* Trong suốt nhẹ để thấy nền */
    border: 1px solid #334155;
    margin-bottom: 20px;
    border-radius: 8px;
    min-height: 140px;
}
.tier-label {
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    color: #000;
}
.tier-s { background-color: #ef4444; }
.tier-a { background-color: #f97316; }
.tier-b { background-color: #eab308; }
.tier-comps {
    display: flex;
    flex-wrap: wrap; /* Cho phép rớt dòng nếu quá nhiều Comp */
    padding: 15px;
    gap: 20px;
}

/* LỤC GIÁC TRANG CHỦ & 3 ICON MINI (Augment, Trait, Champ) */
.hex-link {
    position: relative;
    display: block;
    width: 80px;
    height: 92px; /* 80 * 1.1547 */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.2s ease-in-out;
}
.hex-link:hover { transform: scale(1.1); z-index: 10; }
.border-s { background-color: #ef4444; }
.border-a { background-color: #f97316; }
.border-b { background-color: #eab308; }

.hex-content {
    position: absolute;
    top: 3px; left: 3px; right: 3px; bottom: 3px;
    background-color: #1f2636;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.hex-content img { width: 100%; height: 100%; object-fit: cover; }

.index-mini-icons {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    z-index: 5;
}
.index-mini-icons img {
    width: 20px; height: 20px;
    border: 1px solid #000;
    border-radius: 4px;
    background-color: #000;
}

/* ========================================= */
/* BÀN CỜ LỤC GIÁC TOÁN HỌC (CHUẨN 100%)    */
/* ========================================= */
:root {
    --hex-w: 64px;
    --hex-h: 73.9px; /* 64 * 1.1547 = 73.899 -> 73.9px */
    --hex-gap: 4px;
    /* Margin âm = 25% chiều cao (phần vát tam giác của lục giác) */
    --hex-mt: -18.475px; 
    /* Dòng chẵn thụt vào = 1 nửa (chiều rộng + khoảng cách) */
    --hex-offset: 34px; 
}

.board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.hex-row {
    display: flex;
    gap: var(--hex-gap);
    margin-top: var(--hex-mt);
}
.hex-row:first-child { margin-top: 0; }
.hex-row.even { margin-left: var(--hex-offset); }

.hex-wrapper {
    width: var(--hex-w);
    height: var(--hex-h);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #334155; 
}
.hex-wrapper.empty { background-color: rgba(43, 53, 68, 0.6); }

/* Viền Tier cho bàn cờ */
.tier-1 { background-color: #94a3b8; }
.tier-2 { background-color: #22c55e; }
.tier-3 { background-color: #3b82f6; }
.tier-4 { background-color: #a855f7; }
.tier-5 { background-color: #eab308; }

.hex-inner {
    width: 100%; height: 100%;
    background-color: #0f172a;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: scale(0.92); /* Độ mỏng của viền màu */
}
.hex-inner img { width: 100%; height: 100%; object-fit: cover; }

/* MINI ICON TRÊN BÀN CỜ (Chỉ chứa Items hoặc Traiticons) */
.board-items {
    position: absolute;
    bottom: -5px;
    display: flex;
    gap: 1px;
    z-index: 5;
}
.board-items img {
    width: 18px; height: 18px;
    border: 1px solid #000;
}