/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #141414;
    color: #fff;
    /* Memastikan tidak ada scroll horizontal dari body yang mengganggu penengahan */
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    transition: background 0.3s;
}

header.scrolled {
    background: #141414;
}

.logo {
    font-size: 2em;
    font-weight: 700;
    color: #e50914;
}

.admin-link {
    color: #666;
    text-decoration: none;
    font-size: 0.8em;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.admin-link:hover {
    opacity: 1;
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    height: 65vh;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                 url('https://images.unsplash.com/photo-1556056504-5c7696c4c28d?w=1920') center/cover;
}

.hero-content {
    max-width: 650px;
    padding: 0 20px;
    z-index: 2;
}

.hero h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.live-badge {
    display: inline-block;
    background: #e50914;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========== ADSTERRA BANNER STYLING (Desktop & Mobile) ========== */

/* Menyembunyikan elemen div yang mungkin menampilkan teks skrip Adsterra (jika menggunakan metode pembungkusan) */
.adsterra-hidden-script {
    display: none !important;
}

/* 1. Styling Dasar .ad-banner-placement (Desktop/Tablet) */
.ad-banner-placement {
    /* 🔑 PENTING: Dua properti ini MENENGANHKAN DIV ITU SENDIRI (Horizontal) */
    max-width: 900px; 
    margin: 30px auto; 
    
    /* 🔑 PENTING: Menengahkan konten di dalamnya (Iklan) */
    text-align: center; 
    overflow: hidden; 
}

/* 2. Styling untuk Elemen Iklan di Dalamnya */
.ad-banner-placement > * {
    /* Agar elemen iklan dapat ditengahkan oleh text-align: center */
    display: inline-block;
    max-width: 100%; 
}

/* ========== MATCHES SECTION ========== */
.matches-section {
    padding: 50px 0;
    background: #141414;
}

.section-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 25px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.match-card {
    background: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.match-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.7);
    z-index: 10;
}

.match-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.match-thumbnail {
    position: relative;
    padding-top: 56.25%;
    background-size: cover;
    background-position: center;
}

.match-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.match-teams {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.team {
    text-align: center;
}

.team-flag {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.team-name {
    font-weight: 600;
    font-size: 0.85em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.vs {
    font-size: 1.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.match-info {
    padding: 20px;
}

.match-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #999;
}

.live-indicator {
    background: #e50914;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
    animation: pulse 2s infinite;
}

.upcoming-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

.ended-badge {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

.loading-skeleton {
    background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 350px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== FEATURES SECTION ========== */
.features {
    background: #000;
    padding: 50px 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: #1f1f1f;
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-desc {
    color: #999;
    line-height: 1.6;
    font-size: 0.95em;
}

/* ========== FAQ SECTION ========== */
.faq {
    padding: 50px 50px;
    background: #000;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #1f1f1f;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    font-weight: 600;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #2a2a2a;
}

.faq-icon {
    font-size: 1.5em;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 25px 20px;
    color: #999;
    line-height: 1.8;
    font-size: 0.95em;
}

/* ========== FOOTER ========== */
footer {
    background: #000;
    padding: 40px 50px;
    text-align: center;
    border-top: 1px solid #333;
}

footer p {
    color: #999;
    margin: 5px 0;
}

/* ========== RESPONSIVE (Media Queries) ========== */
@media (max-width: 1024px) {
    .matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header, .container, .features, .faq {
        padding: 15px 20px;
    }

    .logo {
        font-size: 1.5em;
    }

    .hero {
        height: 60vh;
    }

    .hero h1 {
        font-size: 1.8em;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .team-flag {
        font-size: 2em;
    }

    /* 3. MEDIA QUERY KHUSUS UNTUK MOBILE (Maksimal 768px) */
    .ad-banner-placement {
        /* Hapus margin auto di mobile, ganti dengan 0 agar memenuhi lebar penuh */
        margin: 0px 0; /* Memberi jarak atas/bawah, margin kiri/kanan nol */
        padding: 0 5px; /* Sedikit padding di sisi untuk menghindari iklan menempel ke tepi */
        width: calc(100% - 10px); /* Memastikan lebar total pas dengan padding 5px di kiri/kanan */
        max-width: none; /* Nonaktifkan max-width untuk mobile */
        
        /* Penting: Pastikan iklan ditengahkan dalam skala transform */
        text-align: center;
    }

    .ad-banner-placement > * {
        /* Iklan 728px di-scale ke lebar layar */
        /* Catatan: 728 adalah lebar iklan Leaderboard (728x90) */
        transform: scale(calc(100vw / 768)); 
        transform-origin: top center; 
        display: inline-block; 
    }
}