<?php include 'header.php'; ?>

<main style="padding: 40px 20px; background: #0b0e11; min-height: calc(100vh - 64px);">
    <div style="max-width: 1200px; margin: 0 auto;">
        
        <a href="index.php" class="back-btn"><i class="fas fa-arrow-left"></i> Home</a>

        <div style="text-align: center; margin-bottom: 60px; padding: 40px 0; background: linear-gradient(180deg, rgba(0,82,255,0.05) 0%, transparent 100%); border-radius: 30px;">
            <h1 style="font-size: 3.5rem; font-weight: 800; margin-bottom: 15px; color: white;">Staking & Mining</h1>
            <p style="color: var(--text-muted); font-size: 1.2rem; max-width: 700px; margin: 0 auto;">Participate in proof-of-stake and decentralized finance to earn rewards on your digital assets.</p>
        </div>

        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; margin-bottom: 60px;">
            <div style="background: var(--card-bg); padding: 40px; border-radius: 24px; border: 1px solid var(--border-color); transition: 0.3s;" onmouseover="this.style.transform='translateY(-10px)'" onmouseout="this.style.transform='translateY(0)'">
                <div style="width: 60px; height: 60px; background: rgba(0,82,255,0.1); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-size: 28px; margin-bottom: 25px;">
                    <i class="fas fa-pickaxe"></i>
                </div>
                <h3 style="font-size: 1.5rem; margin-bottom: 15px;">Liquidity Mining</h3>
                <p style="color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 25px;">Provide liquidity to automated market makers and earn a portion of the trading fees plus governance tokens.</p>
                <div style="display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border-color);">
                    <div>
                        <div style="color: var(--text-muted); font-size: 12px;">Est. APR</div>
                        <div style="font-size: 20px; font-weight: bold; color: var(--success-color);">Up to 45.8%</div>
                    </div>
                    <button class="btn-primary" style="padding: 10px 25px; border-radius: 12px;">Stake Now</button>
                </div>
            </div>

            <div style="background: var(--card-bg); padding: 40px; border-radius: 24px; border: 1px solid var(--border-color); transition: 0.3s;" onmouseover="this.style.transform='translateY(-10px)'" onmouseout="this.style.transform='translateY(0)'">
                <div style="width: 60px; height: 60px; background: rgba(14,203,129,0.1); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--success-color); font-size: 28px; margin-bottom: 25px;">
                    <i class="fas fa-seedling"></i>
                </div>
                <h3 style="font-size: 1.5rem; margin-bottom: 15px;">PoS Staking</h3>
                <p style="color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 25px;">Stake your proof-of-stake assets to help secure the network and receive inflation rewards directly in your wallet.</p>
                <div style="display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border-color);">
                    <div>
                        <div style="color: var(--text-muted); font-size: 12px;">Est. APR</div>
                        <div style="font-size: 20px; font-weight: bold; color: var(--success-color);">Up to 12.5%</div>
                    </div>
                    <button class="btn-primary" style="padding: 10px 25px; border-radius: 12px;">Stake Now</button>
                </div>
            </div>

            <div style="background: var(--card-bg); padding: 40px; border-radius: 24px; border: 1px solid var(--border-color); transition: 0.3s;" onmouseover="this.style.transform='translateY(-10px)'" onmouseout="this.style.transform='translateY(0)'">
                <div style="width: 60px; height: 60px; background: rgba(240,185,11,0.1); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--gold-color); font-size: 28px; margin-bottom: 25px;">
                    <i class="fas fa-gem"></i>
                </div>
                <h3 style="font-size: 1.5rem; margin-bottom: 15px;">Launchpad</h3>
                <p style="color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 25px;">Gain exclusive access to high-quality blockchain projects before they list on our exchange.</p>
                <div style="display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border-color);">
                    <div>
                        <div style="color: var(--text-muted); font-size: 12px;">Next Project</div>
                        <div style="font-size: 20px; font-weight: bold; color: var(--gold-color);">Coming Soon</div>
                    </div>
                    <button class="btn-primary" style="padding: 10px 25px; border-radius: 12px;">View Details</button>
                </div>
            </div>
        </div>

        <div style="background: var(--card-bg); border-radius: 30px; border: 1px solid var(--border-color); overflow: hidden;">
            <div style="padding: 30px 40px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center;">
                <h3 style="margin: 0;">Yield Rankings</h3>
                <div style="display: flex; gap: 10px;">
                    <button style="padding: 8px 16px; background: #2b3139; border: none; color: white; border-radius: 8px; font-size: 13px;">All</button>
                    <button style="padding: 8px 16px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 8px; font-size: 13px;">DeFi</button>
                    <button style="padding: 8px 16px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 8px; font-size: 13px;">Staking</button>
                </div>
            </div>
            <table style="width: 100%; border-collapse: collapse;">
                <thead style="background: #161a1e;">
                    <tr>
                        <th style="padding: 20px 40px; text-align: left; color: var(--text-muted); font-weight: 500;">Asset</th>
                        <th style="padding: 20px 40px; text-align: left; color: var(--text-muted); font-weight: 500;">Est. APR</th>
                        <th style="padding: 20px 40px; text-align: left; color: var(--text-muted); font-weight: 500;">Duration</th>
                        <th style="padding: 20px 40px; text-align: right; color: var(--text-muted); font-weight: 500;">Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $mining_coins = [
                        ['symbol' => 'USDT', 'apr' => '12.5%', 'duration' => 'Flexible'],
                        ['symbol' => 'BTC', 'apr' => '4.2%', 'duration' => '30 Days'],
                        ['symbol' => 'ETH', 'apr' => '5.8%', 'duration' => 'Flexible'],
                        ['symbol' => 'SOL', 'apr' => '8.9%', 'duration' => '60 Days'],
                        ['symbol' => 'DOT', 'apr' => '14.2%', 'duration' => '30 Days'],
                    ];
                    foreach ($mining_coins as $coin):
                    ?>
                    <tr style="border-bottom: 1px solid var(--border-color); transition: 0.2s;" onmouseover="this.style.background='#161a1e'" onmouseout="this.style.background='transparent'">
                        <td style="padding: 25px 40px;">
                            <div style="display: flex; align-items: center; gap: 15px;">
                                <img src="https://raw.githubusercontent.com/spothq/cryptocurrency-icons/master/128/color/<?php echo strtolower($coin['symbol']); ?>.png" width="35" height="35" onerror="this.src='https://cdn-icons-png.flaticon.com/512/2585/2585274.png'">
                                <span style="font-weight: bold; font-size: 1.1rem;"><?php echo $coin['symbol']; ?></span>
                            </div>
                        </td>
                        <td style="padding: 25px 40px;">
                            <span style="color: var(--success-color); font-weight: bold; font-size: 1.1rem;"><?php echo $coin['apr']; ?></span>
                        </td>
                        <td style="padding: 25px 40px; color: var(--text-muted);"><?php echo $coin['duration']; ?></td>
                        <td style="padding: 25px 40px; text-align: right;">
                            <button class="btn-primary" style="padding: 8px 20px; border-radius: 10px;">Subscribe</button>
                        </td>
                    </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>
</main>

<?php include 'footer.php'; ?>
