{% 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 %}CGI Studio{% endblock %}</title>
    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@300;500;700;900&family=Syncopate:wght@400;700&display=swap" rel="stylesheet">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={% now 'U' %}">
    <style>
        :root {
            --electric-cyan: #00e5ff;
            --neon-purple: #7000ff;
            --bg-deep: #0a0a0c;
        }
        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-deep);
            color: #f8f9fa;
        }
        h1, h2, h3, h4, .font-syncopate {
            font-family: 'Syncopate', sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
        }
        .outfit { font-family: 'Outfit', sans-serif; }
        
        .studio-navbar {
            background: rgba(10, 10, 12, 0.8) !important;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(0, 229, 255, 0.1);
        }
        .text-cyan { color: var(--electric-cyan) !important; }
        .text-purple { color: var(--neon-purple) !important; }
        .bg-purple { background-color: var(--neon-purple) !important; }
        .glass-effect {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        .shadow-neon {
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
        }
        .text-gradient-neon {
            background: linear-gradient(45deg, var(--electric-cyan), var(--neon-purple));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .btn-neon-purple {
            background: var(--neon-purple);
            color: white;
            border: none;
            box-shadow: 0 0 15px rgba(112, 0, 255, 0.3);
            transition: all 0.3s ease;
        }
        .btn-neon-purple:hover {
            background: #8221ff;
            color: white;
            box-shadow: 0 0 25px rgba(112, 0, 255, 0.5);
            transform: scale(1.05);
        }
        .btn-outline-cyan {
            border: 2px solid var(--electric-cyan);
            color: var(--electric-cyan);
            background: transparent;
            transition: all 0.3s ease;
        }
        .btn-outline-cyan:hover {
            background: var(--electric-cyan);
            color: var(--bg-deep);
            box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
        }
        .glass-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 1.5rem;
        }
    </style>
    {% block extra_head %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark studio-navbar sticky-top">
        <div class="container">
            <a class="navbar-brand font-syncopate fw-bold" href="{% url 'home' %}">
                <span class="text-cyan">CGI</span> STUDIO
            </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 ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'home' %}">Command Center</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'asset_library' %}">Assets</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'production_library' %}">Biblioteca AI</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link fw-bold text-cyan" href="{% url 'studio_ai' %}"><i class="bi bi-cpu-fill"></i> Studio AI</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <main>
        {% if messages %}
        <div class="container mt-3">
            {% for message in messages %}
            <div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %} bg-dark border-{{ message.tags }} text-white shadow-neon">
                {{ message }}
            </div>
            {% endfor %}
        </div>
        {% endif %}
        {% block content %}{% endblock %}
    </main>

    <footer class="py-5 mt-5 border-top border-secondary border-opacity-10">
        <div class="container text-center">
            <p class="text-muted small">© 2026 CGI Virtual Studio. Powered by AI Technology.</p>
        </div>
    </footer>

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