<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  <title>Recharge </title>
  
  <!-- External Resources -->
  <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=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">

  <style>
    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

    body {
      font-family: 'Poppins', sans-serif;
      /* আপনার লগইন পেজের এনিমেটেড ব্যাকগ্রাউন্ড */
      background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #ff8c00);
      background-size: 400% 400%;
      animation: gradientBG 15s ease infinite;
      color: #fff;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      padding-top: 20px;
    }

    @keyframes gradientBG {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    /* মেইন কন্টেইনার - মাপ পারফেক্ট করা হয়েছে */
    .recharge-wrapper {
      width: 92%;
      max-width: 380px;
    }

    /* টপ ন্যাভিগেশন */
    .header-nav {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 20px;
    }
    .header-nav a { color: #fff; text-decoration: none; font-size: 18px; }
    .header-nav h2 { font-size: 18px; font-weight: 600; }

    /* ব্যালেন্স বক্স - প্রিমিয়াম গোল্ডেন লুক */
    .wallet-card {
      background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
      padding: 20px;
      border-radius: 20px;
      color: #222;
      box-shadow: 0 10px 20px rgba(0,0,0,0.2);
      margin-bottom: 25px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .wallet-info p { font-size: 12px; font-weight: 600; opacity: 0.8; margin-bottom: 5px; }
    .wallet-info h3 { font-size: 22px; font-weight: 800; }
    .wallet-card i { font-size: 35px; opacity: 0.3; }

    /* ইনপুট এরিয়া */
    .recharge-form {
      background: rgba(255, 255, 255, 0.12);
      backdrop-filter: blur(15px);
      padding: 25px 20px;
      border-radius: 25px;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .input-label {
      display: block;
      font-size: 13px;
      color: #FFD700;
      margin-bottom: 10px;
      font-weight: 500;
    }

    .input-box {
      position: relative;
      margin-bottom: 25px;
    }
    .input-box i {
      position: absolute;
      left: 15px;
      top: 50%;
      transform: translateY(-50%);
      color: #FFD700;
      font-size: 18px;
    }
    .input-box input {
      width: 100%;
      padding: 14px 15px 14px 45px;
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      color: #fff;
      font-size: 16px;
      outline: none;
      transition: 0.3s;
    }
    .input-box input:focus {
      border-color: #FFD700;
      background: rgba(0, 0, 0, 0.3);
    }

    /* রিচার্জ বাটন */
    .btn-recharge {
      width: 100%;
      padding: 15px;
      background: linear-gradient(90deg, #FF8C00, #FF4500);
      border: none;
      border-radius: 12px;
      color: #fff;
      font-size: 15px;
      font-weight: 700;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow: 0 5px 15px rgba(255, 69, 0, 0.4);
      letter-spacing: 1px;
    }
    .btn-recharge:active { transform: scale(0.97); }

    /* ইনস্ট্রাকশন কার্ড */
    .rules-box {
      margin-top: 25px;
      padding: 18px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 18px;
      border-left: 4px solid #FFD700;
    }
    .rules-box h4 { font-size: 14px; color: #FFD700; margin-bottom: 10px; }
    .rules-box p { font-size: 12px; line-height: 1.8; color: #eee; }

    /* পপআপ ডিজাইন */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.85);
      display: none; justify-content: center; align-items: center;
      z-index: 1000; padding: 20px;
    }
    .modal-content {
      background: #fff;
      width: 100%; max-width: 320px;
      border-radius: 25px;
      padding: 30px 20px;
      text-align: center;
      color: #333;
      position: relative;
    }
    .modal-content h3 { font-size: 20px; color: #ff5e00; margin-bottom: 15px; }
    .modal-content p { font-size: 14px; color: #666; margin-bottom: 25px; line-height: 1.6; }
    .modal-btn {
      width: 100%; padding: 12px; background: #ff5e00; border: none;
      border-radius: 12px; color: #fff; font-weight: 600; font-size: 14px;
    }
    .modal-close {
      position: absolute; top: 15px; right: 15px; font-size: 20px; color: #ccc; cursor: pointer;
    }

  </style>
</head>
<body>

<div class="recharge-wrapper">
  
  <!-- Top Header -->
  <div class="header-nav">
    <a href="javascript:history.back();"><i class="fa-solid fa-chevron-left"></i></a>
    <h2>Recharge</h2>
  </div>

  <!-- Wallet Section -->
  <div class="wallet-card">
    <div class="wallet-info">
      <p>CURRENT BALANCE</p>
      <h3><?php echo e(price(auth()->user()->balance)); ?></h3>
    </div>
    <i class="fa-solid fa-wallet"></i>
  </div>

  <!-- Recharge Form -->
  <div class="recharge-form">
    <label class="input-label">Deposit Amount</label>
    <div class="input-box">
      <i class="fa-solid fa-coins"></i>
      <input type="number" id="amountInput" placeholder="Enter amount (Min. 500)" autocomplete="off">
    </div>

    <button type="button" class="btn-recharge" id="submitBtn">Process to Deposit</button>
  </div>

  <!-- Instructions -->
  <div class="rules-box">
    <h4><i class="fa-solid fa-shield-halved"></i> Security Notice</h4>
    <p>
      • Minimum deposit is 500 BDT.<br>
      • Maximum deposit per request is 50,000 BDT.<br>
      • Ensure you complete the payment on the next page.<br>
      • Funds will be added instantly after verification.
    </p>
  </div>

</div>

<!-- Payment Modal -->
<div class="modal-overlay" id="confirmModal">
  <div class="modal-content">
    <i class="fa-solid fa-circle-xmark modal-close" id="closeModal"></i>
    <h3>Confirm Deposit</h3>
    <p>You are about to be redirected to our secure payment gateway. Please follow the steps to complete your recharge.</p>
    <button class="modal-btn" id="goPay">Continue to Pay</button>
  </div>
</div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/layui@2.8.17/dist/layui.js"></script>

<script>
layui.use(['layer'], function(){
  const layer = layui.layer;

  $('#submitBtn').on('click', function(){
    const amt = parseFloat($('#amountInput').val());

    if(!amt || amt < 500){
      layer.msg("Minimum recharge is 500 BDT", {icon: 5, anim: 6});
      return;
    }

    $('#confirmModal').css('display', 'flex');
  });

  $('#goPay').on('click', function(){
    const amount = $('#amountInput').val();
    window.location.href = '<?php echo e(url("deposits")); ?>?amount=' + amount;
  });

  $('#closeModal').on('click', function(){
    $('#confirmModal').hide();
  });
});
</script>

</body>
</html><?php /**PATH /home/goldenyi/public_html/resources/views/app/main/recharge/index.blade.php ENDPATH**/ ?>