import re

with open('src/app/page.tsx', 'r') as f:
    content = f.read()

# Instagram (starts with M12 2.163c)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<svg (.*?)<path d="M12 2\.163c', 
    r'<a href="https://instagram.com"\1<svg \2<path d="M12 2.163c', 
    content
)

# Facebook (starts with M24 12.073c)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<svg (.*?)<path d="M24 12\.073c', 
    r'<a href="https://facebook.com"\1<svg \2<path d="M24 12.073c', 
    content
)

# X (contains <span ...>X</span>)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<span(.*?)>X</span>', 
    r'<a href="https://x.com"\1<span\2>X</span>', 
    content
)

# LinkedIn (starts with M20.447 20.452h)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<svg (.*?)<path d="M20\.447 20\.452h', 
    r'<a href="https://linkedin.com"\1<svg \2<path d="M20.447 20.452h', 
    content
)

# Pinterest (starts with M12.017 0C5)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<svg (.*?)<path d="M12\.017 0C5', 
    r'<a href="https://pinterest.com"\1<svg \2<path d="M12.017 0C5', 
    content
)

# YouTube (starts with M23.498 6.186a)
content = re.sub(
    r'<a href="https://instagram.com"(.*?)<svg (.*?)<path d="M23\.498 6\.186a', 
    r'<a href="https://youtube.com"\1<svg \2<path d="M23.498 6.186a', 
    content
)

with open('src/app/page.tsx', 'w') as f:
    f.write(content)

