<?php
$page = basename($_SERVER['PHP_SELF']);
$pagesToShow = ['index.php', 'slot.php', 'live-casino.php', 'tembak-ikan.php', 'virtual.php', 'sambung-ayam.php', 'sport.php'];
if (in_array($page, $pagesToShow)):
    if ($mobile):
        ?>
        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-2-mobile.png" class="hot-games-bounce" alt="slot"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Slot</div>
                <div onclick="window.location='slot'" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleSlotClick(1006)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/1/fftANbjv93jOl65N.png?s=46073e36f65fb50fb3658a17a5ab2e1c"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1007)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/4/u6CrwN7HjS7YpyMk.png?s=dfba02c22d5bee6f1da3c3a3ff8da58e"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1011)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/58/d8ClG2FW0RUdLfBF.png?s=0787e2f662cd907dd0f28d2c01685ab7"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1153)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/52/wBMn0JMwHqR15Q9h.png?s=31928aa928afde54ebba690406b8329c"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1153)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/57/641tmm7GA9EQLT88.png?s=a87bf801c98128d371f0d49a73959b82"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1153)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/56/qAS4benNwP9OhFfm.png?s=0e6782ab13225ffce0b93e3441ad173e"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleSlotClick(1153)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/55/3eVr8EQfYFOCXzjy.png?s=6156681e187b130640962ff96709ca02"
                        alt="slot" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>

        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-3-mobile.png?s=a6a5f2baa715e01c443800b8ba1510d7" class="hot-games-bounce"
                    alt="live casino"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Live Casino
                </div>
                <div onclick="window.location='live-casino'" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleCasinoClick('101', 1006)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/2/GGZSQzPi3K0EST06.png?s=079ff2cb680d47839d55af905299bb72"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1002)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/24/7XraZf4dTjhBCnGV.png?s=82c816b7b60ea94ea902e1a5b45a789a"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('bjl', 1011)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/53/VXxFB9VzGIBq9BDX.png?s=444966dc5b0c911d70443fe0d5a02576"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1172)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/46/506zzvpHEcCz1fw1.png?s=5b47abf421fca8aba823bb7a616a5670"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1022)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/40/x4A54lpFqLrFvhFp.png?s=f3db829778688f5166eaa12b5c4e43b0"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1020)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/32/vCpvblkSAYmNEPky.png?s=f364459a4a59b3deb0c9b46415cfe141"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1185)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/30/4N9nXFKTmEJUBl9g.png?s=c2f05746eeaf1d8549e6b6bab4d3ad14"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleCasinoClick('', 1185)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/20/SZwKtjnBCApJXQSX.png?s=77151c41abc7aa6fd4ecf75530b8b138"
                        alt="live casino" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>

        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-5-mobile.png" class="hot-games-bounce" alt="sport"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Sport</div>
                <div onclick="handleGameClick('', 0, 'SPORT')" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleGameClick('', 1012, 'SPORT_BOOK')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/21/T15pFEYAhfe4PSYa.png?s=febc5781089a562b54aa92f383a50283"
                        alt="sport" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1012, 'SPORT_BOOK')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/33/QVsxEuFUnbJUSWvq.png?s=9190358c0cdd06d7ac3b0df8c5bf20bc"
                        alt="sport" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1012, 'SPORT_BOOK')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/23/NpdM33GcsFfWoT9U.png?s=ea658dfab8167b69a2138e13cb63a93c"
                        alt="sport" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1012, 'SPORT_BOOK')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/34/5U6o0ebGTiBShfHF.png?s=59802a7dee2600614d013df3ac3e6d3a"
                        alt="sport" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1012, 'SPORT_BOOK')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/39/sfS8Gcxtut7UhUfQ.png?s=a1075c2c059968332d5f4e241dce2996"
                        alt="sport" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>

        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-8-mobile.png" class="hot-games-bounce" alt="sambung ayam"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Sambung Ayam
                </div>
                <div onclick="handleAyamClick('', 0, 'COCK_FIGHT')" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleGameClick('', 1033, 'COCK_FIGHTING')"
                    style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/29/wvbEnWbNb17vNCcO.png?s=27302759446933fc2b546d453315ae47"
                        alt="cock" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>

        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-4-mobile.png" class="hot-games-bounce" alt="tembak ikan"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Tembak Ikan
                </div>
                <div onclick="window.location='tembak-ikan.php'" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleFishingClick(1009)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/47/OVssGriZth5EhjaB.png?s=af554c5eba1e24afbcc592f473a7e18d"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1009)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/19/WhB6ZwNaUh1FaicC.png?s=ac1516665e69a1ad1273ac70780d8ce3"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1009)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/6/HpN4bTRFqDot7sq4.png?s=c9cf914e1482660816c5bd9acc2a191f"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1009)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/11/PdoCaJ3tv4YPceEQ.png?s=eda1db17339c340f65b4d158ff2b2ef8"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1225)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/16/ovvQTpwHZFTyauAL.png?s=2b70fcf935c96646381e23a30419b334"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1221)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/38/y4zQhrs8056gsrG9.png?s=eee223185be822e35aa37ee237970a74"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1091)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/44/2EjvyhNMo7IhYHv0.png?s=66d36787e6536e81438cb6fc4f53bdf2"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleFishingClick(1079)" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/42/RF3e3cnDiWtzpPxE.png?s=4d5023c7bf8799f38f6f6729805cf6b7"
                        alt="fish" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>

        <div style="width: 90%; margin: 0 auto; padding-top: 10px;">
            <div
                style="background: linear-gradient(to right, #070707, #BC9F00); display: flex; padding: 4px 0 4px 10px; border-left: 2px solid #FFD700;">
                <img src="./asset/images/game-6-mobile.png" class="hot-games-bounce" alt="virtual"
                    style="margin: auto 0; width: 18px; height: 18px; animation-duration: 3s; animation-iteration-count: infinite;">
                <div style="color: #FFD700; font-weight: bold; font-size: 14px; margin: auto auto auto 4px;">Virtual
                </div>
                <div onclick="window.location='virtual.php'" class="glowing2"
                    style="cursor: pointer; margin: auto 0 auto auto; background-image: radial-gradient(ellipse farthest-corner at right bottom, #FEDB37 0%, #FDB931 8%, #9f7928 30%, #8A6E2F 40%, transparent 80%), radial-gradient(ellipse farthest-corner at left top, #e99c05 0%, #f4ae00 8%, #f8bf33 25%, #f8ce19 62.5%, #ffdc02 100%); border-radius: 25px; color: #fff; padding: 4px 12px; font-size: 12px;">
                    Lebih Banyak
                </div>
            </div>
        </div>

        <div class="main-menu-outer-container" style="padding-bottom: 20px;">
            <i class="glyphicon glyphicon-chevron-left left_trigger"></i>
            <main>
                <a onclick="handleGameClick('', 1225, 'OTHER')" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/3/v8SoZ8YDSllm4bnH.png?s=3602028904280a38ba55539203db03d7"
                        alt="virtual" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1225, 'OTHER')" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/7/EmWHQHv3khjIG6Jb.png?s=8389ade7dc22a2252d430b9fdaf08ad6"
                        alt="virtual" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1225, 'OTHER')" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/9/COH9PQVpYiFScBlH.png?s=fe1a6f4c9516cc25530a608d615aa528"
                        alt="virtual" style="width: 120px; border-radius: 4px;">
                </a>
                <a onclick="handleGameClick('', 1225, 'OTHER')" style="margin-right: 10px; margin-top: -10px; cursor: pointer;">
                    <img src="https://onelive.dataklmsad902.site/images/provider-game/14/mrrP7P7QLTuH5XcL.png?s=1431eee195edf56558ac6a504d285475"
                        alt="virtual" style="width: 120px; border-radius: 4px;">
                </a>
            </main>
            <i class="glyphicon glyphicon-chevron-right right_trigger"></i>
        </div>
    <?php else: ?>
        <div class="background-top" style="padding: 30px 0;">
            <div
                style="background-color: var(--secondary-color); width: 95%; margin: 0 auto; max-width: 1280px; padding: 30px 30px 0 30px;">
                <div
                    style="background:url(https://rajabotak.dataklmsad902.site/asset/images/jackpot-desktop.jpg?s=05e786b10d912120226da4ed8bc7d77e); background-position: center top; background-size: 100% 100%; background-repeat: no-repeat; padding: 40px 120px;">
                    <div style="display: flex;">
                        <div style="color: #F1EE03; font-family: Open24DisplaySt; font-size: 70px; margin: auto 8px auto auto;">
                            IDR
                        </div>
                        <div id="progressive_jackpot" data-value=""></div>
                    </div>
                </div>


                <div style="padding:20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-2-mobile.png?s=bfbb653b50a0f71bb7967b94f73febd7"
                                class="hot-games-bounce" alt="slot"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Slot</div>
                        </div>
                        <div onclick="window.location='slot'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul
                    style="list-style-type: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/1/fftANbjv93jOl65N.png?s=46073e36f65fb50fb3658a17a5ab2e1c"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/4/u6CrwN7HjS7YpyMk.png?s=dfba02c22d5bee6f1da3c3a3ff8da58e"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/58/d8ClG2FW0RUdLfBF.png?s=0787e2f662cd907dd0f28d2c01685ab7"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/52/wBMn0JMwHqR15Q9h.png?s=31928aa928afde54ebba690406b8329c"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/54/Y6z4g9iAch8XkEFC.png?s=2c55092b012e0bed27a11c5b56618567"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/57/641tmm7GA9EQLT88.png?s=a87bf801c98128d371f0d49a73959b82"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/56/qAS4benNwP9OhFfm.png?s=0e6782ab13225ffce0b93e3441ad173e"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='slot'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/55/3eVr8EQfYFOCXzjy.png?s=6156681e187b130640962ff96709ca02"
                            alt="slot" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>

                <div style="padding:20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-3-mobile.png?s=a6a5f2baa715e01c443800b8ba1510d7"
                                class="hot-games-bounce" alt="live casino"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Live Casino</div>
                        </div>
                        <div onclick="window.location='live-casino'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul
                    style="list-style-type: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/2/GGZSQzPi3K0EST06.png?s=079ff2cb680d47839d55af905299bb72"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/24/7XraZf4dTjhBCnGV.png?s=82c816b7b60ea94ea902e1a5b45a789a"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/53/VXxFB9VzGIBq9BDX.png?s=444966dc5b0c911d70443fe0d5a02576"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/46/506zzvpHEcCz1fw1.png?s=5b47abf421fca8aba823bb7a616a5670"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/40/x4A54lpFqLrFvhFp.png?s=f3db829778688f5166eaa12b5c4e43b0"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/32/vCpvblkSAYmNEPky.png?s=f364459a4a59b3deb0c9b46415cfe141"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/30/4N9nXFKTmEJUBl9g.png?s=c2f05746eeaf1d8549e6b6bab4d3ad14"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='live-casino'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/20/SZwKtjnBCApJXQSX.png?s=77151c41abc7aa6fd4ecf75530b8b138"
                            alt="live casino" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>

                <div style="padding:20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-5-mobile.png?s=ff35fb30d93a8b38470bdb515ee0f5b2"
                                class="hot-games-bounce" alt="sport"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Sport</div>
                        </div>
                        <div onclick="window.location='sport'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul
                    style="list-style-type: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='sport'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/21/T15pFEYAhfe4PSYa.png?s=febc5781089a562b54aa92f383a50283"
                            alt="sport" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='sport'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/33/QVsxEuFUnbJUSWvq.png?s=9190358c0cdd06d7ac3b0df8c5bf20bc"
                            alt="sport" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='sport'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/23/NpdM33GcsFfWoT9U.png?s=ea658dfab8167b69a2138e13cb63a93c"
                            alt="sport" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='sport'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/34/5U6o0ebGTiBShfHF.png?s=59802a7dee2600614d013df3ac3e6d3a"
                            alt="sport" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='sport'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/39/sfS8Gcxtut7UhUfQ.png?s=a1075c2c059968332d5f4e241dce2996"
                            alt="sport" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>

                <div style="padding:20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-8-mobile.png?s=23e488a1b54d0b57b1894a6ef19dc4b9"
                                class="hot-games-bounce" alt="sabung ayam"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Sabung Ayam</div>
                        </div>
                        <div onclick="window.location='https://rajabotak96.xyz/sabung-ayam'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul
                    style="list-style-type: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='sambung-ayam'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/29/wvbEnWbNb17vNCcO.png?s=27302759446933fc2b546d453315ae47"
                            alt="cock" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>

                <div style="padding:20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-4-mobile.png?s=63e6251efc14724ae072b55306ab484c"
                                class="hot-games-bounce" alt="tembak ikan"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Tembak Ikan</div>
                        </div>
                        <div onclick="window.location='tembak-ikan'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul
                    style="list-style-type: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/47/OVssGriZth5EhjaB.png?s=af554c5eba1e24afbcc592f473a7e18d"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/19/WhB6ZwNaUh1FaicC.png?s=ac1516665e69a1ad1273ac70780d8ce3"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='htembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/6/HpN4bTRFqDot7sq4.png?s=c9cf914e1482660816c5bd9acc2a191f"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/11/PdoCaJ3tv4YPceEQ.png?s=eda1db17339c340f65b4d158ff2b2ef8"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/16/ovvQTpwHZFTyauAL.png?s=2b70fcf935c96646381e23a30419b334"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/38/y4zQhrs8056gsrG9.png?s=eee223185be822e35aa37ee237970a74"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/44/2EjvyhNMo7IhYHv0.png?s=66d36787e6536e81438cb6fc4f53bdf2"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='tembak-ikan'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/42/RF3e3cnDiWtzpPxE.png?s=4d5023c7bf8799f38f6f6729805cf6b7"
                            alt="fish" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>

                <div style="padding: 20px 0;">
                    <div
                        style="display: flex; background-color: #070707; padding: 4px 0 4px 10px; border-left: 2px solid var(--primary-color);">
                        <div style="display: flex;">
                            <img src="https://rajabotak.dataklmsad902.site/asset/images/game-6-mobile.png?s=7925b9682d24c145c273d393f412ebe4"
                                class="hot-games-bounce" alt="virtual"
                                style="margin: auto 0; width: 20px; height: 20px; animation-duration: 3s; animation-iteration-count: infinite;">
                            <div
                                style="margin: auto 0; color: var(--primary-color); font-weight: bold; font-size: 16px; padding-left: 6px;">
                                Virtual</div>
                        </div>
                        <div onclick="window.location='virtual'"
                            style="cursor: pointer; margin: auto 0 auto auto; background-color: var(--primary-color); border-radius: 25px; color: #000; padding: 4px 16px;">
                            Lebih Banyak Game
                        </div>
                    </div>
                </div>

                <ul style="list-style-type: none; padding: 0 0 20px 0;; display: flex; flex-wrap: wrap; text-align: center;">
                    <li onclick="window.location='virtual'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/3/v8SoZ8YDSllm4bnH.png?s=3602028904280a38ba55539203db03d7"
                            alt="virtual" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='virtual'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/7/EmWHQHv3khjIG6Jb.png?s=8389ade7dc22a2252d430b9fdaf08ad6"
                            alt="virtual" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='virtual'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/9/COH9PQVpYiFScBlH.png?s=fe1a6f4c9516cc25530a608d615aa528"
                            alt="virtual" style="width: 100%; border-radius: 4px;">
                    </li>
                    <li onclick="window.location='virtual'"
                        style="cursor: pointer; display: inline-block; width: 12.5%; margin-bottom: 1%; padding: 0 15px 0 0;">
                        <img src="https://onelive.dataklmsad902.site/images/provider-game/14/mrrP7P7QLTuH5XcL.png?s=1431eee195edf56558ac6a504d285475"
                            alt="virtual" style="width: 100%; border-radius: 4px;">
                    </li>
                </ul>
            </div>
        </div>
    <?php endif;
endif; ?>

<?php if ($mobile): ?>
    <!-- di css nya gw apus = background:url(asset/footer.jpg); -->
    <div class="footer-bg"
        style="position: relative; background-size: 100% auto; width: 100%; background-repeat: repeat; background-position: top; padding: 20px 0; color: #fff;">
        <div style="margin-left: 15px; position: relative; z-index: 2;">
            Bekerja sama dengan BANK :

            <ul
                style="list-style-type: none; padding: 15px 0 0 0; margin-bottom: 30px; display: flex; flex-wrap: wrap; text-align: center;">
                <?php
                $banks = [
                    'bca',
                    'bni',
                    'bri',
                    'cimb',
                    'mandiri',
                    'danamon',
                    'ovo',
                    'gopay',
                    'dana',
                    'linkaja',
                    'telkomsel',
                    'xl',
                    'seabank',
                    'permata',
                    'ocbc'
                ];

                foreach ($banks as $bank):
                    $gambarbank = "./images/bank-list/" . $bank . ".png";

                    if (!file_exists($gambarbank)) {
                        $gambarbank = "./images/bank-list/" . $bank . ".jpg";
                    }
                    ?>
                    <li style="display: inline-block; width: 33%; padding: 0 8px 0 0; margin-bottom: 6px;">
                        <div style="padding: 2px 4%; border: 1px solid #E3E2DE; border-radius: 4px;">
                            <img src="<?= $gambarbank ?>" alt="<?= strtoupper(str_replace('-', ' ', $bank)) ?>"
                                style="width: 70%;">
                        </div>
                    </li>
                <?php endforeach; ?>
            </ul>

            Bekerja sama dengan PROVIDER :

            <ul
                style="list-style-type: none; padding: 15px 0 0 0; margin-bottom: 30px; display: flex; flex-wrap: wrap; text-align: center;">
                <?php
                $path = './images/provider/';
                $files = glob($path . '*.{png,jpg,jpeg,gif,webp}', GLOB_BRACE);

                foreach ($files as $file):
                    $filename = basename($file);
                    $name = pathinfo($filename, PATHINFO_FILENAME);

                    $alt = ucwords(str_replace(['-', '_'], ' ', $name));
                    ?>
                    <li style="display: inline-block; width: 33%; padding: 0 8px 0 0; margin-bottom: 6px;">
                        <div style="padding: 2px 4%; border: 1px solid #E3E2DE; border-radius: 4px;">
                            <img src="<?= $file ?>" alt="<?= htmlspecialchars($alt) ?>" style="width: 70%;">
                        </div>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>

        <footer>
            <div style="width: 100%; padding: 0 15px; position: relative; z-index: 2;">
                <h2><strong><?= $judul_pertama ?>: Bandar Online Terpercaya #1 di Indonesia dengan Sistem 2025
                        Termutakhir</strong></h2>
                <p><?= $judul_pertama ?> hadir sebagai <strong>bandar online terpercaya #1 di Indonesia</strong>,
                    menghadirkan
                    pengalaman bermain yang modern, aman, dan penuh keuntungan. Dengan mengusung <strong>sistem
                        termutakhir 2025</strong>, platform ini menawarkan performa tinggi, proses transaksi
                    otomatis, dan akses game yang lancar di semua perangkat.</p>
                <p>Salah satu keunggulan utama <a target="_blank" rel="noopener noreferrer nofollow"
                        class="text-primary underline" href="<?= $base_url ?>"><?= $judul_pertama ?></a> adalah
                    <strong>winrate tinggi</strong> yang dirancang secara adil dan transparan, memberikan peluang
                    menang lebih besar kepada semua pemain. Didukung teknologi keamanan terbaru, semua data dan
                    transaksi terlindungi dengan enkripsi tingkat tinggi.
                </p>
                <p>Tak hanya itu, <?= $judul_pertama ?> juga menyediakan berbagai pilihan game populer dari provider
                    ternama,
                    layanan pelanggan 24 jam, serta bonus menarik setiap hari.</p>
                <p>🔒 <strong>Keamanan maksimal</strong>, 🎯 <strong>peluang menang tinggi</strong>, dan 💯
                    <strong>kenyamanan bermain tanpa batas</strong> — semua ada di <?= $judul_pertama ?>.
                </p>
                <p><strong>Gabung sekarang dan rasakan sendiri pengalaman bermain terbaik di tahun 2025!</strong>
                </p>
            </div>

            <div
                style="font-weight: bold; color: #fff; text-align: center; padding: 35px 20px 70px 20px; position: relative; z-index: 2;">
                <h1 style="font-size: 15px; margin-top: 0;" class="cpright-year">&copy; 2025 <?= $judul_pertama ?>. All
                    rights reserved | 18+</h1>
            </div>
        </footer>
    </div>
<?php else: ?>
    <div class="footer-bg" style="background: var(--secondary-color); 
    position: relative; background-size: cover; width: 100%; background-repeat: no-repeat; 
    background-position: center; padding: 40px 0 20px 0; color: #F1F2F3;">

        <div style="width: 95%; margin: 0 auto; max-width: 1280px; position: relative; z-index: 2;">

            <!-- ==================== BANK SECTION ==================== -->
            <div style="font-size: 16px;">Bekerja sama dengan BANK :</div>

            <ul style="list-style-type: none; padding: 15px 0 0 0; margin-bottom: 30px; 
            display: flex; flex-wrap: wrap; text-align: center;">

                <?php
                $bank_folder = "./images/bank-list/";
                $bank_files = glob($bank_folder . "*.{png,jpg,jpeg,webp,gif}", GLOB_BRACE);

                foreach ($bank_files as $file):
                    $filename = basename($file);
                    $alt = strtoupper(pathinfo($filename, PATHINFO_FILENAME));
                    ?>

                    <li style="display: inline-block; width: 10%; padding: 0 8px 0 0; margin-bottom: 10px;">
                        <div style="padding: 8px; border: 1px solid var(--primary-color); border-radius: 4px;">
                            <img src="<?= $file ?>" alt="<?= $alt ?>" style="width: 80%;">
                        </div>
                    </li>

                <?php endforeach; ?>

            </ul>

            <!-- ==================== PROVIDER SECTION ==================== -->
            <div style="font-size: 16px;">Bekerja sama dengan PROVIDER :</div>

            <ul style="list-style-type: none; padding: 15px 0 0 0; margin-bottom: 40px; 
            display: flex; flex-wrap: wrap; text-align: center;">

                <?php
                $provider_folder = "./images/provider/";
                $provider_files = glob($provider_folder . "*.{png,jpg,jpeg,gif,webp}", GLOB_BRACE);

                foreach ($provider_files as $file):
                    $filename = basename($file);
                    $alt = ucwords(str_replace(['-', '_'], ' ', pathinfo($filename, PATHINFO_FILENAME)));
                    ?>

                    <li style="display: inline-block; width: 10%; padding: 0 8px 0 0; margin-bottom: 10px;">
                        <div style="padding: 8px; border: 1px solid var(--primary-color); border-radius: 4px;">
                            <img src="<?= $file ?>" alt="<?= htmlspecialchars($alt) ?>" style="width: 80%;">
                        </div>
                    </li>

                <?php endforeach; ?>

            </ul>
        </div>

        <!-- ==================== FOOTER TEXT ==================== -->
        <footer>
            <div style="width: 95%; margin: 0 auto; max-width: 1280px; position: relative; z-index: 2;">
                <h2><strong><?= $judul_pertama ?>: Bandar Online Terpercaya #1 di Indonesia dengan Sistem 2025
                        Termutakhir</strong></h2>
                <p><?= $judul_pertama ?> hadir sebagai <strong>bandar online terpercaya #1 di Indonesia</strong>,
                    menghadirkan
                    pengalaman bermain yang modern, aman, dan penuh keuntungan. Dengan mengusung <strong>sistem
                        termutakhir 2025</strong>, platform ini menawarkan performa tinggi, proses transaksi
                    otomatis, dan akses game yang lancar di semua perangkat.</p>
                <p>Salah satu keunggulan utama <a target="_blank" rel="noopener noreferrer nofollow"
                        class="text-primary underline" href="<?= $base_url ?>"><?= $judul_pertama ?></a> adalah
                    <strong>winrate tinggi</strong> yang dirancang secara adil dan transparan, memberikan peluang
                    menang lebih besar kepada semua pemain. Didukung teknologi keamanan terbaru, semua data dan
                    transaksi terlindungi dengan enkripsi tingkat tinggi.
                </p>
                <p>Tak hanya itu, <?= $judul_pertama ?> juga menyediakan berbagai pilihan game populer dari provider
                    ternama,
                    layanan pelanggan 24 jam, serta bonus menarik setiap hari.</p>
                <p>🔒 <strong>Keamanan maksimal</strong>, 🎯 <strong>peluang menang tinggi</strong>, dan 💯
                    <strong>kenyamanan bermain tanpa batas</strong> — semua ada di <?= $judul_pertama ?>.
                </p>
                <p><strong>Gabung sekarang dan rasakan sendiri pengalaman bermain terbaik di tahun 2025!</strong>
                </p>
            </div>

            <div style="font-weight: bold; color: #fff; text-align: center; padding: 35px 20px 15px 20px;">
                <p style="font-size: 18px; margin-top: 0;" class="cpright-year">&copy; 2025 <?= $judul_pertama ?>. All
                    rights reserved | 18+</p>
            </div>
        </footer>
    </div>
<?php endif; ?>
<script>
    const copyrights = document.querySelectorAll('.cpright-year');
    const tahun = new Date().getFullYear();

    copyrights.forEach(elem => {
        elem.textContent = elem.textContent.replace(/\d{4}/, tahun);
    });

</script>
<script src="./vendor/jquery/jquery.min.js"></script>
<script src="./vendor/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="./js/custom.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

<?php if ($_SESSION['id']): ?>
    <script>
        // function updateSaldo() {
        //     fetch('update_saldo.php')
        //         .then(response => response.text())
        //         .catch(error => {
        //             console.error('Terjadi kesalahan:', error);
        //         });
        // }

        // window.addEventListener('load', updateSaldo);
        const IDR = (n) => new Intl.NumberFormat('id-ID').format(n);

        let pollInterval = 3000
        let timer = null;
        let backoff = 0;

        async function fetchSaldo() {
            const res = await fetch('update_saldo.php', { headers: { 'X-Requested-With': 'XMLHttpRequest' } });

            const ct = res.headers.get('content-type') || '';
            if (ct.includes('application/json')) {
                const data = await res.json();
                if (!data.ok) throw new Error('Gagal ambil saldo');
                return { raw: data.balance, text: data.formatted || ('IDR ' + IDR(data.balance)) };
            } else {
                const text = (await res.text()).trim();
                const angka = parseInt(text.replace(/[^\d]/g, ''), 10) || 0;
                return { raw: angka, text };
            }
        }

        function renderSaldo(text) {
            document.querySelectorAll('.saldoUser').forEach(el => {
                const parentHasIDR = /IDR\s*$/i.test((el.previousSibling?.textContent || '').trim());
                el.textContent = parentHasIDR ? text.replace(/^IDR\s*/i, '') : text;
            });
        }

        async function updateSaldo() {
            try {
                const { text } = await fetchSaldo();
                renderSaldo(text);
                backoff = 0;
            } catch (e) {
                console.error('Terjadi kesalahan:', e);
                backoff = Math.min((backoff || 1) * 2, 60_000);
            } finally {
                scheduleNext();
            }
        }

        function scheduleNext() {
            clearTimeout(timer);
            const delay = (backoff || pollInterval);
            if (!document.hidden) {
                timer = setTimeout(updateSaldo, delay);
            }
        }

        // jalankan saat halaman siap
        window.addEventListener('load', () => {
            updateSaldo();
        });

        // pause saat tab disembunyikan, resume saat kembali
        document.addEventListener('visibilitychange', () => {
            if (document.hidden) {
                clearTimeout(timer);
            } else {
                updateSaldo();
            }
        });
    </script>
<?php endif; ?>

<script>
    $(window).on('load', function () {
        if (sessionStorage.getItem('sync_done') === 'yes') return;
        sessionStorage.setItem('sync_done', 'yes');

        $.ajax({
            url: 'update_saldo.php',
            type: 'GET',
            beforeSend: function () {
                console.log("Sinkronisasi saldo sedang diproses...");
            },
            success: function (response) {
                console.log("Hasil sinkronisasi:", response);

                $('#saldoUser').text(response);
            },
            error: function (xhr, status, error) {
                console.error("Gagal sinkronisasi:", error);
            }
        });
    });
</script>
<script>
    $('.close-modal').on('click', function () {
        $(".modal-info").remove();
        $(".modal-backdrop").remove();
    });
    $('.circular-menu__icon').on('click', function () {
        $(".overlay").toggleClass("show");
        if ($('.circular-menu__button').is(":checked")) {
            $('.circular-menu__icon').html(
                '<i class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i>').css(
                    'background', 'linear-gradient(#5F70FB, #4E63FA)').css('left', '0').css('z-index', '7');
            $('.circular-menu__item').css('left', '0').css('z-index', '5').css('width', '45px').css('height',
                '45px').css('line-height', '45px');
        } else {
            $('.circular-menu__icon').html(
                '<i class="fa fa-close" style="font-size: 25px; vertical-align: middle;"></i>').css(
                    'background', 'linear-gradient(#E62525, #B10202)').css('left', 'calc(50% - 35px)').css(
                        'z-index', '1055');
            $('.circular-menu__item').css('left', 'calc(50% - 35px)').css('z-index', '1049').css('width',
                '60px').css('height', '60px').css('line-height', '60px');
        }
    });
    $('.overlay').on('click', function () {
        $(".overlay").removeClass("show");
        $('.circular-menu__button').prop('checked', false);
        $('.circular-menu__icon').html(
            '<i class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i>').css('background',
                'linear-gradient(#5F70FB, #4E63FA)').css('left', '0').css('z-index', '7');
        $('.circular-menu__item').css('left', '0').css('z-index', '5').css('width', '45px').css('height',
            '45px').css('line-height', '45px');
    });

    // Mobile sidebar toggle functionality
    $(document).ready(function () {
        // Open sidebar when menu button is clicked
        $('#open-right').on('click', function () {
            $('.overlay').addClass('show');
            $('#right-column').addClass('active');
        });

        // Close sidebar when close button is clicked
        $('.closebtn').on('click', function () {
            $('.overlay').removeClass('show');
            $('#right-column').removeClass('active');
        });

        // Close sidebar when overlay is clicked
        $('.overlay').on('click', function () {
            $(this).removeClass('show');
            $('#right-column').removeClass('active');
            // Also handle circular menu if open
            $('.circular-menu__button').prop('checked', false);
            $('.circular-menu__icon').html(
                '<i class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i>').css(
                    'background',
                    'linear-gradient(#5F70FB, #4E63FA)').css('left', '0').css('z-index', '7');
            $('.circular-menu__item').css('left', '0').css('z-index', '5').css('width', '45px').css(
                'height',
                '45px').css('line-height', '45px');
        });
    });
</script>
<script>
    (function () {
        // Use IIFE to avoid conflicts
        var popupHomeInit = function () {
            var $popupWelcome = $('#popup-home-welcome');

            if ($popupWelcome.length === 0) {
                return;
            }

            // Check if user has closed popup in this session
            var popupClosed = sessionStorage.getItem('popup_home_closed');

            if (!popupClosed) {
                $popupWelcome.show();
                $('body').addClass('popup-home-open');
            }

            // Handle close button
            $('.popup-home-close').off('click').on('click', function (e) {
                e.preventDefault();
                e.stopPropagation();
                $popupWelcome.fadeOut(300);
                $('body').removeClass('popup-home-open');
                sessionStorage.setItem('popup_home_closed', 'true');
                return false;
            });

            // Close when clicking backdrop
            $('.popup-home-backdrop').off('click').on('click', function (e) {
                e.preventDefault();
                e.stopPropagation();
                $popupWelcome.fadeOut(300);
                $('body').removeClass('popup-home-open');
                sessionStorage.setItem('popup_home_closed', 'true');
                return false;
            });

            // Prevent closing when clicking inside modal content
            $('.popup-home-content').off('click').on('click', function (e) {
                e.stopPropagation();
            });

            $('.popup-home-dialog').off('click').on('click', function (e) {
                e.stopPropagation();
            });

            $('.popup-home-modal').off('click').on('click', function (e) {
                // Allow closing when clicking modal overlay (outside dialog)
                if ($(e.target).hasClass('popup-home-modal')) {
                    $popupWelcome.fadeOut(300);
                    $('body').removeClass('popup-home-open');
                    sessionStorage.setItem('popup_home_closed', 'true');
                }
            });
        };

        // Initialize when document is ready
        if (document.readyState === 'loading') {
            $(document).ready(popupHomeInit);
        } else {
            popupHomeInit();
        }
    })();
</script>
<script>
    $(document).ready(function () {
        function getURLParameter(name) {
            const urlParams = new URLSearchParams(window.location.search);
            return urlParams.get(name);
        }

        const refParam = getURLParameter('ref');
        if (refParam) {
            localStorage.setItem('referral_username', refParam);
        }

        const savedReferral = localStorage.getItem('referral_username');
        if (savedReferral) {
            $('#referral_username').val(savedReferral);
            $('#referrer_display').text(savedReferral);
            $('#referral_info').show();
        }

        // Debounce function for live validation
        let debounceTimer;

        function debounce(callback, delay = 500) {
            clearTimeout(debounceTimer);
            debounceTimer = setTimeout(callback, delay);
        }

        // Input restriction: Only numbers for phone
        $('input[name="phone"]').on('input', function () {
            this.value = this.value.replace(/[^0-9]/g, '');
        });

        // Input restriction: Only numbers for bank account number
        $('input[name="bank_account_number"]').on('input', function () {
            this.value = this.value.replace(/[^0-9]/g, '');
        });

        // Input restriction: Only letters and spaces for bank account name
        $('input[name="bank_account_name"]').on('input', function () {
            this.value = this.value.replace(/[^a-zA-Z\s]/g, '');
        });

        // Live validation for username
        $('input[name="username"]').on('input', function () {
            const username = $(this).val();
            const errorDiv = $('.error-username');

            if (username.length === 0) {
                errorDiv.text('').css('color', 'red');
                return;
            }

            errorDiv.html('<i class="fas fa-spinner fa-spin"></i> Mengecek...').css('color', 'gray');

            debounce(function () {
                $.ajax({
                    url: 'function/checker.php',
                    type: 'POST',
                    data: {
                        username: username,
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (response.available) {
                            errorDiv.html('<i class="fas fa-check"></i> ' + response.message).css('color', 'green');
                        } else {
                            errorDiv.html('<i class="fas fa-times"></i> ' + response.message).css('color', 'red');
                        }
                    },
                    error: function () {
                        errorDiv.text('Gagal mengecek username').css('color', 'red');
                    }
                });
            }, 500);
        });

        $('input[name="email"]').on('input', function () {
            const email = $(this).val();
            const errorDiv = $('.error-email');

            if (email.length === 0) {
                errorDiv.text('').css('color', 'red');
                return;
            }

            errorDiv.html('<i class="fas fa-spinner fa-spin"></i> Mengecek...').css('color', 'gray');

            debounce(function () {
                $.ajax({
                    url: 'function/checker.php',
                    type: 'POST',
                    data: {
                        email: email,
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (response.available) {
                            errorDiv.html('<i class="fas fa-check"></i> ' + response.message).css('color', 'green');
                        } else {
                            errorDiv.html('<i class="fas fa-times"></i> ' + response.message).css('color', 'red');
                        }
                    },
                    error: function () {
                        errorDiv.text('Gagal mengecek email').css('color', 'red');
                    }
                });
            }, 500);
        });

        // Live validation for phone
        $('input[name="phone"]').on('input', function () {
            const phone = $(this).val();
            const errorDiv = $('.error-phone');

            if (phone.length === 0) {
                errorDiv.text('').css('color', 'red');
                return;
            }

            errorDiv.html('<i class="fas fa-spinner fa-spin"></i> Mengecek...').css('color', 'gray');

            debounce(function () {
                $.ajax({
                    url: 'function/checker.php',
                    type: 'POST',
                    data: {
                        phone: phone,
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (response.available) {
                            errorDiv.html('<i class="fas fa-check"></i> ' + response.message).css('color', 'green');
                        } else {
                            errorDiv.html('<i class="fas fa-times"></i> ' + response.message).css('color', 'red');
                        }
                    },
                    error: function () {
                        errorDiv.text('Gagal mengecek nomor handphone').css('color', 'red');
                    }
                });
            }, 500);
        });

        $('input[name="bank_account_number"]').on('input', function () {
            const bankAccountNumber = $(this).val();
            const bankName = $('select[name="bank_name"]').val();
            const errorDiv = $('.error-bank_account_number');

            if (bankAccountNumber.length === 0) {
                errorDiv.text('').css('color', 'red');
                return;
            }

            errorDiv.html('<i class="fas fa-spinner fa-spin"></i> Mengecek...').css('color', 'gray');

            debounce(function () {
                $.ajax({
                    url: 'function/checker.php',
                    type: 'POST',
                    data: {
                        bank_account_number: bankAccountNumber,
                        bank_name: bankName,
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (response.available) {
                            errorDiv.html('<i class="fas fa-check"></i> ' + response.message).css('color', 'green');
                        } else {
                            errorDiv.html('<i class="fas fa-times"></i> ' + response.message).css('color', 'red');
                        }
                    },
                    error: function () {
                        errorDiv.text('Gagal mengecek nomor rekening').css('color', 'red');
                    }
                });
            }, 500);
        });

        $('select[name="bank_name"]').on('change', function () {
            const bankAccountNumber = $('input[name="bank_account_number"]').val();
            if (bankAccountNumber.length > 0) {
                $('input[name="bank_account_number"]').trigger('input');
            }
        });

        $('.form-register').on('submit', function (e) {
            e.preventDefault();

            // Ask for confirmation
            if (!confirm('Apakah anda ingin daftar dengan data ini?')) {
                return false;
            }

            // Clear previous errors
            $('.error-username').text('');
            $('.error-password').text('');
            $('.error-password_confirm').text('');
            $('.error-email').text('');
            $('.error-phone').text('');
            $('.error-bank_name').text('');
            $('.error-bank_account_number').text('');
            $('.error-bank_account_name').text('');
            $('.error-captcha').text('');
            $('.error-referral_username').hide().text('');

            var formData = $(this).serializeArray();
            var refuser = localStorage.getItem('referral_username');

            if (refuser) {
                formData.push({
                    name: 'reffallea',
                    value: refuser
                });
            }
            var submitBtn = $(this).find('.submit');
            submitBtn.prop('disabled', true).text('Memproses...');

            $.ajax({
                url: './function/proses_daftar.php',
                type: 'POST',
                data: formData,
                dataType: 'json',
                success: function (response) {
                    if (response.success) {
                        localStorage.removeItem('referral_username');
                        alert(response.message);
                        window.location.href = response.redirect;
                    }
                },
                error: function (xhr) {
                    submitBtn.prop('disabled', false).text('Daftar');

                    if (xhr.status === 422) {
                        var errors = xhr.responseJSON.errors;

                        // Display field-specific errors
                        if (errors.username) {
                            $('.error-username').text(errors.username[0]).css('color', 'red');
                        }
                        if (errors.password) {
                            $('.error-password').text(errors.password[0]).css('color', 'red');
                        }
                        if (errors.password_confirm) {
                            $('.error-password_confirm').text(errors.password_confirm[0]).css('color', 'red');
                        }
                        if (errors.email) {
                            $('.error-email').text(errors.email[0]).css('color', 'red');
                        }
                        if (errors.phone) {
                            $('.error-phone').text(errors.phone[0]).css('color', 'red');
                        }
                        if (errors.bank_name) {
                            $('.error-bank_name').text(errors.bank_name[0]).css('color', 'red');
                        }
                        if (errors.bank_account_number) {
                            $('.error-bank_account_number').text(errors.bank_account_number[0]).css('color', 'red');
                        }
                        if (errors.bank_account_name) {
                            $('.error-bank_account_name').text(errors.bank_account_name[0]).css('color', 'red');
                        }
                        if (errors.captcha) {
                            $('.error-captcha').text(errors.captcha[0]).css('color', 'red');
                            // Refresh captcha on error
                            document.getElementById('captchaCode').src = 'captcha/default.php?' + Math.random();
                        }
                        if (errors.referral_username) {
                            $('.error-referral_username').text(errors.referral_username[0]).show();
                            $('#referral_info').hide();
                        }
                    } else {
                        alert('Terjadi kesalahan. Silakan coba lagi.');
                    }
                }
            });
        });
    });
</script>
<script>
    $(document).ready(function () {
        $('.form-login').on('submit', function (e) {
            e.preventDefault();

            // Clear previous errors
            $('.error-username-mobile').text('');
            $('.error-password-mobile').text('');
            $('.error-check-mobile').html('');

            var formData = $(this).serialize();
            var submitBtn = $(this).find('.submit-mobile');
            var originalText = submitBtn.text();
            submitBtn.prop('disabled', true).text('Memproses...');

            $.ajax({
                url: $(this).attr('action'),
                type: 'POST',
                data: formData,
                dataType: 'json',
                success: function (response) {
                    if (response.success) {
                        $('.error-check-mobile').html(
                            '<div style="padding: 8px; background: #28a745; color: white; border-radius: 5px; margin-bottom: 10px; text-align: center; font-size: 13px;">' +
                            response.message + '</div>');
                        setTimeout(function () {
                            window.location.href = response.redirect;
                        }, 1000);
                    }
                },
                error: function (xhr) {
                    submitBtn.prop('disabled', false).text(originalText);

                    if (xhr.status === 422) {
                        var errors = xhr.responseJSON.errors;

                        // Display field-specific errors
                        if (errors.username) {
                            $('.error-username-mobile').text(errors.username[0]);
                        }
                        if (errors.password) {
                            $('.error-password-mobile').text(errors.password[0]);
                        }
                    } else if (xhr.status === 401) {
                        // Login failed
                        var message = xhr.responseJSON.message ||
                            'Username atau password salah';
                        $('.error-check-mobile').html(
                            '<div style="padding: 8px; background: #dc3545; color: white; border-radius: 5px; margin-bottom: 10px; text-align: center; font-size: 13px;">' +
                            message + '</div>');
                    } else {
                        $('.error-check-mobile').html(
                            '<div style="padding: 8px; background: #dc3545; color: white; border-radius: 5px; margin-bottom: 10px; text-align: center; font-size: 13px;">Terjadi kesalahan. Silakan coba lagi.</div>'
                        );
                    }
                }
            });
        });
    });
</script>
<script>
    $('.circular-menu__icon').on('click', function () {
        $(".overlay").toggleClass("show");
        if ($('.circular-menu__button').is(":checked")) {
            $('.circular-menu__icon').html(
                '<i class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i>').css(
                    'background', 'linear-gradient(#5F70FB, #4E63FA)').css('left', '0').css('z-index', '7');
            $('.circular-menu__item').css('left', '0').css('z-index', '5').css('width', '45px').css('height',
                '45px').css('line-height', '45px');
        } else {
            $('.circular-menu__icon').html(
                '<i class="fa fa-close" style="font-size: 25px; vertical-align: middle;"></i>').css(
                    'background', 'linear-gradient(#E62525, #B10202)').css('left', 'calc(50% - 35px)').css(
                        'z-index', '1055');
            $('.circular-menu__item').css('left', 'calc(50% - 35px)').css('z-index', '1049').css('width',
                '60px').css('height', '60px').css('line-height', '60px');
        }
    });
    $('#open-right').on('click', function () {
        $("#right-column").toggleClass("active");
        $("#right-column li").toggleClass("active");
        $(".overlay").toggleClass("show");
    });
    $('.overlay').on('click', function () {
        $("#right-column").removeClass("active");
        $("#right-column li").removeClass("active");
        $(".overlay").removeClass("show");
        $('.circular-menu__button').prop('checked', false);
        $('.circular-menu__icon').html(
            '<i class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i>').css('background',
                'linear-gradient(#5F70FB, #4E63FA)').css('left', '0').css('z-index', '7');
        $('.circular-menu__item').css('left', '0').css('z-index', '5').css('width', '45px').css('height',
            '45px').css('line-height', '45px');
    });
    $('.closebtn').on('click', function () {
        $("#right-column").removeClass("active");
        $("#right-column li").removeClass("active");
        $(".overlay").removeClass("show");
    });
    $('.riwayat-menu').on('click', function () {
        $(this).toggleClass("show-opt");
        $(".arrow-riwayat-opt").toggleClass("arrow-show-opt");
        $(".riwayat-opt").toggleClass("show");
    });
    $('.pengecekan-menu').on('click', function () {
        $(this).toggleClass("show-opt");
        $(".arrow-pengecekan-opt").toggleClass("arrow-show-opt");
        $(".pengecekan-opt").toggleClass("show");
    });
    $('.close-modal').on('click', function () {
        $(".modal-info").remove();
        $(".modal-backdrop").remove();
    });</script>