$content = Get-Content 'index.html' -Raw -Encoding UTF8
# Replace broken emoji placeholders with proper Unicode emojis
# Line 171 - Profile icon
$content = $content -replace '\?\?\s*Profile', '๐คProfile'
# Line 175 - Guide icon
$content = $content -replace '\?\?\s*Guide', '๐Guide'
# Line 179 - Options icon
$content = $content -replace '\?\?\s*Options', 'โ๏ธOptions'
# Line 198-210 - Feature icons
$content = $content -replace '\?\?\s*Advanced Training', '๐ฏAdvanced Training'
$content = $content -replace '\?\?\s*Quick Sessions', 'โกQuick Sessions'
$content = $content -replace '\?\?\s*Cinema Mode', '๐ฌCinema Mode'
$content = $content -replace '\?\?\s*Hypno Gallery', '๐Hypno Gallery'
# Music controls
$content = $content -replace 'title="Music Controls">\?\?', 'title="Music Controls">๐ต'
$content = $content -replace 'title="Play/Pause">\?\?', 'title="Play/Pause">โฏ๏ธ'
$content = $content -replace 'title="Loop">\?\?', 'title="Loop">๐'
$content = $content -replace 'title="Shuffle">\?\?', 'title="Shuffle">๐'
$content = $content -replace '\?\?', '๐'
# Image library icons
$content = $content -replace '\?\?\? Image Library Management
', '๐ผ๏ธ Image Library Management
'
$content = $content -replace '\?\? Import Image Files
', '๐ Import Image Files
'
$content = $content -replace '>\?\? Task Images', '>๐ธ Task Images'
$content = $content -replace '>\?\? Consequence Images', '>โ ๏ธ Consequence Images'
$content = $content -replace '\?\? Desktop:', '๐ป Desktop:'
$content = $content -replace '\?\? Web:', '๐ Web:'
$content = $content -replace '>\?\? Storage Info', '>๐พ Storage Info'
$content = $content -replace '>\?\? Cleanup', '>๐งน Cleanup'
$content = $content -replace '>\?\?\? Clear All', '>๐๏ธ Clear All'
$content = $content -replace '\?\? Auto-scan', '๐ Auto-scan'
$content = $content -replace '\?\?\? Current Image Library
', '๐ Current Image Library
'
$content = $content -replace '>\?\? Refresh', '>๐ Refresh'
$content = $content -replace '\?\?\? Image Preview
', '๐๏ธ Image Preview
'
# Audio library icons
$content = $content -replace '\?\? Audio Library Management
', '๐ต Audio Library Management
'
$content = $content -replace '\?\? Import Audio Files
', '๐ Import Audio Files
'
$content = $content -replace '>\?\? Background Music', '>๐ถ Background Music'
$content = $content -replace '>\?\? Ambient Sounds', '>๐ Ambient Sounds'
$content = $content -replace '>\?\? Scan Directories', '>๐ Scan Directories'
$content = $content -replace '\?\? Current Audio Library
', '๐ต Current Audio Library
'
$content = $content -replace '\?\? Audio Preview
', '๐ Audio Preview
'
# Video library icons
$content = $content -replace '\?\? Video Library Management
', '๐ฅ Video Library Management
'
$content = $content -replace '\?\? Video Library Management
', '๐ฌ Video Library Management
'
$content = $content -replace '>\?\? Refresh All', '>๐ Refresh All'
$content = $content -replace '>\?\? Clear All', '>๐๏ธ Clear All'
$content = $content -replace '\?\? Video Library
', '๐น Video Library
'
$content = $content -replace '\?\? Video Preview
', '๐๏ธ Video Preview
'
# Console log emojis (keeping existing format)
$content = $content -replace "console\.log\('\?\?", "console.log('๐ง"
$content = $content -replace "console\.log\(`\?\?", "console.log\`๐ง"
$content = $content -replace "console\.warn\('\?\?", "console.warn('โ ๏ธ"
$content = $content -replace "console\.error\('\?\?", "console.error('โ"
$content = $content -replace "console\.error\('\?", "console.error('โ"
$content | Set-Content 'index.html' -Encoding UTF8 -NoNewline
Write-Host "Emoji fix complete!"