<!-- Main Content -->



<style>

    @media (max-width:780px) {

        .divblock {

            display: block !important;

        }



        .card-2 {

            margin-top: 20px !important;

        }



        .btn-secondary {

            width: 25%;

        }

    }

</style>

<div style="padding-top: 140px; padding-bottom: 80px; min-height: 100vh;">

    <div class="container">

        <!-- Header -->

        <div class="text-center"> <?php if ($this->session->flashdata()) {

                                        echo Helpers::showFlash($this->session->flashdata("response"));

                                    } ?></div>

        <div class="text-center" style="margin-bottom: 3rem;">

            <h1 style="font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem;">

                Deposit <span class="gradient-text">SOL</span>

            </h1>

            <p style="color: rgba(255,255,255,0.7); font-size: 1.25rem;">

                Send SOL to start earning daily rewards

            </p>

        </div>



        <?php

        $adminData = Helpers::getAdmin(true);

        ?>

        <!-- Stats -->

        <div class="grid grid-2" style="margin-bottom: 3rem; max-width: 900px; margin-left: auto; margin-right: auto;">

            <div class="card" style="position: relative; overflow: hidden;">

                <div style="position: absolute; top: 0; right: 0; width: 128px; height: 128px; background: linear-gradient(135deg, var(--solana-purple), var(--solana-cyan)); opacity: 0.1; filter: blur(40px); border-radius: 50%;"></div>

                <div style="position: relative;">

                    <div style="display: flex; justify-content: space-between; margin-bottom: 1rem;">

                        <div>

                            <p style="color: rgba(255,255,255,0.6); font-size: 0.875rem; margin-bottom: 0.5rem;">Your Balance</p>

                            <h3 style="font-size: 2rem; font-weight: 700;"><?= MemberHelper::user_wallet(); ?> SOL</h3>

                        </div>

                        <div style="padding: 0.75rem; background: rgba(255,255,255,0.05); border-radius: 0.75rem; height: fit-content;">

                            💰

                        </div>

                    </div>

                    <!-- <div style="color: #14F195; font-size: 0.875rem; font-weight: 600;">+2.5% this week</div> -->

                </div>

            </div>



            <div class="card" style="position: relative; overflow: hidden;">

                <div style="position: absolute; top: 0; right: 0; width: 128px; height: 128px; background: linear-gradient(135deg, var(--solana-purple), var(--solana-cyan)); opacity: 0.1; filter: blur(40px); border-radius: 50%;"></div>

                <div style="position: relative;">

                    <div style="display: flex; justify-content: space-between; margin-bottom: 1rem;">

                        <div>

                            <p style="color: rgba(255,255,255,0.6); font-size: 0.875rem; margin-bottom: 0.5rem;">Today Earnings</p>

                            <h3 style="font-size: 2rem; font-weight: 700;"><?= MemberHelper::user_daily_earnings(); ?> SOL</h3>

                        </div>

                        <div style="padding: 0.75rem; background: rgba(255,255,255,0.05); border-radius: 0.75rem; height: fit-content;">

                            ✓

                        </div>

                    </div>

                    <!-- <div style="color: rgba(255,255,255,0.6); font-size: 0.875rem;">Last 24 hours</div> -->

                </div>

            </div>

        </div>



        <!-- Main Content Grid -->

        <div class="divblock" style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto;">

            <!-- QR Code Section -->

            <div class="card">

                <h2 style="font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem;">Your Deposit Address</h2>



                <!-- QR Code -->

                <div style="text-align: center; margin-bottom: 1.5rem;">

                    <div style="background: white; padding: 1rem; border-radius: 1rem; display: inline-block;">

                        <div id="" style="width: 200px;height:200px"><img src="<?= base_url() ?>uploads/files/qr/<?= $adminData['id']; ?>/<?= $adminData['usdt_qr']; ?>" alt="" style="width: 100%;"></div>

                    </div>

                </div>

                <form action="<?= base_url("confirm_deposit") ?>" method="post">

                    <!-- Address Display -->

                    <div style="margin-bottom: 1.5rem;">

                        <label style="font-size: 0.875rem; color: rgba(255,255,255,0.6); display: block; margin-bottom: 0.5rem;">Solana Address</label>

                        <div style="display: flex; gap: 0.5rem;">

                            <div class="glass" style="flex: 1; padding: 1rem; border-radius: 0.75rem; font-family: monospace; font-size: 0.875rem; word-break: break-all;">

                                <?= $adminData['btc_address']; ?>

                            </div>

                            <button class="btn btn-secondary" style="padding: 1rem;" onclick="copyAddress()">

                                <span id="copyBtn">📋</span>

                            </button>

                        </div>

                    </div>

                    <div class="input-group">

                        <label class="input-label">Enter Amount (SOL)</label>

                        <input type="number" class="input" name="amount" placeholder="Enter Amount (SOL)" required>

                    </div>

                    <!-- Finish Button -->

                    <button class="btn btn-primary" type="submit" style="width: 100%;max-width:unset!important">

                        Finish Deposit

                    </button>

                </form>

                <!-- Success Message -->

                <!-- <div id="successMessage" class="hidden" style="margin-top: 1rem; padding: 1rem; background: rgba(20, 241, 149, 0.1); border: 1px solid rgba(20, 241, 149, 0.3); border-radius: 0.75rem;">

                    <div style="display: flex; align-items: start; gap: 0.75rem;">

                        <div style="color: #14F195; font-size: 1.25rem;">✓</div>

                        <div>

                            <div style="color: #14F195; font-weight: 600; margin-bottom: 0.25rem;">Deposit Confirmed!</div>

                            <div style="font-size: 0.875rem; color: rgba(255,255,255,0.8);">Your SOL is now staking and earning rewards.</div>

                        </div>

                    </div>

                </div> -->

            </div>



            <!-- Instructions Section -->

            <div class="card-2" style="display: flex; flex-direction: column; gap: 1.5rem;">

                <!-- How to Deposit -->

                <div class="card">

                    <h3 style="font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem;">How to Deposit</h3>



                    <div style="display: flex; gap: 0.75rem; margin-bottom: 1.5rem;">

                        <div style="width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--solana-purple), var(--solana-blue)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;">1</div>

                        <div>

                            <div style="font-weight: 600; margin-bottom: 0.25rem;">Send SOL</div>

                            <div style="font-size: 0.875rem; color: rgba(255,255,255,0.7);">Transfer SOL from your wallet to the address above</div>

                        </div>

                    </div>



                    <div style="display: flex; gap: 0.75rem; margin-bottom: 1.5rem;">

                        <div style="width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--solana-purple), var(--solana-blue)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;">2</div>

                        <div>

                            <div style="font-weight: 600; margin-bottom: 0.25rem;">Enter Amount</div>

                            <div style="font-size: 0.875rem; color: rgba(255,255,255,0.7);">Enter the amount you have sent in the field.</div>

                        </div>

                    </div>



                    <div style="display: flex; gap: 0.75rem; margin-bottom: 1.5rem;">

                        <div style="width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--solana-purple), var(--solana-blue)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;">3</div>

                        <div>

                            <div style="font-weight: 600; margin-bottom: 0.25rem;">Click Finish Deposit</div>

                            <div style="font-size: 0.875rem; color: rgba(255,255,255,0.7);">After sending SOL, press "Finish Deposit" to complete the process</div>

                        </div>

                    </div>



                    <div style="display: flex; gap: 0.75rem;">

                        <div style="width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--solana-purple), var(--solana-blue)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;">4</div>

                        <div>

                            <div style="font-weight: 600; margin-bottom: 0.25rem;">Wait for Confirmation</div>

                            <div style="font-size: 0.875rem; color: rgba(255,255,255,0.7);">Transaction usually confirms in under 24 Hours</div>

                        </div>

                    </div>

                </div>



                <!-- Important Notes -->

                <div class="card">

                    <div style="display: flex; gap: 0.75rem;">

                        <div style="color: var(--solana-cyan); font-size: 1.25rem; flex-shrink: 0;">ℹ️</div>

                        <div>

                            <h3 style="font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem;">Important Notes</h3>

                            <ul style="list-style: none; padding: 0; color: rgba(255,255,255,0.7); font-size: 0.875rem; line-height: 1.8;">

                                <li>• Minimum deposit: 10 SOL</li>

                                <li>• Network fees apply (paid to Solana validators)</li>

                                <li>• Always double-check the address before sending</li>

                                <li>• Deposits are irreversible once confirmed</li>

                                <li>• Contact support if you need assistance</li>

                            </ul>

                        </div>

                    </div>

                </div>



                <!-- APY Info -->

                <div class="card" style="background: linear-gradient(135deg, rgba(153, 69, 255, 0.1), rgba(0, 212, 255, 0.1)); border: 1px solid rgba(153, 69, 255, 0.3); text-align: center;">

                    <div style="font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem;" class="gradient-text">10%</div>

                    <div style="color: rgba(255,255,255,0.8); margin-bottom: 0.5rem;">Monthly earnings</div>

                    <div style="font-size: 0.875rem; color: rgba(255,255,255,0.6);">Rewards compound daily and are automatically added to your balance</div>

                </div>

            </div>

        </div>

    </div>

</div>



<script>

    // Generate QR Code

    const depositAddress = '<?= $adminData['btc_address']; ?>';

    new QRCode(document.getElementById("qrcode"), {

        text: depositAddress,

        width: 220,

        height: 220,

        colorDark: "#000000",

        colorLight: "#ffffff",

        correctLevel: QRCode.CorrectLevel.H

    });



    function copyAddress() {

        copyToClipboard(depositAddress, document.getElementById('copyBtn'));

    }



    // function finishDeposit() {

    //     document.getElementById('successMessage').classList.remove('hidden');

    //     showNotification('Deposit confirmed successfully!');

    // }

</script>