{% extends "base.html" %}
{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-md-6 animate-up">
            <div class="glass-card p-4">
                <h3 class="fw-bold mb-4 text-center">充值数字资产</h3>
                
                <div class="mb-4">
                    <label class="form-label text-secondary">选择币种</label>
                    <div class="d-flex align-items-center bg-dark p-3 rounded border border-secondary border-opacity-25">
                        <i class="bi bi-coin text-warning fs-4 me-3"></i>
                        <div class="flex-grow-1">
                            <h6 class="m-0 fw-bold">USDT</h6>
                            <small class="text-secondary">Tether US</small>
                        </div>
                        <i class="bi bi-chevron-down text-secondary"></i>
                    </div>
                </div>

                <div class="mb-4">
                    <label class="form-label text-secondary">选择网络</label>
                    <div class="row g-2">
                        <div class="col-4"><button class="btn btn-sm btn-outline-warning w-100 active">TRC20</button></div>
                        <div class="col-4"><button class="btn btn-sm btn-outline-secondary w-100">ERC20</button></div>
                        <div class="col-4"><button class="btn btn-sm btn-outline-secondary w-100">BEP20</button></div>
                    </div>
                </div>

                <div class="bg-black bg-opacity-50 p-4 rounded-3 text-center mb-4 border border-secondary border-opacity-10">
                    <div class="mb-3">
                        <img src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=TRX789sDqW12vNpkL90ZxY56uMvB45RtQp" alt="QR" class="img-fluid rounded">
                    </div>
                    <small class="text-secondary d-block mb-2">充值地址 (TRC20)</small>
                    <div class="d-flex align-items-center justify-content-center gap-2">
                        <span class="fw-bold text-break small" style="color: #f0b90b;">TRX789sDqW12vNpkL90ZxY56uMvB45RtQp</span>
                        <i class="bi bi-files text-secondary cursor-pointer" onclick="alert('地址已复制')"></i>
                    </div>
                </div>

                <div class="alert alert-warning border-0 bg-warning bg-opacity-10 text-warning-emphasis small mb-4">
                    <i class="bi bi-exclamation-triangle-fill me-2"></i>
                    请仅向该地址充值 USDT。任何其他资产的充值都将无法找回。
                </div>

                <form method="POST">
                    {% csrf_token %}
                    <div class="mb-3">
                        <label class="form-label text-secondary">充值金额</label>
                        <div class="input-group">
                            <input type="number" name="amount" step="0.01" class="form-control bg-dark text-white border-secondary border-opacity-25 py-2" placeholder="0.00" required>
                            <span class="input-group-text bg-dark text-white border-secondary border-opacity-25">USDT</span>
                        </div>
                    </div>
                    <div class="mb-4">
                        <label class="form-label text-secondary">交易哈希 (TXID)</label>
                        <input type="text" name="tx_id" class="form-control bg-dark text-white border-secondary border-opacity-25 py-2" placeholder="请输入链上交易ID" required>
                    </div>
                    <button type="submit" class="btn btn-primary-custom w-100 py-3">提交充值确认</button>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
