/* --- ROOT & GLOBAL VARIABLES --- */
:root {
    --cadmium-green: #006b3c;
    --dark-gold: #b8860b;
    --gesbi-red: #d90429;
    --pure-white: #ffffff;
    --soft-gray: #f4f7f6;
    --dark-navy: #1a1a1a;
}

* {
    box-sizing: border-box; /* Memastikan padding tidak merusak lebar elemen */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--soft-gray);
    margin: 0;
    color: var(--dark-navy);
    overflow-x: hidden; /* Mencegah layar goyang ke samping secara keseluruhan */
    width: 100%;
}

/* --- NAVBAR MODERN --- */
.navbar {
    background: var(--pure-white);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0; 
    z-index: 2000;
}

.brand-container { display: flex; align-items: center; gap: 15px; }
.logo-nav { height: 70px; width: auto; }
.brand-text h1 { margin: 0; font-size: 20px; color: var(--cadmium-green); font-weight: 800; }
.brand-text p { margin: 0; font-size: 10px; text-transform: uppercase; color: var(--dark-gold); font-weight: 600; }

.nav-menu { display: flex; align-items: center; gap: 20px; }
.nav-menu a { text-decoration: none; color: #444; font-weight: 600; font-size: 14px; transition: 0.3s; }
.nav-menu a:hover { color: var(--cadmium-green); }

/* --- CAROUSEL --- */
.carousel-container {
    width: 100%;
    position: relative;
    height: 500px;
    background: #000;
    overflow: hidden;
    z-index: 1;
}

.carousel-slide { display: none; height: 100%; }
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
}

.carousel-caption {
    position: absolute;
    bottom: 25%;
    left: 5%;
    right: 5%;
    text-align: center;
    color: #fff;
}

.carousel-caption h2 { font-size: 2.5rem; color: #ffd700; margin-bottom: 10px; }

/* --- SEARCH BOX --- */
.container-search {
    position: relative;
    z-index: 10;
    margin-top: -40px;
    padding: 0 15px;
}

.search-box {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    gap: 15px;
}

.input-group { flex-grow: 1; display: flex; align-items: center; background: #f9f9f9; padding-left: 15px; border-radius: 8px; }
.search-box select { border: none; background: transparent; padding: 12px; width: 100%; outline: none; font-family: 'Poppins'; }
.btn-gold { background: var(--dark-gold); color: white; border: none; padding: 12px 25px; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* --- MAIN GRID --- */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.card { 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 25px; 
    border-bottom: 4px solid var(--dark-gold); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
}

.card-header { background: var(--cadmium-green); color: white; padding: 15px 20px; font-weight: bold; display: flex; align-items: center; gap: 10px; }

/* --- TABLE RESPONSIVE (Fitur Geser) --- */
.table-responsive { 
    width: 100%; 
    overflow-x: auto; /* Mengaktifkan scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Scroll halus di HP */
}

.table-stats { 
    width: 100%; 
    border-collapse: collapse; 
}

.table-stats th { padding: 12px; background: #f9f9f9; font-size: 12px; text-transform: uppercase; color: #666; }
.table-stats td { padding: 12px; border-bottom: 1px solid #eee; text-align: center; font-size: 14px; }

/* --- RESPONSIVE MOBILE (Portrait Optimization) --- */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 10px; padding: 15px; }
    .nav-menu { gap: 10px; font-size: 11px; flex-wrap: wrap; justify-content: center; }
    
    .carousel-container { height: 250px; }
    .carousel-caption h2 { font-size: 1.4rem; }
    .carousel-caption p { font-size: 0.75rem; }

    .search-box { flex-direction: column; margin-top: -20px; gap: 10px; }
    .btn-gold { width: 100%; }
    
    .main-grid { 
        grid-template-columns: 1fr; /* Menumpuk kolom klasemen dan sidebar */
        margin-top: 20px; 
        padding: 0 10px; 
    }
    
    .brand-text h1 { font-size: 18px; }
    .logo-nav { height: 50px; }

    /* Menentukan lebar minimal tabel agar bisa digeser di HP */
    .table-stats {
        min-width: 550px; 
    }

    .table-stats th, .table-stats td { 
        padding: 10px 5px; 
        font-size: 11px; 
    }

    /* Penyesuaian Nama Tim agar tetap terbaca saat digeser */
    .team-cell strong {
        font-size: 11px;
        white-space: nowrap;
    }
}
@media print {
            body {
                background: #fff;
                color: #000;
            }
            /* Sembunyikan tombol kembali, navbar, dan tombol cetak saat diprint */
            .btn-back, .btn-print, nav, .navbar {
                display: none !important;
            }
            .player-detail-container {
                max-width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
            }
            .card-box, .player-card-hero {
                box-shadow: none !important;
                border: 1px solid #ddd !important;
                break-inside: avoid;
            }
            .player-card-hero {
                background: #006b3c !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            .stat-bar-fill {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
        }

/* --- FOOTER --- */
footer { background: #1a1a1a; color: #fff; padding: 40px 20px; text-align: center; margin-top: 50px; border-top: 4px solid #ffd700; }
.soc-icon { color: #fff; width: 40px; height: 40px; line-height: 40px; border-radius: 50%; display: inline-block; margin: 0 10px; font-size: 18px; transition: 0.3s; text-decoration: none; }
.icon-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.icon-fb { background: #3b5998; }
.icon-wa { background: #25d366; }