import re css_path = r"d:\portfolio engine\engine\static\style.css" with open(css_path, "r", encoding="utf-8") as f: css = f.read() if ".modern-input" not in css: css += """ .modern-input { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); color: #f8fafc; font-family: 'Inter', sans-serif; transition: border-color 0.2s, box-shadow 0.2s; } .modern-input::placeholder { color: #64748b; } .modern-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); } """ with open(css_path, "w", encoding="utf-8") as f: f.write(css) print("Added .modern-input to CSS") opt_path = r"d:\portfolio engine\engine\static\options.html" with open(opt_path, "r", encoding="utf-8") as f: opt_html = f.read() old_btn = 'onclick="event.stopPropagation(); openAddOptionModal();"' new_btn = 'onclick="event.stopPropagation(); const m=document.getElementById(\'addOptionModal\'); if(m) m.style.display=\'flex\';"' opt_html = opt_html.replace(old_btn, new_btn) opt_html = opt_html.replace('onclick="openAddOptionModal();"', 'onclick="const m=document.getElementById(\'addOptionModal\'); if(m) m.style.display=\'flex\';"') with open(opt_path, "w", encoding="utf-8") as f: f.write(opt_html) print("Patched options.html button")