/* ======================================= */
/* GENERAL & BOXED LAYOUT STYLING */
/* ======================================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    
    /* WARNA WALLPAPER / LATAR BELAKANG LUAR - DIUBAH MENJADI WALLPAPER */
    background-image: url('https://statics.hokibagus.club/Bandar80/background/bandar80_backgroundweb.jpg'); /* !!! GANTI URL INI DENGAN GAMBAR ANDA !!! */
    background-color: #1a2a4b; /* Warna fallback jika gambar gagal dimuat */
    background-repeat: repeat;
    background-size: cover; 
    background-attachment: fixed;
    
    color: #fff; 
}

/* KOTAK UTAMA YANG MEMBUNGKUS SEMUA KONTEN */
.main-wrapper {
    max-width: 1240px; 
    margin: 0 auto; 
    background-color: #0b1a37; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
}

/* ======================================= */
/* HEADER STYLING */
/* ======================================= */
.main-header {
    background-color: #0b1a37; 
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.top-header .logo img {
    height: 60px; 
    vertical-align: middle;
}
.top-header .top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px; 
}
.top-header .top-nav ul li a {
    color: #a7b7d7; 
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px; 
    transition: color 0.3s ease;
}
.top-header .top-nav ul li a:hover {
    color: #fff;
}

.bottom-header {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    padding: 0 20px;
}
.bottom-header .main-nav {
    margin-right: auto;
    padding-right: 50px; 
}
.bottom-header .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; 
}
.bottom-header .main-nav ul li a {
    color: #fff; 
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px; 
    padding: 5px 0;
    transition: color 0.3s ease;
}
.bottom-header .main-nav ul li a:hover {
    color: #ccc;
}
.bottom-header .login-form {
    display: flex;
    align-items: center;
    gap: 5px; 
}

.bottom-header .login-form input[type="text"],
.bottom-header .login-form input[type="password"] {
    background-color: #fff; 
    border: 1px solid #ccc;
    border-radius: 20px; 
    padding: 10px 15px; 
    width: 110px; 
    font-size: 14px;
    color: #333;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.bottom-header .login-form .login-button {
    background: linear-gradient(to right, #004085, #002751); 
    color: #fff;
    border: none;
    border-radius: 20px; 
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ======================================= */
/* SLIDESHOW & RUNNING TEXT STYLING */
/* ======================================= */

.slider-container {
    position: relative;
    max-width: none; 
    margin: 0 auto; 
    overflow: hidden;
    padding: 0; 
    height: 480px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); 
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out; 
    height: 100%;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
    display: flex; 
    height: 100%; 
}

.slide-content-wrapper {
    display: flex;
    width: 100%; 
    height: 100%;
    background-color: #1c273a;
    border: 3px solid #d9534f; 
    border-radius: 10px;
    overflow: hidden; 
}

.slide-media {
    position: relative;
    flex: 0 0 100%; 
    overflow: hidden;
    height: 100%; 
}

.slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.live-stream-tag {
    position: absolute;
    top: 15px; 
    left: 15px;
    background-color: #d9534f; 
    color: #fff;
    padding: 8px 15px; 
    border-radius: 8px;
    font-size: 16px; 
    font-weight: bold;
    z-index: 10;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 20;
    height: 100%; 
    display: flex;
    align-items: center;
}

.prev-btn { left: 0; border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.next-btn { right: 0; border-top-right-radius: 10px; border-bottom-right-radius: 10px; }


/* RUNNING TEXT */
.running-text-container {
    background-color: rgba(0, 0, 0, 0.7); 
    color: #fff;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden; 
    border-top: 2px solid #d9534f; 
    border-bottom: 2px solid #d9534f; 
}

.running-text {
    display: flex; 
    align-items: center;
    width: max-content; 
    animation: marquee 30s linear infinite; 
}

.running-text .fas.fa-bullhorn { color: #ffc107; margin-right: 10px; }

@keyframes marquee {
    0% { transform: translateX(100%); } 
    100% { transform: translateX(-100%); } 
}

.slider-dots {
    text-align: center;
    margin-top: 10px;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 4px;
    background-color: #555;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #d9534f;
    width: 25px;
    border-radius: 5px;
}

/* ======================================= */
/* KONTEN UTAMA DENGAN SIDEBAR KIRI (BARU) */
/* ======================================= */

.content-area {
    display: flex;
    gap: 10px; /* Jarak antara sidebar dan konten utama */
    padding: 10px;
    padding-bottom: 0;
    background-color: #1a2a4b; /* Background yang sama dengan luar sidebar */
}

/* Kategori Game (SIDEBAR KIRI) */
.game-list-section {
    flex: 0 0 150px; /* Lebar Sidebar Kategori (150px) */
    padding: 0; 
    max-width: 150px;
    background-color: transparent; 
}

.game-container-wrapper {
    display: flex;
    flex-direction: column; /* Mengubah tata letak menjadi vertikal */
    gap: 5px; /* Jarak antar tombol vertikal */
    padding: 0;
}

.game-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background-color: #0b1a37; 
    border-radius: 5px; /* Lebih kecil agar tidak terlalu membulat */
    padding: 10px 5px; 
    width: 100%; /* Memenuhi lebar 150px sidebar */
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    border: 1px solid #1a2a4b; 
}

.game-box:hover {
    transform: none; /* Menghilangkan efek hover ke atas */
    background-color: #1c273a; /* Warna hover sedikit lebih terang */
    border-color: #007bff; 
}

.game-box img {
    width: 45px; 
    height: 45px;
    margin-bottom: 5px; 
    border-radius: 50%; 
    padding: 3px; 
    background-color: #fff; 
}

.game-title {
    color: #fff;
    font-size: 12px; 
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap; 
}

/* Konten Tambahan/Utama (KANAN) */
.additional-content {
    flex-grow: 1; /* Mengisi sisa ruang */
    background-color: #0b1a37; /* Background konten utama */
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

/* ======================================= */
/* GAME GRID STYLING (Konten Utama) */
/* ======================================= */

.game-grid-area {
    padding: 20px; /* Padding di sekitar grid */
}

.game-grid-container {
    display: grid;
    /* Grid 4 kolom */
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; /* Jarak antar kotak permainan */
}

.grid-game-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background-color: #1a2a4b; 
    border-radius: 10px;
    overflow: hidden;
    /* Rasio aspek kotak, atur tinggi berdasarkan lebar */
    padding-bottom: 100%; 
    height: 0; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grid-game-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
    border-color: #d9534f;
}

.grid-game-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 10px;
}

.game-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Background nama game */
    background: rgba(0, 0, 0, 0.7); 
    color: #fff;
    font-size: 11px; 
    font-weight: bold;
    padding: 5px 0;
    z-index: 5;
    text-transform: uppercase;
}

/* TAGS di pojok kiri atas */
.grid-game-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    color: #fff;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 10px 0 10px 0;
    z-index: 10;
    line-height: 1;
}

/* Styling untuk tag NEW/VIRAL/HOT */
.new-item::before {
    content: 'VIRAL';
    background-color: #ffc107; /* Kuning */
    color: #333;
}

.hot-item::before {
    content: 'HOT';
    background-color: #d9534f; /* Merah */
}

.exclusive-item::before {
    content: 'EKSKLUSIF';
    background-color: #007bff; /* Biru */
}

.top-item::before {
    content: 'TOP';
    background-color: #28a745; /* Hijau */
}

/* LIVE RESULT / LIVE DRAW Overlay */
.live-result {
    /* Pastikan gambar tidak menutupi informasi live */
    z-index: 5; 
}

.live-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.6); 
    color: #fff;
    z-index: 8; 
    padding-bottom: 20px; /* Jarak dari nama game di bawah */
}

.live-info span {
    background-color: #d9534f;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.live-info p {
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
}

/* ======================================= */
/* PROVIDER LOGOS STYLING */
/* ======================================= */
.provider-logos-section {
    background-color: #0b1a37; 
    padding: 15px 0;
    margin-top: 10px;
    border-top: 2px solid #1a2a4b; 
    border-bottom: 2px solid #1a2a4b; 
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.logo-wrapper {
    display: inline-block;
    animation: scroll-logos 40s linear infinite; /* Efek Marquee */
    padding-left: 100%; /* Mulai dari luar kanan */
}

.logo-wrapper img {
    height: 35px; /* Tinggi logo lebih kecil */
    margin: 0 15px;
    opacity: 0.5;
    filter: grayscale(100%); 
    transition: opacity 0.3s, filter 0.3s;
}

.logo-wrapper img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } 
}


/* ======================================= */
/* FOOTER STYLING */
/* ======================================= */
.main-footer {
    background-color: #1a2a4b; 
    padding: 30px 20px;
    border-top: 1px solid #1a2a4b;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    flex: 1;
    min-width: 250px;
    padding: 0 10px;
    text-align: right; 
}

.footer-info h3, .footer-lisensi h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #d9534f;
    display: inline-block;
    padding-bottom: 5px;
}
/* Mengatur judul di footer-info rata kanan */
.footer-info h3 {
    float: right; 
}


.footer-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-info ul li a {
    color: #a7b7d7;
    text-decoration: none;
    font-size: 14px;
    line-height: 2;
    transition: color 0.3s;
}

.footer-info ul li a:hover {
    color: #fff;
}

/* Tombol Kontak */
.contact-buttons {
    display: flex;
    flex-direction: column; 
    gap: 8px;
    margin-top: 15px;
    align-items: flex-end; /* Rata Kanan */
}

.btn {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    width: 150px; /* Lebar tombol yang seragam */
}

.consult-btn {
    background-color: #d9534f; /* Merah */
    color: #fff;
}

.line-btn {
    background-color: #007bff; /* Biru */
    color: #fff;
}


/* Lisensi Logos (AREA KIRI FOOTER) */
.footer-lisensi {
    flex: 2; /* Mengambil ruang lebih banyak di kiri */
    min-width: 300px;
    text-align: left;
}

.footer-lisensi h3 {
     text-align: left;
     float: none; 
}
.lisensi-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    justify-content: flex-start;
    align-items: center;
}
.lisensi-logos img {
    height: 50px; /* Tinggi logo lisensi lebih besar */
    filter: brightness(0.9) grayscale(20%); 
}

/* ======================================= */
/* RESPONSIVENESS */
/* ======================================= */

@media (max-width: 1024px) {
    /* Slide Layout di Tablet */
    .slider-container {
        height: 400px; 
    }
    
    /* Content Area di Tablet */
    .content-area {
        flex-direction: column; /* Ubah menjadi satu kolom di Tablet */
    }
    
    .game-list-section {
        flex: 0 0 auto; /* Sidebar tidak lagi fixed width */
        max-width: none;
        padding: 10px;
    }
    
    .game-container-wrapper {
        flex-direction: row; /* Kembali ke horizontal untuk mobile/tablet */
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .game-box {
        width: calc(33.33% - 10px); /* 3 kolom */
        margin-bottom: 10px;
    }
    
    /* Responsiveness untuk Grid Permainan */
    .game-grid-area {
        padding: 10px;
    }
    .game-grid-container {
        /* 3 kolom di Tablet */
        grid-template-columns: repeat(3, 1fr); 
    }
    
    /* FOOTER RESPONSIVE (Tablet) */
    .footer-container {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 20px;
    }
    .footer-lisensi {
        min-width: 100%;
        text-align: center;
    }
    .footer-lisensi h3 {
        float: none;
    }
    .lisensi-logos {
        justify-content: center;
    }
    .footer-info {
        min-width: unset;
        width: 45%; 
        padding: 0;
        text-align: center;
    }
    .footer-info h3 {
        float: none;
    }
    .contact-buttons {
        align-items: center;
    }
}

@media (max-width: 768px) {
    /* Header Responsive */
    .top-header, .bottom-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }
    .bottom-header .login-form {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    .bottom-header .login-form input,
    .bottom-header .login-form .login-button {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Game Box (Mobile) */
    .game-box {
        width: calc(50% - 10px); /* 2 kolom di mobile */
    }
    
    .game-grid-container {
        /* 2 kolom di Mobile */
        grid-template-columns: repeat(2, 1fr); 
    }
    .game-name {
        font-size: 10px;
    }

    /* FOOTER RESPONSIVE (Mobile) */
    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .footer-info {
        width: 100%;
        text-align: center;
    }
    .footer-info h3 {
        margin: 0 auto 15px auto;
        float: none;
    }
    .contact-buttons {
        align-items: center;
    }
    .footer-info ul li a {
        display: block;
    }
}
