/* =========================================================
   TOOL FIXT - GLOBAL LAYOUT & NAVIGATION
   ========================================================= */

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  height: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 0.75rem;
  width: 100%;
}

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.brand-logo-img {
  height: 44px;
  max-height: 48px;
  max-width: 240px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0 !important;
}

.brand-logo-content,
.brand-logo-fallback {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.brand-logo-svg {
  width: 42px;
  height: 42px;
  flex-shrink: 0 !important;
}

.brand-logo-text {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  white-space: nowrap !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.brand-logo-text .brand-accent {
  color: var(--brand-primary);
  margin-left: 2px;
}

.brand-badge-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand-primary);
  border: 1px solid rgba(79, 70, 229, 0.22);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  position: relative;
  transition: color 0.18s ease;
}

.nav-link:hover {
  color: var(--brand-primary);
}

.nav-link.active {
  color: var(--brand-primary);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--brand-primary);
  border-radius: 99px;
}

/* Category & Suite Quick Links with Matching Icons */
.nav-link-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.nav-cat-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  flex-shrink: 0 !important;
  transition: transform 0.15s ease;
}

.nav-chevron {
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0 !important;
}

.nav-dropdown-container:hover .nav-chevron,
.nav-dropdown-container:focus-within .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-link-cat:hover .nav-cat-icon {
  transform: scale(1.08);
}

/* Categories Mega Menu Dropdown */
.nav-dropdown-container {
  position: relative;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-mega-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -120px;
  width: 900px;
  max-width: 95vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.03);
  padding: 1.4rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-container:hover .nav-mega-menu,
.nav-dropdown-container:focus-within .nav-mega-menu,
.nav-mega-menu:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color-subtle);
}

.mega-menu-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.mega-menu-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.mega-menu-all:hover {
  text-decoration: underline;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mega-menu-item:hover {
  background: var(--bg-surface-raised);
}

.mega-menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
  transition: transform 0.15s ease;
}

.mega-menu-item:hover .mega-menu-icon {
  transform: scale(1.08);
}

.mega-menu-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mega-menu-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.mega-menu-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Specific Mega Menu Layouts for Suites and Pricing */
.nav-mega-menu-all {
  width: 900px;
  left: -80px;
}

.nav-mega-menu-suite {
  width: 620px;
  max-width: 92vw;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
}

.nav-dropdown-container:hover .nav-mega-menu-suite,
.nav-dropdown-container:focus-within .nav-mega-menu-suite,
.nav-mega-menu-suite:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-mega-menu-pricing {
  width: 640px;
  max-width: 92vw;
  left: 50%;
  transform: translateX(-60%) translateY(8px);
}

.nav-dropdown-container:hover .nav-mega-menu-pricing,
.nav-dropdown-container:focus-within .nav-mega-menu-pricing,
.nav-mega-menu-pricing:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-60%) translateY(0);
}

.mega-menu-suite-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.mega-menu-suite-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-menu-suite-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.mega-menu-suite-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
  transition: transform 0.2s ease;
}

.mega-menu-suite-card:hover .mega-menu-suite-icon {
  transform: scale(1.1);
}

.mega-menu-suite-content {
  flex: 1;
  min-width: 0;
}

.mega-menu-suite-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.mega-menu-suite-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-menu-suite-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Pricing Mega Menu Cards */
.mega-menu-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.mega-menu-pricing-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.9rem 0.65rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mega-menu-pricing-card.recommended {
  border-color: var(--brand-primary);
  background: rgba(79, 70, 229, 0.04);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.mega-menu-pricing-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
}

.mega-menu-plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.mega-menu-plan-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.mega-menu-plan-limit {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Modern Pill Theme Toggle Switch (Fixed UI & Proportions - Audio 2) */
.theme-toggle-pill {
  width: 58px;
  height: 30px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border: 1.5px solid #cbd5e1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .theme-toggle-pill {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: #475569;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.theme-pill-icon {
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  z-index: 1;
  pointer-events: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .theme-pill-icon.moon {
  color: #38bdf8;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

[data-theme="light"] .theme-pill-icon.sun {
  color: #d97706;
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.4));
}

.theme-pill-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

[data-theme="dark"] .theme-pill-thumb {
  transform: translateX(28px);
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 8px rgba(56, 189, 248, 0.3);
}

/* Multi-Language Selector Dropdown in Navbar */
.lang-selector-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.lang-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

[data-theme="dark"] .lang-selector-btn {
  background: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

.lang-selector-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

[data-theme="dark"] .lang-selector-btn:hover {
  background: #334155;
  border-color: #64748b;
}

.lang-selector-btn[aria-expanded="true"] {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.lang-globe-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
}

[data-theme="dark"] .lang-globe-icon {
  color: #818cf8;
}

.lang-current-label {
  font-size: 0.8rem;
  font-weight: 700;
}

.lang-chevron {
  transition: transform 0.2s ease;
  color: #64748b;
}

.lang-selector-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

/* Language Dropdown Menu */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, 94vw);
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.18), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  padding: 0.6rem;
  z-index: 9999;
  display: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lang-dropdown-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lang-dropdown-header {
  padding: 0.2rem 0.2rem 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-dropdown-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #64748b);
}

.lang-search-box {
  position: relative;
  margin: 0.35rem 0 0.45rem;
}

.lang-dropdown-search {
  width: 100%;
  padding: 0.45rem 0.65rem 0.45rem 2rem;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-surface-raised, #f8fafc);
  color: var(--text-primary, #0f172a);
  outline: none;
  transition: border-color 0.15s ease;
}

.lang-dropdown-search:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.lang-search-box svg {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.lang-filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.lang-tab-btn {
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: transparent;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.lang-tab-btn:hover {
  color: var(--text-primary, #0f172a);
  border-color: #4f46e5;
}

.lang-tab-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.lang-dropdown-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.2rem;
}

/* Headless Google Translate Toolbar Suppressor */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body {
  top: 0px !important;
  position: static !important;
}

#google_translate_element {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  color: var(--text-primary, #1e293b);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}

.lang-item:hover {
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
}

.lang-item.active {
  background: #4f46e5;
  color: #ffffff;
  font-weight: 700;
}

.lang-item-flag {
  font-size: 0.95rem;
  line-height: 1;
}

.lang-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.lang-item-native {
  font-size: 0.82rem;
  font-weight: 700;
}

.lang-item-en {
  font-size: 0.68rem;
  opacity: 0.75;
}

.lang-item.active .lang-item-en {
  opacity: 0.9;
}

/* Mobile Drawer Language Selector */
.mobile-lang-section {
  margin: 0.75rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

/* Header Search Icon Button (Audio 2: Comfortable Zone) */
.header-search-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: var(--bg-surface-raised, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #0f172a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  flex-shrink: 0 !important;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  touch-action: manipulation;
}

[data-theme="dark"] .header-search-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.header-search-btn:hover {
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.header-search-btn:active {
  transform: scale(0.95);
}

/* In-Header Interactive Search Overlay Bar (Audio 1) */
.header-search-overlay-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10005;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search-overlay-bar.active {
  opacity: 1;
  transform: translateY(0);
}

.header-search-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.header-search-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.header-search-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface-raised, #f8fafc);
  border: 1.5px solid var(--brand-primary);
  border-radius: 9999px;
  padding: 0 0.9rem;
  height: 42px;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .header-search-input-box {
  background: #1e293b;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.header-search-leading-icon {
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  width: 100%;
  font-family: inherit;
}

.header-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.header-search-clear-btn {
  background: rgba(100, 116, 139, 0.16);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.header-search-clear-btn:hover {
  background: rgba(100, 116, 139, 0.3);
  color: var(--text-primary);
}

.header-search-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-raised, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-secondary, #475569);
  border-radius: 9999px;
  height: 38px;
  padding: 0 0.85rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

[data-theme="dark"] .header-search-close-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.header-search-close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* In-Header Live Search Dropdown Panel */
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  max-height: calc(85vh - 70px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10006;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: headerSearchDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .header-search-dropdown {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);
}

@keyframes headerSearchDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-search-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface-raised, #f8fafc);
}

[data-theme="dark"] .header-search-dropdown-header {
  background: #1e293b;
  border-color: #334155;
}

.header-search-count-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.header-search-nav-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-search-nav-tip kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  font-family: inherit;
  font-size: 0.7rem;
}

.header-search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.45rem;
  max-height: 52vh;
  -webkit-overflow-scrolling: touch;
}

.header-search-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.header-search-item:hover,
.header-search-item.selected {
  background: var(--bg-surface-raised, #f1f5f9);
  border-color: rgba(79, 70, 229, 0.25);
  transform: translateX(2px);
}

[data-theme="dark"] .header-search-item:hover,
[data-theme="dark"] .header-search-item.selected {
  background: #1e293b;
  border-color: rgba(99, 102, 241, 0.35);
}

.header-search-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: rgba(79, 70, 229, 0.1);
}

.header-search-item-info {
  flex: 1;
  min-width: 0;
}

.header-search-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search-item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-raised, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .header-search-item-badge {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.search-highlight {
  background: rgba(250, 204, 21, 0.38);
  color: inherit;
  font-weight: 800;
  padding: 0.05rem 0.15rem;
  border-radius: 3px;
}

[data-theme="dark"] .search-highlight {
  background: rgba(234, 179, 8, 0.45);
  color: #fef08a;
}

.header-search-dropdown-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface-raised, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .header-search-dropdown-footer {
  background: #1e293b;
  border-color: #334155;
}

.header-search-view-all-link {
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.header-search-view-all-link:hover {
  text-decoration: underline;
}

.header-search-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.header-search-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.header-search-empty-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

/* Auth Pill Button (Matching Reference) */
.auth-pill-btn {
  padding: 0.55rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.55);
}

/* User Wallet Badge */
.wallet-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.7rem;
  height: 36px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #059669;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.wallet-badge-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #059669;
  transform: translateY(-1px);
}

.wallet-amount {
  letter-spacing: -0.01em;
}

/* User Profile Avatar in Header - Always Crisp 1:1 Circle */
.user-header-menu-wrap {
  position: relative;
  flex-shrink: 0 !important;
}

.user-avatar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0 !important;
  line-height: 1;
}

.user-avatar-img {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--brand-primary) !important;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15) !important;
  flex-shrink: 0 !important;
  display: block !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.user-avatar-btn:hover .user-avatar-img {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
}

.user-avatar-chevron {
  opacity: 0.6;
  transition: transform var(--transition-fast);
  flex-shrink: 0 !important;
}

.user-avatar-btn:hover .user-avatar-chevron {
  opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  padding: 0;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--bg-surface);
  border-color: var(--brand-primary);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-overlay.active,
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86vw;
  max-width: 380px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  pointer-events: none;
  will-change: transform;
  overscroll-behavior: contain;
}

.mobile-nav-drawer.open,
.mobile-nav-drawer.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-raised);
  position: sticky;
  top: 0;
  z-index: 2;
}

.mobile-drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-drawer-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.mobile-drawer-close-btn:hover {
  background: var(--brand-danger);
  color: #ffffff;
  border-color: var(--brand-danger);
}

.mobile-drawer-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: calc(var(--mobile-nav-height) + 2rem);
}

.mobile-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: var(--bg-surface-raised);
  color: var(--brand-primary);
}

.mobile-nav-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin: 0.85rem 0 0.25rem;
  padding-left: 0.5rem;
}

.mobile-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-cat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  text-decoration: none;
  min-height: 44px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.mobile-cat-item:active {
  transform: scale(0.99);
  border-color: var(--brand-primary);
}

.mobile-cat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
}

.mobile-cat-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.mobile-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

/* Mobile Sticky Bottom Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  height: var(--mobile-nav-height, 60px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 4px);
  z-index: 9998;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.95);
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.5);
}

.mobile-bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 2px;
  border-radius: 8px;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  min-height: 44px;
  transition: all 0.15s ease;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-bottom-tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.15;
}

.mobile-bottom-tab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.mobile-bottom-tab.active,
.mobile-bottom-tab:active {
  color: var(--brand-primary);
}

.mobile-bottom-tab.active svg {
  transform: scale(1.1);
  color: var(--brand-primary);
}

/* Center prominent pill tab for 850+ Tools */
.mobile-bottom-tab-center {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #06b6d4 100%);
  color: #ffffff !important;
  border-radius: 50%;
  height: 44px;
  width: 44px;
  max-width: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
  transform: translateY(-8px);
  margin: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-bottom-tab-center svg {
  width: 20px;
  height: 20px;
  color: #ffffff !important;
}

.mobile-bottom-tab-center:active {
  transform: translateY(-5px) scale(0.95);
}


/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-icon-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-icon-link:hover {
  color: #fff;
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-legal-bar a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-legal-bar a:hover {
  color: var(--text-primary);
}

/* Dynamic Multi-Format Ad Placement Slots */
.ad-slot-wrapper {
  width: 100%;
  margin: 2rem auto;
  clear: both;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow: hidden;
}

.ad-slot-header {
  max-width: 970px;
  margin: 1.25rem auto 1.75rem;
}

.ad-slot-tool-top,
.ad-slot-tool_top {
  max-width: 970px;
  margin: 1.25rem auto 1.75rem;
  clear: both;
}

.ad-slot-tool-bottom,
.ad-slot-tool_bottom,
.ad-slot-bottom,
.ad-slot-footer {
  max-width: 970px;
  margin: 2.25rem auto 1.5rem;
  clear: both;
}

.ad-slot-sidebar {
  max-width: 300px;
  margin: 1.5rem auto;
}

.ad-slot-label-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  padding: 0 0.25rem;
}

.ad-slot-hide-btn {
  font-size: 0.7rem;
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}

.ad-slot-hide-btn:hover {
  text-decoration: underline;
}

/* 1. Display Banner Ads */
.ad-banner-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background: var(--bg-surface);
}

.ad-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.ad-banner-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  display: block;
}

/* 2. Native Sponsored Card */
.ad-native-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.ad-native-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.ad-native-media {
  width: 90px;
  height: 75px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface-raised);
}

.ad-native-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-native-details {
  flex: 1;
  min-width: 0;
}

.ad-native-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.ad-native-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-primary);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.ad-native-pro-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  text-decoration: underline;
}

.ad-native-pro-link:hover {
  color: var(--brand-primary);
}

.ad-native-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.ad-native-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ad-native-title a:hover {
  color: var(--brand-primary);
}

.ad-native-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-native-cta-col {
  flex-shrink: 0;
}

.ad-native-btn {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* 3. Custom HTML / Script Box */
.ad-custom-code-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  padding: 0.5rem;
}

/* Backward compatibility */
.ad-slot-container {
  width: 100%;
  margin: 1.5rem auto;
}

@media (max-width: 768px) {
  .ad-native-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ad-native-media {
    width: 100%;
    height: 120px;
  }
  .ad-native-cta-col {
    width: 100%;
  }
  .ad-native-btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Vertical Skyscraper Banner Creative */
.ad-banner-vertical {
  max-width: 300px;
  max-height: 600px;
  margin: 0 auto;
}

.ad-banner-img-vertical {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

.ad-custom-vertical {
  max-width: 300px;
  margin: 0 auto;
  min-height: 250px;
}

/* Desktop Skyscraper Banners (Strictly side gutters on ultra-wide screens >=1680px) */
.desktop-skyscraper {
  display: none !important;
}

/* Completely suppress floating skyscrapers on tool workspaces and editors */
body:has(.workspace-container) .desktop-skyscraper,
body:has(#tool-workspace) .desktop-skyscraper,
body:has(.tool-workspace-card) .desktop-skyscraper,
body.is-workspace-page .desktop-skyscraper {
  display: none !important;
}

@media (min-width: 1680px) {
  .desktop-skyscraper {
    display: none !important;
  }
  /* Calculate distance strictly outside the centered 1240px container */
  /* 50% - (1240px / 2 = 620px) - 25px gap - 160px ad width = 50% - 805px */
  .desktop-skyscraper.skyscraper-left {
    left: calc(50% - 620px - 25px - 160px);
  }
  .desktop-skyscraper.skyscraper-right {
    right: calc(50% - 620px - 25px - 160px);
  }
  .skyscraper-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.35rem;
  }
}

/* Layout stability & CLS Protection */
.adsense-container {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ad-slot-sidebar .adsense-container {
  min-height: 250px;
  max-width: 300px;
}
.ad-slot-native-wrapper {
  min-height: 110px;
}

/* Responsive Media Queries */
@media (max-width: 1360px) {
  .search-trigger-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
    justify-content: center;
  }
  .search-trigger-btn .search-text,
  .search-trigger-btn .search-kbd {
    display: none;
  }
  .nav-desktop {
    gap: 0.2rem;
  }
  .nav-link {
    padding: 0.32rem 0.45rem;
    font-size: 0.81rem;
  }
  .nav-cat-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 1160px) {
  .nav-desktop {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: span 3;
  }
}

/* Mobile Header Brand Wrap */
.header-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  }
  body {
    padding-top: 58px !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .brand-badge-pill {
    display: none !important;
  }
  .auth-pill-btn {
    display: none !important;
  }
  .header-app-download-btn {
    display: none !important;
  }
  .site-header {
    height: 58px;
  }
  .header-container {
    padding-inline: 0.75rem;
  }
  .header-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  /* Comfort Zone Header Actions (Audio 2: All items visible and comfortable) */
  .header-actions {
    gap: 0.45rem;
    flex-shrink: 0 !important;
    align-items: center;
    display: inline-flex;
  }
  .header-search-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .lang-selector-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 0.78rem;
    gap: 0.3rem;
    border-radius: 9999px;
    flex-shrink: 0 !important;
  }
  .lang-current-label {
    max-width: 50px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  .theme-toggle-pill {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 28px !important;
    padding: 0 3px !important;
    flex-shrink: 0 !important;
  }
  .theme-pill-thumb {
    width: 20px !important;
    height: 20px !important;
    top: 3px !important;
    left: 3px !important;
  }
  [data-theme="dark"] .theme-pill-thumb {
    transform: translateX(22px) !important;
  }
  .brand-logo-img {
    height: 32px;
    max-height: 34px;
    max-width: 115px;
    object-fit: contain;
  }
  .brand-logo-text {
    font-size: 1.2rem;
  }
  .brand-logo-svg {
    width: 30px;
    height: 30px;
  }
  .wallet-badge-btn {
    padding: 0 0.4rem;
    height: 32px;
    font-size: 0.74rem;
    flex-shrink: 0 !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  #main-content {
    padding-bottom: calc(var(--mobile-nav-height) + 16px);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* In-Header Search Responsive Layout */
  .header-search-overlay-bar {
    padding: 0 0.65rem;
  }
  .header-search-dropdown {
    position: fixed;
    top: 58px;
    left: 8px;
    right: 8px;
    max-width: none;
    max-height: calc(100vh - 120px);
    border-radius: 14px;
  }
  .header-search-close-label {
    display: none;
  }
  .header-search-close-btn {
    padding: 0;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
  .header-search-input-box {
    height: 38px;
    padding: 0 0.75rem;
  }
  .header-search-nav-tip {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding-inline: 0.45rem;
  }
  /* Extra Small Screens Comfort Zone */
  .header-actions {
    gap: 0.35rem;
    flex-shrink: 0 !important;
  }
  .brand-logo {
    gap: 0.3rem;
  }
  .brand-logo-img {
    height: 28px;
    max-height: 30px;
    max-width: 95px;
  }
  .brand-logo-text {
    font-size: 1.1rem;
  }
  .brand-logo-svg {
    width: 26px;
    height: 26px;
  }
  .header-search-btn,
  .search-trigger-btn,
  .mobile-menu-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .theme-toggle-pill {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 26px !important;
    padding: 0 3px !important;
    flex-shrink: 0 !important;
  }
  .theme-pill-thumb {
    width: 18px !important;
    height: 18px !important;
    top: 3px !important;
    left: 3px !important;
  }
  [data-theme="dark"] .theme-pill-thumb {
    transform: translateX(20px) !important;
  }
  .theme-pill-icon {
    width: 11px;
    height: 11px;
  }
  .lang-selector-btn {
    height: 28px;
    padding: 0 6px;
    font-size: 0.74rem;
    gap: 0.2rem;
    flex-shrink: 0 !important;
  }
  .lang-chevron {
    display: inline-block !important;
    width: 8px;
    height: 8px;
  }
  .lang-current-label {
    max-width: 38px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    font-size: 0.74rem;
  }
  .user-avatar-img {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    flex-shrink: 0 !important;
  }
  .wallet-badge-btn {
    padding: 0 0.3rem;
    height: 28px;
    font-size: 0.68rem;
    gap: 0.2rem;
    flex-shrink: 0 !important;
  }
  .footer-social-icons {
    gap: 0.5rem;
  }
  .social-icon-link {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 360px) {
  .header-container {
    padding-inline: 0.25rem;
  }
  .brand-logo-img {
    height: 26px;
    max-height: 28px;
    max-width: 80px;
  }
  .brand-logo-text {
    font-size: 0.95rem;
  }
  .brand-logo-svg {
    width: 24px;
    height: 24px;
  }
  .header-actions {
    gap: 0.25rem;
  }
  .header-search-btn,
  .search-trigger-btn,
  .mobile-menu-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
  }
  .theme-toggle-pill {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 24px !important;
    padding: 0 2px !important;
  }
  .theme-pill-thumb {
    width: 16px !important;
    height: 16px !important;
    top: 3px !important;
    left: 2px !important;
  }
  [data-theme="dark"] .theme-pill-thumb {
    transform: translateX(18px) !important;
  }
  .theme-pill-icon {
    width: 10px;
    height: 10px;
  }
  .lang-selector-btn {
    padding: 0 4px;
    height: 26px;
  }
  .lang-current-label {
    display: none !important;
  }
  .wallet-badge-btn span.wallet-amount {
    display: none;
  }
  .wallet-badge-btn {
    padding: 0 0.3rem;
    width: 28px;
    justify-content: center;
  }
}


/* User Suggestion & Community Avatar Styling */
.sugg-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  border: 2px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface-raised, #f1f5f9);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sugg-avatar-sm {
  width: 28px;
  height: 28px;
}
.sugg-avatar-lg {
  width: 44px;
  height: 44px;
}

/* =============================================================================
   MOBILE APP DOWNLOAD BUTTONS (HEADER, FOOTER, DRAWER)
   Configurable from Admin Settings -> Mobile App & Google Play Store Settings
   ============================================================================= */

/* Header App Download Pill Button - Styled identically to .auth-pill-btn in vibrant Emerald Green */
.header-app-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.46rem 1.35rem 0.46rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
  text-decoration: none;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.25;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.header-app-download-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

.header-app-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.header-app-download-btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* Crisp Play Store circular white badge placed cleanly before the text */
.app-play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.app-play-badge .app-play-svg {
  width: 13px;
  height: 13px;
  display: block;
}

.app-btn-text {
  letter-spacing: -0.01em;
  color: #ffffff !important;
  font-weight: 700;
}

/* Dark mode stays consistent and vibrant */
[data-theme="dark"] .header-app-download-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

[data-theme="dark"] .header-app-download-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.65);
}

/* Footer Official Google Play Badge */
.footer-app-download-wrap {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.google-play-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-decoration: none;
  width: fit-content;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.google-play-footer-badge:hover {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

.google-play-badge-svg {
  flex-shrink: 0;
  display: block;
}

.play-badge-text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.play-badge-subtitle {
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
}

.play-badge-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* Mobile Drawer App Download Card */
.mobile-app-drawer-card {
  margin: 0.5rem 0 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mobile-app-drawer-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.mobile-app-drawer-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.mobile-app-drawer-info {
  flex: 1;
}

.mobile-app-drawer-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.mobile-app-drawer-subheading {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.mobile-app-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem;
  border-radius: 8px;
  background: #000000;
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.mobile-app-drawer-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Responsive Scaling for Header App Button on Tablet Viewports (769px - 992px) */
@media (max-width: 992px) and (min-width: 769px) {
  .header-app-download-btn {
    padding: 0.42rem 1rem 0.42rem 0.75rem;
    font-size: 0.82rem;
    gap: 0.45rem;
  }
  .app-play-badge {
    width: 20px;
    height: 20px;
  }
  .app-play-badge .app-play-svg {
    width: 12px;
    height: 12px;
  }
}

