<!DOCTYPE html>
<html lang="ro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}INDEX Sistem Jocuri{% endblock %}</title>
    <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
    {% block head %}{% endblock %}
</head>
<body>
    <header class="header">
        <div class="container">
            <h1 class="header-title">
                <a href="{{ url_for('main.index') }}">INDEX Sistem Jocuri</a>
            </h1>
            <nav class="header-nav">
                <a href="{{ url_for('main.index') }}" class="nav-link">Căutare</a>
                <a href="{{ url_for('main.api_statistics') }}" class="nav-link">Statistici</a>
            </nav>
        </div>
    </header>

    <main class="main">
        <div class="container">
            {% block content %}{% endblock %}
        </div>
    </main>

    <footer class="footer">
        <div class="container">
            <p class="footer-text">
                {% if stats and stats.total_activities %}
                    {{ stats.total_activities }} activități indexate
                {% else %}
                    Sistem de indexare activități educaționale
                {% endif %}
            </p>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
    {% block scripts %}{% endblock %}
</body>
</html>