/* ==========================================================================
   AI MINI TOOLS HUB — Modern Responsive Stylesheet
   Pure CSS3 with Custom Properties (Light & Dark Theme)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Light Mode */
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(circle at 50% 0%, #ede9fe 0%, #f8fafc 70%);
  --surface: #ffffff;
  --surface-secondary: #f1f5f9;
  --surface-tertiary: #e2e8f0;
  --border: #e2e8f0;
  --border-focus: #6366f1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Brand / Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --primary-text: #3730a3;
  --accent: #06b6d4;
  --accent-light: #ecfeff;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* 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;
  
  /* Spacing & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --header-height: 72px;
  --max-width: 1200px;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg: #090d16;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #090d16 75%);
  --surface: #111827;
  --surface-secondary: #1f2937;
  --surface-tertiary: #374151;
  --border: #242f3e;
  --border-focus: #818cf8;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: #1e1b4b;
  --primary-text: #c7d2fe;
  --accent: #22d3ee;
  --accent-light: #083344;
  --success: #34d399;
  --success-light: #064e3b;
  --warning: #fbbf24;
  --warning-light: #78350f;
  --danger: #f87171;
  --danger-light: #7f1d1d;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

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

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

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

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Accessibility utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* --------------------------------------------------------------------------
   Header & Navigation (Smart Sticky with Hide on Scroll-Down, Show on Scroll-Up)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-normal), border-color var(--transition-normal), box-shadow 0.3s ease;
  will-change: transform;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.site-header.header-scrolled {
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.92);
}

[data-theme="dark"] .site-header.header-scrolled {
  box-shadow: 0 4px 25px -2px rgba(0, 0, 0, 0.45);
}

body {
  padding-top: var(--header-height);
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.brand-name {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.5rem 0.35rem;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0.35rem;
  right: 0.35rem;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle-btn, .mobile-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: var(--surface-secondary);
  border-color: var(--text-muted);
}

.mobile-toggle-btn {
  display: none;
  position: relative;
  overflow: hidden;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
}

.mobile-toggle-btn:hover {
  background: var(--surface-secondary);
  border-color: var(--border);
}

.mobile-toggle-btn:focus,
.mobile-toggle-btn:focus-visible,
.mobile-toggle-btn:active {
  outline: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

.mobile-toggle-btn.is-active {
  background: var(--surface-secondary);
  border-color: var(--border) !important;
}

/* Animated Hamburger to X */
.hamburger-box {
  width: 20px;
  height: 16px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 20px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, top 0.28s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.hamburger-inner {
  top: 7px;
  left: 0;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -6px;
}

.hamburger-inner::after {
  bottom: -6px;
}

/* Open State - Transforms 3 lines into clean X */
.mobile-toggle-btn.is-active .hamburger-inner {
  transform: rotate(45deg);
  background-color: var(--primary);
}

.mobile-toggle-btn.is-active .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.mobile-toggle-btn.is-active .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
  background-color: var(--primary);
}

/* Mobile Nav Drawer with Smooth Slide & Blur */
.mobile-nav {
  display: block;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 30, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}

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

.mobile-nav-panel {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(-24px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s;
}

.mobile-nav.open .mobile-nav-panel {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(12px);
  opacity: 0;
  transition: background 0.18s, color 0.18s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.mobile-nav.open .mobile-nav-link {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav.open .mobile-nav-link:nth-child(1) { transition-delay: 0.03s; }
.mobile-nav.open .mobile-nav-link:nth-child(2) { transition-delay: 0.06s; }
.mobile-nav.open .mobile-nav-link:nth-child(3) { transition-delay: 0.09s; }
.mobile-nav.open .mobile-nav-link:nth-child(4) { transition-delay: 0.12s; }
.mobile-nav.open .mobile-nav-link:nth-child(5) { transition-delay: 0.15s; }
.mobile-nav.open .mobile-nav-link:nth-child(6) { transition-delay: 0.18s; }
.mobile-nav.open .mobile-nav-link:nth-child(7) { transition-delay: 0.21s; }

.mobile-nav-link:hover, .mobile-nav-link:active {
  background: var(--surface-secondary);
  color: var(--primary);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 4.5rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  max-width: 1050px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* --------------------------------------------------------------------------
   Search & Filter Bar (Professional High-End Design)
   -------------------------------------------------------------------------- */
.search-container {
  max-width: 680px;
  margin: 0 auto 2.75rem;
  position: relative;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), 0 12px 32px -4px rgba(79, 70, 229, 0.16);
  transform: translateY(-2px);
}

.search-icon-box {
  position: absolute;
  left: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.search-input-wrapper:focus-within .search-icon-box {
  color: var(--primary);
  transform: scale(1.08);
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 5.5rem 0 3.4rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-full);
  box-sizing: border-box;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  transition: opacity 0.2s ease;
}

.search-actions-box {
  position: absolute;
  right: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 3;
}

.search-kbd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-kbd-badge .kbd-mod {
  font-size: 0.88rem;
  line-height: 1;
}

.search-input-wrapper:focus-within .search-kbd-badge {
  opacity: 0.4;
}

.search-clear-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
}

.search-clear-btn:hover {
  color: var(--text);
  background: var(--surface-tertiary);
  border-color: var(--primary);
  transform: scale(1.08);
}

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

.search-live-status {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  animation: fadeIn 0.22s ease-out;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

/* Quick Search Suggestion Pills */
.search-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.quick-tag-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.quick-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-tag-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface-secondary);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .search-input {
    height: 50px;
    font-size: 0.95rem;
    padding: 0 4.2rem 0 2.9rem;
  }
  .search-icon-box {
    left: 0.9rem;
  }
  .search-icon-box svg {
    width: 18px;
    height: 18px;
  }
  .search-actions-box {
    right: 0.65rem;
  }
  .search-kbd-badge {
    display: none;
  }
  .search-quick-tags {
    gap: 0.35rem;
  }
  .quick-tag-btn {
    font-size: 0.74rem;
    padding: 0.22rem 0.55rem;
  }
}

/* Category Filter Chips */
.category-filter-section {
  margin-bottom: 2.5rem;
}

.category-chips-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: thin;
}

.category-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.category-chip:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Category Group Banners on Homepage */
.category-block {
  margin-bottom: 3rem;
  scroll-margin-top: 5rem;
}

.category-block:last-child {
  margin-bottom: 0;
}

.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1.5px solid var(--border);
}

.category-block-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.category-block-icon {
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
}

.category-block-title {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}

.category-block-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Green Highlight for Search Matches */
.search-highlight {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #059669 !important;
  font-weight: 750 !important;
  padding: 0 3px !important;
  border-radius: 3px !important;
  border-bottom: 2px solid #10b981 !important;
  display: inline !important;
}

[data-theme="dark"] .search-highlight {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
}

/* Active Category Target Scroll Highlight */
.category-block.highlight-target {
  animation: categoryPulse 1.2s ease;
}

@keyframes categoryPulse {
  0% { transform: scale(0.99); }
  50% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Section Layouts
   -------------------------------------------------------------------------- */
.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-group h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Recently Used Section — Deep Green Color Theme
   -------------------------------------------------------------------------- */
#recent-section .section-title-group h2 svg {
  color: #059669 !important;
}

#recent-section .category-block-count {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(5, 150, 105, 0.25) !important;
}

#recent-section .category-block-icon {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(5, 150, 105, 0.2) !important;
}

#recent-tools-grid .tool-card {
  border-color: rgba(5, 150, 105, 0.2);
  background: var(--surface);
}

#recent-tools-grid .tool-card:hover {
  border-color: rgba(5, 150, 105, 0.5) !important;
  box-shadow: 0 16px 30px -6px rgba(5, 150, 105, 0.15), 0 0 0 1px rgba(5, 150, 105, 0.3) !important;
}

#recent-tools-grid .tool-icon-box {
  color: #047857 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, var(--surface) 100%) !important;
  border-color: rgba(5, 150, 105, 0.25) !important;
}

#recent-tools-grid .tag-badge.category-tag,
#recent-tools-grid .category-tag {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(5, 150, 105, 0.25) !important;
}

#recent-tools-grid .tool-card:hover .open-tool-btn {
  background: #047857 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
}

[data-theme="dark"] #recent-section .section-title-group h2 svg {
  color: #10b981 !important;
}

[data-theme="dark"] #recent-section .category-block-count {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

[data-theme="dark"] #recent-section .category-block-icon {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] #recent-tools-grid .tool-card {
  border-color: rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] #recent-tools-grid .tool-card:hover {
  border-color: rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 16px 32px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(16, 185, 129, 0.35) !important;
}

[data-theme="dark"] #recent-tools-grid .tool-icon-box {
  color: #34d399 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, var(--surface) 100%) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] #recent-tools-grid .tag-badge.category-tag,
[data-theme="dark"] #recent-tools-grid .category-tag {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

[data-theme="dark"] #recent-tools-grid .tool-card:hover .open-tool-btn {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Tool Cards Grid (Computer: Exactly 3 items per line)
   -------------------------------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  user-select: none;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -6px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--primary-light);
  border-color: rgba(99, 102, 241, 0.4);
}

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

[data-theme="dark"] .tool-card {
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tool-card:hover {
  box-shadow: 0 16px 32px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.3);
  border-color: rgba(129, 140, 248, 0.5);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.tool-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
  border: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-icon-box {
  transform: scale(1.06);
}

.tool-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.fav-btn:hover {
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(1.12);
}

.fav-btn.active {
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.4);
}

.badge-popular {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.tool-card-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.55rem;
  color: var(--text);
  line-height: 1.35;
}

.tool-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag-badge.category-tag {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.2);
  font-weight: 600;
}

.tool-card-footer {
  margin-top: auto;
}

.open-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.open-tool-btn svg {
  transition: transform var(--transition-fast);
}

.tool-card:hover .open-tool-btn {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tool-card:hover .open-tool-btn svg {
  transform: translateX(4px);
}

.category-tag {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.tool-card-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}

/* --------------------------------------------------------------------------
   Buttons & Inputs System
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--surface-secondary);
  border-color: var(--text-muted);
}

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

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

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.38 !important;
}

.form-input::placeholder,
.form-textarea::placeholder,
.search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.38;
  font-weight: 400;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-textarea.code-font {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: normal;
}

/* --------------------------------------------------------------------------
   Modal / Dynamic Tool Runner View
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   7. Tool Modal Interface (Enhanced Design System)
   -------------------------------------------------------------------------- */
.tool-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

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

.tool-modal-overlay.closing {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.tool-modal-overlay.closing .tool-modal-container {
  transform: translateY(100vh) scale(0.96) !important;
  transition: transform 0.3s cubic-bezier(0.32, 1, 0.23, 1), opacity 0.26s ease !important;
  opacity: 0 !important;
}

.modal-drag-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 6px;
  width: 100%;
  cursor: grab;
  flex-shrink: 0;
  user-select: none;
  touch-action: pan-y;
}

.modal-drag-indicator:active {
  cursor: grabbing;
}

.modal-drag-indicator .drag-bar {
  width: 48px;
  height: 5px;
  background: var(--border);
  opacity: 0.55;
  border-radius: 999px;
  transition: opacity 0.2s ease, width 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.modal-drag-indicator:hover .drag-bar {
  opacity: 0.95;
  width: 58px;
  background: var(--primary);
}

.tool-modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(45px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
  position: relative;
}

[data-theme="light"] .tool-modal-container {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.tool-modal-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  z-index: 10;
}

.tool-modal-overlay.open .tool-modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Result Reveal Animation */
@keyframes resultPopIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultPulseFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.animate-result-in {
  animation: resultPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards, resultPulseFlash 0.6s ease-out;
}

.tool-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  z-index: 5;
}

.modal-title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface-tertiary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.modal-tool-name {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.modal-tool-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.modal-badge-free {
  display: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

@media (min-width: 1024px) {
  .modal-badge-free {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.modal-action-btn:hover {
  color: var(--text);
  background: var(--surface-tertiary);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

#modal-fav-btn:hover {
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-action-btn.active,
#modal-fav-btn.active {
  color: var(--danger);
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.4);
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
  transform: rotate(90deg);
}

.tool-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(90vh - 80px);
}

/* Slim Custom Scrollbar */
.tool-modal-body::-webkit-scrollbar {
  width: 6px;
}
.tool-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.tool-modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.tool-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.tool-description-banner {
  padding: 0.875rem 1.25rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.5;
}

.tool-description-banner span {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ai-notice-banner {
  padding: 0.85rem 1.25rem;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Tool Workspace Styles */
.tool-controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.tool-output-box {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

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

.tool-output-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-output-content {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* QR Code Generator Enhanced Styles */
.qr-modes-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  background: var(--surface-secondary);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.qr-mode-tab {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.qr-mode-tab:hover {
  color: var(--text);
  background: var(--surface);
}

.qr-mode-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.qr-layout-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.qr-inputs-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}

.qr-tab-fields-wrapper {
  width: 100%;
}

.qr-custom-box {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  width: 100%;
  box-sizing: border-box;
}

.qr-custom-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qr-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.qr-custom-grid.qr-options-row {
  margin-top: 0.85rem;
}

.qr-custom-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.qr-color-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.qr-color-picker {
  width: 40px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 2px;
  background: var(--surface);
  flex-shrink: 0;
}

.qr-color-hex-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.qr-color-swatches {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.qr-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.qr-swatch-btn:hover {
  transform: scale(1.15);
}

.qr-swatch-btn.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--primary);
}

/* WiFi options grid */
.qr-wifi-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
  width: 100%;
  box-sizing: border-box;
}

.qr-checkbox-form-group {
  display: flex;
  align-items: center;
  height: 42px;
  margin-bottom: 1rem;
}

.qr-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}

.qr-checkbox {
  cursor: pointer;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

/* QR Live Preview Card */
.qr-preview-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.qr-preview-header {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-preview-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qr-realtime-badge {
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.qr-canvas-container {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

.qr-canvas-container canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.qr-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.qr-btn-action {
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  min-height: 42px;
  font-weight: 600;
}

/* AI Integration UI Styles */
.btn-ai {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-ai:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-ai:active {
  transform: translateY(0);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .ai-badge {
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.3);
}

.spinner-ai {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin-ai 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin-ai {
  to {
    transform: rotate(360deg);
  }
}

/* Demo input placeholder low opacity */
.demo-placeholder-input::placeholder {
  opacity: 0.45;
  color: var(--text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Specific Tool Components
   -------------------------------------------------------------------------- */
/* Split Preview (Markdown, Diff, etc.) */
.split-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .split-view-grid {
    grid-template-columns: 1fr;
  }
}

.preview-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 250px;
  max-height: 400px;
  overflow-y: auto;
}

.markdown-rendered h1, .markdown-rendered h2, .markdown-rendered h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.markdown-rendered h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.markdown-rendered h2 { font-size: 1.25rem; }
.markdown-rendered h3 { font-size: 1.1rem; }
.markdown-rendered p { margin-bottom: 0.75rem; }
.markdown-rendered ul, .markdown-rendered ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.markdown-rendered code { background: var(--surface-secondary); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.88em; }
.markdown-rendered pre { background: var(--surface-secondary); padding: 0.75rem; border-radius: var(--radius-md); overflow-x: auto; margin-bottom: 0.75rem; }
.markdown-rendered blockquote { border-left: 4px solid var(--primary); padding-left: 0.75rem; color: var(--text-muted); font-style: italic; margin-bottom: 0.75rem; }

/* Diff View */
.diff-line {
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  gap: 0.5rem;
}
.diff-line.added { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.diff-line.removed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.diff-line.unchanged { color: var(--text-muted); }

/* QR Code Display */
.qr-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
}

.qr-canvas-wrapper {
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
}

/* Color Tool Preview */
.color-swatch-display {
  height: 90px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  transition: background-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Google Color Picker Exact Clone (100% Mobile Responsive)
   ========================================================================== */
.gcp-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.gcp-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  align-items: start;
  width: 100%;
}

@media (max-width: 768px) {
  .gcp-main-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.gcp-picker-column {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

/* 2D SV Gradient Plane */
.gcp-sv-box {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .gcp-sv-box {
    height: 190px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 380px) {
  .gcp-sv-box {
    height: 165px;
  }
}

.gcp-sv-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%),
              linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.gcp-sv-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 5px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  transition: transform 0.04s ease-out;
}

/* Hue Slider & Controls */
.gcp-hue-slider-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.gcp-hue-slider {
  position: relative;
  flex: 1;
  height: 22px;
  border-radius: 9999px;
  background: linear-gradient(to right, 
    #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gcp-hue-thumb {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  transition: transform 0.05s ease;
}

.gcp-eyedropper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.gcp-eyedropper-btn:hover {
  background: var(--surface-tertiary);
  transform: scale(1.05);
}

/* Color Preview & Active Format Bar */
.gcp-details-column {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .gcp-details-column {
    padding: 0.85rem;
    border-radius: var(--radius-md);
  }
}

.gcp-preview-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.gcp-color-preview-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .gcp-color-preview-box {
    width: 52px;
    height: 52px;
  }
}

.gcp-primary-format-row {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gcp-format-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gcp-format-dropdown {
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.gcp-primary-input-group {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.gcp-primary-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .gcp-primary-input {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }
}

/* Values Table Breakdown (Exact Google Style) */
.gcp-values-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.gcp-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  min-height: 34px;
}

.gcp-value-row:hover {
  background: var(--surface-secondary);
}

.gcp-row-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 44px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.gcp-row-val {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 0 0.4rem;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 380px) {
  .gcp-row-label {
    width: 38px;
    font-size: 0.72rem;
  }
  .gcp-row-val {
    font-size: 0.76rem;
    padding: 0 0.25rem;
  }
}

.gcp-copy-mini-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  font-weight: 600;
  flex-shrink: 0;
  min-height: 30px;
  transition: all var(--transition-fast);
}

.gcp-copy-mini-btn:hover {
  background: var(--surface-tertiary);
  border-color: var(--border);
  color: var(--primary);
}

/* Shades, Tints & Harmony Bar */
.gcp-shades-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.2rem;
  width: 100%;
}

.gcp-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.gcp-shades-strip {
  display: flex;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}

.gcp-shade-item {
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  padding: 0;
  min-width: 0;
}

.gcp-shade-item:hover, .gcp-shade-item:active {
  transform: scaleY(1.15);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Palette & Harmony Swatches */
.gcp-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.gcp-palette-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 0;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .gcp-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(26px, 1fr));
    gap: 0.35rem;
  }
  .gcp-palette-swatch {
    min-height: 24px;
    border-radius: 5px;
  }
}

.gcp-palette-swatch:hover, .gcp-palette-swatch:active {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 2;
}

.gcp-palette-swatch.active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

.gcp-harmonies-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  width: 100%;
}

@media (max-width: 480px) {
  .gcp-harmonies-row {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
  }
}

.gcp-harmony-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  min-width: 0;
}

@media (max-width: 480px) {
  .gcp-harmony-card {
    padding: 0.25rem 0.15rem;
  }
}

.gcp-harmony-card:hover, .gcp-harmony-card:active {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.gcp-harmony-swatch {
  height: 20px;
  border-radius: 4px;
  width: 100%;
}

.gcp-harmony-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Password Strength Bar */
.password-strength-container {
  margin: 1rem 0;
}

.strength-meter-bg {
  height: 8px;
  background: var(--surface-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.4rem;
}

.strength-meter-fill {
  height: 100%;
  width: 0%;
  transition: width var(--transition-normal), background-color var(--transition-normal);
}

/* Stat Grid for Counters / Age / Percentage */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-metric-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* 10 Title Slots List */
.title-slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.title-slot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  gap: 1rem;
}

.title-slot-text {
  flex-grow: 1;
}

/* --------------------------------------------------------------------------
   Toast Notifications (Permanently Disabled per User Request)
   -------------------------------------------------------------------------- */
.toast-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.toast {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Empty States & Loaders
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  margin: 1.5rem 0;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Features & FAQ Section
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.faq-item:hover {
  border-color: var(--text-muted);
}

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

.faq-icon {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Enhanced Call to Action (CTA) Banner
   -------------------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, #3730a3 0%, #4338ca 40%, #6366f1 100%);
  color: #ffffff;
  border-radius: var(--radius-2xl);
  padding: 4rem 2.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(67, 56, 202, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="dark"] .cta-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.cta-glow-orb-1 {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}

.cta-glow-orb-2 {
  position: absolute;
  bottom: -90px;
  left: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}

.cta-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.cta-banner h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  max-width: 750px;
}

.cta-banner p {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.6;
  opacity: 0.92;
  max-width: 620px;
  margin: 0 auto 1.75rem;
  color: #e0e7ff;
}

.cta-highlights-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cta-pill-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
}

.cta-actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.cta-btn-primary {
  background: #ffffff !important;
  color: #4338ca !important;
  font-weight: 750 !important;
  padding: 0.85rem 1.85rem !important;
  font-size: 1.05rem !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  transition: all var(--transition-fast) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cta-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.35) !important;
  background: #f8fafc !important;
}

.cta-btn-secondary {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 650 !important;
  padding: 0.85rem 1.6rem !important;
  font-size: 1rem !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--transition-fast) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cta-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px);
}

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

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

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

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

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

.footer-link {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

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

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  text-decoration: none;
  flex-shrink: 0;
}

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

.social-icon-btn:hover,
.social-icon-btn:focus {
  color: var(--text-primary);
  background: var(--surface-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.social-icon-btn:active {
  transform: translateY(0);
  background: var(--surface-tertiary);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Standalone Page Styles (About, Privacy, Terms, Contact)
   -------------------------------------------------------------------------- */
.page-header {
  padding: 3.75rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--surface-secondary) 0%, transparent 80%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
  position: relative;
}

.page-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.page-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.content-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.75rem 3rem;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .prose-card {
  box-shadow: 0 4px 25px -2px rgba(0, 0, 0, 0.4);
}

.prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.prose h2 {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.prose p {
  margin-bottom: 1.35rem;
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose ul, .prose ol {
  padding-left: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.65rem;
  line-height: 1.65;
}

.info-callout {
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface) 100%);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  margin: 1.75rem 0;
  font-size: 0.96rem;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.75rem 3rem;
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .contact-card {
  box-shadow: 0 10px 35px -4px rgba(0, 0, 0, 0.5);
}

.contact-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-meta-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-meta-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-meta-text div:first-child {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.contact-meta-text div:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Responsive Media Queries & Mobile Optimizations (100% Comprehensive)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .nav-desktop {
    display: none;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  .brand-link {
    gap: 0.5rem;
  }

  .brand-name {
    font-size: clamp(1.05rem, 4.2vw, 1.25rem);
    white-space: nowrap;
    font-weight: 800;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  /* Mobile Drawer Menu */
  .mobile-nav {
    top: var(--header-height);
    height: calc(100dvh - var(--header-height));
    height: calc(100vh - var(--header-height));
  }

  .mobile-nav-panel {
    padding: 1rem;
    gap: 0.5rem;
  }

  .mobile-nav-link {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 2.25rem 0 1.5rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.1rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
    margin-bottom: 2rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    font-size: 0.98rem;
  }

  /* Search & Filter Bar */
  .search-container {
    max-width: 100%;
    margin-bottom: 1.75rem;
  }

  .search-input {
    height: 48px;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 0 2.5rem 0 2.6rem;
    border-radius: var(--radius-lg);
  }

  .search-icon {
    left: 0.9rem;
  }

  .search-clear-btn {
    right: 0.65rem;
    width: 32px;
    height: 32px;
  }

  .category-filter-section {
    margin-bottom: 1.75rem;
  }

  .category-chips-scroll {
    gap: 0.35rem;
    padding: 0.2rem 0 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    padding: 0.42rem 0.8rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Grid Layouts (Mobile: Exactly 2 tool cards per line) */
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .tool-card {
    padding: 0.85rem 0.75rem !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    min-height: 180px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }

  .tool-card:active {
    transform: scale(0.98) !important;
  }

  .tool-card-top {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 0.45rem !important;
  }

  .tool-icon-box {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.25rem !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .fav-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-full) !important;
    flex-shrink: 0 !important;
  }

  .badge-popular {
    display: none !important;
  }

  .tool-card-title {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
    color: var(--text) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .tool-card-desc {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.45rem !important;
    color: var(--text-muted) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.05rem !important;
  }

  .tool-card-meta {
    gap: 0.25rem !important;
    margin-bottom: 0.55rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .tool-card-meta .tag-badge:not(.category-tag) {
    display: none !important;
  }

  .tag-badge {
    font-size: 0.68rem !important;
    padding: 0.12rem 0.4rem !important;
    border-radius: var(--radius-full) !important;
  }

  .open-tool-btn {
    min-height: 34px !important;
    font-size: 0.78rem !important;
    padding: 0.35rem 0.5rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .section {
    padding: 1.75rem 0;
  }

  .section-header {
    margin-bottom: 1.1rem;
    gap: 0.5rem;
  }

  .section-title-group h2 {
    font-size: 1.35rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  /* --------------------------------------------------------------------------
     Tool Modal Mobile Full-Redesign & Native Sheet Experience
     -------------------------------------------------------------------------- */
  .modal-drag-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
    width: 100%;
    cursor: grab;
    flex-shrink: 0;
  }

  .modal-drag-indicator .drag-bar {
    width: 42px;
    height: 4.5px;
    background: var(--border);
    border-radius: 999px;
  }

  .tool-modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .tool-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 94dvh !important;
    height: 94vh !important;
    max-height: 94dvh !important;
    max-height: 94vh !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
    transform: translateY(100%) !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--surface) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
  }

  .tool-modal-overlay.open .tool-modal-container {
    transform: translateY(0) !important;
  }

  .tool-modal-overlay.closing .tool-modal-container {
    transform: translateY(100%) !important;
    opacity: 0 !important;
    transition: transform 0.3s cubic-bezier(0.32, 1, 0.23, 1), opacity 0.25s ease !important;
  }

  .tool-modal-header {
    padding: 0.65rem 1rem 0.85rem !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--surface) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
  }

  .modal-title-area {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .modal-tool-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.35rem !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface-tertiary) 100%) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    flex-shrink: 0 !important;
  }

  .modal-title-text-group {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .modal-tool-name {
    font-size: clamp(1rem, 3.8vw, 1.15rem) !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .modal-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin-top: 0.15rem !important;
  }

  .modal-tool-category {
    font-size: 0.72rem !important;
    padding: 0.1rem 0.45rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-full) !important;
  }

  .modal-badge-free {
    display: none !important;
  }

  .modal-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
  }

  .modal-action-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-full) !important;
    background: var(--surface-secondary) !important;
    border: 1px solid var(--border) !important;
  }

  .modal-close-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-full) !important;
    background: var(--surface-tertiary) !important;
    border: 1px solid var(--border) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
  }

  .tool-modal-body {
    padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom, 20px)) !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    max-height: none !important;
  }

  .tool-description-banner {
    padding: 0.75rem 0.9rem !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 1.15rem !important;
    background: var(--surface-secondary) !important;
    border: 1px solid var(--border) !important;
  }

  .ai-notice-banner {
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
  }

  /* Universal Tool Controls & Form Layouts on Mobile */
  .tool-controls-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 1rem 0;
  }

  .tool-controls-row > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .tool-controls-row .btn,
  .tool-controls-row select,
  .tool-controls-row .form-select {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
    font-size: 0.95rem;
  }

  .form-group {
    margin-bottom: 1rem;
    width: 100%;
  }

  .form-label {
    font-size: 0.82rem;
  }

  .form-input, .form-select, .form-textarea {
    font-size: 16px !important; /* iOS Zoom Prevention */
    padding: 0.65rem 0.8rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .form-textarea {
    min-height: 100px;
  }

  /* Inline Grids in Tool Templates Auto-Collapse on Mobile */
  [style*="grid-template-columns"],
  .split-view-grid,
  .qr-layout-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  /* Output Container & Content Formatting */
  .tool-output-box {
    padding: 0.85rem;
    margin-top: 1rem;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .tool-output-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
  }

  .tool-output-title {
    font-size: 0.78rem;
  }

  .tool-output-content {
    font-size: 0.88rem;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    overflow-x: auto;
  }

  /* QR Code Generator Mobile Specifics */
  .qr-modes-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.3rem;
    gap: 0.35rem;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
  }

  .qr-modes-tabs::-webkit-scrollbar {
    display: none;
  }

  .qr-mode-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    min-height: 38px;
    border-radius: var(--radius-md);
  }

  .qr-inputs-column {
    gap: 1rem;
  }

  .qr-custom-box {
    padding: 0.9rem;
    border-radius: var(--radius-md);
  }

  .qr-preview-card {
    padding: 1rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--radius-lg);
  }

  .qr-canvas-container {
    padding: 0.85rem;
    max-width: min(100%, 250px);
    width: 100%;
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
  }

  .qr-canvas-container canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
    display: block;
  }

  .qr-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
  }

  .qr-swatch-btn {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .qr-btn-action {
    font-size: 0.85rem;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
  }

  /* Universal Tool Pre/Code Blocks Responsiveness */
  pre, code, .code-font {
    font-size: 0.82rem !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
  }

  /* Color Converter Swatch & Inputs Responsive */
  .color-swatch-display {
    height: 70px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Unit Converter, Percentage & Age Milestones Responsive */
  .unit-convert-row,
  .calc-inputs-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  /* Stats Cards Grid on Mobile (2x2 Grid) */
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    display: grid !important;
    gap: 0.5rem !important;
    width: 100%;
  }

  .stat-metric-card {
    padding: 0.65rem 0.4rem;
    width: 100%;
    box-sizing: border-box;
  }

  .stat-metric-value {
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    word-break: break-all;
  }

  .stat-metric-label {
    font-size: 0.68rem;
  }

  /* Title Slot Items on Mobile */
  .title-slot-list {
    gap: 0.4rem;
    margin-top: 0.75rem;
  }

  .title-slot-item {
    padding: 0.65rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
  }

  .title-slot-text {
    flex: 1 1 100%;
    word-break: break-word;
    line-height: 1.45;
  }

  .title-slot-item .btn {
    margin-left: auto;
    min-height: 36px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Diff View Lines on Mobile */
  .diff-line {
    font-size: 0.78rem;
    padding: 0.2rem 0.4rem;
    word-break: break-all;
    white-space: pre-wrap;
  }

  .preview-pane {
    padding: 0.85rem;
    min-height: 180px;
    max-height: 280px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Features Grid on Mobile */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .feature-card {
    padding: 1.25rem 1rem;
  }

  .feature-icon-box {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    margin-bottom: 0.85rem;
  }

  .feature-title {
    font-size: 1.1rem;
  }

  .feature-desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  /* FAQ Accordion Mobile */
  .faq-question {
    padding: 1rem 1.1rem;
    font-size: 0.96rem;
  }

  .faq-answer {
    padding: 0 1.1rem;
    font-size: 0.88rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1.1rem 1.1rem;
  }

  /* CTA Banner Mobile */
  .cta-banner {
    padding: 2.25rem 1rem;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .cta-eyebrow-badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.85rem;
  }

  .cta-banner h2 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }

  .cta-banner p {
    font-size: 0.9rem !important;
    margin-bottom: 1.35rem !important;
  }

  .cta-highlights-row {
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
  }

  .cta-pill-feature {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }

  .cta-actions-group {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .cta-btn-primary, .cta-btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    font-size: 0.95rem;
  }

  /* Footer & Standalone Pages Mobile */
  .site-footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding-top: 1.5rem;
  }

  .footer-social-links {
    justify-content: flex-start;
  }

  .social-icon-btn {
    width: 40px;
    height: 40px;
  }

  .page-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.75rem;
  }

  .page-title {
    font-size: clamp(1.85rem, 6vw, 2.4rem);
  }

  .page-subtitle {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  .contact-card, .prose-card {
    padding: 1.35rem 1rem;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .prose {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .prose h2 {
    font-size: 1.35rem;
    margin: 1.75rem 0 0.75rem;
  }

  .prose h3 {
    font-size: 1.15rem;
    margin: 1.35rem 0 0.6rem;
  }

  .contact-meta-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .contact-meta-item {
    padding: 0.75rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .header-actions {
    gap: 0.3rem;
  }

  .theme-toggle-btn, .mobile-toggle-btn {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .tool-modal-header {
    padding: 0.65rem 0.75rem;
  }

  .tool-modal-body {
    padding: 0.75rem 0.65rem 1.75rem;
  }

  .modal-action-btn, .modal-close-btn {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 340px) {
  .stats-cards-grid {
    grid-template-columns: 1fr !important;
  }
  .brand-name {
    display: none;
  }
}


