import re

with open('index.html', 'r', encoding='utf-8') as f:
    content = f.read()

# Fix the video button
old_button = r'<a href="https://youtube\.com"[^>]*>.*?</a>'
new_button = '''<a href="https://youtube.com" target="_blank" style="position: absolute; inset: 0; background: transparent; display: flex; align-items: center; justify-content: center; text-decoration: none; z-index: 2; transition: background 0.3s;">
                                <div style="width: 50px; height: 35px; background: #FF0000; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 12px rgba(255,0,0,0.4); transition: transform 0.3s;">
                                    <div style="width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 14px solid white; margin-left: 4px;"></div>
                                </div>
                            </a>'''

content = re.sub(old_button, new_button, content, flags=re.DOTALL)

with open('index.html', 'w', encoding='utf-8') as f:
    f.write(content)

print("Updated index.html video button")
