<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title }} - 解密机管理工具</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <header>
        <div class="header-container">
            <h1>解密机管理工具</h1>
            <div class="header-right">
                <span>{{ datetime.now().strftime('%Y-%m-%d %H:%M') }}</span>
                <span>{{ session.username if 'username' in session else '访客' }}</span>
                <a href="{{ url_for('logout') }}" class="logout-btn">注销</a>
            </div>
        </div>
        <nav>
            <a href="{{ url_for('index') }}" class="home-link">返回主页</a>
        </nav>
    </header>

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

    <footer>
        <p>2025解密机管理工具 | 版本{{ app_version }}</p>
    </footer>

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