{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}LIVE VERSE | Universal Cosmic Platform{% endblock %}</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp|default:'1.2' }}">
    {% block extra_css %}{% endblock %}
</head>
<body>
    <!-- Top Navbar -->
    <nav class="navbar navbar-expand-lg">
        <div class="container-fluid">
            <a class="navbar-brand" href="{% url 'index' %}">
                <i class="fas fa-meteor"></i>
                <span>LIVE VERSE</span>
            </a>
            
            <button class="navbar-toggler text-white border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent">
                <i class="fas fa-bars"></i>
            </button>

            <div class="collapse navbar-collapse" id="navbarContent">
                <div class="search-bar-container mx-auto">
                    <form action="{% url 'index' %}" method="GET">
                        <input type="text" name="q" class="search-bar" placeholder="Explore the universe of content...">
                    </form>
                </div>

                <div class="d-flex align-items-center gap-3 mt-3 mt-lg-0">
                    <a href="{% url 'upload_video' %}" class="upload-btn text-decoration-none">
                        <i class="fas fa-plus"></i> Create
                    </a>
                    <a href="#" class="text-white fs-5"><i class="far fa-bell"></i></a>
                    <a href="/admin/" class="btn btn-outline-danger btn-sm rounded-pill px-3">
                        <i class="fas fa-user-shield me-1"></i> Admin
                    </a>
                </div>
            </div>
        </div>
    </nav>

    <!-- Sidebar Navigation -->
    <aside class="sidebar">
        <a href="{% url 'index' %}" class="sidebar-item {% if request.resolver_match.url_name == 'index' %}active{% endif %}">
            <i class="fas fa-home"></i> Explore
        </a>
        <a href="{% url 'shorts_list' %}" class="sidebar-item {% if request.resolver_match.url_name == 'shorts_list' %}active{% endif %}">
            <i class="fas fa-bolt"></i> Shorts
        </a>
        <a href="#" class="sidebar-item">
            <i class="fas fa-satellite-dish"></i> Live Streams
        </a>
        <a href="#" class="sidebar-item">
            <i class="fas fa-users"></i> Communities
        </a>
        
        <hr class="mx-3 opacity-10">
        
        <div class="px-4 mb-2 small text-muted text-uppercase tracking-wider">Creator Center</div>
        <a href="{% url 'live_studio' %}" class="sidebar-item {% if request.resolver_match.url_name == 'live_studio' %}active{% endif %}">
            <i class="fas fa-vr-cardboard"></i> Live Studio
        </a>
        <a href="#" class="sidebar-item">
            <i class="fas fa-chart-line"></i> Analytics
        </a>
        <a href="{% url 'upload_video' %}" class="sidebar-item {% if request.resolver_match.url_name == 'upload_video' %}active{% endif %}">
            <i class="fas fa-upload"></i> Upload Vault
        </a>

        <hr class="mx-3 opacity-10">
        
        <div class="px-4 mb-2 small text-muted text-uppercase tracking-wider">Your Galaxy</div>
        <a href="#" class="sidebar-item">
            <i class="fas fa-history"></i> History
        </a>
        <a href="#" class="sidebar-item">
            <i class="fas fa-bookmark"></i> Library
        </a>
        <a href="#" class="sidebar-item">
            <i class="fas fa-heart"></i> Liked Videos
        </a>
    </aside>

    <!-- Main Content -->
    <main class="main-wrapper">
        {% block content %}{% endblock %}
    </main>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block extra_js %}{% endblock %}
</body>
</html>