<?php 
    require "../includes/config.php";

    if (!isset($_SESSION["uid"])) {
        header("Location: signin.php");
        exit;
    }
?>

<a href="logout.php">Logout</a>

?>
<!doctype html>
<html lang="id">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>Hit & Run</title>
        <link rel="stylesheet" href="assets/css/style.css">
    </head>

    <body>
    <div style="padding-right: 32px;">
        <div class="gamename card">
            Hit & Run <br> 
            Hit or you Lose.
        </div>
        <div style="padding-top: 32px; display:flex; flex-direction:column; align-items:center;">
            <div class="num-box">
                <button class="btn minus">−</button>
                <input type="number" value="1000" style="margin-bottom: -1px;">
                <button class="btn plus">+</button>
            </div>
            <button class="btn btn-primary" id="playBtn">▶️ MAINKAN</button>
        </div>
    </div>

    <div>
        <div class="userbox">
            <div class="avatar">P</div>

            <div class="info">
                <div class="name"><?php echo $_SESSION["username"]; ?></div>
                <div class="saldo">Saldo: <span><?php echo $_SESSION["money"]; ?></span></div>
                <div class="status">Status: Masih Pemula Banghh....</div>
            </div>
        </div>

    </div>

        <script>
            const playBtn = document.getElementById('playBtn');
            console.log("Startgame");
        </script>
    </body>
    <script src="assets/js/menu.js"></script>
</html>
