@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  /* Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-rgb: 79, 70, 229;
  --secondary: #06b6d4;
  --secondary-hover: #0891b2;
  --accent: #f59e0b;
  
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --border: #e2e8f0;
  --border-focus: #a5b4fc;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 15px rgba(79, 70, 229, 0.15);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(226, 232, 240, 0.8);
  --glass-blur: blur(12px);

  /* Layout & Spacing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --max-width: 1280px;
  --header-height: 72px;

  /* Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  /* Colors */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-rgb: 99, 102, 241;
  --secondary: #22d3ee;
  --secondary-hover: #06b6d4;
  
  --border: #1e293b;
  --border-focus: #4f46e5;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

  /* Glassmorphism */
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(30, 41, 59, 0.8);
}

/* --- RESET & ACCESSIBILITY --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

button {
  cursor: pointer;
}

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

svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

ul, ol {
  list-style: none;
}

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

/* Screen reader only utility class */
.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;
}

/* --- CORE LAYOUT & CONTAINERS --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

main {
  flex-grow: 1;
  padding-top: var(--header-height);
}

/* --- SCROLL PROGRESS BAR & BACK TO TOP --- */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1000;
  background-color: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transition: width 0.1s ease;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* --- HEADER & NAVIGATION --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 900;
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.header.scroll-up {
  transform: translateY(0);
}
.header.scroll-down {
  transform: translateY(calc(-1 * var(--header-height)));
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}
.logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--bg-tertiary);
}

/* Category Dropdown Navigation */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background-color: var(--bg-secondary);
}
.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}
.theme-toggle-btn .sun-icon {
  display: none;
}
[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Search Icon Trigger */
.search-trigger-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background-color: var(--bg-secondary);
}
.search-trigger-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

/* Hamburger Menu Button */
.menu-toggle-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
}
.menu-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Nav Styles */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
  }
}

.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 850;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-link {
  font-size: 18px;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
}
.mobile-link:hover, .mobile-link.active {
  background-color: var(--bg-tertiary);
  color: var(--primary);
}
.mobile-dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 16px;
  padding-left: 12px;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1100;
  max-width: 380px;
  width: calc(100% - 48px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transform: translateX(-40px);
  opacity: 0;
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: all 0.3s ease;
}
.toast.toast-out {
  transform: scale(0.9);
  opacity: 0;
}
.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-error .toast-icon { color: var(--error); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info .toast-icon { color: var(--info); }

@keyframes toast-in {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- MODAL DIALOGS --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  width: calc(100% - 40px);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}
.modal-body {
  padding: 24px;
}

/* --- GLOBAL CORE COMPONENTS --- */

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
}
.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 350px;
  height: 350px;
  background-color: var(--primary);
  filter: blur(150px);
  opacity: 0.15;
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  bottom: 0%;
  right: 15%;
  width: 400px;
  height: 400px;
  background-color: var(--secondary);
  filter: blur(160px);
  opacity: 0.15;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  animation: pulse-badge 2s infinite;
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0);
  }
}

/* Home Hero Search Container */
.hero-search-wrapper {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.search-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 12px 8px 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}
.search-container:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow), var(--shadow-xl);
}
.search-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}
.search-input {
  flex-grow: 1;
  font-size: 16px;
  font-weight: 500;
  height: 48px;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-clear-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-right: 8px;
}
.search-clear-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}
.search-clear-btn.active {
  display: flex;
}
.search-btn {
  background-color: var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}
.search-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Autocomplete suggestion dropdown */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin-top: 12px;
  z-index: 50;
  text-align: left;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}
.autocomplete-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.suggestion-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px 6px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.5px;
}
.suggestion-group-title:first-child {
  border-top: none;
}
.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  transition: background-color 0.2s ease;
}
.suggestion-item:hover, .suggestion-item.highlighted {
  background-color: var(--bg-tertiary);
}
.suggestion-details {
  display: flex;
  align-items: center;
  gap: 12px;
}
.suggestion-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.suggestion-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}
.suggestion-category {
  font-size: 11px;
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* Modal Search Overlay */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.search-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.search-modal-content {
  width: 100%;
  max-width: 650px;
  padding: 0 16px;
}

/* Premium Button Designs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--border);
  transform: translateY(-1px);
}
.btn-accent {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.btn-accent:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

/* --- COMMON SECTIONS --- */
.section {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}
.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.category-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.category-card:hover::after {
  opacity: 1;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.category-tool-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.category-tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  transition: all 0.2s ease;
}
.category-tool-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--primary);
  transform: translateX(4px);
}

/* Beautiful Cards Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.tool-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.tool-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: var(--primary-hover);
}
.tool-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.tool-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-favorite-btn {
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.tool-favorite-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}
.tool-favorite-btn.active {
  color: var(--accent);
}
.tool-favorite-btn svg {
  width: 20px;
  height: 20px;
}
.tool-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.tool-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.tool-card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.tool-card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.tool-card:hover .tool-card-link svg {
  transform: translateX(4px);
}

/* Feature Showcase */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.feature-item {
  text-align: center;
  padding: 24px;
}
.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-sm);
}
.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.feature-text {
  color: var(--text-secondary);
  font-size: 15px;
}

/* FAQs Section - Accordion */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover {
  border-color: var(--primary);
}
.faq-question-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 16px;
  text-align: left;
  color: var(--text-primary);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  background-color: var(--bg-primary);
  border-top: 0 solid var(--border);
}
.faq-answer-content {
  padding: 24px;
  color: var(--text-secondary);
  font-size: 15px;
}
.faq-item.active .faq-answer {
  max-height: 1000px; /* high value to expand */
  border-top-width: 1px;
  transition: max-height 0.5s cubic-bezier(1, 0, 1, 0);
}
.faq-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Call to Action Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.cta-glow {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  filter: blur(40px);
}
.cta-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
}
.cta-text {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 32px;
  opacity: 0.9;
}

/* --- BREADCRUMBS --- */
.breadcrumbs-wrapper {
  background-color: var(--bg-tertiary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li:not(:last-child)::after {
  content: '/';
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--primary);
}
.breadcrumbs li.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-notice {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 420px;
  width: calc(100% - 48px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  z-index: 1000;
  transform: translateY(150px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cookie-notice.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.cookie-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cookie-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.cookie-actions {
  display: flex;
  gap: 12px;
}

/* --- SKELETON LOADER --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}
.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}
.skeleton-title {
  height: 24px;
  margin-bottom: 16px;
  border-radius: 4px;
  width: 60%;
}
.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* --- FOOTER --- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.footer-logo-desc {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-block;
}
.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}
.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.newsletter-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background-color: var(--bg-primary);
  font-size: 14px;
}
.newsletter-input:focus {
  border-color: var(--primary);
  outline: none;
}
.newsletter-btn {
  background-color: var(--primary);
  color: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.newsletter-btn:hover {
  background-color: var(--primary-hover);
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.social-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.1);
}

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

/* AdSense responsive placeholder styling */
.ads-placeholder {
  background-color: var(--bg-tertiary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 20px 0;
  width: 100%;
}
