    <div class="navbar navbar-fixed-top">
        <div class="topbar-container">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12 topbar-inner-container">
                            <a href="/desktop/home" class="logo">
                                <picture><source srcset="/959e5eb8-da31-47c6-ae81.png" type="image/png" /><img alt="Logo" loading="lazy" src="/959e5eb8-da31-47c6-ae81.png" /></picture>
                            </a>
                        <div class="topbar-inner-group">
                            <div class="topbar-sub-section">
                                <div class="topbar-item">
                                    <a href="#" class="search_popup_button">
                                        <i data-icon="search" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/search.svg?v=20241125);"></i>
                                    </a>
                                </div>
                                <div class="topbar-item language-selector-container" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/flags.png?v=20241125);">
                                    <div id="language_selector_trigger" data-toggle="dropdown" class="language-selector-trigger" data-language="id">
                                        <i data-language="id"></i>
                                        BHS INDONESIA
                                    </div>
                                    <ul class="dropdown-menu language-selector">
                                            <li class="language_selector" data-language="en">
                                                <i data-language="en"></i>
                                                <div class="language-name">
                                                    <div>ENGLISH</div>
                                                    <div>ENGLISH</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="id">
                                                <i data-language="id"></i>
                                                <div class="language-name">
                                                    <div>BHS INDONESIA</div>
                                                    <div>INDONESIAN</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="kr">
                                                <i data-language="kr"></i>
                                                <div class="language-name">
                                                    <div>한국어</div>
                                                    <div>KOREAN</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="cn">
                                                <i data-language="cn"></i>
                                                <div class="language-name">
                                                    <div>中文</div>
                                                    <div>CHINESE</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="jp">
                                                <i data-language="jp"></i>
                                                <div class="language-name">
                                                    <div>日本語</div>
                                                    <div>JAPANESE</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="th">
                                                <i data-language="th"></i>
                                                <div class="language-name">
                                                    <div>ไทย</div>
                                                    <div>THAI</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="my">
                                                <i data-language="my"></i>
                                                <div class="language-name">
                                                    <div>မြန်မာစာ</div>
                                                    <div>BURMESE</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="kh">
                                                <i data-language="kh"></i>
                                                <div class="language-name">
                                                    <div>ខេមរភាសា</div>
                                                    <div>KHMER</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="hi">
                                                <i data-language="hi"></i>
                                                <div class="language-name">
                                                    <div>हिन्दी</div>
                                                    <div>HINDI</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="ta">
                                                <i data-language="ta"></i>
                                                <div class="language-name">
                                                    <div>தமிழ்</div>
                                                    <div>TAMIL</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="te">
                                                <i data-language="te"></i>
                                                <div class="language-name">
                                                    <div>తెలుగు</div>
                                                    <div>TELUGU</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="vi">
                                                <i data-language="vi"></i>
                                                <div class="language-name">
                                                    <div>Tiếng Việt</div>
                                                    <div>VIETNAMESE</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="bn">
                                                <i data-language="bn"></i>
                                                <div class="language-name">
                                                    <div>বাংলাদেশী</div>
                                                    <div>BENGALI</div>
                                                </div>
                                            </li>
                                            <li class="language_selector" data-language="pt">
                                                <i data-language="pt"></i>
                                                <div class="language-name">
                                                    <div>Portugu&#234;s</div>
                                                    <div>PORTUGESE</div>
                                                </div>
                                            </li>
                                    </ul>
                                </div>
                                <div class="topbar-item">
                                    <span class="js_live_chat_link live-chat">
                                        <i data-icon="live-chat" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/live-chat.svg?v=20241125);"></i>
                                        Live Chat
                                    </span>
                                </div>
                                    <div class="topbar-item">
                                        <a href="/mobile/home" rel="nofollow">
                                            <i data-icon="mobile" style="--image-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/mobile.svg?v=20241125);"></i>
                                            Versi Mobile
                                        </a>
                                    </div>
                                    <?php if(isset($_SESSION['user_id'])): ?>
                                <div class="top-user-info">
                                        <div class="user-info-item">
                                            <a href="/desktop/deposit">
                                                <picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/wallet.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/wallet.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/wallet.png?v=20241125" /></picture>
                                            </a>
                                        </div>
                                        <div class="user-info-item">
                                            <a href="/desktop/message/inbox">
                                                <picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/inbox.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/inbox.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/inbox.png?v=20241125" /></picture>
                                            </a>
                                        </div>
                                            <div class="user-info-item">
                                                <a href="/desktop/mobile-app">
                                                    <picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/download.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/download.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/download.png?v=20241125" /></picture>
                                                </a>
                                            </div>
                                        <div class="user-info-item">
                                            <a href="/desktop/account-summary">
                                                <picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/profile.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/profile.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/profile.png?v=20241125" /></picture>
                                            </a>
                                        </div>
                                            <div class="user-info-item" id="redemption_store_link">
                                                <a href="/loyalty/redemption-store" target="_blank">
                                                    <picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/redemption-store.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/redemption-store.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/redemption-store.png?v=20241125" /></picture>
                                                </a>
                                            </div>
                                        <div class="user-info-item">
                                            <a href="#" data-new-announcement="true" data-announcement-count="<?= $pesan; ?>" id="unread_announcements_button">
                                                <img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/bell.svg?v=20241125" />
                                            </a>
                                            <div class="unread-announcements-popup" id="unread_announcements_popup">
                                            <div class="loader" id="loader"></div>
                                            <iframe data-src="/desktop/message/announcement" src="about:blank"></iframe>
                                        </div>
                                        <div class="unread-announcements-popup-overlay" id="unread_announcements_popup_overlay"></div>

                                        </div>
                                        <div class="user-info-item">
                                            <a href="#" onclick="window.closeWindows(); document.querySelector('#logout-form').submit()">
<form action="/Account/Logout" id="logout-form" method="post"><picture><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/logout.webp?v=20241125" type="image/webp" /><source srcset="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/logout.png?v=20241125" type="image/png" /><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/logout.png?v=20241125" /></picture></form>                                            </a>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                </div>

                            <?php if(isset($_SESSION['user_id'])): ?>
                            <div class="user-info">
                                <div class="user-info-item" id="loyalty_level_container">
                                    <div class="user-info-loyalty-xp">
                                        <a href="/desktop/loyalty/benefits">
                                            <img class="loyalty_level" data-image-path="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/loyalty/badge/" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/loyalty/badge/bronze.svg?v=20241125" />
                                            <div class="username-container">
                                                <span><?= $user['username']; ?></span>
                                                <div class="loyalty-xp-progress" id="loyalty_experience">
                                                    <div class="progress loyalty_experience_progress" style="width: 0%"></div>
                                                </div>
                                                <div class="loyalty-xp-detail">
                                                    <span id="loyalty_xp">0</span> / <span id="loyalty_next_level_xp">25,000</span>
                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                </div>
                                <div class="user-info-item wallet-container" id="wallet_container">
                                    <button title="Refresh" class="refresh_balance">
                                        <img alt="Refresh Balance" loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/dark-orange/desktop/layout/refresh-v2.svg?v=20241125" />
                                    </button>
                                    <div class="balance">
                                        <a href="#" data-toggle="dropdown">
                                            IDR
                                            <span class="total_balance">
                                                <?= htmlspecialchars(number_format($total_saldo, 0, ',', '.')); ?>
                                            </span>
                                        </a>
                                        <span class="locked-balance locked_balance_container" hidden>
                                            <i data-icon="locked-balance"><img loading="lazy" src="//d33egg70nrp50s.cloudfront.net/Images/icons/wallet/lock-balance.svg?v=20241125" /></i>
                                            IDR
                                            <span class="total_locked_balance">
                                                0.00
                                            </span>
                                        </span>
                                        <div class="dropdown-menu vendor-balances-container">
                                <div class="vendor-balances-header">
                                    <div>SALDO KREDIT</div>
                                    <div><?= htmlspecialchars(number_format($total_saldo, 0, ',', '.')); ?></div>
                                </div>
                                <div class="vendor-balances-content">
                                        <div>
                                            <strong>Slots</strong>
                                            <div class="vendor-balance-item">
                                                <?php
                                                    $getProvider = "SELECT * FROM provider";
                                                    $stmt = $db->prepare($getProvider);
                                                    $stmt->execute();
                                                    $providers = $stmt->fetchAll(PDO::FETCH_ASSOC);
                                                        foreach ($providers as $provider):
                                                ?>
                                                  <div>
                                                    <div>
                                                      <span data-vendor-name="Active"><?= $provider['provider_name']; ?></span>
                                                    </div>
                                                    <div data-vendor-game-code="7">
                                                      0.00
                                                    </div>
                                                  </div>
                                                <?php endforeach; ?>
                                                    <div>
                                                        <div>
                                                            <span data-vendor-name="PG Soft">PG Soft</span>
                                                        </div>
                                                        <div data-vendor-game-code="9">
                            0.00                            </div>
                                                    </div>
                                                      </div>
                                        </div>
                                </div>
                            </div>
                                    </div>
                                </div>
                                <script>
                                $(document).ready(function() {
                                  $(".refresh_balance").click(function() {
                                    $(".total_balance").text("Memperbarui...");
                                
                                    setTimeout(function() {
                                      $.ajax({
                                        url: "/Wallet/Balance.php",
                                        type: "GET",
                                        dataType: "json",
                                        success: function(response) {
                                          if (response.saldo !== undefined) {
                                            $(".total_balance").text(response.saldo.toLocaleString("id-ID"));
                                
                                            alert("Saldo berhasil diperbarui!");
                                
                                            location.reload();
                                          } else {
                                            console.error("Error:", response.error);
                                          }
                                        },
                                        error: function(xhr, status, error) {
                                          console.error("Gagal memperbarui saldo:", error);
                                        }
                                      });
                                    }, 3000);
                                  });
                                });
                                </script>
                                
                                <div class="user-info-item" id="loyalty_point_info">
                                    <a href="/desktop/loyalty/rewards" class="user-info-loyalty-point">
                                        <div class="lp-label">LP</div>
                                        <span class="loyalty_point">0</span>
                                    </a>
                                </div>
                                <div class="user-info-item">
                                    <button type="button">
                                        <i class="daily-reward daily_reward_button" data-icon="daily-reward" data-platform="Desktop"
                                           data-daily-reward-available="true"
                                           style="--chest-claimed-background: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/loyalty/chest-claimed.webp?v=20241125);
                                                --chest-available-background: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/loyalty/chest-available.webp?v=20241125);"></i>
                                    </button>
                                </div>
                            </div>
                            <?php else: ?>
                            <form action="/Account/Login" method="post">
                                <input type="hidden" name="csrf_token" value="<?= $csrf_token; ?>">
                                <div class="login-panel">
                                    <div class="login-panel-item">
                                        <label>
                                            <input type="text" name="username" class="form-control" placeholder="Nama Pengguna" />
                                        </label>
                                    </div>
                                    <div class="login-panel-item">
                                        <label>
                                            <span class="standard-password-field">
                                                <input type="password" name="password" class="form-control" placeholder="Kata Sandi" id="password_input" />
                                                <i class="glyphicon glyphicon-eye-close" id="password_input_trigger"></i>
                                            </span>
                                        </label>
                                    </div>
                                    <div class="login-panel-item">
                                        <input type="submit" class="login-button" value="Masuk" />
                                    </div>
                                    <div class="login-panel-item">
                                        <a href="/#" class="register-button" data-toggle="modal" data-target="#register_modal">
                                            Daftar
                                        </a>
                                    </div>
                                    <a href="#" class="forgot-password-link" id="forgot_password_link" data-toggle="modal" data-target="#forgot_password_modal">
                                        Lupa Kata Sandi
                                    </a>
                                </div>
                            </form>
                            
                            <script>
                              window.addEventListener('DOMContentLoaded', () => {
                                const passwordInputTrigger = document.querySelector('#password_input_trigger');
                                const passwordInput = document.querySelector('#password_input');
                            
                                passwordInputTrigger.onclick = () => {
                                  if (passwordInput.type === 'password') {
                                    passwordInput.type = 'text';
                                    return;
                                  }
                            
                                  passwordInput.type = 'password';
                                };
                             });
                            </script>
                            
                            // <script>
                            //     window.addEventListener('DOMContentLoaded', () => {
                            //         const passwordInputTrigger = document.querySelector('#password_input_trigger');
                            //         const passwordInput = document.querySelector('#password_input');
                            
                            //         passwordInputTrigger.onclick = () => {
                            //             if (passwordInput.type === 'password') {
                            //                 passwordInput.type = 'text';
                            
                            //                 return;
                            //             }
                            
                            //             passwordInput.type = 'password';
                            //         };
                            //     });
                            // </script>
                            
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
