<?php if ($mobile): ?>
    <div
        style="height: 50px; position: fixed; top: 0; z-index: 20; background-color: var(--secondary-color); width: 100%; box-shadow: rgb(0 0 0 / 50%) 0 6px 6px -6px;">
        <div
            style="display: flex; align-items: center; justify-content: space-between; width: 90%; margin: 0 auto; height: 50px;">

            <a href="/" style="display: flex; align-items: center;">
                <img src="<?= $base_url ?>/asset/img/<?= $web['logo_web'] ?>" alt="<?= $judul_pertama ?>"
                    style="height: 50px;">
            </a>

            <?php if (isset($id)): ?>
                <div style="display: flex; align-items: center; gap: 8px;">
                    <div
                        style="border-radius: 4px; border: 1px solid rgba(170,165,165,.54); padding: 2px 8px; text-align: right;">
                        <div style="color: #B5BDCE; font-size: 10px;">Saldo</div>
                        <div>IDR <span style="color: #FFD700; font-weight: bold;"
                                class="saldoUser"><?= ($_SESSION['saldo'] == 0) ? '0.00' : number_format($_SESSION['saldo'], 0, ',', '.') ?></span>
                        </div>
                    </div>
                <?php endif; ?>
                <!-- ICON MENU -->
                <div id="open-right" style="cursor: pointer;">
                    <img src="./asset/images/menu.png" alt="menu" style="width: 22px;">
                </div>
            </div>

        </div>
    </div>


    <div class="overlay"></div>
    <div id="right-column" class="">
        <div class="closebtn" style="cursor: pointer;">×</div>
        <div style="padding: 50px 20px 30px 20px; border-bottom: 2px solid #fff;">
            <?php if (!isset($id)): ?>
                <div class="error-check-mobile"></div>
                <form action="./function/proses_login.php" method="post" class="form-login">
                    <input type="hidden" autocomplete="off">
                    <div style="position: relative;">
                        <img src="./asset/images/username.png" alt="username"
                            style="position: absolute; top: 10px; left: 15px; height: 18px; width: 18px; margin: 0;">
                        <input type="text" name="username" placeholder="Username"
                            style="background-color: transparent; color: #fff; border: 1px solid #fff; width: 100%; border-radius: 5px; padding: 8px 15px 8px 40px; margin-bottom: 5px;">
                        <div class="error-username-mobile"
                            style="color: #ff6b6b; font-size: 12px; margin-bottom: 5px; margin-left: 5px;"></div>
                    </div>
                    <div style="position: relative;">
                        <img src="./asset/images/password.png" alt="password"
                            style="position: absolute; top: 10px; left: 15px; height: 18px; width: 18px; margin: 0;">
                        <input type="password" name="password" placeholder="Password"
                            style="background-color: transparent; color: #fff; border: 1px solid #fff; width: 100%; border-radius: 5px; padding: 8px 15px 8px 40px; margin-bottom: 5px;">
                        <div class="error-password-mobile"
                            style="color: #ff6b6b; font-size: 12px; margin-bottom: 5px; margin-left: 5px;"></div>
                    </div>
                    <div style="display: flex; margin-top: 10px;">
                        <button type="submit" class="submit-mobile"
                            style="color: #fff; border: 1px solid #fff; border-radius: 20px; width: 50%; background-color: transparent; margin-right: 10px; padding: 3px 0; cursor: pointer;">
                            MASUK
                        </button>
                        <a href="/register" class="glowing2"
                            style="color: #fff; border-radius: 20px; width: 50%; 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%); text-align: center; padding: 4px 0;">
                            DAFTAR
                        </a>
                    </div>
                </form>
            <?php else: ?>

                <div style="display: flex;">
                    <i class="fa fa-user-circle" aria-hidden="true"
                        style="font-size: 58px; background-color: #83793e; color: #FFD700; border-radius: 50px; margin: auto 10px auto 0;"></i>

                    <div>
                        <div style="font-size: 12px;">Selamat datang,</div>
                        <div style="color: #FFD700; font-size: 16px; margin-bottom: 2px;"><?= htmlspecialchars($u_user) ?></div>
                        <div>IDR <span style="color: #FFD700; font-weight: bold;"
                                class="saldoUser"><?= ($_SESSION['saldo'] == 0) ? '0.00' : number_format($_SESSION['saldo'], 0, ',', '.') ?></span>
                        </div>
                    </div>
                </div>
                <div style="margin-top: 10px; text-align: center;">
                    <form action="logout.php" method="POST">
                        <a href="#" onclick="event.preventDefault(); this.closest('form').submit();"
                            style="color: #fff; border-radius: 20px; width: 50%; 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%); text-align: center; padding: 3px 16px;">
                            KELUAR
                        </a>
                    </form>
                </div>
            <?php endif; ?>
        </div>

        <?php if (!empty($id)): ?>
            <div style="padding: 20px 20px 10px 20px;">
                <a href="profile" style="display: flex; color: #fff;">
                    <img src="./asset/images/username.png" alt="username" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Akun Saya
                    </div>
                </a>
            </div>
            <div style="padding: 10px 20px;">
                <a href="deposit" style="display: flex; color: #fff;">
                    <img src="./asset/images/deposit.png" alt="deposit" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Deposit
                    </div>
                </a>
            </div>

            <div style="padding: 10px 20px;">
                <a href="withdraw" style="display: flex; color: #fff;">
                    <img src="./asset/images/withdraw.png" alt="withdraw" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Withdraw
                    </div>
                </a>
            </div>

            <div class="riwayat-menu" style="padding: 10px 20px;">
                <div style="display: flex; color: #fff;">
                    <img src="./asset/images/history.png" alt="riwayat" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Riwayat
                    </div>
                    <i class="glyphicon glyphicon-chevron-right arrow-riwayat-opt"
                        style="transition: transform .3s; margin: auto 0 auto auto;"></i>
                </div>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Transaksi
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Slots
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Live Casino
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Tembak Ikan
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Sports
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Virtual
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Sabung Ayam
                    </div>
                </a>
            </div>

            <div class="riwayat-opt" style="padding: 10px 20px; display: none;">
                <a href="history" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Riwayat Togel
                    </div>
                </a>
            </div>

        <?php endif; ?>
        <div style="padding: 10px 20px 10px 20px;">
            <a href="/buku-mimpi" style="display: flex; color: #fff;">
                <img src="./asset/images/book-blue.png" alt="buku mimpi" style="width: 24px;">
                <div style="margin: auto 8px;">
                    Buku Mimpi
                </div>
            </a>
        </div>

        <?php if (!empty($id)): ?>
            <div style="padding: 10px 20px;">
                <a href="pesan" style="display: flex; color: #fff;">
                    <img src="./asset/images/memo.png" alt="pesan" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Pesan
                    </div>
                </a>
            </div>

            <div style="padding: 10px 20px;">
                <a href="referral" style="display: flex; color: #fff;">
                    <img src="./asset/images/referral.png" alt="referral" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Referral
                    </div>
                </a>
            </div>

            <div class="pengecekan-menu" style="padding: 10px 20px;">
                <div style="display: flex; color: #fff;">
                    <img src="./asset/images/checking.png" alt="pengecekan" style="width: 24px;">
                    <div style="margin: auto 8px;">
                        Pengecekan
                    </div>
                    <i class="glyphicon glyphicon-chevron-right arrow-pengecekan-opt"
                        style="transition: transform .3s; margin: auto 0 auto auto;"></i>
                </div>
            </div>

            <div class="pengecekan-opt" style="padding: 10px 20px; display: none;">
                <a href="pengecekan" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Turn Over
                    </div>
                </a>
            </div>

            <div class="pengecekan-opt" style="padding: 10px 20px; display: none;">
                <a href="pengecekan" style="display: flex; color: #fff;">
                    <div style="margin: auto 8px auto 32px;">
                        Promo Deposit
                    </div>
                </a>
            </div>
        <?php endif; ?>

        <div style="padding: 10px 20px;">
            <a href="#" style="display: flex; color: #fff;">
                <img src="./asset/images/desktop.png" alt="desktop" style="width: 24px;">
                <div style="margin: auto 8px;">
                    Versi Desktop
                </div>
            </a>
        </div>
    </div>

    <div
        style="background-color: var(--secondary-color); position: fixed; z-index: 5; bottom: 0; width: 100%; padding: 8px 0; box-shadow: rgb(0 0 0 / 50%) 0 -6px 6px -6px;">
        <table width="100%" style="font-size: 12px;">
            <tbody>
                <tr>
                    <td style="text-align: center; width: 20%;">
                        <a href="/">
                            <img src="./asset/images/menu-1.png" alt="home" style="width: 27px;">
                            <div style="color: #FFD700; margin-top: 2px;">Beranda</div>
                        </a>
                    </td>
                    <td style="text-align: center; width: 20%;">
                        <a href="https://goldenstarproject.it.com/template3/">
                            <img src="./asset/images/menu-2.png" alt="rtp" style="width: 27px;">
                            <div style="color: #FFD700; margin-top: 2px;">RTP</div>
                        </a>
                    </td>
                    <td style="text-align: center; width: 20%; position: relative;">
                        <a href="<?= (!empty($id)) ? 'profile' : 'login' ?>"
                            style="position: absolute; transform: translate(50%, 0); right: 50%; bottom: 0;">
                            <img src="./asset/images/menu-3.png" alt="masuk"
                                style="background-color:var(--secondary-color); width: 48px; border-radius: 50%;">
                            <div style="color: #FFD700; margin-top: 2px;"><?= (!empty($id)) ? 'Profil' : 'Masuk' ?></div>
                        </a>
                    </td>

                    <td style="text-align: center; width: 20%;">
                        <a href="promo">
                            <img src="./asset/images/menu-4.png" alt="promo" style="width: 27px;">
                            <div style="color: #FFD700; margin-top: 2px;">Promo</div>
                        </a>
                    </td>
                    <td style="text-align: center; width: 20%;">
                        <a href="sosmed">
                            <img src="./asset/images/menu-5.png" alt="chat" style="width: 27px;">
                            <div style="color: #FFD700; margin-top: 2px;">Hubungi Kami</div>
                        </a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
<?php else: ?>

<div style="position: fixed; top: 0; z-index: 20; box-shadow: rgb(0 0 0 / 50%) 0 6px 6px -6px; width: 100%;">
    <div style="background-color: var(--tertiary-color); padding: 12px 0;">
        <div style="width: 95%; margin: 0 auto; max-width: 1280px; display: flex;">
            <div onclick="window.location='ganti-mode'" class="menu-opt"
                style="cursor: pointer; display: flex; margin: auto 40px auto 0;">
                <img src="./asset/images/desktop.png" alt="Versi Mobile"
                    style="width: 20px; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;">
                <div style="margin-left: 6px; color: #fff;">
                    Versi Mobile
                </div>
            </div>
            <div onclick="window.location='promo'" class="menu-opt "
                style="cursor: pointer; margin: auto 40px auto 0; display: flex;">
                <img src="./asset/images/menu-4.png" alt="Promo"
                    style="width: 20px; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;">
                <div style="margin-left: 6px;">
                    Promo
                </div>
            </div>
            <div onclick="window.location='https://goldenstarproject.it.com/template3/'" class="menu-opt "
                style="cursor: pointer; margin: auto 40px auto 0; display: flex;">
                <img src="./asset/images/menu-2.png" alt="RTP"
                    style="width: 20px; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;">
                <div style="margin-left: 6px;">
                    RTP
                </div>
            </div>
            <div onclick="window.location='buku-mimpi'" class="menu-opt "
                style="cursor: pointer; margin: auto 40px auto 0; display: flex;">
                <img src="./asset/images/book-blue.png" alt="buku mimpi"
                    style="width: 20px; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;">
                <div style="margin-left: 6px;">
                    Buku Mimpi
                </div>
            </div>
            <div onclick="window.location='sosmed'" class="menu-opt "
                style="cursor: pointer; display: flex; margin: auto 0;">
                <img src="./asset/images/menu-5.png" alt="hubungi kami"
                    style="width: 20px; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;">
                <div style="margin-left: 6px;">
                    Hubungi Kami
                </div>
            </div>
            <?php if (isset($id)): ?>
            <div style="margin: auto 0 auto auto;">
                <div style="display: flex;">
                    <div>
                        <div style="opacity: 0.7; font-size: 12px;">
                            Selamat datang,
                        </div>
                        <div onclick="window.location='profil'" class="menu-top" style="cursor: pointer; color: #EBEBEB; font-size: 16px;">
                            <?= htmlspecialchars($u_user) ?>
                        </div>
                    </div>
                    <div style="margin: auto 20px auto 15px;">
                        <div style="opacity: 0.7; font-size: 12px; text-align: right;">
                            Saldo
                        </div>
                        <div onclick="window.location='deposit'" style="cursor: pointer; color: var(--primary-color); font-size: 16px;">
                            Rp
                            <span
                                class="saldoUser"><?= ($_SESSION['saldo'] == 0) ? '0.00' : number_format($_SESSION['saldo'], 0, ',', '.') ?>
                            </span>
                        </div>
                    </div>
                    <a href="deposit" class="menu-top" style="color: #fff; margin: auto 15px auto 0;">
                        <img src="https://rajabotak.dataklmsad902.site/asset/images/banking.png?s=c03bb74a5202847ebfe6464a0edc29dd" alt="banking" style="width: 24px; margin: auto 4px auto 0; animation-name: topbar-icon-bounce; animation-duration: 2.5s; animation-fill-mode: both; animation-timing-function: linear; animation-iteration-count: infinite;"> Banking
                    </a>
                    <a href="keluar" class="register-btn" style="color: #1A1A1A; border-radius: 20px; transition: all .3s ease; background-color: var(--primary-color); text-align: center; padding: 3px 20px; margin: auto;">
                        KELUAR
                    </a>
                </div>
            </div>
            <?php else: ?>
            <div style="margin: auto 0 auto auto;">
                <div style="display: flex;">
                    <a href="<?= (!empty($id)) ? 'profile' : 'login' ?>" class="login-btn"
                        style="color: #fff; border: 1px solid #fff; border-radius: 20px; transition: all .3s ease; background-color: transparent; padding: 3px 20px; margin: auto 10px auto 0;">MASUK</a>
                    <a href="register" class="register-btn"
                        style="color: #1A1A1A; border-radius: 20px; transition: all .3s ease; background-color: var(--primary-color); text-align: center; padding: 3px 20px; margin: auto;">
                        DAFTAR
                    </a>
                </div>
            </div>
            <?php endif; ?>

        </div>
    </div>
    <div style="background-color: var(--secondary-color); min-height: 120px;">
        <div style="width: 95%; margin: 0 auto; max-width: 1280px; display: flex; padding: 20px 0;">
            <div style="width: 220px;">
                <a href="/">
                    <img src="<?= $base_url ?>/asset/img/<?= $web['logo_web'] ?>"
                        alt="<?= $Judul_pertama ?>" style="height: 80px;">
                </a>
            </div>

            <div style="margin: auto 0 auto auto; display: flex; flex-direction: column; align-items: flex-end;">
                <div style="display: flex; font-size: 16px;">
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="togel" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-7-mobile.png"
                                alt="togel" style="width: 30px; height: 30px; margin-right: 6px;"> 
                                <span style="margin: auto 0;">TOGEL</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="slot" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-2-mobile.png"
                                alt="slot" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">SLOT</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="live-casino" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-3-mobile.png"
                                alt="live casino" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">LIVE CASINO</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="sport" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-5-mobile.png"
                                alt="sport" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">SPORT</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="sambung-ayam" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-8-mobile.png"
                                alt="sabung ayam" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">SABUNG AYAM</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="tembak-ikan" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-4-mobile.png"
                                alt="tembak ikan" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">TEMBAK IKAN</span>
                        </a>
                    </div>
                    <div class="menu-opt" style="margin-left: 28px;">
                        <a href="virtual" class=""
                            style="color: #fff; transition: all .3s ease; display: flex;">
                            <img src="./asset/images/game-6-mobile.png"
                                alt="virtual" style="width: 30px; height: 30px; margin-right: 6px;"> <span
                                style="margin: auto 0;">VIRTUAL</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php endif; ?>