<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Document Viewer{% endblock %}</title>
    
    <!-- xterm.js CSS for FEATURE-005 Interactive Console -->
    <link href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css" rel="stylesheet">
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
    <!-- Highlight.js Theme -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css" rel="stylesheet">
    <!-- EasyMDE Markdown Editor CSS -->
    <link href="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.css" rel="stylesheet">
    <!-- CodeMirror CSS -->
    <link href="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/lib/codemirror.min.css" rel="stylesheet">
    <!-- CodeMirror Search Dialog CSS -->
    <link href="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/dialog/dialog.min.css" rel="stylesheet">
    
    <!-- Application CSS (modular) -->
    <link href="/static/css/base.css" rel="stylesheet">
    <link href="/static/css/sidebar.css" rel="stylesheet">
    <link href="/static/css/editor.css" rel="stylesheet">
    <link href="/static/css/workplace.css" rel="stylesheet">
    <link href="/static/css/terminal.css" rel="stylesheet">
    <!-- FEATURE-011: Stage Toolbox -->
    <link href="/static/css/features/stage-toolbox.css" rel="stylesheet">
    
    {% block extra_css %}{% endblock %}
</head>
<body>
    {% block body %}{% endblock %}
    
    <!-- Bootstrap 5 JS Bundle -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <!-- Marked.js for Markdown parsing -->
    <script src="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js"></script>
    <!-- Highlight.js for syntax highlighting -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
    <!-- CodeMirror core (must load before addons) -->
    <script src="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/lib/codemirror.min.js"></script>
    <!-- CodeMirror Search Add-ons -->
    <script src="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/dialog/dialog.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/search/searchcursor.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/search/search.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/search/jump-to-line.min.js"></script>
    <!-- EasyMDE Markdown Editor JS (uses CodeMirror loaded above) -->
    <script src="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.js"></script>
    <!-- Mermaid.js for diagrams -->
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <!-- AntV Infographic for infographic DSL diagrams -->
    <script src="https://cdn.jsdelivr.net/npm/@antv/infographic@0.2.12/dist/infographic.min.js"></script>
    <!-- Socket.IO for WebSocket communication -->
    <script src="https://cdn.jsdelivr.net/npm/socket.io-client@4/dist/socket.io.min.js"></script>
    <!-- xterm.js for FEATURE-005 Interactive Console -->
    <script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/xterm-addon-unicode11@0.6.0/lib/xterm-addon-unicode11.js"></script>
    <!-- FEATURE-005: Terminal Manager v2 -->
    <script src="/static/js/terminal-v2.js"></script>
    
    <!-- Architecture DSL Library -->
    <script src="/static/js/lib/architecture-dsl/bundle.js"></script>
    
    <!-- Application JS (modular) -->
    <script src="/static/js/core/content-renderer.js"></script>
    <script src="/static/js/features/content-editor.js"></script>
    <script src="/static/js/features/live-refresh.js"></script>
    <script src="/static/js/features/project-switcher.js"></script>
    <script src="/static/js/features/sidebar.js"></script>
    <script src="/static/js/features/workplace.js"></script>
    <!-- FEATURE-011: Stage Toolbox -->
    <script src="/static/js/features/stage-toolbox.js"></script>
    <!-- FEATURE-021: Console Voice Input -->
    <script src="/static/js/features/voice-input.js"></script>
    <script src="/static/js/init.js"></script>
    
    {% block extra_js %}{% endblock %}
</body>
</html>