/**
 * Kazakan Tools 2.0 — Core Glass Shell & Global Navigation Architecture
 * Contains: Atmosphere, Header, Mega Menu, Theme Switcher, Search Modal, About Modal, Mobile Nav, Toast & Modal Dialogs, Footer
 */

/* ==========================================================================
   Kazakan Tools 2.0 — World-Class Modern iPhone Glass Style (Liquid Glass)
   Strictly adheres to user vision mockups (Zero emojis, Pure SVGs, 100% Responsive)
   ========================================================================== */

/* 1. Global Setup & Body Layout (Luminous Liquid Glass Atmosphere) */
html {
  background-color: #060913;
}

[data-theme="light"] {
  background-color: #f0f4f9;
}

body {
  background-color: #060913;
  background-image: 
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(37, 99, 235, 0.32) 0%, transparent 70%),
    radial-gradient(circle 850px at 15% 35%, rgba(99, 102, 241, 0.28) 0%, transparent 60%),
    radial-gradient(circle 850px at 85% 40%, rgba(56, 189, 248, 0.26) 0%, transparent 60%),
    radial-gradient(circle 900px at 50% 55%, rgba(37, 99, 235, 0.26) 0%, transparent 65%),
    radial-gradient(circle 750px at 20% 78%, rgba(139, 92, 246, 0.24) 0%, transparent 60%),
    radial-gradient(circle 750px at 80% 82%, rgba(14, 165, 233, 0.22) 0%, transparent 60%),
    radial-gradient(circle 900px at 50% 95%, rgba(30, 58, 138, 0.32) 0%, transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-main);
  font-family: var(--font-system);
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

[data-theme="light"] body {
  background-color: #f0f4f9;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(59, 130, 246, 0.28) 0%, transparent 70%),
    radial-gradient(circle 850px at 15% 35%, rgba(192, 132, 252, 0.26) 0%, transparent 60%),
    radial-gradient(circle 850px at 85% 40%, rgba(56, 189, 248, 0.28) 0%, transparent 60%),
    radial-gradient(circle 900px at 50% 55%, rgba(96, 165, 250, 0.26) 0%, transparent 65%),
    radial-gradient(circle 750px at 20% 78%, rgba(167, 139, 250, 0.22) 0%, transparent 60%),
    radial-gradient(circle 750px at 80% 82%, rgba(56, 189, 248, 0.24) 0%, transparent 60%),
    radial-gradient(circle 900px at 50% 95%, rgba(147, 197, 253, 0.3) 0%, transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* 2. Floating iPhone Modern Glass Header */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 16, 30, 0.88);
  backdrop-filter: blur(28px) saturate(190%) contrast(102%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(102%);
  border-block-end: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .glass-header {
  background: rgba(255, 255, 255, 0.92);
  border-block-end: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  position: relative;
  z-index: 1010;
  direction: ltr !important;
}

.brand-link {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

[data-theme="light"] .brand-link {
  color: #0f172a;
}

.brand-icon {
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.4));
  flex-shrink: 0;
}

/* Header Navigation (Tools, Articles, About) */
.header-nav {
  display: flex;
  grid-column: 2;
  justify-self: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  direction: ltr !important;
  position: static;
  width: max-content;
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .header-nav {
    display: none;
  }
}

.nav-link-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #f1f5f9;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
  line-height: 1.2;
  text-align: center;
}

[data-theme="light"] .nav-link-btn {
  color: #0f172a;
}

.nav-link-btn:hover {
  color: #ffffff;
}

[data-theme="light"] .nav-link-btn:hover {
  color: #0f172a;
}

.nav-link-btn.active,
.nav-link-btn.active-pill {
  color: #ffffff;
  background-color: transparent;
  border-radius: var(--radius-pill);
  position: relative;
  box-shadow: 0 2px 0 0 #3b82f6;
}

[data-theme="light"] .nav-link-btn.active,
[data-theme="light"] .nav-link-btn.active-pill {
  color: #0f172a;
  background-color: rgba(15, 23, 42, 0.06);
}

/* 3. Centered Frosted Glass Mega Menu (Modern Split Layout) */
.mega-menu-wrapper {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(7px);
  width: min(1040px, calc(100vw - 32px));
  height: min(78vh, 540px);
  max-height: min(78vh, 540px);
  max-height: min(78dvh, 540px);
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: contain;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), transparent 52%), rgba(248, 250, 255, 0.98);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-card);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  padding: 0;
  display: flex;
  opacity: 0;
  visibility: hidden;
  z-index: 2000;
  transition: opacity 140ms ease, transform 140ms ease, visibility 0s linear 140ms;
}

[dir="rtl"] .mega-menu-wrapper {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] .mega-menu-wrapper {
  direction: ltr;
  text-align: left;
}

.mega-menu-wrapper::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 16px;
}

[data-theme="dark"] .mega-menu-wrapper {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), transparent 55%), rgba(8, 13, 25, 0.98);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Visibility is state-driven */
.nav-item.is-open .mega-menu-wrapper {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

.nav-item.is-open > #mega-menu-trigger {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 0 0 #3b82f6;
}

[data-theme="light"] .nav-item.is-open > #mega-menu-trigger {
  background: rgba(15, 23, 42, 0.06);
}

#mega-menu-trigger svg {
  transition: transform 180ms ease;
}

.nav-item.is-open > #mega-menu-trigger svg {
  transform: rotate(180deg);
}

/* Split Pane Layout */
.mega-menu-split {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar Categories List */
.mega-menu-sidebar {
  width: 270px;
  flex: 0 0 270px;
  display: flex;
  flex-direction: column;
  border-inline-end: 1px solid var(--border-medium);
  background: rgba(15, 23, 42, 0.35);
  box-sizing: border-box;
}

[data-theme="light"] .mega-menu-sidebar {
  background: rgba(241, 245, 249, 0.65);
}

.mega-sidebar-tabs {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.mega-sidebar-tabs::-webkit-scrollbar {
  width: 5px;
}

.mega-sidebar-tabs::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 999px;
}

.mega-cat-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  min-height: 40px;
  user-select: none;
}

.mega-cat-tab:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
}

.mega-cat-tab.is-active,
.mega-cat-tab[aria-selected="true"] {
  color: var(--text-main);
  background: var(--bg-card);
  border-color: var(--brand-primary-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .mega-cat-tab.is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .mega-cat-tab.is-active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(37, 99, 235, 0.35);
}

.mega-cat-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-primary);
}

.mega-cat-tab-icon svg {
  width: 16px;
  height: 16px;
}

.mega-cat-tab-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-cat-tab-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.mega-cat-tab.is-active .mega-cat-tab-count {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: transparent;
}

.mega-cat-tab-arrow {
  width: 13px;
  height: 13px;
  color: var(--text-subtle);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

[dir="ltr"] .mega-cat-tab-arrow {
  transform: translateX(-4px);
}

.mega-cat-tab.is-active .mega-cat-tab-arrow,
.mega-cat-tab:hover .mega-cat-tab-arrow {
  opacity: 1;
  transform: translateX(0);
}

.mega-sidebar-footer {
  padding: 10px;
  border-block-start: 1px solid var(--border-medium);
  background: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .mega-sidebar-footer {
  background: rgba(241, 245, 249, 0.5);
}

.mega-menu-all-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(115deg, var(--brand-primary), #3b82f6);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-sizing: border-box;
}

.mega-menu-all-link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.mega-menu-all-link svg {
  width: 14px;
  height: 14px;
}

/* Content Area for Category Panels */
.mega-menu-content-area {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.mega-menu-content-area::-webkit-scrollbar {
  width: 6px;
}

.mega-menu-content-area::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 999px;
}

.mega-cat-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.mega-cat-panel.is-active,
.mega-cat-panel:not([hidden]) {
  display: flex;
  animation: megaFadeIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--border-subtle);
}

.mega-panel-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mega-panel-header-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mega-panel-header-icon svg {
  width: 18px;
  height: 18px;
}

.mega-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.mega-panel-desc {
  margin: 2px 0 0 0;
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.mega-panel-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mega-panel-cat-link:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.mega-panel-cat-link svg {
  width: 12px;
  height: 12px;
}

.mega-panel-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.mega-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  min-width: 0;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.mega-tool-item:hover {
  background-color: var(--bg-card);
  border-color: var(--brand-primary-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mega-tool-img-wrap {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
}

.mega-tool-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.mega-tool-item:hover .mega-tool-img-wrap img {
  transform: scale(1.12);
}

.mega-tool-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.mega-tool-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mega-tool-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mega-tool-arrow {
  color: var(--text-subtle);
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.mega-tool-item:hover .mega-tool-arrow {
  color: var(--brand-primary);
  transform: translateX(-3px);
}

[dir="ltr"] .mega-tool-item:hover .mega-tool-arrow {
  transform: translateX(3px);
}


/* 4. iOS Theme Switcher Pill (Vision Matching) */
.theme-toggle-pill {
  position: relative;
  width: 58px;
  height: 30px;
  border-radius: var(--radius-pill);
  background-color: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: pointer;
  outline: none;
  direction: ltr !important;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .theme-toggle-pill {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.15);
}

.theme-toggle-pill .icon-svg {
  width: 13px;
  height: 13px;
  z-index: 1;
  color: #94a3b8;
  transition: color 0.25s ease;
}

.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .theme-toggle-knob,
.theme-toggle-pill.is-dark .theme-toggle-knob {
  transform: translateX(26px) !important;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr !important;
}

.lang-switch-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  height: 30px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lang-switch-pill:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

[data-theme="light"] .lang-switch-pill {
  background-color: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

[data-theme="light"] .lang-switch-pill:hover {
  background-color: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.22);
  color: #0f172a;
}

.lang-switch-pill:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Mobile Drawer Hamburger */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* Quick Search Header Trigger Button */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  position: relative;
  flex-shrink: 0;
}

[data-theme="light"] .header-search-btn {
  background-color: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.header-search-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

[data-theme="light"] .header-search-btn:hover {
  background-color: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.22);
  color: #0f172a;
}

.header-search-btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.header-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Quick Search Dropdown Container Flush Below Sticky Header */
.header-quick-search {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  z-index: 1005;
  pointer-events: auto;
}

.header-quick-search[hidden] {
  display: none !important;
}

.header-quick-search-backdrop {
  position: fixed;
  top: 58px;
  inset-inline: 0;
  bottom: 0;
  background: rgba(4, 8, 18, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

[data-theme="light"] .header-quick-search-backdrop {
  background: rgba(15, 23, 42, 0.22);
}

.header-quick-search.is-open .header-quick-search-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.header-quick-search-panel {
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.98) 0%, rgba(9, 14, 28, 0.99) 100%);
  backdrop-filter: blur(28px) saturate(190%) contrast(102%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(102%);
  border-block-end: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

[data-theme="light"] .header-quick-search-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.99) 100%);
  border-block-end: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.header-quick-search.is-open .header-quick-search-panel {
  transform: translateY(0);
  opacity: 1;
}

.quick-search-container {
  max-width: 760px;
  margin-inline: auto;
  padding: 16px 20px 20px;
  box-sizing: border-box;
}

.quick-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 0 12px;
  height: 48px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

[data-theme="light"] .quick-search-form {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.quick-search-form:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

[data-theme="light"] .quick-search-form:focus-within {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.quick-search-input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-inline-end: 6px;
}

.quick-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  padding: 0 6px;
}

[data-theme="light"] .quick-search-input {
  color: #0f172a;
}

.quick-search-input::placeholder {
  color: #94a3b8;
}

[data-theme="light"] .quick-search-input::placeholder {
  color: #64748b;
}

.quick-search-input::-webkit-search-decoration,
.quick-search-input::-webkit-search-cancel-button {
  display: none;
}

.quick-search-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  margin-inline-end: 6px;
  padding: 0;
  transition: all 0.15s ease;
}

[data-theme="light"] .quick-search-clear-btn {
  background: rgba(15, 23, 42, 0.06);
}

.quick-search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

[data-theme="light"] .quick-search-clear-btn:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.quick-search-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-search-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .quick-search-close-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

.quick-search-esc-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1.5px 5px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.2;
}

[data-theme="light"] .quick-search-esc-tag {
  background-color: rgba(15, 23, 42, 0.06);
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.1);
}

/* Results Dropdown */
.quick-search-dropdown {
  margin-block-start: 12px;
}

.quick-search-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
}

.quick-search-section-label {
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.quick-search-count-badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .quick-search-count-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.quick-search-scroll {
  max-height: min(58vh, 390px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
  scrollbar-width: thin;
}

.quick-search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quick-search-item {
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.quick-search-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  min-height: 52px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  box-sizing: border-box;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.quick-search-item:hover .quick-search-link,
.quick-search-item.is-active .quick-search-link {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .quick-search-item:hover .quick-search-link,
[data-theme="light"] .quick-search-item.is-active .quick-search-link {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.quick-search-item-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

[data-theme="light"] .quick-search-item-thumb {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

.quick-search-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quick-search-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-search-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-search-item-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .quick-search-item-name {
  color: #0f172a;
}

.qs-highlight {
  background: rgba(37, 99, 235, 0.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

[data-theme="light"] .qs-highlight {
  background: rgba(147, 197, 253, 0.5);
}

.quick-search-item-cat {
  font-size: 0.675rem;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .quick-search-item-cat {
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.08);
}

.quick-search-item-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.quick-search-item-arrow {
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
  margin-inline-start: 4px;
}

.quick-search-item:hover .quick-search-item-arrow,
.quick-search-item.is-active .quick-search-item-arrow {
  color: var(--brand-primary);
  transform: translateX(-3px);
}

[dir="ltr"] .quick-search-item:hover .quick-search-item-arrow,
[dir="ltr"] .quick-search-item.is-active .quick-search-item-arrow {
  transform: translateX(3px);
}

/* Empty State */
.quick-search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  gap: 10px;
}

.quick-search-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

[data-theme="light"] .quick-search-empty-icon {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

.quick-search-empty-msg {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Bottom Bar */
.quick-search-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-start: 12px;
  padding-block-start: 12px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-subtle);
}

[data-theme="light"] .quick-search-bottom-bar {
  border-block-start-color: rgba(15, 23, 42, 0.08);
}

.quick-search-keys-guide {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-search-key-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-search-key-item kbd {
  font-family: inherit;
  font-size: 0.675rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="light"] .quick-search-key-item kbd {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}

.quick-search-badge-private {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #93c5fd;
  font-weight: 600;
}

[data-theme="light"] .quick-search-badge-private {
  color: #1d4ed8;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .header-search-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
  }

  .header-search-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
  }

  .header-search-kbd {
    display: none;
  }

  .quick-search-container {
    padding: 12px 14px 16px;
  }

  .quick-search-form {
    height: 46px;
    padding: 0 10px;
  }

  .quick-search-input {
    font-size: 1rem;
  }

  .quick-search-esc-tag {
    display: none;
  }

  .quick-search-keys-guide {
    display: none;
  }

  .quick-search-bottom-bar {
    justify-content: center;
    margin-block-start: 10px;
    padding-block-start: 10px;
  }

  .quick-search-scroll {
    max-height: min(65vh, 380px);
  }
}

@media (max-width: 480px) {
  .header-search-btn {
    width: 28px;
    height: 28px;
  }

  .header-search-btn::after {
    inset: -10px;
  }

  .header-search-icon {
    width: 14px;
    height: 14px;
  }

  .quick-search-item-cat {
    display: none;
  }
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  background: rgba(3, 7, 18, 0.58);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.mobile-drawer-content {
  position: relative;
  width: min(400px, calc(100vw - 22px));
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom));
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(59, 130, 246, 0.055), transparent 42%),
    var(--bg-surface);
  border-inline-end: 1px solid var(--border-medium);
  border-start-end-radius: 28px;
  border-end-end-radius: 28px;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.48) transparent;
  transform: translateX(-105%);
  transition: transform 320ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

[dir="rtl"] .mobile-drawer-content {
  transform: translateX(105%);
}

.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-header,
.mobile-drawer-brand,
.mobile-drawer-section-heading,
.mobile-drawer-nav-link,
.mobile-drawer-tool-link,
.mobile-drawer-store-link,
.mobile-drawer-control {
  display: flex;
  align-items: center;
}

.mobile-drawer-header {
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
}

.mobile-drawer-brand {
  min-width: 0;
  gap: 10px;
  color: var(--text-main);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.mobile-drawer-brand .brand-icon {
  width: 34px;
  height: 34px;
}

.mobile-drawer-close {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  appearance: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.mobile-drawer-close svg {
  width: 20px;
  height: 20px;
}

.mobile-drawer-close:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  transform: rotate(90deg);
}

.mobile-drawer-primary-nav {
  display: grid;
  gap: 8px;
  padding-block-end: 18px;
  border-block-end: 1px solid var(--border-subtle);
}

.mobile-drawer-nav-link {
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
  gap: 12px;
  padding: 8px 12px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: start;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mobile-drawer-nav-link:hover,
.mobile-drawer-nav-link:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary-border);
  transform: translateY(-1px);
}

.mobile-drawer-nav-link-primary {
  background: linear-gradient(110deg, rgba(37, 99, 235, 0.16), rgba(59, 130, 246, 0.055));
  border-color: var(--brand-primary-border);
}

.mobile-drawer-nav-icon,
.mobile-drawer-tool-icon,
.mobile-drawer-store-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--brand-primary-hover);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-border);
  border-radius: 13px;
}

.mobile-drawer-nav-icon svg,
.mobile-drawer-tool-icon svg,
.mobile-drawer-store-icon svg {
  width: 19px;
  height: 19px;
}

.mobile-drawer-nav-link > span:nth-child(2),
.mobile-drawer-tool-name,
.mobile-drawer-store-link > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.mobile-drawer-nav-arrow,
.mobile-drawer-tool-arrow {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--text-subtle);
  transition: transform 160ms ease, color 160ms ease;
}

[dir="rtl"] .mobile-drawer-nav-arrow,
[dir="rtl"] .mobile-drawer-tool-arrow {
  transform: rotate(180deg);
}

.mobile-drawer-nav-link:hover .mobile-drawer-nav-arrow,
.mobile-drawer-tool-link:hover .mobile-drawer-tool-arrow {
  color: var(--brand-primary-hover);
}

[dir="rtl"] .mobile-drawer-nav-link:hover .mobile-drawer-nav-arrow,
[dir="rtl"] .mobile-drawer-tool-link:hover .mobile-drawer-tool-arrow {
  transform: rotate(180deg) translateX(-3px);
}

[dir="ltr"] .mobile-drawer-nav-link:hover .mobile-drawer-nav-arrow,
[dir="ltr"] .mobile-drawer-tool-link:hover .mobile-drawer-tool-arrow {
  transform: translateX(3px);
}

.mobile-drawer-tools {
  min-width: 0;
}

.mobile-drawer-section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 12px;
}

.mobile-drawer-section-heading h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 750;
}

.mobile-drawer-all-tools {
  color: var(--brand-primary-hover);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.mobile-drawer-all-tools:hover {
  color: var(--brand-accent);
}

.mobile-drawer-tool-list {
  display: grid;
  gap: 6px;
}

.mobile-drawer-tool-link {
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  gap: 11px;
  padding: 5px 8px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.mobile-drawer-tool-link:hover,
.mobile-drawer-tool-link:focus-visible {
  color: var(--text-main);
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.mobile-drawer-tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.mobile-drawer-tool-icon svg {
  width: 17px;
  height: 17px;
}

.mobile-drawer-tool-arrow {
  width: 15px;
  height: 15px;
}

.mobile-drawer-bottom {
  display: grid;
  gap: 12px;
  margin-block-start: auto;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--border-subtle);
}

.mobile-drawer-store-link {
  min-height: 52px;
  gap: 11px;
  padding: 7px 10px;
  color: var(--text-main);
  background: linear-gradient(110deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.045));
  border: 1px solid var(--brand-primary-border);
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.mobile-drawer-store-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.mobile-drawer-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mobile-drawer-control {
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
}

.mobile-drawer-control svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--brand-primary-hover);
}

.mobile-drawer-control:hover {
  color: var(--text-main);
  border-color: var(--brand-primary-border);
}

.mobile-drawer-open {
  overflow: hidden;
}

.mobile-menu-btn:focus-visible,
.mobile-drawer-close:focus-visible,
.mobile-drawer-nav-link:focus-visible,
.mobile-drawer-tool-link:focus-visible,
.mobile-drawer-control:focus-visible,
.mobile-drawer-store-link:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .mobile-drawer-content,
  .mobile-drawer-nav-link,
  .mobile-drawer-tool-link,
  .mobile-drawer-close {
    transition-duration: 0.01ms;
  }
}

[dir="rtl"] .mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

[dir="ltr"] .mobile-drawer-content {
  transform: translateX(-105%);
}

.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-content > * {
  box-sizing: border-box;
}

/* Localized About popup */
.about-dialog {
  position: fixed;
  width: min(660px, calc(100vw - 28px));
  max-width: none;
  max-height: min(84vh, 760px);
  max-height: min(84dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--text-main);
  background:
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(59, 130, 246, 0.08), transparent 55%),
    var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.48) transparent;
}

.article-dialog {
  width: min(780px, calc(100vw - 28px));
}

.about-dialog::backdrop {
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.about-dialog[open] {
  animation: about-dialog-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes about-dialog-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.about-dialog::-webkit-scrollbar {
  width: 7px;
}

.about-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.about-dialog::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.42);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.about-dialog-shell {
  padding: clamp(22px, 5vw, 38px);
}

.about-dialog-topline,
.about-dialog-brand,
.about-dialog-actions {
  display: flex;
  align-items: center;
}

.about-dialog-topline {
  justify-content: space-between;
  gap: 16px;
}

.about-dialog-brand {
  min-width: 0;
  gap: 12px;
  color: var(--brand-primary-hover);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-dialog-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 5px;
  object-fit: contain;
  border: 1px solid var(--brand-primary-border);
  border-radius: 14px;
  background: var(--brand-primary-light);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

.about-dialog-close {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.about-dialog-close svg {
  width: 19px;
  height: 19px;
}

.about-dialog-close:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  transform: rotate(90deg);
}

.about-dialog-title {
  margin: 26px 0 10px;
  color: var(--text-main);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-wrap: balance;
}

.about-dialog-description {
  max-width: 56ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.article-dialog-content {
  margin-block-start: 18px;
}

.article-dialog-intro {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.article-dialog-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.article-dialog-point {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 17px;
}

.article-dialog-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--brand-primary-hover);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-border);
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 800;
}

.article-dialog-point h3 {
  margin: 1px 0 5px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.45;
}

.article-dialog-point p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.77rem;
  line-height: 1.6;
}

.about-dialog-store {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-block-start: 20px;
  padding: 14px;
  background: linear-gradient(115deg, rgba(37, 99, 235, 0.12), rgba(56, 189, 248, 0.045)), var(--bg-card);
  border: 1px solid var(--brand-primary-border);
  border-radius: 18px;
}

.about-dialog-store-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--brand-primary-hover);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-border);
  border-radius: 14px;
}

.about-dialog-store-icon svg {
  width: 21px;
  height: 21px;
}

.about-dialog-store-copy {
  min-width: 0;
}

.about-dialog-store-copy h3 {
  margin: 0 0 4px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.about-dialog-store-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.about-dialog-store-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.about-dialog-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: 1px solid rgba(96, 165, 250, 0.55);
  border-radius: var(--radius-pill);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, filter 160ms ease;
}

.about-dialog-store-link:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.about-dialog-store-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

[dir="rtl"] .about-dialog-store-link svg {
  transform: rotate(180deg);
}

.about-dialog-store-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 160ms cubic-bezier(0.16, 1, 0.3, 1);
  direction: ltr;
}

.about-dialog-store-email svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--brand-primary-hover);
}

.about-dialog-store-email:hover {
  color: #ffffff;
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-border);
  transform: translateY(-1px);
}

.about-dialog-store-email:focus-visible,
.about-dialog-store-link:focus-visible {
  outline: 2px solid var(--brand-primary-border);
  outline-offset: 2px;
}

[data-theme="light"] .about-dialog-store-email {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}

[data-theme="light"] .about-dialog-store-email:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1e40af;
}

.about-dialog-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block-start: 26px;
}

.about-dialog-feature {
  min-width: 0;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}

.about-dialog-feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-block-end: 14px;
  color: var(--brand-primary-hover);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-border);
  border-radius: 14px;
}

.about-dialog-feature-icon svg {
  width: 21px;
  height: 21px;
}

.about-dialog-feature h3 {
  margin: 0 0 7px;
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.4;
}

.about-dialog-feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.about-dialog-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 26px;
}

.about-dialog-primary,
.about-dialog-dismiss {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.about-dialog-primary {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: 1px solid rgba(96, 165, 250, 0.55);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.about-dialog-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.about-dialog-primary svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

[dir="rtl"] .about-dialog-primary svg {
  transform: rotate(180deg);
}

.about-dialog-dismiss {
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
}

.about-dialog-dismiss:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.about-dialog-close:focus-visible,
.about-dialog-primary:focus-visible,
.about-dialog-dismiss:focus-visible,
.footer-about-open:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
}

.footer-about-open {
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.8125rem;
  text-align: start;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-about-open:hover {
  color: var(--text-main);
  transform: translateX(-2px);
}

[dir="ltr"] .footer-about-open:hover {
  transform: translateX(2px);
}

@media (max-width: 600px) {
  .about-dialog {
    width: calc(100vw - 20px);
    max-height: min(88vh, 760px);
    max-height: min(88dvh, 760px);
    border-radius: 24px;
  }

  .article-dialog-points {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .article-dialog-point {
    padding: 12px;
  }

  .about-dialog-shell {
    padding: 22px;
  }

  .about-dialog-features {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-block-start: 20px;
  }

  .about-dialog-store {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .about-dialog-store-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .about-dialog-store-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-block-start: 4px;
  }

  .about-dialog-feature {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 12px;
    padding: 14px;
  }

  .about-dialog-feature-icon {
    grid-row: span 2;
    margin: 0;
  }

  .about-dialog-feature h3 {
    align-self: end;
  }

  .about-dialog-actions {
    margin-block-start: 20px;
  }

  .about-dialog-primary {
    flex: 1;
  }
}


/* 11. Modern iOS Glass Breadcrumbs */
nav[aria-label="مسار التنقل"],
nav[aria-label="Breadcrumb"],
.tool-page > nav,
.articles-page > nav,
.container > nav:first-child {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin-block-end: var(--space-4, 16px);
  overflow: hidden;
}

.breadcrumbs-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 16px;
  background-color: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  max-width: 100%;
  width: max-content;
  box-sizing: border-box;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0;
}

.breadcrumbs-glass::-webkit-scrollbar {
  display: none;
}

.breadcrumbs-glass li {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.breadcrumbs-glass a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.breadcrumbs-glass a:hover {
  color: var(--text-main);
}

.breadcrumbs-glass [aria-current="page"],
.breadcrumbs-glass li[aria-current="page"] {
  color: var(--text-main);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.breadcrumbs-glass .breadcrumb-current-text,
.breadcrumbs-glass [aria-current="page"] > span {
  display: inline-block;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.breadcrumbs-sep {
  color: var(--text-muted);
  opacity: 0.75;
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline: 1px;
  user-select: none;
}

.breadcrumbs-sep svg {
  width: 8px !important;
  height: 8px !important;
  display: block;
  flex-shrink: 0 !important;
  stroke: currentColor;
}

[dir="rtl"] .breadcrumbs-sep svg {
  transform: rotate(180deg);
}

/* 11b. Universal Hero, Search Pill, Category Pills & Tool Cards System */
.hero-glass {
  padding-block-start: clamp(var(--space-8), 6vw, var(--space-12));
  padding-block-end: var(--space-6);
  text-align: center;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-block-end: var(--space-4);
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-block-end: var(--space-3);
  color: var(--text-main);
}

.hero-title .highlight {
  color: var(--brand-primary);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin-inline: auto;
  margin-block-end: var(--space-6);
}

/* Search Bar Pill */
.search-pill-wrapper {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
  margin-block-end: var(--space-6);
}

.search-pill-input {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-pill);
  background: rgba(14, 22, 40, 0.6);
  backdrop-filter: blur(24px) saturate(190%) contrast(102%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) contrast(102%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-inline-start: 48px;
  padding-inline-end: 20px;
  font-size: 0.95rem;
  color: #ffffff;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35), inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
  outline: none;
}

[data-theme="light"] .search-pill-input {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text-main);
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .search-pill-input::placeholder {
  color: var(--text-subtle);
}

[dir="rtl"] .search-pill-input {
  text-align: right;
  padding-inline-start: 48px;
  padding-inline-end: 20px;
}

.search-pill-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light), 0 4px 20px rgba(37, 99, 235, 0.2);
}

.search-pill-icon {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  pointer-events: none;
  z-index: 2;
  display: block;
}

[data-theme="light"] .search-pill-icon {
  color: var(--text-muted);
}

/* Category Filter Pills Bar */
.category-pills-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-block-end: var(--space-8);
}

.category-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-4);
  height: 40px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(14, 22, 40, 0.6);
  backdrop-filter: blur(24px) saturate(190%) contrast(102%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) contrast(102%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.25), inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .category-filter-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.45) 100%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text-main);
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.06), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.95);
}

.category-filter-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%), rgba(20, 32, 58, 0.75);
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.42);
  border-top-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.4), 0 0 16px -2px rgba(59, 130, 246, 0.22), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .category-filter-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.65) 100%);
  color: var(--brand-primary);
  border-color: rgba(255, 255, 255, 0.9);
  border-top-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.15), inset 0 1px 2px 0 #ffffff;
}

.category-filter-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

@media (max-width: 1280px), (max-height: 800px) {
  .hero-glass {
    padding-block-start: 22px;
    padding-block-end: 12px;
  }

  .hero-pill-badge {
    font-size: 0.75rem;
    padding: 3px 12px;
    margin-block-end: 8px;
  }

  .hero-title {
    font-size: clamp(1.45rem, 3.2vw, 2.1rem);
    margin-block-end: 6px;
  }

  .hero-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-block-end: 14px;
    max-width: 560px;
  }

  .search-pill-wrapper {
    max-width: 480px;
    margin-block-end: 14px;
  }

  .search-pill-input {
    height: 44px;
    font-size: 0.85rem;
    padding-inline-start: 42px;
    padding-inline-end: 16px;
  }

  .search-pill-icon {
    width: 18px;
    height: 18px;
    inset-inline-start: 14px;
  }

  .category-pills-bar {
    gap: 6px;
    margin-block-end: 16px;
  }

  .category-filter-btn {
    height: 32px;
    padding-inline: 12px;
    font-size: 0.78rem;
  }
}

/* Tools Grid & Modern Responsive Tool Cards System */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-block-end: var(--space-8);
}

.tool-card-glass {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: auto;
  min-height: 250px;
  box-sizing: border-box;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.01) 100%), rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(28px) saturate(210%) contrast(105%);
  -webkit-backdrop-filter: blur(28px) saturate(210%) contrast(105%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 20px 16px 14px;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 16px 38px -8px rgba(0, 0, 0, 0.55), 0 4px 14px -3px rgba(0, 0, 0, 0.3), inset 0 1px 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

[data-theme="light"] .tool-card-glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.38) 50%, rgba(240, 246, 255, 0.25) 100%);
  backdrop-filter: blur(28px) saturate(200%) contrast(102%);
  -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(102%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 36px -8px rgba(37, 99, 235, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04), inset 0 1px 2px 0 rgba(255, 255, 255, 0.98), inset 0 -1px 1px 0 rgba(37, 99, 235, 0.04);
  color: var(--text-main);
}

.tool-card-glass:hover {
  transform: translateY(-5px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(37, 99, 235, 0.12) 100%), rgba(18, 28, 52, 0.55);
  border-color: rgba(96, 165, 250, 0.45);
  border-top-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 22px 45px -8px rgba(0, 0, 0, 0.65), 0 0 24px -4px rgba(59, 130, 246, 0.25), inset 0 1px 2px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .tool-card-glass:hover {
  transform: translateY(-5px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(224, 242, 254, 0.35) 100%);
  border-color: rgba(255, 255, 255, 0.9);
  border-top-color: #ffffff;
  box-shadow: 0 18px 40px -8px rgba(37, 99, 235, 0.16), 0 6px 16px -2px rgba(15, 23, 42, 0.06), inset 0 1px 2px 0 #ffffff;
}

.tool-card-img-wrap {
  width: 100%;
  height: 114px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-end: 12px;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.tool-card-img-wrap img {
  max-width: 135px;
  max-height: 108px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card-glass:hover .tool-card-img-wrap img {
  transform: scale(1.06) translateY(-4px);
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-block-end: 4px;
  line-height: 1.32;
  color: #ffffff;
  text-align: center;
  height: 2.65em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  flex-shrink: 0;
}

[data-theme="light"] .tool-card-title {
  color: #0f172a;
}

.tool-card-desc {
  font-size: 0.79rem;
  color: #94a3b8;
  line-height: 1.38;
  margin-block-end: 8px;
  text-align: center;
  height: 2.75em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  flex-shrink: 0;
}

[data-theme="light"] .tool-card-desc {
  color: #475569;
}

.tool-card-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  direction: ltr !important;
  margin-block-start: auto;
  padding-block-start: 4px;
  flex-shrink: 0;
}

[dir="ltr"] .tool-card-bottom {
  justify-content: flex-end !important;
}

.tool-action-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s ease;
}

[data-theme="light"] .tool-action-circle {
  background-color: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.tool-card-glass:hover .tool-action-circle {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateX(-3px);
}

[dir="ltr"] .tool-card-glass:hover .tool-action-circle {
  transform: translateX(3px);
}

/* ==========================================================================
   720p AND SMALL SCREENS PROGRESSIVE SCALE-DOWN (HOME & ALL TOOLS)
   ========================================================================== */
@media (max-width: 1280px), (max-height: 800px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-block-end: 20px;
  }

  .tool-card-glass {
    min-height: 235px;
    padding: 16px 14px 12px;
    border-radius: 18px;
  }

  .tool-card-img-wrap {
    height: 98px;
    margin-block-end: 10px;
  }

  .tool-card-img-wrap img {
    max-width: 115px;
    max-height: 92px;
  }

  .tool-card-title {
    font-size: 0.94rem;
    line-height: 1.3;
    margin-block-end: 4px;
    height: 2.6em;
  }

  .tool-card-desc {
    font-size: 0.76rem;
    line-height: 1.35;
    margin-block-end: 8px;
    height: 2.7em;
  }

  .tool-action-circle {
    width: 28px;
    height: 28px;
  }

  .tool-action-circle svg {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .tool-card-glass {
    min-height: 220px;
    padding: 14px 12px 10px;
    border-radius: 16px;
  }

  .tool-card-img-wrap {
    height: 88px;
    margin-block-end: 8px;
  }

  .tool-card-img-wrap img {
    max-width: 102px;
    max-height: 82px;
  }

  .tool-card-title {
    font-size: 0.88rem;
    line-height: 1.28;
    height: 2.56em;
  }

  .tool-card-desc {
    font-size: 0.72rem;
    line-height: 1.3;
    height: 2.6em;
  }

  .tool-action-circle {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 860px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .tool-card-glass {
    min-height: 205px;
    padding: 12px 10px 9px;
  }

  .tool-card-img-wrap {
    height: 78px;
    margin-block-end: 7px;
  }

  .tool-card-img-wrap img {
    max-width: 90px;
    max-height: 72px;
  }

  .tool-card-title {
    font-size: 0.82rem;
    line-height: 1.25;
    height: 2.5em;
  }

  .tool-card-desc {
    font-size: 0.68rem;
    line-height: 1.28;
    height: 2.56em;
  }

  .tool-action-circle {
    width: 25px;
    height: 25px;
  }
}

/* 12. Vision Mockup Liquid Glass Footer System */
.footer-glass {
  width: 100%;
  margin-block-start: auto;
  background: linear-gradient(180deg, rgba(8, 13, 25, 0.45) 0%, rgba(6, 9, 19, 0.96) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  padding-block-start: var(--space-10);
  padding-block-end: var(--space-6);
}

[data-theme="light"] .footer-glass {
  background: rgba(255, 255, 255, 0.76);
  border-block-start-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 -10px 32px rgba(15, 23, 42, 0.04);
}

.footer-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.15fr 1.15fr auto;
  gap: var(--space-6);
  align-items: start;
  direction: ltr !important;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  direction: ltr;
  text-align: left;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 10px;
}

.footer-brand-header .brand-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.45));
}

.footer-brand-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

[data-theme="light"] .footer-brand-title,
[data-theme="light"] .footer-col-title {
  color: var(--text-main);
}

.footer-brand-desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 270px;
  margin-block-end: 14px;
}

[dir="rtl"] .footer-brand-desc {
  direction: rtl;
  text-align: right;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .footer-social-icon {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

.footer-social-icon:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.footer-social-icon svg {
  display: block;
}

.footer-social-icon:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

.footer-contact-email {
  margin-block-start: 12px;
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.footer-email-link span {
  direction: ltr;
  unicode-bidi: embed;
}

.footer-email-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 180ms ease;
}

.footer-email-link:hover {
  color: #ffffff;
}

.footer-email-link:hover svg {
  color: var(--brand-primary-hover);
}

.footer-email-link:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .footer-nav-col {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] .footer-nav-col {
  direction: ltr;
  text-align: left;
}

.footer-col-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  margin-block-end: 14px;
  letter-spacing: -0.01em;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer-links-list a:hover {
  color: #ffffff;
  transform: translateX(-2px);
}

[dir="ltr"] .footer-links-list a:hover {
  transform: translateX(2px);
}

.footer-actions-col {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.footer-controls-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 36px;
  min-width: 48px;
}

[data-theme="light"] .footer-lang-pill,
[data-theme="light"] .footer-theme-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-main);
}

.footer-lang-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .footer-bottom {
  border-block-start-color: rgba(15, 23, 42, 0.08);
}

.footer-theme-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Light/Dark Toggle state */
[data-theme="dark"] .footer-theme-btn .icon-svg-sun {
  display: none;
}
[data-theme="dark"] .footer-theme-btn .icon-svg-moon {
  display: block;
}
[data-theme="light"] .footer-theme-btn .icon-svg-moon {
  display: none;
}
[data-theme="light"] .footer-theme-btn .icon-svg-sun {
  display: block;
}

.footer-bottom {
  margin-block-start: var(--space-8);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-copy-text {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-subtle);
  letter-spacing: 0.01em;
}

/* Light Theme Footer */
[data-theme="light"] .footer-glass {
  background: linear-gradient(180deg, rgba(240, 244, 250, 0.85) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-block-start-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .footer-brand-title {
  color: #0f172a;
}

[data-theme="light"] .footer-col-title {
  color: #0f172a;
}

[data-theme="light"] .footer-social-icon {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-muted);
}

[data-theme="light"] .footer-social-icon:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

[data-theme="light"] .footer-email-link {
  color: var(--text-muted);
}

[data-theme="light"] .footer-email-link:hover {
  color: var(--text-main);
}

[data-theme="light"] .footer-email-link:hover svg {
  color: var(--brand-primary);
}

[data-theme="light"] .footer-lang-pill {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

[data-theme="light"] .footer-lang-pill:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .footer-theme-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-muted);
}

[data-theme="light"] .footer-theme-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

[data-theme="light"] .footer-bottom {
  border-block-start-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .footer-links-list a:hover {
  color: var(--brand-primary);
}

@media (max-width: 640px) {
  .footer-glass {
    padding-block: 16px calc(12px + env(safe-area-inset-bottom));
  }

  .footer-container {
    padding-inline: 14px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
    padding: 13px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.075), transparent 68%), var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  .footer-brand-header {
    gap: 9px;
    margin-block-end: 8px;
  }

  .footer-brand-header .brand-icon {
    width: 30px;
    height: 30px;
  }

  .footer-brand-title {
    font-size: 0.98rem;
  }

  .footer-brand-desc {
    max-width: none;
    margin-block: 0 10px;
    font-size: 0.75rem;
    line-height: 1.6;
  }

  .footer-social-links {
    gap: 8px;
  }

  .footer-social-icon {
    width: 32px;
    height: 32px;
  }

  .footer-contact-email {
    margin-block-start: 10px;
  }

  .footer-email-link {
    font-size: 0.775rem;
  }

  .footer-nav-col {
    min-width: 0;
    padding: 11px 11px 9px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.035), transparent 72%), var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 17px;
  }

  .footer-col-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-block: 0 7px;
    padding-block-end: 7px;
    border-block-end: 1px solid var(--border-subtle);
    font-size: 0.78rem;
  }

  .footer-col-title::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 10px var(--brand-primary-border);
  }

  .footer-links-list {
    gap: 3px;
  }

  .footer-links-list li {
    min-width: 0;
  }

  .footer-links-list a,
  .footer-links-list .footer-about-open {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 29px;
    box-sizing: border-box;
    padding: 4px 7px;
    border-radius: 9px;
    font-size: 0.71rem;
    line-height: 1.4;
  }

  .footer-links-list a:hover,
  .footer-links-list .footer-about-open:hover {
    background: var(--bg-subtle);
    transform: none;
  }

  .footer-actions-col {
    grid-column: 1 / -1;
    justify-content: flex-start;
    align-items: center;
    padding-block-start: 0;
  }

  .footer-controls-row {
    gap: 6px;
    padding: 3px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
  }

  .footer-lang-pill {
    min-width: 40px;
    min-height: 34px;
    padding-inline: 11px;
    font-size: 0.75rem;
  }

  .footer-theme-btn {
    width: 34px;
    height: 34px;
  }

  .footer-bottom {
    justify-content: center;
    margin-block-start: 12px;
    padding-block-start: 10px;
    text-align: center;
  }

  .footer-copy-text {
    font-size: 0.65rem;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .footer-container {
    padding-inline: 10px;
  }

  .footer-grid {
    gap: 8px;
  }

  .footer-brand-col {
    padding: 13px;
  }

  .footer-nav-col {
    padding-inline: 9px;
  }

  .footer-links-list a,
  .footer-links-list .footer-about-open {
    padding-inline: 5px;
    font-size: 0.66rem;
  }
}

/* Keep the mega menu inside the viewport as the navigation gets narrower. */
@media (max-width: 900px) and (min-width: 761px) {
  .trust-badges-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mega-menu-wrapper {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .mega-callout-card {
    padding: 14px;
  }

  .mega-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
  }

  .mega-tool-item {
    gap: 8px;
    padding: 5px 8px;
  }

  .mega-tool-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 760px) and (min-width: 641px) {
  .trust-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mega-menu-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    width: min(620px, calc(100vw - 24px));
    max-height: min(76vh, 600px);
    max-height: min(76dvh, 600px);
  }

  .mega-callout-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 14px;
  }

  .mega-callout-card > div {
    min-width: 0;
  }

  .mega-menu-all-tools {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mega-callout-desc {
    margin-block-end: 0;
  }

  .mega-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mega-tool-item {
    min-width: 0;
    gap: 8px;
    padding: 8px;
  }

  .mega-tool-icon {
    width: 30px;
    height: 30px;
  }
}

/* Compact glass layout used by the narrow reference viewport. */
@media (max-width: 640px) {
  .site-main {
    padding-block: 0;
  }

  nav[aria-label="مسار التنقل"],
  nav[aria-label="Breadcrumb"],
  .tool-page > nav,
  .articles-page > nav,
  .container > nav:first-child {
    margin-block-end: 12px;
  }

  .breadcrumbs-glass {
    min-height: 34px;
    padding: 5px 12px;
    gap: 6px;
    font-size: 0.74rem;
    border-radius: 12px;
    max-width: 100%;
  }

  .breadcrumbs-glass .breadcrumb-current-text,
  .breadcrumbs-glass [aria-current="page"] > span,
  .breadcrumbs-glass [aria-current="page"] {
    max-width: clamp(110px, 36vw, 180px);
  }

  .breadcrumbs-sep {
    width: 12px;
    height: 12px;
    min-width: 12px;
  }

  .breadcrumbs-sep svg {
    width: 7px !important;
    height: 7px !important;
  }

  .header-container {
    padding: 8px 14px;
    gap: 8px;
  }

  .container {
    padding-inline: 24px;
  }

  .brand-link {
    gap: 7px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .brand-icon {
    width: 25px;
    height: 25px;
  }

  .header-nav {
    gap: 0;
    flex-shrink: 1;
  }

  .nav-link-btn {
    padding-inline: 7px;
    font-size: 0.7rem;
    min-height: 32px;
    white-space: nowrap;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-switch-pill {
    height: 26px;
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .theme-toggle-pill {
    width: 48px;
    height: 26px;
    padding-inline: 5px;
  }

  .theme-toggle-pill .icon-svg {
    width: 11px;
    height: 11px;
  }

  .theme-toggle-knob {
    width: 20px;
    height: 20px;
    top: 2px;
    left: 2px;
  }

  [data-theme="dark"] .theme-toggle-knob,
  .theme-toggle-pill.is-dark .theme-toggle-knob {
    transform: translateX(22px) !important;
  }

  .hero-glass {
    padding-block-start: 24px;
    padding-block-end: 12px;
  }

  .hero-pill-badge {
    margin-block-end: 10px;
    font-size: 0.68rem;
    padding: 4px 11px;
  }

  .hero-title {
    font-size: clamp(1.35rem, 5.4vw, 1.7rem);
    line-height: 1.3;
    margin-block-end: 6px;
  }

  .hero-desc {
    font-size: 0.76rem;
    line-height: 1.55;
    margin-block-end: 14px;
  }

  .search-pill-wrapper {
    max-width: 380px;
    margin-block-end: 12px;
  }

  .search-pill-input {
    height: 42px;
    font-size: 0.78rem;
    padding-inline-start: 40px;
    padding-inline-end: 16px;
  }

  .search-pill-icon {
    width: 17px;
    height: 17px;
    inset-inline-start: 14px;
  }

  .category-pills-bar {
    gap: 6px;
    margin-block-end: 14px;
  }

  .category-filter-btn {
    height: 29px;
    padding-inline: 10px;
    font-size: 0.68rem;
  }

  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-block-end: 14px;
  }

  .tool-card-glass {
    min-height: 168px;
    padding: 13px 10px 9px;
    border-radius: 14px;
  }

  .tool-card-img-wrap {
    width: 100%;
    height: 72px;
    aspect-ratio: auto;
    margin-block-end: 6px;
  }

  .tool-card-img-wrap img {
    max-width: 82px;
    max-height: 68px;
    width: auto;
    height: auto;
  }

  .tool-card-title {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    height: 2.5em;
    margin-block-end: 2px;
  }

  .tool-card-desc {
    font-size: 0.56rem;
    line-height: 1.26;
    height: 2.55em;
    margin-block-end: 4px;
  }

  .tool-card-bottom {
    margin-block-start: auto;
    padding-block-start: 2px;
  }

  .tool-action-circle {
    width: 22px;
    height: 22px;
  }

  .tool-action-circle svg {
    width: 10px;
    height: 10px;
  }

  .view-all-tools-wrap {
    margin-block: 28px 36px;
  }

  .view-all-tools-btn {
    min-height: 48px;
    padding-block: 6px;
    padding-inline-start: 24px;
    padding-inline-end: 8px;
    font-size: 0.95rem;
    gap: 12px;
  }

  .view-all-tools-icon {
    width: 32px;
    height: 32px;
  }

  .view-all-tools-icon svg {
    width: 15px;
    height: 15px;
  }

  .trust-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-block-end: 20px;
  }

  .trust-badge-pill {
    min-height: 76px;
    gap: 9px;
    padding: 10px;
    border-radius: 15px;
  }

  .trust-badge-title {
    font-size: 0.75rem;
  }

  .trust-badge-subtitle {
    font-size: 0.64rem;
  }

  .store-showcase-banner {
    min-height: 148px;
    padding: 14px;
    gap: 9px;
    border-radius: 16px;
    margin-block-end: 22px;
  }

  .store-banner-media img {
    width: 138px;
    max-height: 108px;
  }

  .store-banner-title {
    font-size: 1.05rem;
    margin-block-end: 4px;
  }

  .store-banner-desc {
    font-size: 0.68rem;
    line-height: 1.45;
    margin-block-end: 9px;
  }

  .store-cta-btn {
    min-height: 32px;
    padding-inline: 17px;
    font-size: 0.7rem;
  }

  .articles-section {
    margin-block-end: 24px;
  }

  .articles-header {
    margin-block-end: 10px;
  }

  .articles-title {
    font-size: 1rem;
  }

  .articles-view-all {
    min-height: 34px;
    padding: 4px 10px 4px 12px;
    font-size: 0.76rem;
    gap: 6px;
  }

  [dir="rtl"] .articles-view-all {
    padding: 4px 12px 4px 10px;
  }

  .articles-view-all-icon {
    width: 22px;
    height: 22px;
  }

  .articles-view-all-icon svg,
  .articles-view-all > svg {
    width: 11px;
    height: 11px;
  }

  .articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .article-card {
    min-height: 82px;
    padding: 10px 8px;
    border-radius: 13px;
  }

  .article-card-title {
    font-size: 0.7rem;
    line-height: 1.35;
    margin-block-end: 4px;
  }

  .article-card-desc {
    font-size: 0.57rem;
    line-height: 1.35;
  }

  .article-action-circle {
    width: 21px;
    height: 21px;
    margin-block-start: 5px;
  }

}

@media (max-width: 480px) {
  .mega-menu-wrapper {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .mega-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .breadcrumbs-glass {
    padding: 4px 10px;
    gap: 5px;
    font-size: 0.70rem;
    border-radius: 10px;
  }

  .breadcrumbs-glass .breadcrumb-current-text,
  .breadcrumbs-glass [aria-current="page"] > span,
  .breadcrumbs-glass [aria-current="page"] {
    max-width: clamp(90px, 30vw, 130px);
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card-glass {
    min-height: 158px;
  }

  .tool-card-img-wrap {
    height: 64px;
  }

  .tool-card-img-wrap img {
    max-width: 72px;
    max-height: 60px;
  }

  .tool-card-title {
    font-size: 0.64rem;
    line-height: 1.23;
  }

  .tool-card-desc {
    font-size: 0.52rem;
    line-height: 1.24;
  }

  .trust-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-showcase-banner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .breadcrumbs-glass {
    padding: 3px 8px;
    gap: 4px;
    font-size: 0.67rem;
  }

  .breadcrumbs-glass .breadcrumb-current-text,
  .breadcrumbs-glass [aria-current="page"] > span,
  .breadcrumbs-glass [aria-current="page"] {
    max-width: 85px;
  }

  .tool-card-glass {
    min-height: 148px;
  }

  .tool-card-img-wrap {
    height: 56px;
  }

  .tool-card-img-wrap img {
    max-width: 62px;
    max-height: 52px;
  }

  .tool-card-title {
    font-size: 0.60rem;
    line-height: 1.2;
  }

  .tool-card-desc {
    font-size: 0.49rem;
    line-height: 1.22;
  }

  .header-container {
    padding-inline: 9px;
    gap: 4px;
  }

  .trust-badges-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .trust-badge-pill {
    min-height: 68px;
    padding-inline: 12px;
  }

  .brand-link {
    font-size: 0.72rem;
    gap: 4px;
  }

  .brand-icon {
    width: 21px;
    height: 21px;
  }

  .header-actions {
    gap: 4px;
  }

  .lang-switch-pill {
    padding-inline: 7px;
  }

  .theme-toggle-pill {
    width: 43px;
  }

  [data-theme="dark"] .theme-toggle-knob,
  .theme-toggle-pill.is-dark .theme-toggle-knob {
    transform: translateX(17px) !important;
  }
}



/* Universal Reusable Modal Dialog & Toast System */
.kz-modal-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
  overflow: visible;
  color: var(--text-main);
  z-index: 99999;
}

.kz-modal-dialog::backdrop {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.kz-modal-dialog[open] {
  animation: kz-modal-pop 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes kz-modal-pop {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.kz-modal-card {
  position: relative;
  padding: clamp(20px, 4.5vw, 28px);
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 26px;
  box-shadow: 0 28px 70px -15px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.kz-modal-card[data-type="error"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.15), transparent 55%),
    var(--bg-surface);
  border-color: rgba(239, 68, 68, 0.3);
}

.kz-modal-card[data-type="warning"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.15), transparent 55%),
    var(--bg-surface);
  border-color: rgba(245, 158, 11, 0.3);
}

.kz-modal-card[data-type="success"] {
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15), transparent 55%),
    var(--bg-surface);
  border-color: rgba(16, 185, 129, 0.3);
}

.kz-modal-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.kz-modal-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: transform 0.2s ease;
}

.kz-modal-icon-badge svg {
  width: 24px;
  height: 24px;
}

.kz-icon-info,
.kz-icon-confirm {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
}

.kz-icon-warning {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.kz-icon-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.kz-icon-success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.kz-modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.16s ease;
}

.kz-modal-close-btn svg {
  width: 17px;
  height: 17px;
}

.kz-modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  transform: scale(1.05);
}

.kz-modal-close-btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.kz-modal-content {
  margin-bottom: 22px;
}

.kz-modal-title {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.kz-modal-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  word-break: break-word;
}

.kz-modal-prompt-wrap {
  margin-top: 14px;
}

.kz-modal-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.18s ease;
}

.kz-modal-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  background: var(--bg-surface);
}

.kz-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kz-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.kz-modal-btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.kz-modal-btn:active {
  transform: scale(0.98);
}

.kz-modal-btn-cancel {
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-main);
}

.kz-modal-btn-cancel:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
}

.kz-modal-btn-confirm.is-primary {
  border: none;
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 82%, #1e3a8a));
  color: #ffffff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-primary) 32%, transparent);
}

.kz-modal-btn-confirm.is-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-primary) 42%, transparent);
}

.kz-modal-btn-confirm.is-danger {
  border: none;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.32);
}

.kz-modal-btn-confirm.is-danger:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.42);
}

.kz-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
}

[dir="rtl"] .kz-toast-container {
  right: auto;
  left: 24px;
}

.kz-toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  animation: kz-toast-slide 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kz-toast-item.is-leaving {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: all 0.2s ease;
}

@keyframes kz-toast-slide {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.kz-toast-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.kz-toast-info .kz-toast-icon { color: #3b82f6; }
.kz-toast-success .kz-toast-icon { color: #10b981; }
.kz-toast-warning .kz-toast-icon { color: #f59e0b; }
.kz-toast-error .kz-toast-icon { color: #ef4444; }

@media (max-width: 480px) {
  .kz-modal-actions {
    flex-direction: column-reverse;
  }
  .kz-modal-btn {
    width: 100%;
  }
  .kz-toast-container {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px;
    max-width: none;
  }
}
/* Search Empty State */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px;
  margin: 24px auto;
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  animation: searchEmptyFadeIn 200ms ease;
}

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

.search-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-block-end: 14px;
}

.search-empty-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.search-empty-desc {
  margin: 0 0 20px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 380px;
}

.search-empty-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(115deg, var(--brand-primary), #3b82f6);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  min-height: 44px;
}

.search-empty-reset:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
}

.search-empty-reset:active {
  transform: translateY(0);
}

.search-empty-reset:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* ==========================================================================
   LOW-SPEC / NO-GPU HARDWARE ACCELERATION FALLBACK (LIGHTWEIGHT SOLID MODE)
   Activated via:
   - html.no-glass / html.low-spec (synchronously detected in <head>)
   - @supports not (backdrop-filter: blur(10px)) (native CSS fallback)
   ========================================================================== */

html.no-glass *,
html.no-glass *::before,
html.no-glass *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 1. Eliminate Fixed Heavy Layered Radial Backgrounds on Body */
html.no-glass body {
  background-image: none !important;
  background-attachment: scroll !important;
  background-color: #070c18 !important;
}

html.no-glass[data-theme="light"] body {
  background-image: none !important;
  background-attachment: scroll !important;
  background-color: #f1f5f9 !important;
}

/* 2. Remove Offscreen Rasterizer Drop-Shadows & Mask Images */
html.no-glass .brand-icon,
html.no-glass .tool-card-img-wrap img,
html.no-glass .trust-badge-icon,
html.no-glass .store-mascot-img,
html.no-glass .promo-mascot-img,
html.no-glass .marquee-track-wrapper {
  filter: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

/* 3. Solid Header */
html.no-glass .glass-header {
  background: #0b1120 !important;
  border-block-end: 1px solid #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html.no-glass[data-theme="light"] .glass-header {
  background: #ffffff !important;
  border-block-end: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

/* 4. Solid Tool Cards */
html.no-glass .tool-card-glass {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

html.no-glass .tool-card-glass:hover {
  background: #142036 !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

html.no-glass[data-theme="light"] .tool-card-glass {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

html.no-glass[data-theme="light"] .tool-card-glass:hover {
  background: #f8fafc !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
}

/* 5. Solid Tool Workspaces & Heroes */
html.no-glass .tool-workspace,
html.no-glass .tool-hero-glass {
  background: #0c1322 !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html.no-glass[data-theme="light"] .tool-workspace,
html.no-glass[data-theme="light"] .tool-hero-glass {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

/* 6. Solid Dialogs, Drawers & Menus */
html.no-glass dialog,
html.no-glass .search-modal-dialog,
html.no-glass .about-modal-dialog,
html.no-glass .mega-menu-wrapper,
html.no-glass .mobile-drawer-sheet,
html.no-glass .mobile-drawer-content {
  background: #0c1322 !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

html.no-glass[data-theme="light"] dialog,
html.no-glass[data-theme="light"] .search-modal-dialog,
html.no-glass[data-theme="light"] .about-modal-dialog,
html.no-glass[data-theme="light"] .mega-menu-wrapper,
html.no-glass[data-theme="light"] .mobile-drawer-sheet,
html.no-glass[data-theme="light"] .mobile-drawer-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important;
}

/* 7. Solid Inputs & Interactive Areas */
html.no-glass .glass-textarea,
html.no-glass textarea.search-input,
html.no-glass .tool-workspace textarea,
html.no-glass .tool-workspace input,
html.no-glass .tool-workspace select,
html.no-glass .interactive-area,
html.no-glass .search-pill-input {
  background: #141e33 !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

html.no-glass[data-theme="light"] .glass-textarea,
html.no-glass[data-theme="light"] textarea.search-input,
html.no-glass[data-theme="light"] .tool-workspace textarea,
html.no-glass[data-theme="light"] .tool-workspace input,
html.no-glass[data-theme="light"] .tool-workspace select,
html.no-glass[data-theme="light"] .interactive-area,
html.no-glass[data-theme="light"] .search-pill-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
}

/* 8. Solid Badges & Pills */
html.no-glass .hero-pill-badge,
html.no-glass .category-filter-btn:not(.active) {
  background: #141e33 !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

html.no-glass[data-theme="light"] .hero-pill-badge,
html.no-glass[data-theme="light"] .category-filter-btn:not(.active) {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
}

html.no-glass .breadcrumbs-glass {
  background: #0d1527 !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

html.no-glass[data-theme="light"] .breadcrumbs-glass {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

@supports not (backdrop-filter: blur(10px)) {
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body {
    background-image: none !important;
    background-attachment: scroll !important;
    background-color: #070c18 !important;
  }
  [data-theme="light"] body {
    background-image: none !important;
    background-attachment: scroll !important;
    background-color: #f1f5f9 !important;
  }
  .brand-icon,
  .tool-card-img-wrap img,
  .trust-badge-icon,
  .store-mascot-img,
  .promo-mascot-img,
  .marquee-track-wrapper {
    filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .glass-header {
    background: #0b1120 !important;
    border-block-end: 1px solid #1e293b !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  }
  [data-theme="light"] .glass-header {
    background: #ffffff !important;
    border-block-end: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  .tool-card-glass {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  }
  .tool-card-glass:hover {
    background: #142036 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  }
  [data-theme="light"] .tool-card-glass {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  [data-theme="light"] .tool-card-glass:hover {
    background: #f8fafc !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
  }
  .tool-workspace,
  .tool-hero-glass {
    background: #0c1322 !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  }
  [data-theme="light"] .tool-workspace,
  [data-theme="light"] .tool-hero-glass {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  dialog,
  .search-modal-dialog,
  .about-modal-dialog,
  .mega-menu-content,
  .mobile-drawer-sheet {
    background: #0c1322 !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  }
  [data-theme="light"] dialog,
  [data-theme="light"] .search-modal-dialog,
  [data-theme="light"] .about-modal-dialog,
  [data-theme="light"] .mega-menu-content,
  [data-theme="light"] .mobile-drawer-sheet {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important;
  }
  .glass-textarea,
  textarea.search-input,
  .tool-workspace textarea,
  .tool-workspace input,
  .tool-workspace select,
  .interactive-area,
  .search-pill-input {
    background: #141e33 !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
  }
  [data-theme="light"] .glass-textarea,
  [data-theme="light"] textarea.search-input,
  [data-theme="light"] .tool-workspace textarea,
  [data-theme="light"] .tool-workspace input,
  [data-theme="light"] .tool-workspace select,
  [data-theme="light"] .interactive-area,
  [data-theme="light"] .search-pill-input {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
  }
  .hero-pill-badge,
  .category-filter-btn:not(.active) {
    background: #141e33 !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
  }
  [data-theme="light"] .hero-pill-badge,
  [data-theme="light"] .category-filter-btn:not(.active) {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
  }
  .breadcrumbs-glass {
    background: #0d1527 !important;
    border: 1px solid #1e293b !important;
  }
  [data-theme="light"] .breadcrumbs-glass {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
  }
}

