:root,
[data-theme="dark"] {
  /* Color Palette - Dark Mode (Default) */
  --bg-body: #090c15;
  --bg-surface: #101524;
  --bg-card: #151b2e;
  --bg-card-hover: #1c243d;
  --bg-input: #0b0f1a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(99, 102, 241, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, Monaco, monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--accent-primary-glow);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  --header-height: 72px;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-color-hover: rgba(99, 102, 241, 0.5);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #334155;
  
  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-primary-glow: rgba(79, 70, 229, 0.18);
  
  --accent-cyan: #0891b2;
  --accent-cyan-glow: rgba(8, 145, 178, 0.18);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.18);
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

ul, ol {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  flex: 1 0 auto;
}

/* Glassmorphism Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(9, 12, 21, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.88);
}

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

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-cyan) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active {
  background: rgba(0, 0, 0, 0.05);
}

/* Header Live Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.header-search-input {
  width: 100%;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 16px 0 38px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.header-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.header-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.search-shortcut-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-radius: 4px;
  font-family: var(--font-mono);
  pointer-events: none;
}

/* Search Dropdown Results */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  animation: fadeInDown 0.2s ease;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.highlighted {
  background: var(--bg-card-hover);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

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

.search-result-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-top: 2px;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Header Home Button */
.header-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header-home-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.header-home-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.theme-icon-sun, .theme-icon-moon {
  width: 20px;
  height: 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  position: absolute;
}

[data-theme="dark"] .theme-icon-sun {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}

[data-theme="dark"] .theme-icon-moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

[data-theme="light"] .theme-icon-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

[data-theme="light"] .theme-icon-moon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  padding: 18px 0;
  font-size: 13.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumb-active {
  color: var(--accent-primary);
  font-weight: 700;
}

/* ==========================================================================
   HERO SECTION (PARENT PAGE)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 90px 0 70px 0;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

/* Animated Ambient Glow Orbs */
.hero-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.orb-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  animation: orbFloat1 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 450px;
  height: 450px;
  top: 50px;
  right: 10%;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  animation: orbFloat2 22s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-70px, 50px) scale(1.2); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 24px;
  animation: fadeIn 0.8s ease;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 62px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 22px;
  color: var(--text-main);
  animation: fadeInUp 0.8s ease;
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px auto;
  animation: fadeInUp 0.9s ease;
}

/* Hero Centered Search Box */
.hero-search-wrapper {
  max-width: 680px;
  margin: 0 auto 28px auto;
  position: relative;
  animation: fadeInUp 1s ease;
}

.hero-search-input {
  width: 100%;
  height: 56px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 24px 0 54px;
  font-size: 16px;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.hero-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-primary-glow), var(--shadow-lg);
  background: var(--bg-surface);
}

.hero-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Quick Tag Pills */
.hero-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 46px;
  animation: fadeInUp 1.1s ease;
}

.quick-tag-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-tag-pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  transition: all var(--transition-fast);
}

.quick-tag-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Hero Stat Counters Strip */
.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  animation: fadeInUp 1.2s ease;
}

.hero-stat-item {
  text-align: center;
  border-right: 1px solid var(--border-color);
  padding: 0 12px;
}

.hero-stat-item:last-child {
  border-right: none;
}

.hero-stat-number {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.hero-stat-number.cyan {
  color: var(--accent-cyan);
}

.hero-stat-number.emerald {
  color: var(--accent-emerald);
}

.hero-stat-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   CATEGORY CARDS DIRECTORY GRID
   ========================================================================== */
.section {
  padding: 80px 0;
}

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

.section-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 16.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 6-Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card-hover);
}

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

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.category-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.category-tool-count {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.category-card-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.category-card-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

.category-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tool-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

.category-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-primary);
  transition: gap var(--transition-fast);
}

.category-card:hover .category-card-link {
  gap: 12px;
}

/* ==========================================================================
   TECHNICAL ADVANTAGE BENTO SECTION
   ========================================================================== */
.advantage-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.advantage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  transition: transform var(--transition-fast);
}

.advantage-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
}

.advantage-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.advantage-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.advantage-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   FAQ ACCORDION COMPONENT
   ========================================================================== */
.faq-section {
  padding: 90px 0;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.faq-item:hover, .faq-item.active {
  border-color: var(--border-color-hover);
}

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

.faq-icon {
  font-size: 18px;
  color: var(--accent-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 22px;
}

/* ==========================================================================
   TOOL WORKSPACE STYLES (CATEGORY PAGES)
   ========================================================================== */
.category-hero {
  padding: 60px 0 40px 0;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-color);
}

.category-hero-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -0.8px;
}

.category-hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.65;
}

/* Tools Stack / Layout */
.tools-stack {
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  scroll-margin-top: calc(var(--header-height) + 20px);
  transition: border-color var(--transition-fast);
}

.tool-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.tool-header {
  padding: 24px 30px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tool-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tool-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
}

.tool-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-actions {
  display: flex;
  gap: 8px;
}

.tool-body {
  padding: 30px;
}

/* Form Controls & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.form-control, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
  font-family: var(--font-family);
  line-height: 1.5;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 600;
}

.slider-control {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
}

.slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-primary-glow);
}

/* Primary & Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.btn-copy:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--accent-primary);
}

/* Metrics & Counter Badges */
.metrics-pill-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.metric-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.metric-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.2;
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-col-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

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

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .category-grid, .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links, .header-search {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .category-grid, .advantage-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
  }
  .hero-stat-item:last-child {
    border-bottom: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* File Upload Dropzones & OCR Progress */
.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--bg-body);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.file-dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.file-dropzone-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.file-dropzone-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.ocr-progress-container {
  margin: 1.25rem 0;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.ocr-progress-bar-bg {
  height: 10px;
  background: var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.ocr-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  transition: width 0.2s ease;
}
