<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Defilenders</title>

    <meta name="description" content="Defilenders">

    <link rel="shortcut icon" type="image/x-icon" href="<?= base_url(); ?>website/img/favicon.png">
    <link rel="stylesheet" href="<?= base_url() ?>website/css/style.css">
    <link rel="stylesheet" href="<?= base_url() ?>website/css/header.css">



</head>
<?php
// Current URL nikalne ke liye
$current_url = $_SERVER['REQUEST_URI'];
?>


<body>

    <!-- Navbar -->

    <nav class="navbar" id="navbar">

        <div class="container">

            <div class="navbar-content">

                <?php if ($this->session->userdata('user')) { ?>

                    <a href="<?= base_url() ?>main_wallet" class="logo">

                    <?php } else { ?>

                        <a href="<?= base_url() ?>" class="logo">

                        <?php } ?>

                        <img src="<?= base_url() ?>website/img/logo/logo.png" width="40" alt="logo">

                        <!-- <span class="logo-text">Defilenders</span> -->

                        </a>



                        <ul class="nav-links mobile-drawer" id="mobile_nav">
                            <div class="drawer-header">
                                <img src="<?= base_url() ?>website/img/logo/logo.png" width="40" alt="logo">
                                <!-- <span class="logo-text">Defilenders</span> -->
                                <div class="close-nav-wrapper">
                                    <button class="arrow-only-btn" onclick="toggleMobileMenu()">
                                        <div class="arrow-icon-box">
                                            <span class="css-arrow"></span>
                                        </div>
                                    </button>
                                </div>
                            </div>
                            <?php if (!$this->session->userdata('user')) { ?>
                                <li class="mt-100"><a href="<?= base_url() ?>">Home</a></li>
                            <?php } ?>


                            <?php if ($this->session->userdata('user')) { ?>
                                <li><a class="<?= (strpos($current_url, 'main_wallet') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>main_wallet">Main Wallet</a></li>
                                <li><a class="<?= (strpos($current_url, 'deposit') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>deposit">Deposit</a></li>
                                <li><a class="<?= (strpos($current_url, 'withdrawal') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>withdrawal">Withdrawal</a></li>

                                <li class="desktop-only custom-dropdown">
                                    <a href="javascript:void(0)">Settings ▼</a>
                                    <ul class="dropdown-menu" style="padding: 0px 10px;">
                                        <li style="list-style: none !important"><a href="<?= base_url() ?>profile">Profile</a></li>
                                        <li style="list-style: none !important"><a href="<?= base_url() ?>enable_2fa">2FA Security</a></li>
                                        <li style="list-style: none !important"><a href="<?= base_url() ?>change_password">Change Password</a></li>
                                    </ul>
                                </li>

                                <li class="mobile-only"><a class="<?= (strpos($current_url, 'profile') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>profile">Profile</a></li>
                                <li class="mobile-only"><a class="<?= (strpos($current_url, 'enable_2fa') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>enable_2fa">2FA Security</a></li>
                                <li class="mobile-only"><a class="<?= (strpos($current_url, 'change_password') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>change_password">Change Password</a></li>
                                <li><a class="<?= (strpos($current_url, 'support') !== false) ? 'active-link' : ''; ?>" href="<?= base_url() ?>support">Support</a></li>
                                <li><a href="<?= base_url() ?>logout">Logout</a></li>

                            <?php } else { ?>
                                <li><a href="<?= base_url() ?>login">Sign In</a></li>
                                <a href="<?= base_url() ?>register" class="btnm1 btn btn-primary">Start Earning</a>
                            <?php } ?>
                        </ul>

                        <?php if (!$this->session->userdata('user')) { ?>

                            <a href="<?= base_url() ?>register" class="btnm2 btn btn-primary">Start Earning</a>

                        <?php } ?>
                        <button class="bento-menu-btn" onclick="toggleMobileMenu()">
                            <div class="dot"></div>
                            <div class="dot"></div>
                            <div class="dot"></div>
                            <div class="dot"></div>
                        </button>



            </div>

        </div>

    </nav>