{% extends "base.html" %}

{% block content %}
<div class="min-h-screen flex flex-col bg-gray-50">
    <!-- Navigation Bar -->
    <nav class="bg-white border-b border-gray-200 sticky top-0 z-50" x-data="{ mobileMenuOpen: false }">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <!-- Logo -->
                <div class="flex items-center gap-3">
                    <div class="w-8 h-8 rounded-lg bg-[#0770E3] flex items-center justify-center">
                        <span class="text-white font-bold text-lg">CS</span>
                    </div>
                    <span class="text-xl font-bold text-gray-900">ClaudeSavvy</span>
                </div>

                <!-- Desktop Navigation Links -->
                <div class="hidden md:flex gap-1">
                    <a href="/" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Dashboard
                    </a>
                    <a href="/tokens" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Tokens
                    </a>
                    <a href="/projects" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Projects
                    </a>
                    <a href="/files" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Files
                    </a>
                    <a href="/integrations" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Integrations
                    </a>
                    <a href="/features" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Features
                    </a>
                    <a href="/configuration" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Configuration
                    </a>
                    <a href="/settings" class="px-3 py-2 rounded-md text-sm font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100 transition-colors">
                        Settings
                    </a>
                </div>

                <!-- Mobile menu button -->
                <button @click="mobileMenuOpen = !mobileMenuOpen" class="md:hidden p-2 rounded-md text-gray-700 hover:bg-gray-100">
                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                    </svg>
                </button>
            </div>

            <!-- Mobile Navigation Menu -->
            <div x-show="mobileMenuOpen" class="md:hidden pb-4 space-y-1" x-transition>
                <a href="/" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Dashboard
                </a>
                <a href="/tokens" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Tokens
                </a>
                <a href="/projects" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Projects
                </a>
                <a href="/files" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Files
                </a>
                <a href="/integrations" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Integrations
                </a>
                <a href="/features" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Features
                </a>
                <a href="/configuration" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Configuration
                </a>
                <a href="/settings" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-[#0770E3] hover:bg-gray-100">
                    Settings
                </a>
            </div>
        </div>
    </nav>

    <!-- Main Content Area -->
    <main class="flex-1">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
            {% block main_content %}{% endblock %}
        </div>
    </main>

    <!-- Footer -->
    <footer class="bg-white border-t border-gray-200 mt-auto">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
            <div class="flex flex-col md:flex-row justify-between items-center gap-4">
                <!-- Left side: Brand and description -->
                <div class="flex items-center gap-3">
                    <div class="w-6 h-6 rounded bg-[#0770E3] flex items-center justify-center">
                        <span class="text-white font-bold text-sm">CS</span>
                    </div>
                    <div>
                        <span class="font-bold text-gray-900">ClaudeSavvy</span>
                        <p class="text-xs text-gray-500">Open-source usage tracking for Claude Code</p>
                    </div>
                </div>

                <!-- Right side: Links -->
                <div class="flex items-center gap-6 text-sm">
                    <a href="https://github.com/allannapier/claudesavvy" target="_blank" class="text-gray-600 hover:text-[#0770E3] flex items-center gap-1">
                        <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
                            <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
                        </svg>
                        GitHub
                    </a>
                    <span class="text-gray-300">|</span>
                    <a href="https://github.com/anthropics/claude-code" target="_blank" class="text-gray-600 hover:text-[#0770E3]">
                        Claude Code
                    </a>
                    <span class="text-gray-300">|</span>
                    <a href="https://claude.ai" target="_blank" class="text-gray-600 hover:text-[#0770E3]">
                        Claude.ai
                    </a>
                    <span class="text-gray-300">|</span>
                    <span class="text-gray-500">MIT License</span>
                </div>
            </div>
        </div>
    </footer>
</div>
{% endblock %}
