<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{TITLE}}</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
            padding: 2rem;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 2rem;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        header {
            border-bottom: 2px solid #3498db;
            padding-bottom: 1rem;
            margin-bottom: 2rem;
        }

        h1 {
            color: #2c3e50;
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .meta {
            color: #7f8c8d;
            font-size: 0.9rem;
        }

        .stats {
            display: flex;
            gap: 2rem;
            margin: 1rem 0;
            padding: 1rem;
            background: #ecf0f1;
            border-radius: 4px;
        }

        .stat {
            flex: 1;
        }

        .stat-label {
            font-size: 0.8rem;
            color: #7f8c8d;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: #2c3e50;
        }

        .category {
            margin: 2rem 0;
            padding: 1.5rem;
            background: #fff;
            border-left: 4px solid #3498db;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .category h2 {
            color: #2c3e50;
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        .category-description {
            color: #7f8c8d;
            margin-bottom: 0.5rem;
            font-style: italic;
        }

        .category-stats {
            color: #95a5a6;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }

        .concept-list {
            list-style: none;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 0.5rem;
        }

        .concept-item {
            padding: 0.5rem;
            background: #f8f9fa;
            border-radius: 4px;
            transition: background 0.2s;
        }

        .concept-item:hover {
            background: #e9ecef;
        }

        .concept-name {
            font-weight: 500;
            color: #2c3e50;
        }

        .concept-frequency {
            color: #95a5a6;
            font-size: 0.85rem;
        }

        footer {
            margin-top: 3rem;
            padding-top: 1rem;
            border-top: 1px solid #dee2e6;
            text-align: center;
            color: #7f8c8d;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>📚 Codebase Wiki</h1>
            <p class="meta">Generated: {{GENERATED_AT}}</p>
        </header>

        <div class="stats">
            <div class="stat">
                <div class="stat-label">Total Concepts</div>
                <div class="stat-value">{{TOTAL_CONCEPTS}}</div>
            </div>
            <div class="stat">
                <div class="stat-label">Total Chunks</div>
                <div class="stat-value">{{TOTAL_CHUNKS}}</div>
            </div>
        </div>

        <main>
            {{CATEGORIES}}
        </main>

        <footer>
            <p>Generated by mcp-vector-search wiki</p>
        </footer>
    </div>
</body>
</html>
