
<!----
<?php
if (!isset($_COOKIE["user"])) {
    header("Location: ../login.html");
    exit();
}

if (isset($_GET["action"])) {
    if ($_GET["action"] == "logout") {
        setcookie("user", "logout", time() - (24 * 60 * 60 * 24), "/");
        header("Location: ../login.html");
        exit();
    }
}

$user = $_COOKIE["user"];
$j_data = json_decode(file_get_contents("../u.j"), false);
$admin_text = "";
if (isset($j_data->users->$user)) {

    //if ($j_data->users->$user->idverified != 2) {
      //  header("Location: verify.php");
    //}

    if ($j_data->users->$user->admin) {
        $admin_text = '<li>
                            <a href="admin.php" class="waves-effect">
                                <i class="fas fa-user-lock-cog"></i><span> ADMIN Dashboard </span>
                            </a>
                        </li>';
    }
    $email = $j_data->users->$user->email;
    $interest_rate = $j_data->users->$user->interest_rate;
    $stock = $j_data->users->$user->stock;
    $account_balance = $j_data->users->$user->account_balance;
     $ref = $j_data->users->$user->refs_earnings;
    $investment_profits = $j_data->users->$user->investment_profits;
    $investment_date = $j_data->users->$user->birthday;
    $currency = $j_data->users->currency;

    if (!isset($j_data->users->$user->refs_earnings)) {
        $j_data->users->$user->refs_earnings = 0;
    }
    $refs_earnings = $j_data->users->$user->refs_earnings;
} else {
    setcookie("user", "logout", time() - (24 * 60 * 60 * 24), "/");
    header("Location: ../login.html");
    exit();
}


?>    --->


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>QFS Vault</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', sans-serif;
      background-color: #f9f9f9;
      overflow-x: hidden;
    }

    .container {
      min-height: 100vh;
      padding-bottom: 90px;
      overflow-y: auto;
    }

    .topbar {
      background-color: #000;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #fff;
    }

    .logo {
      color: #FF6C37;
      font-weight: bold;
      font-size: 18px;
    }

    .profile-section {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .profile-section img {
      width: 36px;
      height: 36px;
      border-radius: 50%;
    }

    .language {
      background: #eee;
      border-radius: 12px;
      padding: 4px 10px;
      color: #000;
      font-weight: bold;
      font-size: 14px;
    }

    .balance-card {
      background-color: #000;
      color: #fff;
      padding: 20px;
      text-align: center;
    }

    .balance-card .amount {
      font-size: 36px;
      font-weight: bold;
      margin-top: 5px;
    }

    .balance-card .status {
      margin-top: 5px;
      color: red;
      font-size: 14px;
    }

    .balance-card .verify-btn {
      margin-top: 6px;
      padding: 5px 12px;
      background: #fff;
      color: #000;
      border: none;
      font-weight: 600;
      font-size: 14px;
      border-radius: 6px;
      cursor: pointer;
    }

    .actions {
      display: flex;
      justify-content: space-around;
      margin: 20px 0 10px;
      text-align: center;
    }

    .action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 60px;
      gap: 6px;
    }

    .action-btn button {
      width: 60px;
      height: 60px;
      border: none;
      border-radius: 12px;
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .buy-btn { background: white; color: black; border: 1px solid #ddd; }
    .send-btn { background: #FF4375; color: white; }
    .receive-btn, .swap-btn, .link-btn { background: #2962ff; color: white; }

    .action-label {
      margin-top: 2px;
      font-size: 12px;
      color: #ffffff;
      font-weight: 500;
    }

    .coin-card {
      background: #fff;
      margin: 12px 16px;
      padding: 15px;
      border-radius: 14px;
       display: grid;
       justify-content: center;
       justify-items: center;
       align-items: center;
      box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    }

    .coin-name {
      font-weight: 600;
      font-size: 16px;
    }

    .coin-price {
      font-size: 14px;
      color: red;
      margin-top: 4px;
    }

    .coin-amount {
      margin-top: 5px;
      color: #888;
     
      font-size: 14px;
    }

    .green {
      color: green;
    }

    .bottom-nav {
      position: fixed;
      bottom: 0;
      width: 100%;
      background: #fff;
      display: flex;
      justify-content: space-around;
      border-top: 1px solid #ccc;
      padding: 10px 0 5px;
      z-index: 1000;
    }

    .bottom-nav a {
      text-decoration: none;
      text-align: center;
      font-size: 11px;
      color: #000;
    }

    .bottom-nav i {
      display: block;
      font-size: 18px;
      margin-bottom: 2px;
    }

    .logout-btn {
      position: fixed;
      bottom: 70px;
      right: 15px;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: green;
      color: #fff;
      border: none;
      font-size: 20px;
      z-index: 1001;
    }
   
  </style>
</head>
<body>

  <div class="container">
    <!-- Top Bar -->
    <div class="topbar">
      <div class="logo">QFS-VAULT</div>
      <div class="profile-section">
        <div class="language">EN</div>
        <i class="fa fa-bell"></i>
        <img src="https://via.placeholder.com/36" alt="User">
      </div>
    </div>

    <!-- Balance Card -->
    <div class="balance-card">
      <div>Total Balance</div>
      <div class="amount">$ <?php echo $account_balance;?> </div>
      <div class="status">Not Verified</div>
      <button class="verify-btn">Verify Now</button>

      <!-- Action Buttons with Labels -->
      <div class="actions">
        <div class="action-btn">
          <button class="buy-btn"><i class="fa-brands fa-cc-visa"></i></button>
          <div class="action-label">Buy</div>
        </div>
        <div class="action-btn">
          <button class="send-btn"><i class="fa fa-arrow-up"></i></button>
          <div class="action-label">Send</div>
        </div>
        <div class="action-btn">
          <button class="receive-btn"><i class="fa fa-arrow-down"></i></button>
          <div class="action-label">Receive</div>
        </div>
        <div class="action-btn">
          <button class="swap-btn"><i class="fa fa-retweet"></i></button>
          <div class="action-label">Swap</div>
        </div>
        <div class="action-btn">
          <button class="link-btn"><i class="fa fa-link"></i></button>
          <div class="action-label">Link Wallet</div>
        </div>
      </div>
    </div>

   <div class="row">
 <!-- Coin Cards -->
    <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="XLM" lcw-base="USD" lcw-period="d" lcw-color-tx="#000000" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 XLM</div>
    </div>

    <div class="coin-card">
       <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="XRP" lcw-base="USD" lcw-period="d" lcw-color-tx="#000000" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 XRP</div>
    </div>

    <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="BTC" lcw-base="USD" lcw-period="d" lcw-color-tx="#fcb900" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 BTC</div>
    </div>
    
     <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="ETH" lcw-base="USD" lcw-period="d" lcw-color-tx="#000000" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 ETH</div>
    </div>
    
     <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="USDT" lcw-base="USD" lcw-period="d" lcw-color-tx="#00d084" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 USDT</div>
    </div>
    
       <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="DOGE" lcw-base="USD" lcw-period="d" lcw-color-tx="#c9af27" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 DOGE</div>
    </div>
    
       <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="LTC" lcw-base="USD" lcw-period="d" lcw-color-tx="#0693e3" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 LTC</div>
    </div>
           <div class="coin-card">
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script> <div class="livecoinwatch-widget-6" lcw-coin="SHIB" lcw-base="USD" lcw-period="d" lcw-color-tx="#fcb900" lcw-color-bg="#ffffff" lcw-border-w="0" ></div>
      <div class="coin-amount">$0.00 | 0.00 SHIB</div>
    </div>
    
    
    
  </div>


   </div>
  <!-- Floating Logout Button -->
  <button class="logout-btn"><i class="fa fa-sign-out-alt"></i></button>

  <!-- Bottom Navigation -->
  <div class="bottom-nav">
    <a href="profile.php"><i class="fa fa-cog"></i>Settings</a>
    <a href="#"><i class="fa fa-bell"></i>Notifications</a>
    <a href="#"><i class="fa fa-wallet"></i>Wallet</a>
    <a href="#"><i class="fa fa-headset"></i>Support</a>
  </div>

</body>
</html>
