{% load static %}
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
    <div class="container">
        <a class="navbar-brand d-flex align-items-center" href="{% url 'home' %}">
            <i class="bi bi-currency-bitcoin me-2"></i>
            <span>CryptoSignals</span><span style="color: var(--accent-cyan);">Pro</span>
        </a>
        
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>
        
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav me-auto">
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'coins' %}">
                        <i class="bi bi-graph-up-arrow me-1"></i> Markets
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'signals' %}">
                        <i class="bi bi-lightning-charge-fill me-1"></i> Signals
                    </a>
                </li>
                
                {% if user.is_authenticated %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'dashboard' %}">
                        <i class="bi bi-speedometer2 me-1"></i> Dashboard
                    </a>
                </li>
                {% endif %}
            </ul>
            
            <ul class="navbar-nav">
                {% if user.is_authenticated %}
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle d-flex align-items-center" href="#" role="button" data-bs-toggle="dropdown">
                        <div class="avatar me-2">
                            <i class="bi bi-person-circle" style="font-size: 1.25rem;"></i>
                        </div>
                        {{ user.username }}
                    </a>
                    <ul class="dropdown-menu dropdown-menu-end">
                        <li><a class="dropdown-item" href="{% url 'profile' %}">
                            <i class="bi bi-person me-2"></i> My Profile
                        </a></li>
                        <li><a class="dropdown-item" href="{% url 'wallet_overview' %}">
                            <i class="bi bi-wallet2 me-2"></i> Wallet
                        </a></li>
                        <li><a class="dropdown-item" href="{% url 'referral_dashboard' %}">
                            <i class="bi bi-people me-2"></i> Referrals
                        </a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item" href="{% url 'logout' %}">
                            <i class="bi bi-box-arrow-right me-2"></i> Logout
                        </a></li>
                    </ul>
                </li>
                {% else %}
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'login' %}">
                        <i class="bi bi-box-arrow-in-right me-1"></i> Login
                    </a>
                </li>
                <li class="nav-item">
                    <a class="btn btn-primary btn-sm ms-2" href="{% url 'signup' %}">
                        Sign Up
                    </a>
                </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
