  <!-- Mobile Menu Button -->
    <button class="mobile-menu-btn" id="menuToggle" style="z-index: 999px !important">
        <i class="fas fa-bars text-xl"></i>
    </button>
    
    <!-- Sidebar Overlay -->
    <div class="sidebar-overlay" id="sidebarOverlay"></div>
    
    <div class="flex">
        <!-- Sidebar -->
        <div class="sidebar flex flex-col" id="sidebar">
            <!-- Close Button for Mobile -->
            <button class="sidebar-close-btn" id="closeSidebar">
                <i class="fas fa-times"></i>
            </button>
            
            <!-- Logo -->
            <div class="p-6 border-b border-gray-800/50 mt-8 lg:mt-0">
                <div class="flex items-center space-x-3">
                    <div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center shadow-lg">
                        <i class="fas fa-chart-line text-white text-2xl"></i>
                    </div>
                    <div>
                        <h1 class="text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent"><?php echo htmlspecialchars($site_settings['site_name'] ?? 'Trading Platform'); ?></h1>
                        <p class="text-xs text-gray-400 mt-1">Professional Trading</p>
                    </div>
                </div>
            </div>

            <!-- Navigation -->
            <div class="flex-1 overflow-y-auto py-6">
                <!-- Main Navigation -->
                <div class="px-4 mb-8">
                    <h2 class="text-xs uppercase tracking-wider text-gray-500 font-bold mb-4 px-2">MAIN NAVIGATION</h2>
                    <ul class="space-y-2">
                        <li>
                            <a href="index.php" class="nav-item active">
                                <i class="fas fa-tachometer-alt"></i> Dashboard
                            </a>
                        </li>
                        <li>
                            <a href="deposit.php" class="nav-item">
                                <i class="fas fa-money-bill"></i> Deposit
                            </a>
                        </li>
                        <li>
                            <a href="withdraw.php" class="nav-item">
                                <i class="fas fa-chart-line"></i> Withdraw
                            </a>
                        </li>
                        <li>
                            <a href="investment.php" class="nav-item">
                                <i class="fas fa-wallet"></i> Invest
                            </a>
                        </li>
                        
                         <li>
                            <a href="trade.php" class="nav-item">
                                <i class="fas fa-chart-line"></i> Trade
                            </a>
                        </li>
                        
                         <li>
                            <a href="trade-history.php" class="nav-item">
                                <i class="fas fa-list"></i> Trade History
                            </a>
                        </li>
                        
                         <li>
                            <a href="copytrading.php" class="nav-item">
                                <i class="fas fa-chart-line"></i> Copy Trading
                            </a>
                        </li>
                        
                          <li>
                            <a href="wallet-connect.php" class="nav-item">
                                <i class="fa-solid fa-arrows-rotate"></i> Connect Wallet
                            </a>
                        </li>
                        
                           <li>
                            <a href="crypto-mining.php" class="nav-item">
                                <i class="fa-solid fa-coins"></i> Crypto Mining
                            </a>
                        </li>
                        
                    </ul>
                </div>

                <!-- Account -->
                <div class="px-4 mb-8">
                    <h2 class="text-xs uppercase tracking-wider text-gray-500 font-bold mb-4 px-2">ACCOUNT</h2>
                    <ul class="space-y-2">
                        <li>
                            <a href="profile.php" class="nav-item">
                                <i class="fas fa-user"></i> Profile
                            </a>
                        </li>
                       
                        <li>
                            <a href="support.php" class="nav-item">
                                <i class="fas fa-headset"></i> Support
                            </a>
                        </li>
                        
                        <li>
                            <a href="logout.php" class="nav-item">
                                <i class="fa-solid fa-door-open"></i> Logout
                            </a>
                        </li>
                    </ul>
                </div>

                <!-- Live Market Prices -->
                <div class="px-4 mt-8">
                    <div class="market-ticker">
                        <div class="flex items-center justify-between mb-3">
                            <span class="text-sm font-medium text-gray-300">LIVE MARKETS</span>
                            <span class="text-xs text-green-400 bg-green-400/10 px-2 py-1 rounded-full flex items-center">
                                <span class="w-2 h-2 bg-green-400 rounded-full mr-1 animate-pulse"></span> LIVE
                            </span>
                        </div>
                        <div class="space-y-3">
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="w-8 h-8 bg-yellow-500/20 rounded-lg flex items-center justify-center mr-3">
                                        <i class="fab fa-bitcoin text-yellow-400"></i>
                                    </div>
                                    <div>
                                        <span class="text-sm font-medium">BTC/USD</span>
                                        <div class="text-xs text-gray-400">Bitcoin</div>
                                    </div>
                                </div>
                                <div class="text-right">
                                    <div class="text-sm font-bold">$<?php echo number_format($btc_price, 0); ?></div>
                                    <div class="text-xs <?php echo $btc_change >= 0 ? 'text-green-400' : 'text-red-400'; ?>">
                                        <?php echo $btc_change >= 0 ? '+' : ''; ?><?php echo number_format($btc_change, 2); ?>%
                                    </div>
                                </div>
                            </div>
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="w-8 h-8 bg-purple-500/20 rounded-lg flex items-center justify-center mr-3">
                                        <i class="fab fa-ethereum text-purple-400"></i>
                                    </div>
                                    <div>
                                        <span class="text-sm font-medium">ETH/USD</span>
                                        <div class="text-xs text-gray-400">Ethereum</div>
                                    </div>
                                </div>
                                <div class="text-right">
                                    <div class="text-sm font-bold">$<?php echo number_format($eth_price, 0); ?></div>
                                    <div class="text-xs <?php echo $eth_change >= 0 ? 'text-green-400' : 'text-red-400'; ?>">
                                        <?php echo $eth_change >= 0 ? '+' : ''; ?><?php echo number_format($eth_change, 2); ?>%
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- User Profile -->
            <div class="p-4 border-t border-gray-800/50">
                <div class="flex items-center">
                    <div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center shadow-lg">
                        <span class="font-bold text-lg"><?php echo strtoupper(substr($user['username'] ?? 'U', 0, 1)); ?></span>
                    </div>
                    <div class="ml-3 flex-1 min-w-0">
                        <p class="font-medium truncate"><?php echo htmlspecialchars($user['username'] ?? 'User'); ?></p>
                        <div class="flex items-center gap-2 mt-1">
                            <span class="tier-badge text-xs">
                                <i class="fas fa-crown mr-1"></i> <?php echo $tier_name; ?>
                            </span>
                            <span class="status-badge text-xs">
                                <i class="fas fa-circle mr-1"></i> Active
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Smartsupp Live Chat script -->
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = '41595e0497a6ea8a252180f285a5256d8deaedcb';
window.smartsupp||(function(d) {
  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
  s=d.getElementsByTagName('script')[0];c=d.createElement('script');
  c.type='text/javascript';c.charset='utf-8';c.async=true;
  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script>
<noscript>Powered by <a href="https://www.smartsupp.com" target="_blank">Smartsupp</a></noscript>

        