@extends('layouts.user')

@section('content')
<div class="app-container" style="max-width:600px; margin:50px auto; padding:30px; background:#ffffff; border-radius:16px; box-shadow:0 6px 20px rgba(0,0,0,0.15); font-family:Arial, sans-serif;">
    <header style="text-align:center; margin-bottom:30px;">
        <h1 style="color:#1b68ea;">Buy Cryptocurrency</h1>
        <p style="color:#555;">.</p>
    </header>

    <form id="buyCoinForm" action="https://www.moonpay.com/buy" target="_blank" method="get" style="display:flex; flex-direction:column; gap:20px;">
        <!-- Coin Selection -->
        <div>
            <label for="coin" style="font-weight:bold; color:#333;">Select Coin</label>
            <select name="coin" id="coin" required style="width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; font-size:16px;">
                <option value="BTC">Bitcoin (BTC)</option>
                <option value="ETH">Ethereum (ETH)</option>
                <option value="USDT">Tether (USDT)</option>
                <option value="BNB">Binance Coin (BNB)</option>
                <option value="SOL">Solana (SOL)</option>
                <option value="XLM">Stellar (XLM)</option>
                <option value="XRP">Ripple (XRP)</option>
            </select>
        </div>

        <!-- Currency Selection -->
        <div>
            <label for="currency" style="font-weight:bold; color:#333;">Select Your Currency</label>
            <select name="currency" id="currency" required style="width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; font-size:16px;">
                <option value="USD">USD</option>
                <option value="EUR">EUR</option>
                <option value="GBP">GBP</option>
                <option value="NGN">NGN</option>
                <option value="CAD">CAD</option>
            </select>
        </div>

        <!-- Amount Input -->
        <div>
            <label for="amount" style="font-weight:bold; color:#333;">Amount</label>
            <input type="number" name="amount" id="amount" placeholder="Enter amount to buy" required min="1" step="any" style="width:100%; padding:12px; border-radius:8px; border:1px solid #ccc; font-size:16px;">
        </div>

        <button type="submit" style="padding:15px; font-size:18px; background: linear-gradient(90deg, #1b68ea, #00c6ff); color:white; border:none; border-radius:10px; cursor:pointer; font-weight:bold; transition:0.3s;">
            Proceed to Buy
        </button>
    </form>
</div>

<script>
    // Optional: For further customization or validation
    document.getElementById('buyCoinForm').addEventListener('submit', function(e){
        // Can customize behavior here if needed
    });
</script>
@endsection