/* =========================================
   WAQARKOZI - Premium Commercial CSS System
   Enterprise-Grade Design Framework
   ========================================= */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* --- Font Awesome Icons --- */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* --- Design Tokens --- */
:root {
  /* Core Foundation */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Inter', system-ui, sans-serif;

  /* Premium Light Mode Palette */
  --bg: #fdfdfd;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Primary Brand Colors */
  --primary: #6366f1; /* Modern Indigo */
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  
  --secondary: #ec4899; /* Vibrant Pink */
  --accent: #10b981; /* Emerald */

  /* Shadows & Depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  /* Radius & Spacing */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --surface: #111827;
  --surface-2: #1f2937;
  --surface-3: #374151;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  --border: #1f2937;
  --border-light: #374151;

  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --primary-dark: #6366f1;
  --primary-glow: rgba(129, 140, 248, 0.2);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* Base Styles & Resets */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo {
  font-family: var(--font-primary);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  cursor: pointer;
  font-family: inherit;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.glass-bright {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-bright {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Neon Theme */
[data-theme="neon"] {
  --bg:             #0a0a0a;
  --surface:        #1a1a1a;
  --surface-2:      #2a2a2a;
  --surface-3:      #3a3a3a;
  --text:           #ffffff;
  --text-muted:     #b0b0b0;
  --text-light:     #808080;
  --border:         #404040;
  --border-light:   #505050;

  --primary:        #00ff88;
  --primary-light:  #33ffaa;
  --primary-dark:   #00cc66;
  --primary-glow:   rgba(0, 255, 136, 0.3);
  --secondary:      #ff0088;
  --secondary-light: #ff33aa;
  --accent:         #8800ff;
  --success:        #00ff88;
  --warning:        #ffff00;
  --danger:         #ff0044;
  --info:           #00aaff;

  --shadow-glow:    0 0 40px var(--primary-glow);
}

/* Minimal Theme */
[data-theme="minimal"] {
  --bg:             #fefefe;
  --surface:        #ffffff;
  --surface-2:      #fafafa;
  --surface-3:      #f5f5f5;
  --text:           #2c2c2c;
  --text-muted:     #666666;
  --text-light:     #999999;
  --border:         #e0e0e0;
  --border-light:   #f0f0f0;

  --primary:        #000000;
  --primary-light:  #333333;
  --primary-dark:   #000000;
  --primary-glow:   rgba(0, 0, 0, 0.1);
  --secondary:      #666666;
  --secondary-light: #999999;
  --accent:         #cccccc;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.02);
  --shadow-md:      0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg:      0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl:      0 8px 16px rgba(0,0,0,0.05);
  --shadow-glow:    0 0 10px var(--primary-glow);
}

/* High Contrast Theme */
[data-theme="high-contrast"] {
  --bg:             #000000;
  --surface:        #ffffff;
  --surface-2:      #f0f0f0;
  --surface-3:      #e0e0e0;
  --text:           #000000;
  --text-muted:     #333333;
  --text-light:     #666666;
  --border:         #000000;
  --border-light:   #333333;

  --primary:        #0000ff;
  --primary-light:  #4444ff;
  --primary-dark:   #0000aa;
  --primary-glow:   rgba(0, 0, 255, 0.2);
  --secondary:      #ff0000;
  --secondary-light: #ff4444;
  --accent:         #00ff00;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:      0 2px 4px rgba(0,0,0,0.4);
  --shadow-lg:      0 4px 8px rgba(0,0,0,0.5);
  --shadow-xl:      0 8px 16px rgba(0,0,0,0.6);
  --shadow-glow:    0 0 20px var(--primary-glow);
}

/* Colorblind Friendly Theme */
[data-theme="colorblind"] {
  --bg:             #f8f9fa;
  --surface:        #ffffff;
  --surface-2:      #f1f3f4;
  --surface-3:      #e8eaed;
  --text:           #202124;
  --text-muted:     #5f6368;
  --text-light:     #80868b;
  --border:         #dadce0;
  --border-light:   #e8eaed;

  --primary:        #1a73e8;
  --primary-light:  #4285f4;
  --primary-dark:   #1557b0;
  --primary-glow:   rgba(26, 115, 232, 0.15);
  --secondary:      #34a853;
  --secondary-light: #4caf50;
  --accent:         #ea4335;
  --success:        #34a853;
  --warning:        #fbbc04;
  --danger:         #ea4335;
  --info:           #4285f4;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.1);
  --shadow-md:      0 2px 4px rgba(0,0,0,0.12);
  --shadow-lg:      0 4px 8px rgba(0,0,0,0.14);
  --shadow-xl:      0 8px 16px rgba(0,0,0,0.16);
  --shadow-glow:    0 0 20px var(--primary-glow);
}

/* Ocean Theme */
[data-theme="ocean"] {
  --bg:             #e0f2fe;
  --surface:        #ffffff;
  --surface-2:      #f1f8fe;
  --surface-3:      #e3f2fd;
  --text:           #0d47a1;
  --text-muted:     #1976d2;
  --text-light:     #42a5f5;
  --border:         #bbdefb;
  --border-light:   #e3f2fd;

  --primary:        #0277bd;
  --primary-light:  #039be5;
  --primary-dark:   #01579b;
  --primary-glow:   rgba(2, 119, 189, 0.2);
  --secondary:      #00acc1;
  --secondary-light: #26c6da;
  --accent:         #00838f;
  --success:        #00695c;
  --warning:        #f57c00;
  --danger:         #c62828;
  --info:           #0277bd;

  --shadow-sm:      0 1px 2px rgba(2,119,189,0.1);
  --shadow-md:      0 2px 4px rgba(2,119,189,0.12);
  --shadow-lg:      0 4px 8px rgba(2,119,189,0.14);
  --shadow-xl:      0 8px 16px rgba(2,119,189,0.16);
  --shadow-glow:    0 0 25px var(--primary-glow);
}

/* --- Theme Selector --- */
.theme-selector {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.theme-selector-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.theme-selector-btn:hover {
  background: var(--surface-3);
  border-color: var(--primary);
}

.theme-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.theme-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.theme-option:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.theme-option:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.theme-option:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}



.favorite-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.favorite-item:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.favorite-link {
  display: flex;
  align-items: center;
  flex: 1;
  text-decoration: none;
  color: var(--text);
}

.favorite-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--gradient);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1rem;
}

.favorite-info {
  flex: 1;
}

.favorite-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* /* ====== HERO SEARCH HUB ====== */
.hero-search-hub {
  padding: 10rem 1.5rem 6rem;
  text-align: center;
  background: radial-gradient(circle at top, var(--primary-glow) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-main-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-query-container {
  max-width: 720px;
  margin: 0 auto 3rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.hero-query-container:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

#hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1rem;
  font-size: 1.25rem;
  outline: none;
  color: var(--text);
}

.query-icon {
  margin-right: 1.25rem;
  color: var(--text-dim);
}

.query-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.voice-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
  border-radius: var(--radius-md);
}

.voice-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--primary);
}

.voice-btn.recording {
  color: var(--danger);
  animation: pulse-glow 1.5s infinite;
}

.hero-popular-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.hero-popular-tags a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.hero-popular-tags a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.favorite-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.remove-favorite {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.remove-favorite:hover {
  background: var(--danger);
  opacity: 0.8;
  transform: scale(1.1);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

/* --- Advanced Animations & Effects --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50% { box-shadow: 0 0 30px var(--primary-glow), 0 0 40px var(--primary-glow); }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* /* ====== TOOLS GRID & CARDS ====== */
.tools-section {
  padding: 4rem 1.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.tool-card-icon {
  font-size: 2.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
}

.tool-tag {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  width: fit-content;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin: 0;
}

.tool-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.tool-card-arrow {
  margin-top: auto;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Floating Actions */
.search-trigger, .ai-flaot-trigger {
  position: fixed;
  bottom: 2rem;
  z-index: 999;
  padding: 1rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.search-trigger {
  right: 6rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.ai-flaot-trigger {
  right: 2rem;
  background: var(--primary);
  color: white;
  border: none;
}

.search-trigger:hover, .ai-flaot-trigger:hover {
  transform: scale(1.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-link:hover {
  transform: translateY(-1px);
}

/* Loading animation */
@keyframes loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: loading 1s linear infinite;
  margin: 0 auto;
}

/* Gradient text animation */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 3s ease-in-out infinite;
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Layout & Responsive Structure */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  backdrop-filter: blur(18px);
  background: rgba(17, 24, 39, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
  font-weight: 800;
}

.logo-tag {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text);
  transition: color var(--transition), transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.navbar-search-wrapper {
  flex: 1 1 320px;
  min-width: 220px;
  display: flex;
  justify-content: center;
}

.navbar-search {
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.5rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

.navbar-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-link,
.dashboard-link {
  font-size: 0.95rem;
  white-space: nowrap;
}

.hamburger {
  display: none;
  border: none;
  background: transparent;
  flex-direction: column;
  justify-content: space-between;
  width: 2rem;
  height: 1.4rem;
  padding: 0;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 999px;
}

.header-banner-ad {
  display: block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: center;
  padding: 0.85rem 1rem;
  margin: 0 auto 2rem;
  border-radius: var(--radius-xl);
  max-width: 1200px;
  font-weight: 600;
}

.hero-search-hub {
  padding: 8rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-search-hub::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(129, 140, 248, 0.16), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.hero-search-hub .container {
  position: relative;
  z-index: 1;
}

.hero-main-title {
  margin-bottom: 2rem;
}

.hero-query-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.query-icon {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

.query-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-popular-tags {
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.hero-popular-tags span {
  font-weight: 600;
  color: var(--text);
}

.category-nav-section {
  padding: 2rem 0 4rem;
}

.category-nav-section .overflow-x {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tools-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  align-items: center;
  padding-bottom: 0.75rem;
}

.tools-filter::-webkit-scrollbar {
  height: 8px;
}

.tools-filter::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

.filter-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.ad-container {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  position: relative;
  min-height: 180px;
}

.ad-header {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.ad-content {
  color: var(--text-muted);
}

.ad-label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.stats-grid,
.testimonials-grid,
.team-grid,
.grid-auto-fit,
.grid-auto-fit-wide,
.partner-grid {
  display: grid;
  gap: 1.5rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card,
.testimonial-card,
.team-card,
.feature-showcase-card,
.partner-card,
.contact-form-wrapper,
.contact-info,
.final-cta-box,
.cta-section,
.newsletter,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  padding: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-desc {
  color: var(--text-muted);
}

.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial-card {
  padding: 1.75rem;
}

.testimonial-rating {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.testimonial-text {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: 100%;
  gap: 1.5rem;
}

.team-card {
  padding: 1.75rem;
  text-align: center;
  min-width: 0;
  overflow-wrap: break-word;
}

.team-avatar {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.12);
  font-size: 1.75rem;
}

.team-role,
.team-bio,
.partner-desc,
.contact-info p,
.contact-method p,
.partner-offer,
.faq-answer p,
.footer p,
.footer-col p {
  color: var(--text-muted);
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-social a {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text);
}

.contact-section {
  padding: 4rem 0;
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact-info {
  padding: 2.5rem;
}

.contact-methods {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.contact-method {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.method-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.12);
  font-size: 1.25rem;
}

.contact-form-wrapper {
  padding: 2.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: grid;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.newsletter-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

.contact-form textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 0.95rem 1.5rem;
  font-weight: 700;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost-white {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.1);
}

.btn-white {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2rem;
}

.newsletter {
  margin-top: 2.5rem;
  padding: 2.5rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.newsletter-form input {
  max-width: 420px;
}

.faq-section {
  padding: 4rem 0;
}

.faq-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.faq-item {
  padding: 1.5rem;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.faq-toggle {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.final-cta-section {
  padding: 4rem 0;
}

.final-cta-box {
  padding: 2.5rem;
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta-badge {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-auto-fit-wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-showcase-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  min-height: 240px;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px;
}

.partner-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.partner-card {
  padding: 2rem;
}

.partner-badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.partner-offer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-muted);
  margin: 1.25rem 0;
}

.partner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.affiliate-disclosure {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.footer {
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: grid;
  gap: 1rem;
}

.footer-col h4,
.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col ul,
.footer-links {
  display: grid;
  gap: 0.75rem;
}

.footer-col a,
.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover,
.footer-col a:hover {
  color: var(--primary);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-bottom p {
  margin: 0;
}

.ai-drawer {
  position: fixed;
  right: 1.5rem;
  bottom: 4.5rem;
  width: min(360px, calc(100% - 2rem));
  max-height: 80vh;
  transform: translateY(120%);
  opacity: 0;
  transition: var(--transition);
  z-index: 10020;
}

.ai-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

.drawer-header,
.drawer-footer {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.drawer-content {
  padding: 1rem 1.25rem 0;
}

.input-wrapper {
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem;
}

.input-wrapper input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.9rem 1rem;
  background: var(--surface-2);
  color: var(--text);
}

.send-btn {
  border: none;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  padding: 0.85rem 1rem;
}

.ai-flaot-trigger,
.search-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10010;
}

.ai-flaot-trigger {
  right: 1.5rem;
}

.search-trigger {
  right: 6.5rem;
}

.search-trigger span,
.search-trigger kbd {
  margin-left: 0.5rem;
}

.search-trigger kbd {
  background: rgba(255,255,255,0.08);
  border-radius: 0.45rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-center {
  text-align: center !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 0.75rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.75rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.max-width-600 { max-width: 600px !important; }
.font-black { font-weight: 900 !important; }

@media (max-width: 980px) {
  .nav-content {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    justify-content: center;
  }

  .navbar-search-wrapper {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-search-hub {
    padding: 5rem 1rem 3rem;
  }

  .hero-query-container {
    padding: 1rem;
  }

  .category-nav-section,
  .stats-section,
  .testimonials-section,
  .team-section,
  .contact-section,
  .faq-section,
  .final-cta-section,
  .unique-features-section,
  .ultra-unique-section,
  .marketplace-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-trigger,
  .ai-flaot-trigger {
    bottom: 1rem;
  }

  .search-trigger {
    right: 1rem;
  }

  .ai-flaot-trigger {
    right: 5rem;
  }
}

@media (max-width: 560px) {
  .hero-popular-tags {
    flex-direction: column;
    align-items: center;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .query-actions {
    width: 100%;
    justify-content: stretch;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-card {
    padding: 1.25rem;
  }

  .team-avatar {
    width: 3.5rem;
    height: 3.5rem;
  }

  .btn,
  .partner-cta,
  .modal-content,
  .ai-drawer {
    width: 100%;
  }
}

/* Particle effect */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }

/* Advanced button effects */
.btn-advanced {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-advanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-advanced:hover::before {
  left: 100%;
}

/* Typing effect */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

.typing-effect {
  overflow: hidden;
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary); }
}



/* --- Advanced Password Generator --- */
.password-generator-advanced {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.password-result-section {
  margin-bottom: 2rem;
}

.result-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
}

.password-display {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 2px;
  word-break: break-all;
  line-height: 1.4;
  color: var(--text);
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.strength-meter {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.strength-text {
  font-weight: 600;
  font-size: 0.875rem;
}

.password-options {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.option-group {
  margin-bottom: 2rem;
}

.option-group:last-child {
  margin-bottom: 0;
}

.option-group h4 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.option-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.option-slider {
  width: 100%;
  margin-bottom: 0.5rem;
}

.option-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.preset-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.checkbox-item:hover {
  background: var(--surface-2);
}

.checkbox-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

.checkmark {
  position: relative;
}

.batch-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.batch-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.batch-input {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
}

.batch-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.batch-header {
  background: var(--surface-2);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.batch-list {
  max-height: 300px;
  overflow-y: auto;
}

.batch-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.batch-item:last-child {
  border-bottom: none;
}

.batch-number {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 2rem;
}

.batch-password {
  flex: 1;
  font-family: 'Courier New', monospace;
  background: var(--surface-2);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.batch-copy-single {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}

.batch-copy-single:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.analysis-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.analysis-label {
  font-weight: 500;
  color: var(--text-muted);
}

.analysis-item span:last-child {
  font-weight: 600;
  color: var(--text);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .password-generator-advanced {
    padding: 1rem;
  }

  .result-box {
    padding: 1.5rem;
  }

  .password-display {
    font-size: 1.25rem;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .batch-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Particle Background */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  animation: float-particle linear infinite;
  opacity: 0.3;
  filter: blur(8px);
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) scale(1.5);
    opacity: 0;
  }
}

/* Animated Gradient Text */
.gradient-text-animated {
  background: linear-gradient(
    270deg,
    var(--primary),
    var(--secondary),
    var(--accent),
    var(--success),
    var(--warning),
    var(--primary)
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
  font-weight: 900;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px)  { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* --- Utility --- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   NAVBAR
   ========================================= */
/* ====== NAVBAR ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  padding: 0 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar.glass-bright {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .navbar.glass-bright {
  background: rgba(15, 23, 41, 0.88);
}

.nav-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.45rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.logo .logo-k {
  color: var(--primary);
}

.logo .logo-tag {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-lg);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.navbar-search-wrapper {
  flex: 1;
  max-width: 420px;
  min-width: 220px;
}

.navbar-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.navbar-search:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.navbar-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}

.navbar-search-input::placeholder {
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Navigation Improvements */
@media (max-width: 767px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    gap: 0.5rem;
    z-index: 199;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-h));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    padding: 1.2rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: all var(--transition);
    color: var(--text);
    background: var(--surface-2);
    font-weight: 500;
    position: relative;
    overflow: hidden;
  }
  
  .nav-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform var(--transition);
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateX(4px);
  }
  
  .nav-links a:hover::before,
  .nav-links a.active::before {
    transform: scaleY(1);
  }

  .nav-content {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  .navbar-search-wrapper {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .nav-actions {
    order: 2;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  #authButtons,
  #dashboardButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
  }

  .nav-open .navbar-search-wrapper {
    display: none;
  }

  .nav-open {
    overflow: hidden;
  }

  /* Larger touch targets for mobile */
  .filter-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-height: 48px; /* Touch-friendly size */
  }
  
  .tool-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  
  .hero-sub {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    padding: 0 0.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  /* Improved social share for mobile */
  .social-share {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .share-text {
    font-size: 0.9rem;
    text-align: center;
  }
  
  .share-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .share-btn {
    width: 48px; /* Larger touch target */
    height: 48px;
  }
  
  /* Better search modal on mobile */
  .search-modal-content {
    max-width: calc(100% - 2rem);
    margin: 1rem;
  }
  
  #global-search {
    font-size: 1.1rem; /* Larger text input */
  }
  
  .search-result-item {
    padding: 1rem;
    min-height: 72px; /* Touch-friendly */
  }
  
  /* Enhanced AI chatbot for mobile */
  .ai-assistant {
    bottom: 6rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
  
  .ai-trigger {
    bottom: 1rem;
    right: 1rem;
    width: 60px;
    height: 60px;
  }
  
  /* Breadcrumb mobile optimization */
  .breadcrumb {
    width: calc(100% - 2rem);
    margin: 0 1rem 1.5rem;
    padding: 0.625rem 1rem;
  }
  
  .breadcrumb-list {
    font-size: 0.8rem;
  }
}

/* Ultra-small screens */
@media (max-width: 375px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
}

@keyframes slideDown {
  from { 
    opacity: 0; 
    transform: translateY(-12px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-glow);
}
@media (max-width: 767px) {
  .nav-links a {
    padding: 0.875rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
  }
  .nav-links a:hover { border-color: var(--border); }
}

/* --- Nexus Elite Downloader UI --- */
.downloader-ui {
  max-width: 800px;
  margin: 3rem auto;
  text-align: center;
}

.downloader-shield {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  margin-bottom: 2rem;
  transition: var(--transition-spring);
  background: var(--glass-bright);
  border: 1px solid var(--border);
}

.downloader-shield:focus-within {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(79,70,229,0.2);
}

.downloader-input-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
}

.download-icon {
  color: var(--primary);
  opacity: 0.7;
}

#video-url {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text);
  outline: none;
  min-width: 0;
}

#download-trigger {
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79,70,229,0.3);
  transition: var(--transition-spring);
}

#download-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.downloader-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
}

.status-pulse {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-glow 1.5s infinite;
}

#download-result {
  margin-top: 2rem;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--success);
  animation: spring-in 0.6s both;
  background: var(--glass-bright);
}

.result-header {
  margin-bottom: 1rem;
}

.downloader-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.feat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
#theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* Mobile Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition);
  align-items: center;
}
.hamburger:hover {
  border-color: var(--primary);
  background: var(--surface);
}
@media (max-width: 767px) { .hamburger { display: flex; } }

.hamburger span {
  display: block;
  width: 20px; height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ========== Navbar Search Bar ========== */
.navbar-search-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 350px;
  margin: 0 1rem;
}

.navbar-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.navbar-search:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.navbar-search:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.navbar-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition);
}

.navbar-search:focus-within .navbar-search-icon {
  color: var(--primary);
}

.navbar-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-primary);
}

.navbar-search-input::placeholder {
  color: var(--text-muted);
}

/* Responsive Navbar Search */
@media (max-width: 1024px) {
  .navbar-search-wrapper {
    display: flex;
    flex: 1 1 auto;
    max-width: none;
    margin: 0.4rem 0.7rem;
    order: 1;
  }
  .navbar-search {
    width: 100%;
    padding: 0.45rem 0.75rem;
  }
  .navbar-search-input {
    font-size: 0.95rem;
  }
}

@media (max-width: 767px) {
  .navbar-search-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0.5rem 0.75rem;
    order: 1;
  }
  .navbar-search {
    width: 100%;
  }
  .nav-links {
    display: none;
  }
  .nav-actions {
    order: 2;
  }
}

/* --- Nexus Zenith OmniSearch --- */
.omnisearch-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.omnisearch-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.omnisearch-modal {
  width: 100%;
  max-width: 650px;
  background: var(--glass-bright);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 128px rgba(0,0,0,0.5);
  overflow: hidden;
}

.omnisearch-header {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

#omnisearch-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.25rem;
  outline: none;
}

.results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.omnisearch-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 1rem;
}

.omnisearch-item:hover, .omnisearch-item.selected {
  background: var(--primary-glow);
  transform: translateX(4px);
}

.item-icon { font-size: 1.5rem; }
.item-info { flex: 1; display: flex; flex-direction: column; }
.item-name { font-weight: 600; color: var(--text); }
.item-category { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; }
.item-shortcut { font-size: 0.7rem; color: var(--text-dim); opacity: 0.5; }

.omnisearch-footer {
  padding: 0.75rem 1.5rem;
  background: rgba(0,0,0,0.1);
  display: flex;
  gap: 1.5rem;
}

.hint { font-size: 0.75rem; color: var(--text-dim); display: flex; gap: 0.4rem; align-items: center; }
.hint kbd { 
  background: var(--surface-2); 
  padding: 2px 6px; 
  border-radius: 4px; 
  border: 1px solid var(--border);
}

/* --- 3D INTERACTIVE TILT --- */
.tilt-card {
  transition: transform 0.1s ease-out;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.advanced-options {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.option-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.option-group select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.option-group select:focus {
  border-color: var(--primary);
}

/* --- Elite Categories (Singularity Update) --- */
.elite-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.category-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--glass-bright);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-spring);
}

.category-banner:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.cat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

.cat-info h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.cat-info p { font-size: 0.85rem; color: var(--text-dim); }

.trending-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(79,70,229,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(79,70,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
}

.cat-pulse {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(16,185,129,0.4);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.tilt-card:hover { transform: translateY(-4px) rotateX(2deg) rotateY(2deg); }

/* --- Nexus Elite Hub Banner --- */
.hero-section {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 767px) { .hero-section { padding: 3rem 0 2.5rem; } }

/* Background blobs */
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-section::before {
  width: 500px; height: 500px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
}
.hero-section::after {
  width: 400px; height: 400px;
  bottom: -100px; right: -80px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
}

.hero-section .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.875rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.7s ease 0.4s both;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-top: 0.25rem; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 48px; /* Touch-friendly */
  touch-action: manipulation; /* Better touch response */
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight on tap */
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}
.btn-primary:active {
  transform: scale(0.98); /* Press effect */
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

/* Mobile-first button improvements */
@media (max-width: 767px) {
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 56px; /* Larger on mobile */
  }
  
  /* Add ripple effect for touch feedback */
  .btn {
    position: relative;
    overflow: hidden;
  }
  
  .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }
  
  .btn:active::after {
    width: 300px;
    height: 300px;
  }
}

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: inline-block;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.breadcrumb-item a {
  color: var(--primary);
  font-weight: 600;
}
.breadcrumb-item a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}
.breadcrumb-item.active {
  color: var(--text);
  font-weight: 600;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Social Share */
.social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.share-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.share-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}
.share-btn:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: transparent;
  box-shadow: 0 8px 20px var(--primary-glow);
}
.share-btn:hover::before {
  opacity: 0.15;
}
.share-btn svg {
  position: relative;
  z-index: 1;
  transition: transform var(--transition);
}
.share-btn:hover svg {
  transform: scale(1.15) rotate(5deg);
}
.share-btn.twitter:hover { color: #1DA1F2; }
.share-btn.facebook:hover { color: #1877F2; }
.share-btn.linkedin:hover { color: #0A66C2; }
.share-btn.whatsapp:hover { color: #25D366; }
.share-btn.copy-link:hover { color: var(--primary); }

@media (max-width: 767px) {
  .social-share {
    flex-direction: column;
    gap: 1rem;
  }
  .share-text {
    font-size: 0.85rem;
  }
  .share-btn {
    width: 36px;
    height: 36px;
  }
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.features-section {
  padding: 5rem 0;
}
@media (max-width: 767px) { .features-section { padding: 3rem 0; } }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-glow);
  transform: translateY(-4px);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* =========================================
   TOOLS SECTION
   ========================================= */
.tools-section {
  padding: 4rem 0 5rem;
}
@media (max-width: 767px) { .tools-section { padding: 2.5rem 0 3.5rem; } }

/* Category Filter */
.tools-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 480px)  { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 1.125rem; } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-light) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.tool-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
  z-index: 1;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.2),
    0 0 0 1px var(--primary-glow),
    inset 0 0 20px var(--primary-glow);
  filter: brightness(1.05);
}
.tool-card:hover::before { opacity: 0.08; }
.tool-card:hover::after {
  opacity: 1;
  left: 100%;
  transition: all 0.8s ease;
}

.tool-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  animation: icon-bounce 2s ease-in-out infinite;
}
@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}
.tool-card:hover .tool-card-icon {
  transform: scale(1.2) rotate(-10deg);
  animation: none;
}
.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
  line-height: 1.3;
  transition: color 0.3s ease;
}
.tool-card:hover h3 {
  color: var(--primary);
}
.tool-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  line-height: 1.5;
  flex: 1;
  transition: color 0.3s ease;
}
.tool-card:hover p {
  color: var(--text);
}
.tool-card-arrow {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.tool-card:hover .tool-card-arrow { 
  gap: 0.5rem;
  transform: translateX(5px);
}

/* Tool Category Tags */
.tool-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary-light);
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}

/* =========================================
   CTA BANNER
   ========================================= */
.cta-section {
  padding: 5rem 0;
}
@media (max-width: 767px) { .cta-section { padding: 3rem 0; } }

.cta-banner {
  background: var(--gradient);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-banner * { position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.875rem;
}
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  border: 1px solid var(--border);
}
.btn-white:hover {
  background: rgba(255,255,255,0.95);
  color: var(--primary-dark);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.btn-ghost-white {
  background: rgba(255,255,255,0.18);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.34);
}
.btn-ghost-white:hover {
  background: rgba(255,255,255,0.35);
  color: var(--text);
  border-color: rgba(255,255,255,0.48);
  transform: translateY(-2px);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 899px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0.875rem 0 1.25rem;
  max-width: 280px;
}
.footer-social {
  display: flex; gap: 0.625rem;
}
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
}
.social-btn:hover { border-color: var(--primary); color: var(--primary); }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.625rem; }
.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--primary); }

/* =========================================
   AD PLACEHOLDERS
   ========================================= */
.ad-placeholder {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.header-ad { height: 70px; margin: 0.5rem 0; }
@media (max-width: 767px) { .header-ad { height: 50px; } }

/* =========================================
   TOOL PAGE LAYOUT
   ========================================= */
.main-content { flex: 1; padding-bottom: 3rem; }

.tool-wrapper {
  max-width: 860px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
@media (max-width: 767px) { .tool-wrapper { margin: 1rem auto; } }

.tool-header {
  background: var(--gradient);
  padding: 2rem 2rem 1.75rem;
  color: white;
  text-align: center;
}
@media (max-width: 767px) { .tool-header { padding: 1.5rem; } }

.tool-header h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.375rem;
}
.tool-header p { font-size: 0.95rem; opacity: 0.85; }

.tool-interface {
  padding: 2rem;
  min-height: 200px;
}
@media (max-width: 767px) { .tool-interface { padding: 1.25rem; } }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.625rem 0;
  transition: color var(--transition);
  margin-bottom: 0.5rem;
}
.back-link:hover { color: var(--primary); }

/* =========================================
   FORM CONTROLS
   ========================================= */
.form-group { margin-bottom: 1.125rem; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* Result Box */
.result-box {
  background: var(--bg);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  min-height: 48px;
  word-break: break-all;
}

/* =========================================
   AI CHATBOT
   ========================================= */
.ai-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 1.375rem;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--primary-glow);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-trigger:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 32px var(--primary-glow);
}

/* Search Trigger Button */
.search-trigger {
  position: fixed;
  bottom: 8.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: all var(--transition);
}
.search-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.search-trigger kbd {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: inherit;
  border: 1px solid var(--border);
}
@media (max-width: 767px) {
  .search-trigger {
    bottom: 7.5rem;
    padding: 0.5rem 0.75rem;
  }
  .search-trigger span { display: none; }
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-modal.active {
  opacity: 1;
  pointer-events: all;
}

.search-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}
.search-modal.active .search-modal-content {
  transform: translateY(0);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
#global-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--text);
  background: transparent;
}
.search-close-btn {
  background: var(--surface-2);
  border: none;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}
.search-close-btn:hover {
  background: var(--danger);
  color: white;
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.75rem;
}
.search-hint {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}
.search-hint p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.search-result-item:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}
.search-result-item.active {
  background: var(--primary-glow);
  border-color: var(--primary);
}
.search-result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.search-result-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary-light);
  font-weight: 600;
  flex-shrink: 0;
}

.search-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.shortcut-hint kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-family: inherit;
}

/* AI Chatbot Styles (existing) */

.ai-assistant {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  height: 420px;
}
.ai-assistant.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-header {
  background: var(--gradient);
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-chat-header button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--transition);
}
.ai-chat-header button:hover { background: rgba(255,255,255,0.3); }

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.ai-msg, .user-msg {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 85%;
}
.ai-msg { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; }
.user-msg { background: var(--gradient); color: white; align-self: flex-end; }

.ai-chat-input {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ai-chat-input input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.ai-chat-input input:focus { border-color: var(--primary); }
.ai-chat-input button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity var(--transition);
}
.ai-chat-input button:hover { opacity: 0.85; }

/* =========================================
   SKIP LINK (Accessibility)
   ========================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* =========================================
   BLOG STYLES
   ========================================= */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.blog-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.blog-card p { color: var(--text-muted); font-size: 0.875rem; flex: 1; line-height: 1.65; margin-bottom: 1rem; }
.blog-card a { color: var(--primary); font-weight: 600; font-size: 0.875rem; }

/* --- Advanced Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary);
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-secondary {
  background: var(--secondary);
  color: white;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-info {
  background: rgba(14, 165, 233, 0.1);
  border-color: var(--info);
  color: var(--info);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.progress {
  width: 100%;
  height: 0.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
}

/* --- Enhanced Tool Page Styles --- */
.tool-content {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tool-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.tool-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-section h3 i {
  color: var(--primary);
  font-size: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.results-section {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  min-height: 100px;
}

.result {
  font-family: var(--font-secondary);
  line-height: 1.6;
}

.result.success {
  color: var(--success);
  font-weight: 600;
}

.result.error {
  color: var(--danger);
  font-weight: 600;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-danger { background: var(--danger); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* --- Responsive Grid --- */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* --- Animations --- */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Touch-friendly interactions */
@media (max-width: 767px) {
  /* Make all interactive elements larger */
  a, button, input, select, textarea {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(79, 70, 229, 0.2);
  }
  
  /* Improve text readability on mobile */
  p {
    line-height: 1.8;
    margin-bottom: 1rem;
  }
  
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  /* Better form controls */
  .form-control {
    font-size: 16px; /* Prevents zoom on iPhone */
    padding: 1rem;
  }
  
  /* Tool cards easier to tap */
  .tool-card {
    margin-bottom: 0.75rem;
  }
  
  /* Filter buttons more visible */
  .filter-btn {
    margin: 0.25rem;
    white-space: nowrap;
  }
  
  /* Search improvements */
  #global-search {
    padding: 1rem;
  }
  
  /* AI chatbot easier to use */
  .ai-chat-body {
    padding: 1rem;
  }
  
  .ai-msg, .user-msg {
    padding: 0.875rem 1rem;
    max-width: 90%;
  }
  
  /* Toast notifications full width on small screens */
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .tool-card {
    border-width: 2px;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particles-container {
    display: none;
  }
}

/* Print styles */
@media print {
  .navbar, .ai-assistant, .search-trigger, .share-buttons, .particles-container {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .tool-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* =========================================
   CATEGORY-SPECIFIC STYLES
   Unique Styling for Tool Categories
   ========================================= */

/* AI & ML Tools Category */
.category-ai-ml {
  --cat-primary: #8b5cf6;
  --cat-light: #c4b5fd;
  --cat-glow: rgba(139, 92, 246, 0.15);
}
.category-ai-ml .tool-header,
.category-ai-ml .btn-primary,
.category-ai-ml .gradient-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
}
.category-ai-ml .tool-card {
  border-color: #d946ef;
}
.category-ai-ml .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.5), 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* Quantum Computing Category */
.category-quantum {
  --cat-primary: #06b6d4;
  --cat-light: #22d3ee;
  --cat-glow: rgba(6, 182, 212, 0.15);
}
.category-quantum .tool-header,
.category-quantum .btn-primary,
.category-quantum .gradient-text {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.category-quantum .tool-card {
  border-color: #0891b2;
}
.category-quantum .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.5), 0 20px 40px rgba(6, 182, 212, 0.2);
}

/* Blockchain & Crypto Category */
.category-blockchain {
  --cat-primary: #f59e0b;
  --cat-light: #fbbf24;
  --cat-glow: rgba(245, 158, 11, 0.15);
}
.category-blockchain .tool-header,
.category-blockchain .btn-primary,
.category-blockchain .gradient-text {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.category-blockchain .tool-card {
  border-color: #d97706;
}
.category-blockchain .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.5), 0 20px 40px rgba(245, 158, 11, 0.2);
}

/* Cybersecurity Category */
.category-cybersecurity {
  --cat-primary: #ef4444;
  --cat-light: #f87171;
  --cat-glow: rgba(239, 68, 68, 0.15);
}
.category-cybersecurity .tool-header,
.category-cybersecurity .btn-primary,
.category-cybersecurity .gradient-text {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.category-cybersecurity .tool-card {
  border-color: #dc2626;
}
.category-cybersecurity .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.5), 0 20px 40px rgba(239, 68, 68, 0.2);
}

/* Cloud Computing Category */
.category-cloud {
  --cat-primary: #3b82f6;
  --cat-light: #60a5fa;
  --cat-glow: rgba(59, 130, 246, 0.15);
}
.category-cloud .tool-header,
.category-cloud .btn-primary,
.category-cloud .gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.category-cloud .tool-card {
  border-color: #2563eb;
}
.category-cloud .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5), 0 20px 40px rgba(59, 130, 246, 0.2);
}

/* AR/VR Development Category */
.category-ar-vr {
  --cat-primary: #10b981;
  --cat-light: #34d399;
  --cat-glow: rgba(16, 185, 129, 0.15);
}
.category-ar-vr .tool-header,
.category-ar-vr .btn-primary,
.category-ar-vr .gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.category-ar-vr .tool-card {
  border-color: #059669;
}
.category-ar-vr .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.5), 0 20px 40px rgba(16, 185, 129, 0.2);
}

/* IoT Tools Category */
.category-iot {
  --cat-primary: #8b5cf6;
  --cat-light: #a78bfa;
  --cat-glow: rgba(139, 92, 246, 0.15);
}
.category-iot .tool-header,
.category-iot .btn-primary,
.category-iot .gradient-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.category-iot .tool-card {
  border-color: #7c3aed;
}
.category-iot .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.5), 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* Robotics Category */
.category-robotics {
  --cat-primary: #ec4899;
  --cat-light: #f472b6;
  --cat-glow: rgba(236, 72, 153, 0.15);
}
.category-robotics .tool-header,
.category-robotics .btn-primary,
.category-robotics .gradient-text {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}
.category-robotics .tool-card {
  border-color: #be185d;
}
.category-robotics .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(190, 24, 93, 0.5), 0 20px 40px rgba(236, 72, 153, 0.2);
}

/* Media & Image Tools Category */
.category-media {
  --cat-primary: #14b8a6;
  --cat-light: #2dd4bf;
  --cat-glow: rgba(20, 184, 166, 0.15);
}
.category-media .tool-header,
.category-media .btn-primary,
.category-media .gradient-text {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}
.category-media .tool-card {
  border-color: #0d9488;
}
.category-media .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.5), 0 20px 40px rgba(20, 184, 166, 0.2);
}

/* PDF & Document Tools Category */
.category-pdf {
  --cat-primary: #f97316;
  --cat-light: #fb923c;
  --cat-glow: rgba(249, 115, 22, 0.15);
}
.category-pdf .tool-header,
.category-pdf .btn-primary,
.category-pdf .gradient-text {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.category-pdf .tool-card {
  border-color: #ea580c;
}
.category-pdf .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.5), 0 20px 40px rgba(249, 115, 22, 0.2);
}

/* Generators Category */
.category-generators {
  --cat-primary: #06b6d4;
  --cat-light: #22d3ee;
  --cat-glow: rgba(6, 182, 212, 0.15);
}
.category-generators .tool-header,
.category-generators .btn-primary,
.category-generators .gradient-text {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.category-generators .tool-card {
  border-color: #0891b2;
}
.category-generators .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.5), 0 20px 40px rgba(6, 182, 212, 0.2);
}

/* Text Processing Tools Category */
.category-text {
  --cat-primary: #6366f1;
  --cat-light: #818cf8;
  --cat-glow: rgba(99, 102, 241, 0.15);
}
.category-text .tool-header,
.category-text .btn-primary,
.category-text .gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.category-text .tool-card {
  border-color: #4f46e5;
}
.category-text .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.5), 0 20px 40px rgba(99, 102, 241, 0.2);
}

/* Utilities & Converters Category */
.category-utilities {
  --cat-primary: #a855f7;
  --cat-light: #c77dff;
  --cat-glow: rgba(168, 85, 247, 0.15);
}
.category-utilities .tool-header,
.category-utilities .btn-primary,
.category-utilities .gradient-text {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}
.category-utilities .tool-card {
  border-color: #9333ea;
}
.category-utilities .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.5), 0 20px 40px rgba(168, 85, 247, 0.2);
}

/* Education & Learning Category */
.category-education {
  --cat-primary: #16a34a;
  --cat-light: #22c55e;
  --cat-glow: rgba(22, 163, 74, 0.15);
}
.category-education .tool-header,
.category-education .btn-primary,
.category-education .gradient-text {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}
.category-education .tool-card {
  border-color: #15803d;
}
.category-education .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.5), 0 20px 40px rgba(22, 163, 74, 0.2);
}

/* Fun & Entertainment Tools Category */
.category-fun {
  --cat-primary: #f43f5e;
  --cat-light: #fb7185;
  --cat-glow: rgba(244, 63, 94, 0.15);
}
.category-fun .tool-header,
.category-fun .btn-primary,
.category-fun .gradient-text {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}
.category-fun .tool-card {
  border-color: #e11d48;
}
.category-fun .tool-card:hover {
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.5), 0 20px 40px rgba(244, 63, 94, 0.2);
}

/* =========================================
   CATEGORY PAGE HERO SECTIONS
   Unique Banner Designs
   ========================================= */
.category-hero {
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.08) 100%);
  z-index: 1;
}

.category-hero .container {
  position: relative;
  z-index: 2;
}

.category-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.category-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 520px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.category-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.category-stat {
  text-align: center;
}

.category-stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.category-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

/* =========================================
   RESPONSIVE IMPROVEMENTS FOR ALL DEVICES
   ========================================= */

/* Extra Large Screens (2560px+) */
@media (min-width: 2560px) {
  .container {
    padding: 0 4rem;
  }
  
  .hero-title {
    font-size: 5rem;
  }
  
  .tool-card {
    padding: 2rem;
  }
  
  .tools-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
}

/* Large Screens (1920px - 2559px) */
@media (min-width: 1920px) {
  .tools-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  }
}

/* Standard Desktop (1280px - 1919px) */
@media (min-width: 1280px) and (max-width: 1919px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Small Laptop/Large Tablet (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .navbar-search-wrapper {
    max-width: 280px;
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet Portrait (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .tool-card {
    padding: 1rem;
  }
}

/* Large Mobile (480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .tool-card {
    padding: 0.75rem 1rem;
  }
  
  .tool-card h3 {
    font-size: 0.875rem;
  }
  
  .tool-card p {
    font-size: 0.75rem;
  }
}

/* Small Mobile (375px - 479px) */
@media (max-width: 479px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .category-stats {
    gap: 1rem;
    flex-direction: column;
  }
}

/* Super Small (< 360px) */
@media (max-width: 359px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero-title {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
  }
  
  .tool-card {
    padding: 0.5rem 0.75rem;
  }
  
  .tool-card-icon {
    font-size: 1.25rem;
  }
  
  .tool-tag {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
  }
}

/* =========================================
   PSYCHOLOGICAL DESIGN SECTIONS
   Engagement & Trust Building Elements
   ========================================= */

/* Social Proof Section */
.social-proof-section {
  padding: 3rem 0;
  background: var(--gradient);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.social-proof-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.social-proof-section .container {
  position: relative;
  z-index: 1;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.logo-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Problems Section */
.problems-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--bg-color) 0%, rgba(79, 70, 229, 0.02) 100%);
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.problem-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--primary-glow);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.problem-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.problem-card:hover::before {
  opacity: 1;
}

.problem-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.problem-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.problem-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.solution {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Testimonials Section */
.testimonials-section {
  padding: 4rem 0;
  background: var(--bg-color);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--primary-color);
}

.stars {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: block;
}

.testimonial-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
}

.testimonial-author {
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.testimonial-author strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Feature Showcase */
.feature-showcase {
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, var(--bg-color) 100%);
}

.showcase-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.showcase-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.showcase-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.showcase-card.active,
.showcase-card:hover {
  color: white;
}

.showcase-card.active::after,
.showcase-card:hover::after {
  opacity: 1;
}

.showcase-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.3s ease;
}

.showcase-card:hover .showcase-icon {
  transform: scale(1.1) rotateZ(5deg);
}

.showcase-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.showcase-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* FAQ Section */
.faq-section {
  padding: 4rem 0;
  background: var(--bg-color);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.3s ease;
  user-select: none;
  font-weight: 600;
  font-size: 1rem;
}

.faq-item:hover .faq-question {
  background: rgba(79, 70, 229, 0.05);
}

.faq-toggle {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(79, 70, 229, 0.02);
}

.faq-item.open .faq-answer {
  max-height: 1000px;
}

.faq-answer p {
  padding: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Final CTA Section */
.final-cta-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  position: relative;
  overflow: hidden;
}

.final-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="1.5" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.5;
}

.final-cta-section .container {
  position: relative;
  z-index: 1;
}

.final-cta-box {
  text-align: center;
  color: white;
  animation: slideUpFade 0.8s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.final-cta-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.final-cta-box p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-ghost-white {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.cta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.95rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* =========================================
   RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 480px) {
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.5rem; }
  .cta-banner { padding: 2.5rem 1.25rem; }
  .cta-banner h2 { font-size: 1.625rem; }
  .tools-filter { gap: 0.375rem; }
  .filter-btn { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
  
  /* Mobile responsive - Psychological sections */
  .problems-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .showcase-cards { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .logos-grid { grid-template-columns: repeat(2, 1fr); }
  
  .final-cta-box h2 {
    font-size: 1.75rem;
  }
  
  .final-cta-box p {
    font-size: 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .btn-lg {
    width: 100%;
  }
}

/* --- Nexus AI Assistant Side-Drawer --- */
.ai-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition-spring);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  border-left: 1px solid var(--border);
}

.ai-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.ai-status-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

.drawer-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-bubble {
  padding: 1rem;
  border-radius: var(--radius-lg);
  max-width: 85%;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ai-bubble.intro {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid var(--primary);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.ai-bubble.bot {
  background: var(--surface-2);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.ai-bubble.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  width: fit-content;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: pulse-glow 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.input-wrapper {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.5rem 0.25rem 1.25rem;
  border-radius: var(--radius-full);
}

#ai-drawer-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  padding: 0.75rem 0;
}

.send-btn {
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.send-btn:hover {
  transform: scale(1.1);
  background: var(--primary-hover);
}

/* Floating Trigger */
.ai-flaot-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.4);
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulse-glow 2s infinite;
}

@media (max-width: 480px) {
  .ai-drawer {
    width: 100%;
    right: -100%;
  }
}

/* --- Tool Interface Styling --- */
.tool-wrapper {
  max-width: 1000px;
  margin: 2rem auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: slideInUp 0.6s ease-out forwards;
}

.tool-header {
  padding: 3rem 2rem;
  background: var(--gradient);
  color: white !important;
  text-align: center;
}

.tool-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: white !important;
}

.tool-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  color: white !important;
}

.tool-interface {
  padding: 3rem;
  min-height: 400px;
}

.tool-footer {
  padding: 1.5rem 2rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tool-interface input, 
.tool-interface select, 
.tool-interface textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-secondary);
  transition: var(--transition);
  width: 100%;
}

.tool-interface input:focus, 
.tool-interface select:focus, 
.tool-interface textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.tool-interface .btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tool-interface .btn-primary {
  background: var(--gradient);
  color: white !important;
  border: none;
}

.tool-interface .btn-secondary {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .tool-wrapper {
    margin: 1rem;
  }
  .tool-interface {
    padding: 1.5rem;
  }
}

/* --- Omega Absolute Singularity Styles --- */
#nexus-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background: var(--bg-main);
}

.footer.glass-bright {
  background: rgba(var(--primary-rgb), 0.05);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 1rem 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.zenith-mode-switcher {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  width: fit-content;
}

.mode-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--transition-spring);
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   ADVANCED TOOL DASHBOARDS (Zenith Update)
   ============================================================ */

.resume-builder-dashboard {
  max-width: 1400px;
  margin: 0 auto;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .resume-grid {
    grid-template-columns: 1fr;
  }
}

.resume-form-panel {
  padding: 2.5rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.form-section {
  margin-bottom: 2.5rem;
}

.form-section h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.form-section h3 svg {
  color: var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.item-block {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.remove-btn:hover {
  background: var(--error);
  color: white;
}

.skill-tag {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--primary-border);
}

.skill-tag i {
  cursor: pointer;
  opacity: 0.6;
}

.skill-tag i:hover {
  opacity: 1;
}

/* Resume Preview Side */
.resume-preview-panel {
  background: #fdfdfd;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

[data-theme="dark"] .resume-preview-panel {
  background: #2d3748;
}

.preview-header-bar {
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.preview-canvas {
  padding: 3rem;
  background: #f0f2f5;
  display: flex;
  justify-content: center;
}

[data-theme="dark"] .preview-canvas {
  background: #1a202c;
}

.resume-sheet {
  aspect-ratio: 1 / 1.414; /* A4 Ratio */
  background: white;
  width: 100%;
  max-width: 210mm;
  padding: 15mm;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  color: #1a1a1a;
  text-align: left;
}

/* Homepage Scoped Responsive Overrides */
.homepage .navbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  backdrop-filter: blur(18px);
  background: rgba(17, 24, 39, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.homepage .nav-content {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.homepage .logo {
  font-size: 1.25rem;
  font-weight: 800;
}

.homepage .nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.homepage .nav-links a {
  font-size: 0.95rem;
  transition: color var(--transition), transform var(--transition);
}

.homepage .nav-links a:hover,
.homepage .nav-links a.active {
  color: var(--primary);
}

.homepage .navbar-search-wrapper {
  flex: 1 1 320px;
  min-width: 220px;
  display: flex;
  justify-content: center;
}

.homepage .navbar-search {
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.55rem 0.85rem;
}

.homepage .navbar-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
}

.homepage .hamburger {
  display: none;
}

.homepage .hero-search-hub {
  padding: 8rem 1.5rem 4rem;
}

.homepage .hero-search-hub::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(129, 140, 248, 0.16), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.homepage .hero-search-hub .container {
  position: relative;
  z-index: 1;
}

.homepage .hero-query-container {
  max-width: 860px;
  margin: 0 auto 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.homepage .query-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.homepage .category-nav-section {
  padding: 2rem 0 4rem;
}

.homepage .category-nav-section .overflow-x {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.homepage .tools-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  align-items: center;
  padding-bottom: 0.75rem;
}

.homepage .filter-btn {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.homepage .filter-btn.active,
.homepage .filter-btn:hover {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
}

.homepage .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.homepage .stats-grid,
.homepage .testimonials-grid,
.homepage .team-grid,
.homepage .grid-auto-fit,
.homepage .grid-auto-fit-wide,
.homepage .partner-grid {
  display: grid;
  gap: 1.5rem;
}

.homepage .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.homepage .testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.homepage .team-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.homepage .contact-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.homepage .contact-form-wrapper,
.homepage .contact-info,
.homepage .final-cta-box,
.homepage .newsletter,
.homepage .faq-item,
.homepage .feature-showcase-card,
.homepage .partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.homepage .contact-form-wrapper {
  padding: 2.5rem;
}

.homepage .contact-form {
  display: grid;
  gap: 1rem;
}

.homepage .contact-form input,
.homepage .contact-form select,
.homepage .contact-form textarea,
.homepage .newsletter-form input {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

.homepage .newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.homepage .footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.homepage .footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.homepage .faq-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.homepage .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.homepage .faq-item.active .faq-answer {
  max-height: 300px;
}

.homepage .final-cta-box {
  padding: 2.5rem;
  text-align: center;
}

.homepage .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.homepage .partner-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.homepage .footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.homepage .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 0.95rem 1.5rem;
  font-weight: 700;
}

.homepage .btn-primary {
  background: var(--primary);
  color: white;
}

.homepage .btn-ghost-white {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.1);
}

.homepage .btn-white {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.homepage .btn-lg {
  padding: 1rem 2rem;
}

.homepage .search-trigger,
.homepage .ai-flaot-trigger {
  position: fixed;
  bottom: 1.5rem;
  z-index: 10010;
}

.homepage .search-trigger {
  right: 1rem;
}

.homepage .ai-flaot-trigger {
  right: 5rem;
}

@media (max-width: 980px) {
  .homepage .nav-content {
    flex-wrap: wrap;
    justify-content: center;
  }

  .homepage .navbar-search-wrapper,
  .homepage .nav-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .homepage .hero-search-hub {
    padding: 5rem 1rem 3rem;
  }

  .homepage .contact-content,
  .homepage .footer-grid {
    grid-template-columns: 1fr;
  }

  .homepage .search-trigger,
  .homepage .ai-flaot-trigger {
    bottom: 1rem;
  }

  .homepage .search-trigger {
    right: 1rem;
  }

  .homepage .ai-flaot-trigger {
    right: 5rem;
  }
}

@media (max-width: 560px) {
  .homepage .hero-popular-tags {
    flex-direction: column;
    align-items: center;
  }

  .homepage .tool-card {
    padding: 1.5rem;
  }

  .homepage .query-actions {
    width: 100%;
    justify-content: stretch;
  }
}

/* PDF print-specific adjust */
@media print {
  .navbar, .footer, .resume-form-panel, .preview-header-bar, .ai-assistant, .ai-trigger {
    display: none !important;
  }
  .preview-canvas {
    padding: 0;
    background: white;
  }
  .resume-sheet {
    box-shadow: none;
    padding: 0;
  }
}

/* ====== NEXUS MARKETPLACE (MONETIZATION) ====== */
.marketplace-section {
  padding: 8rem 1.5rem;
  background: radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  border-bottom: 1px solid var(--border);
}

.marketplace-header {
  text-align: center;
  margin-bottom: 4rem;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.partner-card {
  background: var(--surface);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

.partner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.partner-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 60px -12px rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.partner-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.partner-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.partner-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.partner-offer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #b45309;
  font-weight: 600;
  font-size: 0.9rem;
}

.partner-cta {
  margin-top: 2rem;
  width: 100%;
  background: #f59e0b;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: var(--transition);
  text-align: center;
  display: block;
}

.partner-cta:hover {
  background: #d97706;
  box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
}

.affiliate-disclosure {
  text-align: center;
  margin-top: 6rem;
  padding: 2rem;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
