import glob
import re

def make_internal_headers_solid():
    html_files = glob.glob('*.html')
    
    for file_path in html_files:
        if file_path == 'index.html':
            continue
            
        with open(file_path, 'r', encoding='utf-8') as f:
            content = f.read()
            
        # Check if we already added it
        if '/* Internal page solid header override */' not in content:
            # We can insert a style block right before </head>
            style_override = """
    <style>
        /* Internal page solid header override */
        .fs-header {
            background: #0c1727 !important;
        }
    </style>
</head>"""
            
            new_content = content.replace('</head>', style_override)
            
            if new_content != content:
                with open(file_path, 'w', encoding='utf-8') as f:
                    f.write(new_content)
                print(f"Added solid header override to {file_path}")

if __name__ == '__main__':
    make_internal_headers_solid()
