<?php
include 'template/header.php';
include 'template/slider.php';
?>

<?php if ($mobile): ?>
    <div style="background-color:var(--secondary-color); display: flex; padding: 8px 0; font-weight: 500;">
        <?php if (empty($id)): ?>
            <div class="glowing" onclick="window.location='login.php'"
                style="background-color: var(--primary-color); display: flex; margin: auto 3% auto auto; border-radius: 3px; width: 120px; padding: 6px 0; letter-spacing: 1px;">
                <div style="margin: auto;">MASUK</div>
            </div>
            <div class="glowing" onclick="window.location='register.php'"
                style="background-color: var(--tertiary-color); display: flex; margin: auto auto auto 3%; border-radius: 3px; width: 120px; padding: 6px 8px; letter-spacing: 1px;"
                data-cf-modified-10cc17aaf96fe32d2d6629fe-="">
                <div style="margin: auto;">DAFTAR</div>
            </div>
        <?php else: ?>
            <div onclick="window.location='withdraw.php'"
                style="background-color:var(--secondary-color); border: 1px solid var(--primary-color); display: flex; margin: auto 3% auto auto; border-radius: 4px; padding: 8px 0;">
                <img src="asset/images/withdraw.png" alt="withdraw" style="width: 32px; margin-left: 12px;">
                <div style="margin: auto 12px auto 8px;">WITHDRAW</div>
            </div>
            <div onclick="window.location='deposit.php'"
                style="background-color:var(--secondary-color); border: 1px solid var(--primary-color); display: flex; margin: auto auto auto 3%; border-radius: 4px; padding: 8px;">
                <img src="asset/images/deposit.png" alt="withdraw" style="width: 32px; margin-left: 12px;">
                <div style="margin: auto 12px auto 8px;">DEPOSIT</div>
            </div>
        <?php endif; ?>
    </div>


    <?php include "template/menu-outer.php" ?>

    <div
        style="font-family: Teko-SemiBold; text-align: center; font-size: 24px; padding-top: 20px; color: transparent !important; -webkit-background-clip: text; 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%);">
        JACKPOT PROGRESIF
    </div>
    <div
        style="background:url(asset/jackpot-mobile.jpg); background-position: center top; background-repeat: no-repeat; background-size: 100% 100%; height: 70px; margin-bottom: 20px;">
        <div style="display: flex; padding-top: 10px;">
            <div
                style="color: transparent !important; -webkit-background-clip: text; 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%); font-family: Open24DisplaySt; font-size: 32px; margin: auto 8px auto auto;">
                IDR
            </div>
            <div id="progressive_jackpot" data-value=""></div>
        </div>
    </div>


    <script>
        // Handle slot game click
        function handleSlotClick(productCode) {
            // User is not logged in, redirect to login
            window.location.href = '/slot';
        }

        // Handle fishing game click
        function handleFishingClick(productCode) {
            // User is not logged in, redirect to login
            window.location.href = '/tembak-ikan';
        }

        // Handle casino/live game click
        function handleCasinoClick(gameCode, productCode) {
            // User is not logged in, redirect to login
            window.location.href = '/live-casino';
        }

        function handleAyamClick(gameCode, productCode, gameType) {
            // User is not logged in, redirect to login
            window.location.href = '/sambung-ayam';
        }
        // Handle other game types (sport, sabung ayam, virtual)
        function handleGameClick(gameCode, productCode, gameType) {
            // User is not logged in, redirect to login
            if (gameType == "OTHER") window.location.href = '/virtual';
            if (gameType == "SPORT_BOOK" || gameType == "BOOK") window.location.href = '/sport';
            else window.location.href = '/sambung-ayam';
        }
    </script>
    <nav class="circular-menu">
        <input class="circular-menu__button" id="circular-menu" type="checkbox" href="javascript: void 0">
        <label class="circular-menu__icon" for="circular-menu"
            style="background: linear-gradient(rgb(95, 112, 251), rgb(78, 99, 250)); left: 0px; z-index: 7;"><i
                class="fa fa-bars" style="font-size: 25px; vertical-align: middle;"></i></label>
        <a class="circular-menu__item" href="https://goldenstarproject.it.com/template3/"
            style="left: 0px; z-index: 5; width: 45px; height: 45px; line-height: 45px;">
            <img src="asset/RTP.gif" width="45" height="45" border="0" alt="RTP"
                style="border-radius: 100%; margin-top: -3px;">
        </a>
    </nav>
    <div class="setting_welcome" id="popup-home-welcome" style="display: none;">
        <div class="popup-home-backdrop"
            style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1040;">
        </div>
        <div class="popup-home-modal" data-backdrop="static" role="dialog"
            style="display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1050; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px;">
            <div class="popup-home-dialog" role="document"
                style="margin: auto; max-width: 600px; width: 90%; position: relative;">
                <div class="popup-home-content"
                    style="position: relative; background-color: #fff; border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.5);">
                    <div class="popup-home-header"
                        style="display: block; padding: 15px; border-bottom: 1px solid #e5e5e5; position: relative;">
                        <button type="button" class="popup-home-close" aria-label="Close"
                            style="position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 28px; font-weight: bold; line-height: 1; color: #000; opacity: 0.5; cursor: pointer;">
                            <span aria-hidden="true">×</span>
                        </button>
                    </div>
                    <div class="popup-home-body"
                        style="padding: 15px; max-height: calc(100vh - 200px); overflow-y: auto; overflow-x: hidden;">
                        <h4 style="margin-top: 0; margin-bottom: 10px; font-size: 20px; font-weight: bold;">
                            <?= $web['judul_popup'] ?>
                        </h4>

                        <div style="margin-bottom: 10px;">
                            <p>
                                <code>
                                    <?= $web['popup_pengumuman_link_alt'] ?>
                                </code>
                            </p>
                            <p></p>
                        </div>

                        <div style="text-align: center; margin-top: 10px;">
                            <img src="asset/popup/<?= $web['popup_pengumuman_gambar'] ?>" alt="info"
                                style="max-width: 100%; height: auto; display: block; margin: 0 auto;">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php endif; ?>

<?php include 'template/footer.php'; ?>