/* Refined Scrollbar */
.custom-search-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-search-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-search-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.custom-search-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(34,211,238,0.3); }

/* Animation States */
.gai-search-overlay.active { 
    display: block !important; 
}
.gai-search-overlay.show-bg {
    opacity: 1 !important;
}
.gai-search-dialog.show-dialog {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* Elegant Result Items */
.gai-search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease-out;
}
.gai-search-result-item:hover, .gai-search-result-item.selected {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.2);
}
.gai-search-result-img {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================================================
   LIGHT MODE THEME ENGINE (DESKTOP & MOBILE)
   Activated when <html> has class .gai-light-mode
   ========================================================= */
html:not(.gai-light-mode) {
    color-scheme: dark;
}
html.gai-light-mode {
    color-scheme: light;
    --gai-bg: #f8fafc !important;
    --gai-surface: #ffffff !important;
    --gai-border: #e2e8f0 !important;
    --gai-text: #0f172a !important;
    --gai-text-muted: #475569 !important;
    --gai-primary: #4f46e5 !important;
    --gai-primary-hover: #4338ca !important;
    --db-sidebar-bg: #ffffff !important;
    --db-surface: #ffffff !important;
    --db-border: #e2e8f0 !important;
    --db-text: #0f172a !important;
    --db-muted: #475569 !important;
    --db-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}

html.gai-light-mode,
html.gai-light-mode body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Primary Page, Dashboard & Section Backgrounds */
html.gai-light-mode #primary,
html.gai-light-mode .site-main,
html.gai-light-mode main[style*="background"],
html.gai-light-mode .bg-obsidian,
html.gai-light-mode [class*="bg-[#030712]"],
html.gai-light-mode [class*="bg-[#020617]"],
html.gai-light-mode [class*="bg-[#0A1128]"],
html.gai-light-mode [class*="bg-[#090d16]"],
html.gai-light-mode [class*="bg-[#050914]"],
html.gai-light-mode .goa-community-wrapper,
html.gai-light-mode .goa-single-wrapper,
html.gai-light-mode .mp-wrapper,
html.gai-light-mode .db-wrapper,
html.gai-light-mode .gai-layout,
html.gai-light-mode .gai-main,
html.gai-light-mode .academy-archive-wrapper,
html.gai-light-mode .archive-hero,
html.gai-light-mode .mp-hero,
html.gai-light-mode .goa-community-hero,
html.gai-light-mode .spa-hero {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Sticky Header, Mobile Header & Sidebars in Light Mode */
html.gai-light-mode #masthead.site-header,
html.gai-light-mode header#masthead,
html.gai-light-mode .gai-mobile-header {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}
html.gai-light-mode #masthead #primary-menu a,
html.gai-light-mode #masthead #site-navigation a,
html.gai-light-mode #masthead .gai-dd-parent-toggle,
html.gai-light-mode #masthead .site-branding a {
    color: #0f172a !important;
}
html.gai-light-mode #masthead #primary-menu a:hover,
html.gai-light-mode #masthead #site-navigation a:hover,
html.gai-light-mode #masthead .gai-dd-parent-toggle:hover {
    color: #0284c7 !important;
}
html.gai-light-mode #masthead .gai-dd-arrow {
    stroke: #64748b !important;
}
html.gai-light-mode #masthead a[href*="lang=ar"],
html.gai-light-mode #masthead a[href*="lang=en"],
html.gai-light-mode #masthead a[href*="gateofai.com/?lang="],
html.gai-light-mode #masthead a[class*="text-slate-300"] {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}
html.gai-light-mode #masthead a[href*="lang=ar"]:hover,
html.gai-light-mode #masthead a[href*="lang=en"]:hover {
    background-color: #e2e8f0 !important;
    color: #0284c7 !important;
}
html.gai-light-mode .gai-mobile-header span[style*="color: #fff"],
html.gai-light-mode .gai-mobile-header span[style*="color:#fff"],
html.gai-light-mode .gai-mobile-header a span {
    color: #0f172a !important;
}
html.gai-light-mode #mobile-menu-backdrop {
    background: rgba(15, 23, 42, 0.8) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    opacity: 1 !important;
}
html.gai-light-mode #mobile-menu-panel,
html.gai-light-mode .gai-sidebar,
html.gai-light-mode #gaiDashboardSidebar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    box-shadow: -15px 0 40px rgba(15, 23, 42, 0.15) !important;
}
html.gai-light-mode #mobile-menu-panel a,
html.gai-light-mode #mobile-menu-panel button:not(.gai-btn-indigo-glow),
html.gai-light-mode #close-menu {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Dashboard Sidebar Navigation Items, Groups & Details */
html.gai-light-mode .gai-sidebar .gai-sidebar-group-header {
    color: #475569 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
html.gai-light-mode .gai-sidebar .gai-sidebar-group-header:hover {
    color: #0f172a !important;
    background: #f8fafc !important;
}
html.gai-light-mode .gai-sidebar .gai-sidebar-group-header .chevron {
    color: #94a3b8 !important;
}
html.gai-light-mode .gai-sidebar .gai-nav-item {
    color: #334155 !important;
}
html.gai-light-mode .gai-sidebar .gai-nav-item:hover {
    background: #f1f5f9 !important;
    color: #4f46e5 !important;
}
html.gai-light-mode .gai-sidebar .gai-nav-item.active {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
    border-left: 3px solid #4f46e5 !important;
}
html[dir="rtl"].gai-light-mode .gai-sidebar .gai-nav-item.active,
body[dir="rtl"].gai-light-mode .gai-sidebar .gai-nav-item.active,
[dir="rtl"] html.gai-light-mode .gai-sidebar .gai-nav-item.active {
    border-left: none !important;
    border-right: 3px solid #4f46e5 !important;
}
html.gai-light-mode .gai-sidebar span.text-white,
html.gai-light-mode .gai-sidebar .text-white {
    color: #0f172a !important;
}

/* Sub-menus in Header */
html.gai-light-mode .sub-menu {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08) !important;
}
html.gai-light-mode .sub-menu a {
    color: #334155 !important;
}
html.gai-light-mode .sub-menu a:hover {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
}

/* Logos & Branding Across Header, Dashboard, Mobile & Footer */
html.gai-light-mode .site-branding a,
html.gai-light-mode .site-logo a,
html.gai-light-mode #masthead .site-branding a,
html.gai-light-mode #colophon .site-logo a,
html.gai-light-mode #mobile-menu-panel .site-branding a,
html.gai-light-mode #mobile-menu-panel a.text-xl.font-black,
html.gai-light-mode .gai-mobile-header a,
html.gai-light-mode .gai-mobile-header a span[style*="color: #fff"],
html.gai-light-mode .gai-mobile-header a span[style*="color:#fff"],
html.gai-light-mode .gai-sidebar .text-white.font-black,
html.gai-light-mode .gai-mobile-header a span {
    color: #0f172a !important;
}
/* Ensure the cyan accent in GATEOFAI logo is vibrant cyan across all headers */
html.gai-light-mode .site-branding a span.text-cyan-400,
html.gai-light-mode #masthead .site-branding a span.text-cyan-400,
html.gai-light-mode #mobile-menu-panel a span.text-cyan-400,
html.gai-light-mode .gai-mobile-header a span[style*="color: #22d3ee"],
html.gai-light-mode .gai-sidebar span.text-cyan-400 {
    color: #0284c7 !important;
}
html.gai-light-mode .site-logo img,
html.gai-light-mode .custom-logo {
    filter: none !important;
}
html.gai-light-mode .goa-card-logo-wrap,
html.gai-light-mode .goa-similar-logo,
html.gai-light-mode .goa-similar-logo-placeholder,
html.gai-light-mode .tool-header-logo {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}
html.gai-light-mode .goa-card-logo-placeholder,
html.gai-light-mode .goa-similar-logo-placeholder {
    color: #0284c7 !important;
}
html.gai-light-mode img.invert,
html.gai-light-mode .invert {
    filter: none !important;
}

/* Cards, Modules, Panels, Bento Boxes & Containers */
html.gai-light-mode .bg-slate-950,
html.gai-light-mode .bg-slate-900,
html.gai-light-mode [class*="bg-slate-900/"],
html.gai-light-mode [class*="bg-slate-950/"],
html.gai-light-mode [class*="bg-[#0f172a]"],
html.gai-light-mode [class*="bg-[#121C3A]"],
html.gai-light-mode [class*="bg-[#090d16]"],
html.gai-light-mode [class*="bg-[#060b19]"],
html.gai-light-mode .bento-card,
html.gai-light-mode .mp-card,
html.gai-light-mode .goa-tool-card,
html.gai-light-mode .goa-bento-card,
html.gai-light-mode .goa-feature-card,
html.gai-light-mode .goa-sidebar-card,
html.gai-light-mode .goa-similar-card,
html.gai-light-mode .goa-voting-box,
html.gai-light-mode .goa-stats-bar,
html.gai-light-mode .tool-card-item,
html.gai-light-mode .ai-tool-card,
html.gai-light-mode .tool-actions-card,
html.gai-light-mode .tutorial-card,
html.gai-light-mode .news-card,
html.gai-light-mode .post-card,
html.gai-light-mode .sub-section,
html.gai-light-mode .gai-calc-card,
html.gai-light-mode .gai-project-cta-wrapper,
html.gai-light-mode .gai-seo-utilities-strip,
html.gai-light-mode .gai-seo-utility-card,
html.gai-light-mode .gai-helpful-voting,
html.gai-light-mode .ai-chat-container,
html.gai-light-mode .ai-chat-container .chat-header,
html.gai-light-mode .comment-respond,
html.gai-light-mode #gaiSearchDialog,
html.gai-light-mode #gaiNotifCurtain,
html.gai-light-mode .site-footer,
html.gai-light-mode .goa-review-action,
html.gai-light-mode .goa-filter-bar,
html.gai-light-mode .gai-module,
html.gai-light-mode .gai-sub-card,
html.gai-light-mode .glass-panel,
html.gai-light-mode .gai-wiz-card,
html.gai-light-mode .gai-channel-card,
html.gai-light-mode .gai-saas-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

/* Elevated Hover for Interactive Cards Across Directory, News, Tutorials & Marketplace */
html.gai-light-mode .goa-tool-card:hover,
html.gai-light-mode .ai-tool-card:hover,
html.gai-light-mode .tutorial-card:hover,
html.gai-light-mode .news-card:hover,
html.gai-light-mode .post-card:hover,
html.gai-light-mode .mp-card:hover,
html.gai-light-mode .bento-card:hover,
html.gai-light-mode .goa-similar-card:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04) !important;
    transform: translateY(-2px) !important;
}

/* Tool & Project Card Media/Image Backdrops */
html.gai-light-mode .ai-tool-image-wrapper,
html.gai-light-mode .goa-card-img-wrap,
html.gai-light-mode .tool-img-container {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
}

/* Inline-styled dark cards inside Dashboards, Single Posts & Inner Pages */
html.gai-light-mode div[style*="rgba(15, 23, 42"],
html.gai-light-mode div[style*="rgba(18, 28, 58"],
html.gai-light-mode div[style*="rgba(30, 41, 59"],
html.gai-light-mode div[style*="rgba(10, 17, 40"],
html.gai-light-mode div[style*="rgba(3, 7, 18"],
html.gai-light-mode div[style*="rgba(4, 8, 20"],
html.gai-light-mode div[style*="linear-gradient(145deg, #090d16"],
html.gai-light-mode div[style*="linear-gradient(145deg, #0b1120"],
html.gai-light-mode section[style*="linear-gradient(145deg, #090d16"],
html.gai-light-mode a[style*="rgba(15, 23, 42"],
html.gai-light-mode div[style*="background: #0f172a"],
html.gai-light-mode div[style*="background:#0f172a"],
html.gai-light-mode div[style*="background: #121C3A"],
html.gai-light-mode div[style*="background: #1e293b"],
html.gai-light-mode div[style*="background: #090d16"],
html.gai-light-mode div[style*="background:#090d16"],
html.gai-light-mode div[style*="background: #0A1128"],
html.gai-light-mode div[style*="background:#0A1128"],
html.gai-light-mode div[style*="background: #030712"],
html.gai-light-mode div[style*="background:#030712"],
html.gai-light-mode div[style*="background: #060b19"],
html.gai-light-mode .gai-executive-dashboard > div:first-of-type {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

/* Inner Sub-Boxes, Stat Boxes & Nested Rows */
html.gai-light-mode .sub-tool-row,
html.gai-light-mode .sub-empty,
html.gai-light-mode .goa-card-header,
html.gai-light-mode .goa-card-body,
html.gai-light-mode .goa-distinction-banner,
html.gai-light-mode div[style*="background: rgba(255, 255, 255, 0.03)"],
html.gai-light-mode div[style*="background: rgba(255, 255, 255, 0.05)"],
html.gai-light-mode div[style*="background: rgba(255, 255, 255, 0.02)"],
html.gai-light-mode .gai-main div[style*="background: rgba(30, 41, 59"],
html.gai-light-mode .gai-main div[style*="background: rgba(15, 23, 42"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

/* All Buttons in Dashboard & Website (Glassmorphic, Ghost & Outline) */
html.gai-light-mode .gai-btn-glassmorphic {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
}
html.gai-light-mode .gai-btn-glassmorphic:hover {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}
html.gai-light-mode .gai-btn-ghost,
html.gai-light-mode .btn-secondary,
html.gai-light-mode .gai-theme-toggle-btn,
html.gai-light-mode #mobileSidebarToggle,
html.gai-light-mode button.bg-slate-800,
html.gai-light-mode button.bg-slate-800\/80 {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
html.gai-light-mode #mobileSidebarToggle i,
html.gai-light-mode #mobileSidebarToggle span {
    color: #0f172a !important;
}
html.gai-light-mode .gai-theme-toggle-btn:hover,
html.gai-light-mode #mobileSidebarToggle:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Dashboard Action Buttons & Table Action Buttons */
html.gai-light-mode button[style*="rgba(255,255,255,0.05)"],
html.gai-light-mode button[style*="rgba(255, 255, 255, 0.05)"],
html.gai-light-mode button[style*="rgba(255,255,255,0.1)"],
html.gai-light-mode button[style*="rgba(255, 255, 255, 0.1)"],
html.gai-light-mode button[style*="rgba(255,255,255,0.08)"],
html.gai-light-mode button[style*="rgba(255, 255, 255, 0.08)"],
html.gai-light-mode a.btn[style*="rgba(255,255,255"],
html.gai-light-mode a[style*="background: rgba(255, 255, 255, 0.08)"],
html.gai-light-mode a[style*="background: rgba(255,255,255,0.08)"],
html.gai-light-mode a[style*="background: rgba(255, 255, 255, 0.05)"],
html.gai-light-mode a[style*="background: rgba(255,255,255,0.05)"],
html.gai-light-mode a[style*="background: rgba(255, 255, 255, 0.06)"],
html.gai-light-mode a[style*="background: rgba(255,255,255,0.06)"],
html.gai-light-mode a[style*="background: rgba(255, 255, 255, 0.1)"],
html.gai-light-mode a[style*="background: rgba(255,255,255,0.1)"],
html.gai-light-mode .gai-filter-btn:not(.active-filter) {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}
html.gai-light-mode button[style*="rgba(255,255,255"]:hover,
html.gai-light-mode a.btn[style*="rgba(255,255,255"]:hover,
html.gai-light-mode a[style*="background: rgba(255, 255, 255"]:hover,
html.gai-light-mode a[style*="background: rgba(255,255,255"]:hover {
    background: #e2e8f0 !important;
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}
html.gai-light-mode .gai-sub-btn.outline {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}
html.gai-light-mode .gai-sub-btn.outline:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Solid CTA & Glow Buttons: Keep High-Contrast Vibrant Appearance */
html.gai-light-mode .gai-btn-neon-glow {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: rgba(2, 132, 199, 0.5) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}
html.gai-light-mode .gai-btn-neon-glow:hover {
    background: linear-gradient(180deg, #0369a1 0%, #075985 100%) !important;
    color: #ffffff !important;
}
html.gai-light-mode .gai-btn-emerald-glow {
    background: linear-gradient(180deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    border-color: rgba(5, 150, 105, 0.5) !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}
html.gai-light-mode .gai-btn-emerald-glow:hover {
    background: linear-gradient(180deg, #047857 0%, #065f46 100%) !important;
    color: #ffffff !important;
}
html.gai-light-mode .gai-btn-indigo-glow {
    background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    border-color: rgba(79, 70, 229, 0.5) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
}
html.gai-light-mode .gai-btn-indigo-glow:hover {
    background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%) !important;
    color: #ffffff !important;
}

/* Preset Buttons, Interactive Filter Pills & Chips Across Website */
html.gai-light-mode .quick-pill-btn,
html.gai-light-mode .goa-filter-chip,
html.gai-light-mode .pill-button,
html.gai-light-mode .gai-pill {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html.gai-light-mode .quick-pill-btn:hover,
html.gai-light-mode .goa-filter-chip:hover,
html.gai-light-mode .pill-button:hover,
html.gai-light-mode .gai-pill:hover {
    background: #f0f9ff !important;
    background-color: #f0f9ff !important;
    border-color: #0284c7 !important;
    color: #0369a1 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12) !important;
}

/* Category & Tag Pills in Light Mode */
html.gai-light-mode .goa-tag {
    background: #eef2ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
}
html.gai-light-mode .goa-tag.pricing {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}
html.gai-light-mode .goa-tag.arabic-badge {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
    box-shadow: none !important;
}
html.gai-light-mode .goa-tag.partner-badge {
    background: #f0f9ff !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
    box-shadow: none !important;
}

/* Voting & Interaction Buttons in Light Mode */
html.gai-light-mode .goa-vote-btn {
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    background: #f8fafc !important;
}
html.gai-light-mode .goa-vote-btn:hover {
    background: #f1f5f9 !important;
}
html.gai-light-mode .goa-vote-btn.upvote:hover,
html.gai-light-mode .goa-vote-btn.upvote.voted {
    border-color: #16a34a !important;
    color: #16a34a !important;
    background: rgba(22, 163, 74, 0.1) !important;
}
html.gai-light-mode .goa-vote-btn.downvote:hover,
html.gai-light-mode .goa-vote-btn.downvote.voted {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.1) !important;
}

/* Typography in Light Mode */
html.gai-light-mode h1,
html.gai-light-mode h2,
html.gai-light-mode h3,
html.gai-light-mode h4,
html.gai-light-mode h5,
html.gai-light-mode h6,
html.gai-light-mode .text-white,
html.gai-light-mode .text-slate-100,
html.gai-light-mode .text-slate-200,
html.gai-light-mode .goa-glitch-title,
html.gai-light-mode .goa-tool-title,
html.gai-light-mode .goa-feature-title,
html.gai-light-mode .goa-similar-name,
html.gai-light-mode .goa-spec-value,
html.gai-light-mode .mp-hero-title,
html.gai-light-mode .archive-hero-title,
html.gai-light-mode .gai-project-cta-title,
html.gai-light-mode .gai-seo-strip-title,
html.gai-light-mode .gai-utility-name,
html.gai-light-mode .goa-card-title a,
html.gai-light-mode .bento-title,
html.gai-light-mode .db-greeting h1,
html.gai-light-mode .db-table td,
html.gai-light-mode [style*="color: #fff"],
html.gai-light-mode [style*="color:#fff"],
html.gai-light-mode [style*="color: #ffffff"],
html.gai-light-mode [style*="color: #f8fafc"],
html.gai-light-mode [style*="color: #f1f5f9"],
html.gai-light-mode [style*="color: #e2e8f0"],
html.gai-light-mode [style*="color: white"] {
    color: #0f172a !important;
}

/* Flowing Headline Gradient in Light Mode (High Contrast on White) */
html.gai-light-mode .gai-glowing-title {
    background: linear-gradient(120deg, #0284c7 0%, #4f46e5 35%, #9333ea 70%, #0284c7 100%) !important;
    background-size: 250% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.2)) !important;
}

/* Secondary / Muted Text in Light Mode (WCAG AAA High-Contrast Compliance) */
html.gai-light-mode .text-slate-300,
html.gai-light-mode .text-slate-400,
html.gai-light-mode .gai-project-cta-desc,
html.gai-light-mode .gai-utility-desc,
html.gai-light-mode .goa-overview-body p,
html.gai-light-mode .goa-feature-desc,
html.gai-light-mode .goa-tool-tagline,
html.gai-light-mode .goa-similar-desc,
html.gai-light-mode .goa-excerpt,
html.gai-light-mode .db-table th,
html.gai-light-mode .db-greeting p,
html.gai-light-mode [style*="color: #94a3b8"],
html.gai-light-mode [style*="color: #94A3B8"],
html.gai-light-mode [style*="color: #cbd5e1"],
html.gai-light-mode [style*="color: #CBD5E1"] {
    color: #475569 !important;
}

html.gai-light-mode .text-slate-500,
html.gai-light-mode [style*="color: #64748b"],
html.gai-light-mode [style*="color: #64748B"] {
    color: #475569 !important;
}

/* Deeper contrast for enterprise body paragraphs across single post, tools and tutorials */
html.gai-light-mode article p,
html.gai-light-mode .entry-content p,
html.gai-light-mode .prose p,
html.gai-light-mode .goa-single-content p {
    color: #334155 !important;
}

/* High-Contrast Action Pills & Section Buttons in Dashboard Live Feed */
html.gai-light-mode .gai-main a[style*="color: #a5b4fc"],
html.gai-light-mode .gai-main a[style*="color: #67e8f9"],
html.gai-light-mode .gai-main a[style*="color: #6ee7b7"],
html.gai-light-mode .gai-main a[style*="color: #818cf8"],
html.gai-light-mode .gai-main a[style*="color: #22d3ee"],
html.gai-light-mode .gai-main a[style*="color: #34d399"],
html.gai-light-mode .gai-main a[style*="color: #38bdf8"],
html.gai-light-mode .gai-main a[style*="color: #a78bfa"] {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #312e81 !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}
html.gai-light-mode .gai-main a[style*="color: #a5b4fc"]:hover,
html.gai-light-mode .gai-main a[style*="color: #67e8f9"]:hover,
html.gai-light-mode .gai-main a[style*="color: #6ee7b7"]:hover,
html.gai-light-mode .gai-main a[style*="color: #818cf8"]:hover,
html.gai-light-mode .gai-main a[style*="color: #22d3ee"]:hover,
html.gai-light-mode .gai-main a[style*="color: #34d399"]:hover {
    background-color: #e2e8f0 !important;
    border-color: #4f46e5 !important;
    color: #4338ca !important;
}

/* Accessible Status Badges & Tag Labels in Light Mode */
html.gai-light-mode .gai-main span[style*="background: rgba"] {
    border: 1px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 800 !important;
}
html.gai-light-mode .gai-main span[style*="color: #a5b4fc"] {
    background-color: #e0e7ff !important;
    border: 1px solid #c7d2fe !important;
    color: #3730a3 !important;
}
html.gai-light-mode .gai-main span[style*="color: #67e8f9"],
html.gai-light-mode .gai-main span[style*="color: #22d3ee"] {
    background-color: #cffafe !important;
    border: 1px solid #a5f3fc !important;
    color: #0e7490 !important;
}
html.gai-light-mode .gai-main span[style*="color: #6ee7b7"],
html.gai-light-mode .gai-main span[style*="color: #34d399"] {
    background-color: #d1fae5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #065f46 !important;
}
html.gai-light-mode .gai-main div[style*="color: #34d399"],
html.gai-light-mode .gai-main div[style*="color: #10b981"] {
    color: #047857 !important;
}
html.gai-light-mode .gai-main div[style*="color: #38bdf8"],
html.gai-light-mode .gai-main div[style*="color: #22d3ee"] {
    color: #0369a1 !important;
}

/* Preserve vibrant styling on solid colored CTA buttons & badges */
html.gai-light-mode .gai-btn-indigo-glow,
html.gai-light-mode .gai-btn-neon-glow,
html.gai-light-mode .gai-btn-emerald-glow,
html.gai-light-mode .gai-project-btn-primary,
html.gai-light-mode .gai-project-btn-primary span,
html.gai-light-mode .goa-cta-button,
html.gai-light-mode .goa-cta-button span,
html.gai-light-mode .btn-primary,
html.gai-light-mode .sub-btn,
html.gai-light-mode .db-btn,
html.gai-light-mode .goa-btn-primary,
html.gai-light-mode .bg-purple-600,
html.gai-light-mode .bg-indigo-600,
html.gai-light-mode .bg-emerald-600,
html.gai-light-mode .gai-mobile-dash-tab.active,
html.gai-light-mode a[style*="linear-gradient(135deg, #4f46e5"],
html.gai-light-mode a[style*="linear-gradient(135deg, #6366f1"],
html.gai-light-mode a[style*="linear-gradient(135deg, #06b6d4"],
html.gai-light-mode a[style*="linear-gradient(135deg, #0ea5e9"],
html.gai-light-mode a[style*="linear-gradient(135deg, #10b981"],
html.gai-light-mode button[style*="linear-gradient"],
html.gai-light-mode button[style*="background: var(--gai-primary)"],
html.gai-light-mode button[style*="background: #6366f1"],
html.gai-light-mode button[style*="background: #3b82f6"] {
    color: #ffffff !important;
}

/* Red / Danger Action Buttons (Logout, Delete, Reject) in Light Mode */
html.gai-light-mode a.gai-logout-btn,
html.gai-light-mode .gai-logout-btn,
html.gai-light-mode .btn-logout,
html.gai-light-mode a[href*="action=logout"],
html.gai-light-mode a[href*="wp-login.php?action=logout"] {
    background-color: #fee2e2 !important;
    border: 1px solid #f87171 !important;
    color: #dc2626 !important;
    font-weight: 800 !important;
}
html.gai-light-mode a.gai-logout-btn:hover,
html.gai-light-mode .gai-logout-btn:hover,
html.gai-light-mode .btn-logout:hover,
html.gai-light-mode a[href*="action=logout"]:hover,
html.gai-light-mode a[href*="wp-login.php?action=logout"]:hover {
    background-color: #fecaca !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}
html.gai-light-mode .btn-reject,
html.gai-light-mode .danger,
html.gai-light-mode .btn-delete-milestone {
    background-color: #fee2e2 !important;
    border: 1px solid #f87171 !important;
    color: #dc2626 !important;
    font-weight: 700 !important;
}

html.gai-light-mode .border-white\/5,
html.gai-light-mode .border-white\/10,
html.gai-light-mode .border-white\/15,
html.gai-light-mode .border-slate-800,
html.gai-light-mode .border-slate-700 {
    border-color: #e2e8f0 !important;
}

html.gai-light-mode .bg-white\/5,
html.gai-light-mode .bg-white\/10,
html.gai-light-mode .bg-slate-800 {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

/* Micro Segmented Tab Active in Light Mode */
html.gai-light-mode .gai-tab-active {
    background: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}

/* All Forms, Inputs, Selects & Textareas in Light Mode */
html.gai-light-mode input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html.gai-light-mode select,
html.gai-light-mode textarea,
html.gai-light-mode .input-field {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
html.gai-light-mode input:-webkit-autofill,
html.gai-light-mode input:-webkit-autofill:hover,
html.gai-light-mode input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
}

/* Mobile Bottom App Dock in Light Mode */
html.gai-light-mode .gai-mobile-app-dock {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.08) !important;
}
html.gai-light-mode .gai-dock-item {
    color: #64748b !important;
}
html.gai-light-mode .gai-dock-item.active {
    color: #0284c7 !important;
}
html.gai-light-mode .gai-dock-item.active::after {
    background: #0284c7 !important;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.5) !important;
}

/* 100% Solid Opaque Mobile Drawer & Backdrop (Zero See-Through Guaranteed) */
#mobile-menu {
    background: transparent !important;
    background-color: transparent !important;
    z-index: 999999 !important;
}
#mobile-menu-backdrop {
    background: rgba(0, 0, 0, 0.82) !important;
    background-color: rgba(0, 0, 0, 0.82) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 1 !important;
    z-index: 1 !important;
}
html.gai-light-mode #mobile-menu-backdrop {
    background: rgba(15, 23, 42, 0.75) !important;
    background-color: rgba(15, 23, 42, 0.75) !important;
    opacity: 1 !important;
}
#mobile-menu-panel {
    position: relative !important;
    z-index: 10 !important;
    background: #050914 !important;
    background-color: #050914 !important;
    background-image: none !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.9) !important;
}
@media (min-width: 640px) {
    #mobile-menu-panel {
        max-width: 24rem !important;
        background: #050914 !important;
        background-color: #050914 !important;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.95) !important;
    }
    html.gai-light-mode #mobile-menu-panel {
        background: #ffffff !important;
        background-color: #ffffff !important;
        box-shadow: -20px 0 60px rgba(15, 23, 42, 0.25) !important;
    }
}
html.gai-light-mode #mobile-menu-panel {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Explicit breakpoint handling for header elements in mobile/desktop */
@media (max-width: 1279px) {
    #site-navigation {
        display: none !important;
    }
    #mobile-menu-trigger {
        display: flex !important;
    }
}
@media (min-width: 1280px) {
    #site-navigation {
        display: flex !important;
    }
    #mobile-menu-trigger,
    .xl\:hidden {
        display: none !important;
    }
}

/* Mobile Primary Menu Items & Category Parent Toggles - 100% Solid Cards */
#mobile-primary-menu > li {
    margin-bottom: 0.5rem;
}
#mobile-primary-menu > li > a,
#mobile-primary-menu .gai-dd-parent-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    border-radius: 12px !important;
    background: #0f172a !important;
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}
#mobile-primary-menu > li > a:hover,
#mobile-primary-menu .gai-dd-parent-toggle:hover,
#mobile-primary-menu .gai-dd-parent-toggle[aria-expanded="true"] {
    background: #1e293b !important;
    border-color: rgba(0, 240, 255, 0.4) !important;
    color: #00f0ff !important;
}
html.gai-light-mode #mobile-primary-menu > li > a,
html.gai-light-mode #mobile-primary-menu .gai-dd-parent-toggle {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}
html.gai-light-mode #mobile-primary-menu > li > a:hover,
html.gai-light-mode #mobile-primary-menu .gai-dd-parent-toggle:hover,
html.gai-light-mode #mobile-primary-menu .gai-dd-parent-toggle[aria-expanded="true"] {
    background: #e2e8f0 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}
#mobile-primary-menu .sub-menu {
    margin-top: 0.4rem !important;
    margin-bottom: 0.6rem !important;
    padding: 0.5rem !important;
    border-radius: 12px !important;
    background: #090f20 !important;
    background-color: #090f20 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
html.gai-light-mode #mobile-primary-menu .sub-menu {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
#mobile-primary-menu .sub-menu li {
    margin-bottom: 0.25rem;
}
#mobile-primary-menu .sub-menu li:last-child {
    margin-bottom: 0;
}
#mobile-primary-menu .sub-menu li a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.65rem 0.85rem !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    transition: all 0.2s ease !important;
}
#mobile-primary-menu .sub-menu li a:hover {
    background: rgba(0, 240, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(0, 240, 255, 0.3) !important;
}
html.gai-light-mode #mobile-primary-menu .sub-menu li a {
    color: #334155 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
html.gai-light-mode #mobile-primary-menu .sub-menu li a:hover {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}

/* =========================================================
   NATIVE MOBILE & PWA EXPERIENCE LAYER (<= 1023px ONLY)
   Desktop (>= 1024px) is 100% untouched.
   ========================================================= */
@view-transition {
    navigation: auto;
}

@media (max-width: 1023px) {
    /* Eliminate 300ms tap delay and gray tap flash on iOS/Android */
    a, button, input, select, textarea, [role="button"] {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Tactile native press feedback on buttons */
    button:active, .gai-btn-neon-glow:active, .gai-btn-indigo-glow:active, .gai-btn-emerald-glow:active, .gai-btn-glassmorphic:active {
        transform: scale(0.97) !important;
    }

    /* Universal Native Mobile Form Controls (All Forms, Entries, Wizards, Search & Auth) */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
    select,
    textarea {
        font-size: 16px !important;
        border-radius: 14px !important;
        min-height: 48px !important;
        padding: 12px 16px !important;
        line-height: 1.4 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        -webkit-appearance: none;
        appearance: none;
    }
    textarea {
        min-height: 110px !important;
    }
    button[type="submit"],
    input[type="submit"],
    .sub-btn,
    .btn-primary {
        min-height: 48px !important;
        border-radius: 14px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Collapse multi-column form rows to single column on mobile phones */
    form div[style*="grid-template-columns: 1fr 1fr"],
    form div[style*="grid-template-columns: repeat(2"],
    .gai-module div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    /* Safe-area top support when launched as standalone iOS Home Screen App */
    #masthead.site-header {
        position: sticky !important;
        top: 0 !important;
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(3.75rem + env(safe-area-inset-top, 0px)) !important;
        background: #030712 !important;
        background-color: #030712 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    html.gai-light-mode #masthead.site-header {
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    /* Ensure top of every page is 100% visible and compact below sticky header */
    main#primary,
    main.site-main,
    body > main.relative.min-h-screen,
    #gai-submit-app,
    .mp-wrapper,
    .goa-community-wrapper {
        padding-top: 0.5rem !important;
        margin-top: 0 !important;
    }
    main#primary > section:first-of-type {
        padding-top: 1.5rem !important;
        padding-bottom: 2rem !important;
    }

    /* Prevent Notification Curtain from clipping off-screen on mobile & Arabic RTL */
    #gaiNotifCurtain {
        position: fixed !important;
        top: calc(4.25rem + env(safe-area-inset-top, 0px)) !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
        max-height: 75dvh !important;
        border-radius: 1.25rem !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
    }

    /* Mobile Search Dialog: fit cleanly above virtual keyboard */
    #gaiSearchDialog {
        margin-top: calc(1rem + env(safe-area-inset-top, 0px)) !important;
        width: calc(100% - 1.5rem) !important;
        max-height: 82dvh !important;
    }
    .gai-search-scroll-area {
        max-height: 58dvh !important;
    }

    /* Offset Web Push prompt above the Mobile Bottom App Bar */
    #gai-push-modal-prompt {
        bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Reserve bottom space so footer/content is never covered by the Mobile App Dock */
    body:not(.page-template-page-liveassist-cockpit) #page {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    /* Mobile Drawer Safe-Area & Bottom Dock Clearance */
    #mobile-menu-panel {
        padding-top: calc(1.25rem + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)) !important;
        background: #050914 !important;
        background-color: #050914 !important;
    }
    html.gai-light-mode #mobile-menu-panel {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    /* =========================================================
       SITE-WIDE NATIVE MOBILE LAYOUT NORMALIZATION (<= 1023px)
       Applies app-grade spacing, fluid typography, and compact
       hero sections across ALL archives, tools, and inner pages.
       ========================================================= */

    /* 1. Community Tools Archive (/community-tools/) */
    .goa-community-hero {
        padding: 1.75rem 0 1.5rem !important;
    }
    .goa-glitch-title {
        font-size: clamp(1.65rem, 6.5vw, 2.25rem) !important;
        line-height: 1.15 !important;
    }
    .goa-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
        padding: 0 0.5rem !important;
    }
    .goa-stats-bar {
        gap: 1rem !important;
        padding: 1rem 0.85rem !important;
        flex-wrap: wrap !important;
        border-radius: 16px !important;
        width: calc(100% - 1rem) !important;
    }
    .goa-stat-value {
        font-size: 1.25rem !important;
    }
    .goa-bento-grid {
        gap: 1rem !important;
        padding: 1.5rem 0 3.5rem !important;
    }
    .goa-tool-card {
        border-radius: 18px !important;
    }
    .goa-card-content {
        padding: 1.25rem !important;
    }
    .goa-card-footer {
        padding: 0.9rem 1.25rem !important;
    }

    /* 2. AI Tools Directory Archive (/ai-tools/) & Taxonomies */
    .archive-hero {
        padding: 1.75rem 1rem 1.5rem !important;
    }
    .archive-hero-title {
        font-size: clamp(1.65rem, 6.5vw, 2.25rem) !important;
        margin-bottom: 0.65rem !important;
    }
    .archive-hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
    }
    .hero-search-form input {
        padding: 14px 100px 14px 44px !important;
        font-size: 16px !important;
        border-radius: 16px !important;
    }
    body.rtl .hero-search-form input {
        padding: 14px 44px 14px 100px !important;
    }
    .hero-search-form .search-icon {
        left: 16px !important;
        font-size: 1.1rem !important;
    }
    body.rtl .hero-search-form .search-icon {
        left: auto !important;
        right: 16px !important;
    }
    .hero-search-form button {
        padding: 0 16px !important;
        font-size: 0.85rem !important;
        border-radius: 12px !important;
    }

    /* 3. Solutions Marketplace (/marketplace/) */
    .mp-hero {
        padding: 1.75rem 1rem 1.5rem !important;
    }
    .mp-hero-title {
        font-size: clamp(1.75rem, 7vw, 2.35rem) !important;
        line-height: 1.15 !important;
    }
    .mp-hero-sub {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* 4. Tutorials Academy (/tutorial/) */
    .academy-archive-wrapper header.page-header {
        padding-top: 1.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    .academy-archive-wrapper .page-title {
        font-size: clamp(1.65rem, 6.5vw, 2.25rem) !important;
    }
    .academy-archive-wrapper .archive-description {
        font-size: 0.95rem !important;
    }
    .masterclass-featured {
        border-radius: 18px !important;
        margin-bottom: 1.75rem !important;
        min-height: 240px !important;
    }
    .masterclass-featured .featured-content {
        padding: 1.25rem !important;
    }
    .masterclass-featured h2 {
        font-size: 1.35rem !important;
    }
    .tutorial-card {
        border-radius: 18px !important;
    }
    .tutorial-content {
        padding: 1.25rem !important;
    }

    /* 5. Latest AI News (/latest-ai-news/) */
    .archive-hero.neural-bg {
        padding: 1.75rem 1rem 1.5rem !important;
    }
    .news-hero-card {
        border-radius: 18px !important;
    }
    .news-hero-title {
        font-size: 1.4rem !important;
    }

    /* 6. Interactive Tools & Form Pages (Prompts, LLM Calculator, Leaderboard, Compare, Submit Tool, Login, Register, Post Project) */
    .spa-hero {
        padding: 1.75rem 1rem 1.5rem !important;
    }
    .spa-hero h1 {
        font-size: clamp(1.65rem, 6.5vw, 2.2rem) !important;
    }
    .gai-calc-page {
        padding: 1.5rem 1rem 3.5rem !important;
    }
    .gai-calc-card {
        padding: 1.25rem !important;
        border-radius: 18px !important;
    }
    .gai-lb-wrap {
        padding: 1.5rem 1rem 3.5rem !important;
    }
    .gai-lb-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 16px !important;
    }

    /* Auth & Form Cards (Login, Register, Reset Password, Verify Email) */
    .rounded-\[2\.5rem\] {
        border-radius: 1.5rem !important;
        padding: 1.5rem 1.25rem !important;
    }

    /* 7. Global Section & Container Mobile Tightening */
    .pt-24 {
        padding-top: 1.5rem !important;
    }
    .py-24 {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }
    .py-20 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .py-16 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }
    .p-10, .p-12 {
        padding: 1.25rem !important;
    }
}

/* ==========================================================================
   Standardized Header Utility Buttons & Controls (Uniform Height & Alignment)
   ========================================================================== */
.gai-header-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-inline-start: 16px !important;
    vertical-align: middle !important;
}

.gai-header-btn-text {
    height: 36px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.gai-header-btn-text.gai-header-btn-dashboard {
    padding: 0 16px !important;
}

.gai-header-btn-icon,
.gai-header-btn-badge {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.gai-header-btn-icon i,
.gai-header-btn-icon svg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 14px !important;
}

/* Strict Single-Icon Visibility for Light & Dark Mode */
.gai-theme-icon-sun {
    display: inline-flex !important;
}
.gai-theme-icon-moon {
    display: none !important;
}
html.gai-light-mode .gai-theme-icon-sun {
    display: none !important;
}
html.gai-light-mode .gai-theme-icon-moon {
    display: inline-flex !important;
}

#mobile-menu-trigger.gai-header-btn-icon svg {
    width: 20px !important;
    height: 20px !important;
}

#gaiNotificationWrapper {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

#gaiNotificationWrapper #gaiNotifBadge {
    top: 6px !important;
    right: 6px !important;
}

/* Ensure mobile hamburger toggle sits in front and remains 100% clickable */
#mobile-menu-trigger {
    position: relative !important;
    z-index: 50 !important;
    flex-shrink: 0 !important;
}

/* On mobile screens, never display any injected language dropdown in the main header bar */
@media (max-width: 1279px) {
    .gai-header-controls {
        gap: 6px !important;
        margin-inline-start: 6px !important;
    }
    .gai-header-controls .goai-lang-switcher-mount,
    .gai-header-controls .goai-lang-header-mount,
    .gai-header-controls .goai-lang-switcher,
    #masthead .gai-header-controls .goai-lang-switcher-mount,
    #masthead .gai-header-controls .goai-lang-header-mount,
    #masthead .gai-header-controls .goai-lang-switcher {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}

/* Mobile Drawer Language Switcher: Full Width Accordion Style */
#mobile-menu-panel .goai-lang-switcher-mount,
.goai-lang-mobile-mount {
    display: block !important;
    width: 100% !important;
    margin: 0 0 0.75rem 0 !important;
    box-sizing: border-box !important;
}

#mobile-menu-panel .goai-lang-switcher,
.goai-lang-mobile-mount .goai-lang-switcher {
    position: static !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#mobile-menu-panel .goai-lang-trigger,
.goai-lang-mobile-mount .goai-lang-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    border-radius: 12px !important;
    background: #0f172a !important;
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    text-align: inherit !important;
}

#mobile-menu-panel .goai-lang-trigger:hover,
.goai-lang-mobile-mount .goai-lang-trigger:hover {
    background: #1e293b !important;
    border-color: rgba(0, 240, 255, 0.4) !important;
    color: #00f0ff !important;
}

#mobile-menu-panel .goai-lang-menu,
.goai-lang-mobile-mount .goai-lang-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.6rem !important;
    padding: 0.5rem !important;
    border-radius: 12px !important;
    background: #090f20 !important;
    background-color: #090f20 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    box-sizing: border-box !important;
}

#mobile-menu-panel .goai-lang-item,
.goai-lang-mobile-mount .goai-lang-item {
    display: block !important;
    width: 100% !important;
    text-align: inherit !important;
    padding: 0.6rem 0.85rem !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    box-sizing: border-box !important;
}

#mobile-menu-panel .goai-lang-item:hover,
#mobile-menu-panel .goai-lang-item.is-active,
.goai-lang-mobile-mount .goai-lang-item:hover,
.goai-lang-mobile-mount .goai-lang-item.is-active {
    background: rgba(56, 189, 248, 0.14) !important;
    color: #38bdf8 !important;
}

#mobile-menu-panel .goai-lang-divider,
.goai-lang-mobile-mount .goai-lang-divider {
    margin: 6px 8px 4px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #94a3b8 !important;
}

/* Light mode for mobile drawer switcher */
html.gai-light-mode #mobile-menu-panel .goai-lang-trigger,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-trigger {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

html.gai-light-mode #mobile-menu-panel .goai-lang-trigger:hover,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-trigger:hover {
    background: #e2e8f0 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

html.gai-light-mode #mobile-menu-panel .goai-lang-menu,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-menu {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

html.gai-light-mode #mobile-menu-panel .goai-lang-item,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-item {
    color: #334155 !important;
}

html.gai-light-mode #mobile-menu-panel .goai-lang-item:hover,
html.gai-light-mode #mobile-menu-panel .goai-lang-item.is-active,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-item:hover,
html.gai-light-mode .goai-lang-mobile-mount .goai-lang-item.is-active {
    background: #e2e8f0 !important;
    color: #0284c7 !important;
}

/* Light mode overrides for header buttons */
html.gai-light-mode .gai-header-btn-icon,
html.gai-light-mode .gai-header-btn-badge,
html.gai-light-mode .gai-header-btn-text.gai-btn-glassmorphic {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

html.gai-light-mode .gai-header-btn-icon:hover,
html.gai-light-mode .gai-header-btn-badge:hover,
html.gai-light-mode .gai-header-btn-text.gai-btn-glassmorphic:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
