$cssPath = "site\assets\style.css"
$css = Get-Content $cssPath -Raw

# 1. Add pulse animation for glowing buttons
$glowCss = @"

/* --- PREMIUM UI EFFECTS --- */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(124,47,245, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(124,47,245, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124,47,245, 0); }
}
"@

if ($css -notmatch "@keyframes pulseGlow") {
    $css = $css -replace '(\.btn-primary\{[^\}]+\})', "`$1 animation: pulseGlow 2s infinite;"
    $css += $glowCss
}

# 2. Add glassmorphism to navbar
# The navbar uses .nav-bg
if ($css -notmatch "backdrop-filter: blur") {
    $css = $css -replace '(\.nav-bg\{[^\}]+\})', "`$1 backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.85) !important;"
}

# 3. Add hover micro-interactions to cards
if ($css -notmatch "transform: translateY") {
    $css += @"

.card, .tool-card, .article-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .tool-card:hover, .article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
"@
}

# 4. Google Ads Setup
if ($css -notmatch "\.ad-container") {
    $css += @"

/* --- GOOGLE ADS MONETIZATION --- */
.ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px auto;
  min-height: 90px; /* Anti-CLS */
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ad-container-mobile-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  min-height: 50px;
  display: none; /* Shown via media query */
}
@media (max-width: 768px) {
  .ad-container-mobile-sticky { display: flex; justify-content: center; align-items: center; }
}
"@
}

Set-Content -Path $cssPath -Value $css -Encoding UTF8
Write-Host "CSS updated with UI effects and Ad containers."
