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

# 1. Ensure .nav never wraps so the logo is always aligned
$css = $css -replace '\.nav\{display:flex;align-items:center;justify-content:space-between;padding:22px 0;\}', '.nav{display:flex;align-items:center;justify-content:space-between;padding:22px 0;flex-wrap:nowrap;}'

# 2. Re-write the mobile menu completely for the "bottom style"
$oldMobileMenu = '(?s)@media \(max-width: 760px\)\{.*?\.blog-slide-card\{flex-basis:240px;\}\s*\}'

$newMobileMenu = @"
@media (max-width: 760px){
  /* Maintain top layout */
  .nav { flex-wrap: nowrap; }
  .nav .btn-ghost { display: none; }
  
  /* Stylish Bottom Floating Action Button (FAB) */
  .nav-toggle {
    display: flex;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    right: 24px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-brand);
    border: none;
    box-shadow: 0 10px 25px rgba(124,47,245, 0.4);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: pulseGlow 2.5s infinite;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    background: #fff;
    width: 22px;
  }

  /* Stylish Glassmorphism Modal Menu */
  .nav-links {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
    left: 24px;
    right: 24px;
    top: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 24px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 999;
    /* Animation setup */
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .nav-links.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  
  /* Menu Items Styling */
  .nav-links a, .nav-links button {
    width: 100%;
    text-align: center;
    padding: 14px 10px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
  }
  .nav-links a:hover, .nav-links button:hover {
    background: rgba(124,47,245, 0.1);
  }

  /* Grid adjustments */
  h1{font-size:38px !important;}
  h2{font-size:28px !important;}
  .tool-grid{grid-template-columns:1fr;}
  .grid-2{grid-template-columns:1fr;}
  .related-articles-grid{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .wrap,.wrap-mid,.wrap-narrow{padding:0 20px;}
  .blog-slide-card{flex-basis:240px;}
}
"@

$css = $css -replace $oldMobileMenu, $newMobileMenu

# Save changes
Set-Content -Path $cssPath -Value $css -Encoding UTF8
Write-Host "Updated responsive bottom menu style."
