<?php

$isLoggedIn = isset($isLoggedIn)
    ? (bool) $isLoggedIn
    : false;

$activeMenu = isset($activeMenu)
    ? (string) $activeMenu
    : '';

$currentYear = date('Y');

$footerQuickLinks = [
    [
        'title' => 'Promosi',
        'url' => 'promo.php',
    ],
    [
        'title' => 'Event',
        'url' => 'event.php',
    ],
    [
        'title' => 'Provider',
        'url' => 'provider.php',
    ],
    [
        'title' => 'Bantuan',
        'url' => 'help.php',
    ],
];

$footerGameLinks = [
    [
        'title' => 'Slot Populer',
        'url' => 'popular.php',
    ],
    [
        'title' => 'Permainan Slot',
        'url' => 'slot.php',
    ],
    [
        'title' => 'Live Casino',
        'url' => 'live-casino.php',
    ],
    [
        'title' => 'Sportsbook',
        'url' => 'sport.php',
    ],
    [
        'title' => 'Arcade',
        'url' => 'arcade.php',
    ],
    [
        'title' => 'Sabung Ayam',
        'url' => 'sambung-ayam.php',
    ],
];
?>

    </main>

    <!-- FOOTER CASINO -->
    <footer class="casino-footer">

        <div
            class="casino-footer-light casino-footer-light--left"
            aria-hidden="true"
        ></div>

        <div
            class="casino-footer-light casino-footer-light--right"
            aria-hidden="true"
        ></div>

        <!-- Ornamen atas -->
        <div class="casino-footer-ornament">
            <span></span>

            <div class="casino-footer-ornament-center">
                <i>♠</i>
                <b>◆</b>
                <i>♥</i>
            </div>

            <span></span>
        </div>

        <div class="casino-footer-inner">

            <!-- Brand -->
            <section class="casino-footer-brand">

                <div class="casino-footer-logo">
                    <span class="casino-footer-logo-crown">
                        ♛
                    </span>

                    <strong>
                        <?= e($siteName); ?>
                    </strong>

                    <small>
                        PREMIUM GAMING EXPERIENCE
                    </small>
                </div>

                <p>
                    Nikmati akses permainan yang cepat, nyaman,
                    dan responsif melalui perangkat mobile maupun desktop.
                </p>

                <div class="casino-footer-status">

                    <div>
                        <span class="casino-status-icon">
                            ✓
                        </span>

                        <small>
                            Sistem
                        </small>

                        <strong>
                            ONLINE
                        </strong>
                    </div>

                    <div>
                        <span class="casino-status-icon">
                            ⚡
                        </span>

                        <small>
                            Transaksi
                        </small>

                        <strong>
                            CEPAT
                        </strong>
                    </div>

                    <div>
                        <span class="casino-status-icon">
                            ◆
                        </span>

                        <small>
                            Layanan
                        </small>

                        <strong>
                            24 JAM
                        </strong>
                    </div>

                </div>

            </section>

            <!-- Navigasi -->
            <div class="casino-footer-navigation">

                <section class="casino-footer-column">

                    <h3>
                        <span>★</span>
                        Menu Utama
                    </h3>

                    <div class="casino-footer-links">

                        <?php foreach ($footerQuickLinks as $link): ?>

                            <a href="<?= e($link['url']); ?>">
                                <span>›</span>
                                <?= e($link['title']); ?>
                            </a>

                        <?php endforeach; ?>

                    </div>

                </section>

                <section class="casino-footer-column">

                    <h3>
                        <span>♠</span>
                        Kategori Game
                    </h3>

                    <div class="casino-footer-links">

                        <?php foreach ($footerGameLinks as $link): ?>

                            <a href="<?= e($link['url']); ?>">
                                <span>›</span>
                                <?= e($link['title']); ?>
                            </a>

                        <?php endforeach; ?>

                    </div>

                </section>

            </div>

            <!-- Keamanan -->
            <section class="casino-footer-security">

                <div class="casino-footer-security-icon">
                    18+
                </div>

                <div>
                    <strong>
                        Bermain dengan bertanggung jawab
                    </strong>

                    <p>
                        Layanan hanya ditujukan untuk pengguna yang telah
                        memenuhi batas usia sesuai peraturan yang berlaku.
                    </p>
                </div>

            </section>

            <!-- Legal links -->
            <nav
                class="casino-footer-legal"
                aria-label="Informasi legal"
            >
                <a href="terms.php">
                    Syarat & Ketentuan
                </a>

                <i></i>

                <a href="privacy.php">
                    Kebijakan Privasi
                </a>

                <i></i>

                <a href="responsible.php">
                    Bermain Bertanggung Jawab
                </a>

                <i></i>

                <a href="help.php">
                    Pusat Bantuan
                </a>
            </nav>

            <!-- Copyright -->
            <div class="casino-footer-bottom">

                <p>
                    © <?= e($currentYear); ?>
                    <strong><?= e($siteName); ?></strong>.
                    Seluruh hak dilindungi.
                </p>

                <span>
                    SECURE CONNECTION
                    <i></i>
                </span>

            </div>

        </div>

    </footer>

  <!-- NAVIGASI BAWAH MOBILE -->
<?php
$liveChatUrl = 'livechat.php';
?>

<nav
    class="casino-bottom-nav <?= $isLoggedIn
        ? 'has-five-items'
        : 'has-four-items'; ?>"
    aria-label="Navigasi bawah"
>

    <!-- HOME -->
    <a
        class="<?= $activeMenu === 'home'
            ? 'is-active'
            : ''; ?>"
        href="index.php"
        <?= $activeMenu === 'home'
            ? 'aria-current="page"'
            : ''; ?>
    >
        <span class="casino-bottom-icon">
            ⌂
        </span>

        <small>
            Home
        </small>
    </a>

    <!-- RTP -->
    <a
        class="<?= $activeMenu === 'rtp'
            ? 'is-active'
            : ''; ?>"
        href="rtp.php"
        <?= $activeMenu === 'rtp'
            ? 'aria-current="page"'
            : ''; ?>
    >
        <span class="casino-bottom-icon">
            ％
        </span>

        <small>
            RTP
        </small>
    </a>

    <!-- DEPOSIT: HANYA SETELAH LOGIN -->
    <?php if ($isLoggedIn): ?>

        <a
            class="casino-bottom-main <?= $activeMenu === 'deposit'
                ? 'is-active'
                : ''; ?>"
            href="deposit.php"
            <?= $activeMenu === 'deposit'
                ? 'aria-current="page"'
                : ''; ?>
        >
            <span class="casino-bottom-main-ring">

                <span class="casino-bottom-main-icon">
                    ＋
                </span>

            </span>

            <small>
                Deposit
            </small>
        </a>

    <?php endif; ?>

    <!-- PROMO -->
    <a
        class="<?= $activeMenu === 'promo'
            ? 'is-active'
            : ''; ?>"
        href="promo.php"
        <?= $activeMenu === 'promo'
            ? 'aria-current="page"'
            : ''; ?>
    >
        <span class="casino-bottom-icon">
            ✦
        </span>

        <small>
            Promo
        </small>
    </a>

    <!-- LIVECHAT -->
    <a
        class="<?= $activeMenu === 'livechat'
            ? 'is-active'
            : ''; ?>"
        href="<?= e($liveChatUrl); ?>"
        <?= $activeMenu === 'livechat'
            ? 'aria-current="page"'
            : ''; ?>
            target="_blank"
    >
        <span class="casino-bottom-icon">
            ◉
        </span>

        <small>
            Livechat
        </small>
    </a>

</nav>

</div>
<style>
    /*
|--------------------------------------------------------------------------
| Jumlah kolom navigasi berdasarkan login
|--------------------------------------------------------------------------
*/

.casino-bottom-nav.has-four-items {
    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;
}

.casino-bottom-nav.has-five-items {
    grid-template-columns:
        repeat(5, minmax(0, 1fr)) !important;
}

/*
|--------------------------------------------------------------------------
| Tampilan item navigasi
|--------------------------------------------------------------------------
*/

.casino-bottom-nav > a {
    -webkit-tap-highlight-color: transparent;
}

.casino-bottom-nav > a:hover {
    color: #ffffff;
}

.casino-bottom-nav > a:active {
    transform: translateY(1px);
}

/*
 * Jangan ganggu posisi tombol deposit.
 */
.casino-bottom-nav > a.casino-bottom-main:active {
    transform: translateY(-12px);
}

/*
|--------------------------------------------------------------------------
| Ikon RTP
|--------------------------------------------------------------------------
*/

.casino-bottom-nav > a[href="rtp.php"]
.casino-bottom-icon {
    color: #53d8ff;

    font-size: 17px;
    font-weight: 1000;

    text-shadow:
        0 0 7px rgba(0, 183, 255, 0.65);
}

/*
|--------------------------------------------------------------------------
| Ikon Promo
|--------------------------------------------------------------------------
*/

.casino-bottom-nav > a[href="promo.php"]
.casino-bottom-icon {
    color: #ffd04c;

    text-shadow:
        0 0 7px rgba(255, 196, 39, 0.62);
}

/*
|--------------------------------------------------------------------------
| Ikon Livechat
|--------------------------------------------------------------------------
*/

.casino-bottom-nav > a[href="livechat.php"]
.casino-bottom-icon {
    position: relative;

    color: #54e89a;

    text-shadow:
        0 0 7px rgba(62, 225, 145, 0.62);
}

.casino-bottom-nav > a[href="livechat.php"]
.casino-bottom-icon::after {
    position: absolute;

    top: 1px;
    right: 1px;

    width: 6px;
    height: 6px;

    content: "";

    border:
        1px solid #03142d;

    border-radius: 50%;

    background: #43e792;

    box-shadow:
        0 0 6px rgba(67, 231, 146, 0.80);
}
</style>
<style>
/*
|--------------------------------------------------------------------------
| Footer casino
|--------------------------------------------------------------------------
*/

.casino-footer {
    position: relative;

    width: 100%;

    padding:
        15px
        11px
        86px;

    overflow: hidden;

    border-top:
        1px solid rgba(255, 196, 48, 0.58);

    color: #ffffff;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(30, 127, 255, 0.22),
            transparent 230px
        ),
        radial-gradient(
            circle at 0 55%,
            rgba(255, 174, 0, 0.08),
            transparent 170px
        ),
        linear-gradient(
            180deg,
            #031127 0%,
            #020a19 45%,
            #01050e 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 -5px 20px rgba(0, 0, 0, 0.42);
}

.casino-footer::before {
    position: absolute;
    z-index: 0;

    top: 0;
    right: 0;
    left: 0;

    height: 2px;

    content: "";

    background:
        linear-gradient(
            90deg,
            transparent,
            #ffb814,
            #fff1a1,
            #ffb814,
            transparent
        );

    box-shadow:
        0 0 8px rgba(255, 184, 20, 0.68);
}

.casino-footer-inner {
    position: relative;
    z-index: 3;

    width: 100%;
    max-width: 540px;

    margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| Cahaya belakang
|--------------------------------------------------------------------------
*/

.casino-footer-light {
    position: absolute;
    z-index: 0;

    width: 170px;
    height: 170px;

    border-radius: 50%;

    filter: blur(25px);

    pointer-events: none;
}

.casino-footer-light--left {
    bottom: 80px;
    left: -120px;

    background:
        rgba(0, 128, 255, 0.16);
}

.casino-footer-light--right {
    right: -125px;
    bottom: 160px;

    background:
        rgba(255, 174, 0, 0.13);
}

/*
|--------------------------------------------------------------------------
| Ornamen atas
|--------------------------------------------------------------------------
*/

.casino-footer-ornament {
    position: relative;
    z-index: 4;

    display: flex;

    width: 100%;
    max-width: 540px;

    align-items: center;
    justify-content: center;

    margin:
        -5px
        auto
        11px;

    gap: 8px;
}

.casino-footer-ornament > span {
    display: block;

    height: 1px;

    flex: 1;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 193, 35, 0.82)
        );

    box-shadow:
        0 0 5px rgba(255, 184, 24, 0.40);
}

.casino-footer-ornament > span:last-child {
    transform: scaleX(-1);
}

.casino-footer-ornament-center {
    display: flex;

    align-items: center;

    gap: 5px;

    color: #ffd34b;

    text-shadow:
        0 0 7px rgba(255, 194, 34, 0.64);
}

.casino-footer-ornament-center i {
    color: #fff3a5;

    font-size: 10px;
    font-style: normal;
}

.casino-footer-ornament-center b {
    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Brand
|--------------------------------------------------------------------------
*/

.casino-footer-brand {
    padding:
        13px
        12px;

    border:
        1px solid rgba(255, 193, 37, 0.25);

    border-radius: 14px;

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(255, 180, 0, 0.14),
            transparent 120px
        ),
        linear-gradient(
            180deg,
            rgba(9, 30, 63, 0.95),
            rgba(3, 14, 34, 0.98)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 5px 14px rgba(0, 0, 0, 0.25);
}

.casino-footer-logo {
    display: grid;

    justify-items: center;
}

.casino-footer-logo-crown {
    margin-bottom: -3px;

    color: #ffd64f;

    font-size: 24px;
    line-height: 1;

    text-shadow:
        0 1px 0 #fff5a7,
        0 3px 0 #7d3e00,
        0 0 9px rgba(255, 196, 38, 0.60);
}

.casino-footer-logo strong {
    background:
        linear-gradient(
            180deg,
            #fff8ae 0%,
            #ffd047 35%,
            #ed9600 70%,
            #fff080 100%
        );

    background-clip: text;
    -webkit-background-clip: text;

    color: #ffd047;

    font-size: 22px;
    font-weight: 1000;

    letter-spacing: 0.03em;

    -webkit-text-fill-color: transparent;

    filter:
        drop-shadow(0 2px 0 #713800)
        drop-shadow(0 4px 4px rgba(0, 0, 0, 0.75));
}

.casino-footer-logo small {
    margin-top: 3px;

    color: #80cfff;

    font-size: 6px;
    font-weight: 900;

    letter-spacing: 0.26em;
}

.casino-footer-brand > p {
    max-width: 410px;

    margin:
        9px
        auto
        0;

    color: #9fb2cc;

    font-size: 8px;
    line-height: 1.55;
}

/*
|--------------------------------------------------------------------------
| Status
|--------------------------------------------------------------------------
*/

.casino-footer-status {
    display: grid;

    margin-top: 12px;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 5px;
}

.casino-footer-status > div {
    display: grid;

    min-width: 0;
    min-height: 54px;

    align-content: center;
    justify-items: center;

    padding: 5px;

    border:
        1px solid rgba(0, 169, 255, 0.25);

    border-radius: 9px;

    background:
        linear-gradient(
            180deg,
            rgba(10, 44, 87, 0.90),
            rgba(3, 19, 45, 0.96)
        );
}

.casino-status-icon {
    color: #ffd64d;

    font-size: 14px;
    font-weight: 1000;

    text-shadow:
        0 0 6px rgba(255, 205, 62, 0.54);
}

.casino-footer-status small {
    margin-top: 2px;

    color: #7892b2;

    font-size: 6px;
}

.casino-footer-status strong {
    margin-top: 1px;

    color: #ffffff;

    font-size: 7px;
    font-weight: 1000;
}

/*
|--------------------------------------------------------------------------
| Navigasi footer
|--------------------------------------------------------------------------
*/

.casino-footer-navigation {
    display: grid;

    margin-top: 9px;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}

.casino-footer-column {
    min-width: 0;

    padding: 10px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            rgba(5, 22, 49, 0.94),
            rgba(2, 10, 25, 0.97)
        );
}

.casino-footer-column h3 {
    display: flex;

    align-items: center;

    margin:
        0
        0
        7px;

    gap: 5px;

    color: #ffd151;

    font-size: 9px;
    font-weight: 1000;
}

.casino-footer-column h3 span {
    font-size: 11px;

    text-shadow:
        0 0 6px rgba(255, 196, 38, 0.55);
}

.casino-footer-links {
    display: grid;

    gap: 2px;
}

.casino-footer-links a {
    display: flex;

    min-height: 24px;

    align-items: center;

    padding: 3px 4px;

    gap: 5px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.04);

    color: #aabbd1;

    font-size: 7px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 150ms ease,
        padding-left 150ms ease;
}

.casino-footer-links a:last-child {
    border-bottom: 0;
}

.casino-footer-links a span {
    color: #ffc83c;

    font-size: 13px;
}

.casino-footer-links a:hover {
    padding-left: 8px;

    color: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Keamanan dan usia
|--------------------------------------------------------------------------
*/

.casino-footer-security {
    display: grid;

    margin-top: 8px;
    padding: 9px 10px;

    grid-template-columns:
        38px
        minmax(0, 1fr);

    align-items: center;

    gap: 9px;

    border:
        1px solid rgba(255, 182, 31, 0.20);

    border-radius: 11px;

    background:
        linear-gradient(
            90deg,
            rgba(85, 40, 2, 0.34),
            rgba(4, 20, 43, 0.93)
        );
}

.casino-footer-security-icon {
    display: grid;

    width: 38px;
    height: 38px;

    place-items: center;

    border:
        2px solid #ffbd2d;

    border-radius: 50%;

    color: #ffd75e;

    background:
        #281500;

    font-size: 11px;
    font-weight: 1000;

    box-shadow:
        0 0 8px rgba(255, 183, 31, 0.29);
}

.casino-footer-security strong {
    display: block;

    color: #ffffff;

    font-size: 8px;
}

.casino-footer-security p {
    margin: 3px 0 0;

    color: #8ea2bc;

    font-size: 6px;
    line-height: 1.45;
}

/*
|--------------------------------------------------------------------------
| Legal
|--------------------------------------------------------------------------
*/

.casino-footer-legal {
    display: flex;

    flex-wrap: wrap;
    justify-content: center;

    margin-top: 11px;

    gap: 5px;
}

.casino-footer-legal a {
    color: #8398b5;

    font-size: 6px;
    font-weight: 700;

    text-decoration: none;
}

.casino-footer-legal a:hover {
    color: #ffd450;
}

.casino-footer-legal i {
    display: block;

    width: 2px;
    height: 2px;

    align-self: center;

    border-radius: 50%;

    background:
        #d69c28;
}

/*
|--------------------------------------------------------------------------
| Copyright
|--------------------------------------------------------------------------
*/

.casino-footer-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 10px;
    padding-top: 9px;

    gap: 8px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}

.casino-footer-bottom p {
    margin: 0;

    color: #657b98;

    font-size: 6px;
}

.casino-footer-bottom p strong {
    color: #d8b24a;
}

.casino-footer-bottom > span {
    display: flex;

    align-items: center;

    gap: 4px;

    color: #5fa67f;

    font-size: 5px;
    font-weight: 900;

    white-space: nowrap;
}

.casino-footer-bottom > span i {
    display: block;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        #42df91;

    box-shadow:
        0 0 6px rgba(66, 223, 145, 0.70);
}

/*
|--------------------------------------------------------------------------
| Navigasi bawah
|--------------------------------------------------------------------------
*/

.casino-bottom-nav {
    position: fixed;
    z-index: 999;

    right: 0;
    bottom: 0;
    left: 0;

    display: grid;

    width: 100%;
    max-width: 560px;
    min-height: 63px;

    margin: 0 auto;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    align-items: end;

    padding:
        5px
        4px
        max(5px, env(safe-area-inset-bottom));

    border-top:
        1px solid rgba(255, 191, 36, 0.47);

    background:
        linear-gradient(
            180deg,
            rgba(5, 25, 55, 0.98),
            rgba(1, 7, 18, 0.99)
        );

    box-shadow:
        0 -5px 18px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    backdrop-filter:
        blur(13px);
}

.casino-bottom-nav > a {
    position: relative;

    display: grid;

    min-width: 0;
    min-height: 48px;

    align-content: center;
    justify-items: center;

    gap: 2px;

    color: #7790af;

    text-decoration: none;
}

.casino-bottom-icon {
    display: grid;

    width: 27px;
    height: 25px;

    place-items: center;

    font-size: 18px;
    line-height: 1;
}

.casino-bottom-nav small {
    font-size: 7px;
    font-weight: 900;
}

.casino-bottom-nav > a.is-active {
    color: #ffd24e;
}

.casino-bottom-nav > a.is-active::before {
    position: absolute;

    top: -5px;
    right: 22%;
    left: 22%;

    height: 2px;

    content: "";

    background:
        #ffc52f;

    box-shadow:
        0 0 8px rgba(255, 195, 44, 0.75);
}

/*
|--------------------------------------------------------------------------
| Tombol deposit tengah
|--------------------------------------------------------------------------
*/

.casino-bottom-main {
    transform:
        translateY(-13px);
}

.casino-bottom-main-ring {
    display: grid;

    width: 53px;
    height: 53px;

    place-items: center;

    border:
        2px solid #ffd45a;

    border-radius: 50%;

    background:
        linear-gradient(
            180deg,
            #ffdc69 0%,
            #e89500 58%,
            #7d3d00 100%
        );

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.72),
        inset 0 -3px 5px rgba(75, 25, 0, 0.55),
        0 0 0 4px #03152d,
        0 0 0 5px rgba(255, 190, 35, 0.48),
        0 0 13px rgba(255, 184, 20, 0.55),
        0 7px 10px rgba(0, 0, 0, 0.50);
}

.casino-bottom-main-icon {
    display: grid;

    width: 35px;
    height: 35px;

    place-items: center;

    border-radius: 50%;

    color: #fff7c2;

    background:
        radial-gradient(
            circle at 35% 25%,
            #1861aa,
            #073b77 65%,
            #021b3d
        );

    font-size: 24px;
    font-weight: 1000;

    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.70);
}

.casino-bottom-main small {
    margin-top: 2px;

    color: #ffd14a;

    font-size: 7px;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 390px) {
    .casino-footer {
        padding-right: 8px;
        padding-left: 8px;
    }

    .casino-footer-brand {
        padding:
            11px
            9px;
    }

    .casino-footer-logo strong {
        font-size: 20px;
    }

    .casino-footer-navigation {
        gap: 5px;
    }

    .casino-footer-column {
        padding: 8px;
    }
}

@media (max-width: 340px) {
    .casino-footer-navigation {
        grid-template-columns:
            1fr;
    }

    .casino-footer-bottom {
        display: grid;

        justify-items: center;

        text-align: center;
    }

    .casino-footer-security {
        grid-template-columns:
            34px
            minmax(0, 1fr);
    }

    .casino-footer-security-icon {
        width: 34px;
        height: 34px;
    }
}
</style>

<script src="assets/js/app.js?v=1.0.1"></script>
</body>
</html>