<?php
session_start();

if(!isset($_SESSION['username'])) {
    header('location:login.php');
    exit;
}
?>

<!DOCTYPE html>
<html lang="id">
    <style>
    body {
            height: 526px;
            background-color: rgb(24, 24, 24);
    }
    h1 {
      text-align: center;
      margin-top: 10%;
      font-size: 40px;
      box-sizing: border-box;
      color: white;
    }
    h3 {
      color: white;
    }
    .container {
      padding: 5px; /* Nanti dihapus */
      border-radius: 7pt; /* Nanti dihapus */
      width: 65%;
      height: 55%;
      justify-self: center;
      background-image: url("gameOver/gameOver.png");
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
      /* background-image: url(); */
    }

    #button {
      font-size: 35px;
      margin-top: 5%;
      width: 50%;
      margin-bottom: 5%;
      border: 2px solid #5c5b58;
      background-color: #5c5b58;
      color: white;
      border-radius: 3pt;
      padding: 2px;
      justify-self: center;
      text-align: center;
    }

    
    </style>


    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Halaman ke-1</title>
    </head>
    <body style='text-align:center'>
        <h1>EAT THAT APPLE</h1>
        <!-- <a href="index.php">Home</a>
        <a href="logout.php">Logout</a> -->
        <hr>

        <h3>Selamat datang, <?php echo isset($_SESSION['users']['nama']) ? htmlspecialchars($_SESSION['users']['nama']) : 'User' ?></h3>
        <br>

        <!-- <h1>EAT THAT APPLE</h1> -->
        <div class="container">
            <div class="b2">
              <a href="game.php">
                  <div id="button">Play Game</div>
              </a>
            </div>
            <div class="b2">
              <a href="leaderboard.php">
                  <div id="button">Leaderboard</div>
              </a>
            </div>
            <div class="b2">
              <a href="logout.php">
                  <div id="button">Logout</div>
              </a>
            </div>
        </div>
    </body>
</html>