/* ==========================================================================
   ASToolHub - Modern Design System & Global Styles
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #6366f1;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --secondary: #0ea5e9;
  --secondary-light: #e0f2fe;
  
  --accent: #8b5cf6;
  --accent-light: #f5f3ff;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;

  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 25px var(--primary-glow);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Layout */
  --header-height: 72px;
  --max-width: 1280px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #090d16;
  --bg-subtle: #0f172a;
  --surface: #131c2e;
  --surface-secondary: #1a253c;
  --surface-tertiary: #24304c;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #1e293b;
  --border-subtle: #172033;
  --border-focus: #818cf8;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.16);
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --secondary: #38bdf8;
  --secondary-light: rgba(56, 189, 248, 0.15);

  --accent: #a78bfa;
  --accent-light: rgba(167, 139, 250, 0.15);

  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.15);
  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.15);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

ul, ol {
  list-style: none;
}

/* Focus styles for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container--narrow {
  max-width: 860px;
}

/* Announcement bar removed */

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

[data-theme="dark"] .site-header {
  background: rgba(19, 28, 46, 0.88);
}

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

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.025em;
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.95;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.38);
}

.brand-logo-img--sm {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.brand-name span {
  color: var(--primary);
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

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

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-toggle:hover, .dropdown-toggle[aria-expanded="true"], .nav-dropdown:hover .dropdown-toggle {
  color: var(--primary);
  background-color: var(--primary-light);
}

.dropdown-toggle svg {
  transition: transform var(--transition-fast);
}

.dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 880px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 1010;
}

/* Invisible hover bridge connecting trigger button to mega menu */
.mega-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

.mega-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-col-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.mega-col ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-item {
  display: block;
  padding: 6px 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-item:hover {
  color: var(--text);
  background-color: var(--bg-subtle);
  transform: translateX(3px);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.theme-toggle-btn .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  align-items: center;
  justify-content: center;
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 1050;
  overflow-y: auto;
  padding: 24px;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mobile-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background-color: var(--bg-subtle);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-item > a {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
}

.mobile-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
}

.mobile-accordion-content {
  display: none;
  padding-left: 12px;
  margin-top: 8px;
  border-left: 2px solid var(--border);
}

.mobile-accordion-content.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-sub-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
}

.mobile-sub-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 5px 0;
  display: block;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Smooth Theme Switch Transitions */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
}

/* ==========================================================================
   Hero Section & Animated Background
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 80px 0 64px;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

/* Animated Background Blobs */
.hero-bg-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero-blob-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 70%);
  filter: blur(65px);
  animation: floatBlob1 18s ease-in-out infinite alternate;
}

.hero-blob-2 {
  width: 460px;
  height: 460px;
  top: 15%;
  right: -80px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28) 0%, rgba(99, 102, 241, 0.12) 50%, transparent 70%);
  filter: blur(65px);
  animation: floatBlob2 15s ease-in-out infinite alternate;
}

.hero-blob-3 {
  width: 380px;
  height: 380px;
  bottom: -60px;
  left: 35%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(79, 70, 229, 0.1) 50%, transparent 70%);
  filter: blur(55px);
  animation: floatBlob3 22s ease-in-out infinite alternate;
}

/* Dark theme adapted blobs */
[data-theme="dark"] .hero-blob-1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  filter: blur(75px);
}

[data-theme="dark"] .hero-blob-2 {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
  filter: blur(75px);
}

[data-theme="dark"] .hero-blob-3 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, transparent 70%);
  filter: blur(65px);
}

/* Subtle Animated Grid Overlay */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, #000 65%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, #000 65%, transparent 100%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

[data-theme="dark"] .hero-grid-pattern {
  opacity: 0.25;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 35px) scale(1.08); }
  100% { transform: translate(-30px, 60px) scale(0.95); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, 40px) scale(1.06); }
  100% { transform: translate(25px, -35px) scale(0.92); }
}

@keyframes floatBlob3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -45px) scale(1.1); }
  100% { transform: translate(-40px, 20px) scale(0.95); }
}

/* Tool page subtle ambient background decoration */
.tool-bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.tool-bg-blob {
  position: absolute;
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

[data-theme="dark"] .tool-bg-blob {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

/* Hero Entrances & Typography */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Reserved space wrapper using CSS Grid stacking for ZERO layout shift */
.hero-animated-wrapper {
  display: inline-grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  position: relative;
  max-width: 100%;
  vertical-align: middle;
  text-align: center;
}

/* Ghost element reserves dimensions of the longest animated phrase */
.hero-animated-ghost {
  grid-area: 1 / 1;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  user-select: none;
  font: inherit;
  letter-spacing: inherit;
}

.hero-animated-text {
  grid-area: 1 / 1;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  font: inherit;
  letter-spacing: inherit;
  will-change: opacity, transform;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 25%, #0ea5e9 50%, #7c3aed 75%, #4f46e5 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite;
  display: inline-block;
}

[data-theme="dark"] .hero-gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 25%, #38bdf8 50%, #a78bfa 75%, #818cf8 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text-fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-text-prep-in {
  opacity: 0;
  transform: translateY(8px);
  transition: none !important;
}

.hero-text-fade-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* Search Box Component */
.search-wrapper {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 12px 6px 18px;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), 0 12px 30px -4px rgba(79, 70, 229, 0.25);
}

.search-icon {
  color: var(--text-light);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-light);
  transition: opacity 0.2s ease;
}

.search-kbd {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  color: var(--text-muted);
  user-select: none;
}

@keyframes dropdownReveal {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-results-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1020;
  text-align: left;
  display: none;
}

.search-results-panel.open {
  display: block;
  animation: dropdownReveal 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
  color: var(--text);
}

.search-result-item:hover, .search-result-item.selected {
  background-color: var(--primary-light);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.search-result-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-result-category {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--primary);
  text-transform: uppercase;
}

.search-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Hero Feature Pills */
.hero-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  font-size: 0.88rem;
  color: var(--text-muted);
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.hero-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-pill-item svg {
  color: var(--success);
}

/* ==========================================================================
   Tool Cards & Section Components
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section--subtle {
  background-color: var(--bg-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Grid Layouts */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tools-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
  overflow: hidden;
  text-decoration: none;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(79, 70, 229, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -8px rgba(79, 70, 229, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: rgba(99, 102, 241, 0.4);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:active {
  transform: translateY(-2px) scale(0.99);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background-color: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.25s ease, 
              color 0.25s ease, 
              box-shadow 0.25s ease;
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
  background-color: var(--primary);
  color: #ffffff;
}

.tool-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.tool-card:hover .tool-card-category {
  color: var(--primary);
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  transition: color 0.2s ease;
}

.tool-card:hover .tool-card-title {
  color: var(--primary);
}

.tool-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}

.tool-card-link svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover .tool-card-link svg {
  transform: translateX(6px);
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.category-tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.category-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-tab-btn.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-box-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-box-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-box-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   FAQ Section Accordions
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  gap: 16px;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   AdSense-Ready Slot
   ========================================================================== */
.ad-slot {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 32px auto;
  background-color: var(--surface-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
}

.ad-slot--responsive {
  max-width: 970px;
}

/* ==========================================================================
   Call To Action Banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.cta-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta-desc {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn--white {
  background-color: #ffffff;
  color: #4f46e5;
}

.btn--white:hover {
  background-color: #f8fafc;
  color: #4338ca;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn--outline {
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

/* ==========================================================================
   Breadcrumbs Component
   ========================================================================== */
.breadcrumbs {
  padding: 16px 0 24px;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   Tool Page Layout & SEO Content Sections
   ========================================================================== */
.tool-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
}

.tool-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.tool-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.seo-content {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.seo-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--text);
}

.seo-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.seo-content p, .seo-content ul, .seo-content ol {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.seo-content ul, .seo-content ol {
  padding-left: 24px;
}

.seo-content ul {
  list-style: disc;
}

.seo-content ol {
  list-style: decimal;
}

.how-to-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0 36px;
}

.how-to-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 16px;
  max-width: 300px;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

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

.footer-disclaimer {
  max-width: 600px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast--success svg { color: var(--success); }
.toast--error svg { color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(0.96); }
}

/* ==========================================================================
   Animated Statistics / Trust Cards
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px -4px rgba(79, 70, 229, 0.12);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #4f46e5 20%, #7c3aed 70%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.reveal-visible > *:nth-child(1) { transition-delay: 50ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(3) { transition-delay: 150ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(4) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(5) { transition-delay: 250ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(6) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(7) { transition-delay: 350ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-visible > *:nth-child(8) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Footer Social Media Section & Icons
   ========================================================================== */
.footer-social-wrapper {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-social-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.footer-social-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.social-icons-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal), background-color var(--transition-normal), color var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  text-decoration: none;
}

.social-icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.3);
}

.social-icon-btn--github:hover { background-color: #24292e; border-color: #24292e; }
.social-icon-btn--x:hover { background-color: #000000; border-color: #000000; }
.social-icon-btn--linkedin:hover { background-color: #0a66c2; border-color: #0a66c2; }
.social-icon-btn--youtube:hover { background-color: #ff0000; border-color: #ff0000; }
.social-icon-btn--facebook:hover { background-color: #1877f2; border-color: #1877f2; }
.social-icon-btn--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: #cc2366; }

/* ==========================================================================
   Floating Social / Share Widget
   ========================================================================== */
.floating-share-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1010;
}

.floating-share-trigger {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.floating-share-trigger:hover {
  transform: scale(1.08);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}

.share-popover {
  position: absolute;
  bottom: 56px;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 175px;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.share-popover.open {
  display: flex;
}

.share-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.share-popover-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Prefers Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-blob,
  .hero-gradient-text,
  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .search-wrapper,
  .hero-pills {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

