# Batch update Popp ins font for all remaining template files

$files = @(
    "Photo.html",
    "MP3.html",
    "StoriesDownload.html",
    "preview.html",
    "privacy.html",
    "terms.html",
    "contact.html"
)

$templatePath = "c:\Users\LAPTOP MART\Desktop\software done\instastories.info\instastories.info\templates"

foreach ($file in $files) {
    $filePath = Join-Path $templatePath $file
    if (Test-Path $filePath) {
        Write-Host "Processing: $file"
        $content = Get-Content $filePath -Raw
        
        # Add Poppins font import if not present
        if ($content -notmatch "Poppins") {
            $content = $content -replace '(Plus\+Jakarta\+Sans.*?rel="stylesheet">)', '$1' + "`r`n  <link href=`"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap`"`r`n    rel=`"stylesheet`">"
        }
        
       # Update .mode-btn font styling
        $content = $content -replace '(\.mode-btn\s*\{[^}]*?)font-weight:\s*800;', '$1font-family: ''Poppins'', sans-serif;' + "`r`n      font-weight: 300;"
        $content = $content -replace '(\.mode-btn\s*\{[^}]*?font-size:\s*15px;)', '$1' + "`r`n      line-height: 24px;"
        
        Set-Content -Path $filePath -Value $content -NoNewline
        Write-Host "Updated: $file" -ForegroundColor Green
    }
}

Write-Host "`nAll files updated!" -ForegroundColor Cyan
