<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{{ project_name }}{% endblock %}</title>
    {% if project_description %}<meta name="description" content="{{ project_description }}">{% endif %}
    
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lexend:wght@400;600;700&display=swap" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
    
    <style>
        :root {
            --bg-dark: #0a0b0d;
            --card-bg: #1e2126;
            --accent-green: #00ffad;
            --accent-red: #ff4d4d;
            --text-main: #ffffff;
            --text-muted: #94a3b8;
            --border-color: #2d333b;
        }
        
        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
        }
        
        h1, h2, h3, h4, .navbar-brand {
            font-family: 'Lexend', sans-serif;
        }

        .navbar {
            background-color: rgba(10, 11, 13, 0.8);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border-color);
            padding: 1rem 2rem;
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--accent-green) !important;
        }

        .nav-link {
            color: var(--text-muted) !important;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-link:hover, .nav-link.active {
            color: var(--text-main) !important;
        }

        .btn-primary-custom {
            background-color: var(--accent-green);
            color: var(--bg-dark);
            font-weight: 600;
            border: none;
            padding: 0.5rem 1.5rem;
            border-radius: 8px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn-primary-custom:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 255, 173, 0.3);
            background-color: #00e69b;
            color: var(--bg-dark);
        }
    </style>
    {% block head %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg sticky-top">
        <div class="container-fluid">
            <a class="navbar-brand" href="{% url 'home' %}">
                <i class="fa-solid fa-chart-line me-2"></i>MP TRADE TRACKER
            </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 'home' %}">Dashboard</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'mp_list' %}">MPs</a></li>
                    <li class="nav-item"><a class="nav-link" href="#">Tickers</a></li>
                    <li class="nav-item"><a class="nav-link" href="/admin/">Admin</a></li>
                </ul>
                <div class="d-flex align-items-center">
                    {% if user.is_authenticated %}
                        <span class="text-muted me-3">Hello, {{ user.username }}</span>
                        <form action="{% url 'logout' %}" method="post" class="d-inline">
                            {% csrf_token %}
                            <button type="submit" class="btn btn-outline-light btn-sm me-2">Logout</button>
                        </form>
                    {% else %}
                        <a href="{% url 'login' %}" class="nav-link me-3">Login</a>
                        <a href="#" class="btn btn-primary-custom">Get Started</a>
                    {% endif %}
                </div>
            </div>
        </div>
    </nav>

    <main>
        {% block content %}{% endblock %}
    </main>

    <footer class="py-4 mt-5 border-top border-secondary">
        <div class="container text-center">
            <p class="text-muted small mb-0">&copy; 2024 Canada MP Trade Tracker. For reconnaissance purposes only.</p>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>