/* =========================================
   TOOLSHUB - PREMIUM SAAS UI STYLES (ENHANCED)
   ========================================= */

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

/* --- CSS VARIABLES --- */
:root {
  /* Color System */
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --secondary: #8B5CF6; /* Purple accent */
  --accent-cyan: #06B6D4;
  --accent-pink: #EC4899;
  --accent-orange: #F97316;

  /* Rich Gradients */
  --grad-primary: linear-gradient(135deg, #3B82F6, #8B5CF6);
  --grad-secondary: linear-gradient(135deg, #8B5CF6, #EC4899);
  --grad-accent: linear-gradient(135deg, #06B6D4, #3B82F6);
  --grad-warm: linear-gradient(135deg, #F97316, #F59E0B);
  --grad-animated: linear-gradient(270deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

  /* Backgrounds */
  --bg-main: #FAFAFA;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F3F4F6;
  --bg-secondary: #F3F4F6;

  /* Text Colors */
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;

  /* Borders & Shadows */
  --border-color: #E2E8F0;
  --border-light: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.4);
  --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.4);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.8);

  /* Layout */
  --container-width: 1280px;
  --header-height: 80px;

  /* Transitions */
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-main: #0B0F19; /* Deeper, richer dark */
  --bg-surface: #131B2C;
  --bg-surface-hover: #1E293B;
  --bg-secondary: #0F172A;
  
  --grad-surface: linear-gradient(180deg, #131B2C 0%, #0F172A 100%);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --border-color: #1E293B;
  --border-light: rgba(255, 255, 255, 0.05);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 15px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 25px 40px -10px rgba(0, 0, 0, 0.7);

  --glass-bg: rgba(19, 27, 44, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  background-image: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* --- UTILITIES --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-gradient {
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.section-padding {
  padding: 8rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
  z-index: 2;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- COMPONENTS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.2);
  transform: translateX(-100%) skewX(-15deg);
  transition: all 0.5s ease;
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(100%) skewX(-15deg);
}

.btn-primary {
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 4s ease infinite;
  color: white;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: var(--secondary); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-green { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); border: 1px solid rgba(249, 115, 22, 0.2); }

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
}

.header.scrolled {
  height: 70px;
  background: rgba(var(--bg-surface), 0.9);
  box-shadow: var(--shadow-md);
}

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

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo:hover .logo-icon {
  transform: rotate(10deg) scale(1.1);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-glow);
}

/* Parent-brand hierarchy block */
.logo-brand-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0.15rem;
}

.logo-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.logo-subbrand {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.logo:hover .logo-subbrand {
  opacity: 1;
  color: var(--primary);
}

/* Zentryxio parent brand badge in footer */
.footer-parent-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.footer-parent-brand:hover {
  opacity: 1;
}

.footer-parent-brand span {
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Zentryxio Ecosystem Section */
.ecosystem-section {
  margin-top: 1.25rem;
}

.ecosystem-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

.ecosystem-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ecosystem-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  transition: all 0.25s ease;
  width: fit-content;
}

.ecosystem-link:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  border-color: var(--border-color);
  transform: translateX(3px);
}

.ecosystem-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  cursor: default;
  font-weight: 600;
}

.ecosystem-link.active:hover {
  transform: none;
}

/* Social Links */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-glow);
}

.social-link svg {
  width: 16px;
  height: 16px;
}


/* Hero trust badge */
.hero-parent-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-parent-trust .trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
  flex-shrink: 0;
}

.hero-parent-trust .trust-brand {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}


.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links li a {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--grad-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links li a:hover {
  color: var(--text-main);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--text-main) !important;
}

.dropdown-menu a:hover {
  background: var(--bg-surface-hover);
  color: var(--primary) !important;
}

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

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition-bounce);
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
  display: none;
  color: var(--text-main);
  font-size: 1.5rem;
}

/* --- HERO SECTION --- */
.hero {
  padding: calc(var(--header-height) + 8rem) 0 8rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Complex Animated Background Mesh */
.hero-bg-shapes {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  overflow: hidden;
  opacity: 0.8;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
}

.shape-1 {
  top: -10%; left: -5%;
  width: 600px; height: 600px;
  background: rgba(59, 130, 246, 0.4);
  animation: float-complex 15s ease-in-out infinite;
}

.shape-2 {
  top: 20%; right: -5%;
  width: 500px; height: 500px;
  background: rgba(139, 92, 246, 0.4);
  animation: float-complex 18s ease-in-out infinite reverse;
}

.shape-3 {
  bottom: -20%; left: 30%;
  width: 700px; height: 700px;
  background: rgba(236, 72, 153, 0.3);
  animation: float-complex 20s ease-in-out infinite 2s;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem 0.5rem 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  animation: slideDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(-20px);
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: fadeUpIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero p {
  font-size: 1.35rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  max-width: 650px;
  margin-inline: auto;
  animation: fadeUpIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-search {
  position: relative;
  max-width: 700px;
  margin: 0 auto 4rem;
  animation: fadeUpIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-search input {
  width: 100%;
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  font-size: 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  font-family: inherit;
}

.hero-search input:focus {
  outline: none;
  border-color: transparent;
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), var(--shadow-hover);
}

.hero-search-icon {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  color: var(--primary);
  width: 28px; height: 28px;
}

.hero-search-btn {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 4s ease infinite;
  color: white;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.125rem;
  box-shadow: var(--shadow-glow);
}

.hero-search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.6);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  animation: fadeUpIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--glass-bg);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-item i {
  color: var(--primary);
}

/* --- CATEGORIES SECTION --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.category-card {
  background: var(--grad-surface);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

/* Animated Border Gradient on Hover */
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 28px;
  padding: 2px;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 3s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

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

.category-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  position: relative;
  z-index: 2;
  transition: var(--transition-bounce);
}

.category-card:hover .category-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

/* Colorful Icon Wrappers */
.cat-pdf .category-icon-wrapper { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05)); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.cat-img .category-icon-wrapper { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05)); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.2); }
.cat-calc .category-icon-wrapper { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05)); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.cat-seo .category-icon-wrapper { background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.05)); color: #F97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.cat-ai .category-icon-wrapper { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05)); color: #8B5CF6; border: 1px solid rgba(139, 92, 246, 0.2); }
.cat-text .category-icon-wrapper { background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.05)); color: #06B6D4; border: 1px solid rgba(6, 182, 212, 0.2); }
.cat-dev .category-icon-wrapper { background: linear-gradient(135deg, rgba(55, 65, 81, 0.2), rgba(55, 65, 81, 0.05)); color: var(--text-main); border: 1px solid rgba(55, 65, 81, 0.2); }
.cat-gen .category-icon-wrapper { background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.05)); color: #EC4899; border: 1px solid rgba(236, 72, 153, 0.2); }

.category-card h3 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.category-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
}

.tool-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-secondary);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.category-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition-bounce);
}

.category-card:hover .category-arrow {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  transform: translateX(6px) rotate(-45deg);
  box-shadow: var(--shadow-glow);
}

/* --- POPULAR TOOLS GRID --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: var(--grad-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  padding: 2px;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 3s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

/* Hover Shimmer Effect */
.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  transition: var(--transition);
  z-index: 2;
  pointer-events: none;
}

.tool-card:hover::after {
  left: 150%;
  transition: all 0.8s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

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

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
  transition: var(--transition-bounce);
}

.tool-card:hover .tool-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-glow);
  border-color: transparent;
}

.tool-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: auto;
}

.tool-action {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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

.tool-card:hover .tool-action i {
  transform: translateX(6px);
  color: var(--primary);
}

.tool-action i {
  transition: var(--transition-bounce);
  color: var(--text-muted);
}

/* --- SEARCH UI OVERLAY --- */
.search-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  width: 100%;
  max-width: 800px;
  background: var(--bg-surface);
  border-radius: 28px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
  transform: translateY(-40px) scale(0.95);
  transition: var(--transition-bounce);
  overflow: hidden;
  position: relative;
}

.search-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 4s ease infinite;
}

.search-overlay.active .search-modal {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.search-modal-header i {
  font-size: 1.75rem;
  color: var(--primary);
  margin-right: 1.25rem;
}

.search-modal-header input {
  flex-grow: 1;
  border: none;
  background: none;
  font-size: 1.75rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.close-search {
  background: var(--bg-secondary);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

.close-search:hover {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.search-suggestions {
  padding: 2rem;
  background: var(--bg-main);
}

.search-suggestions-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.suggestion-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-bounce);
}

.suggestion-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.suggestion-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* --- RECENTLY ADDED (Slider) --- */
.recent-slider {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 3rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.recent-slider::-webkit-scrollbar { display: none; }

.recent-card {
  min-width: 340px;
  background: var(--grad-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.75rem;
  transition: var(--transition-bounce);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.recent-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: var(--primary);
}

.recent-card .tool-icon {
  width: 60px; height: 60px; font-size: 1.8rem;
}

.recent-date {
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
  display: block;
  font-weight: 600;
}

.recent-card h4 {
  font-size: 1.25rem;
}

/* --- WHY CHOOSE US --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  border-radius: 24px;
  transition: var(--transition-bounce);
  background: transparent;
}

.feature-item:hover {
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
}

.feature-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 2rem;
  border-radius: 24px;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 5s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  position: relative;
  box-shadow: var(--shadow-glow);
  transform: rotate(-5deg);
  transition: var(--transition-bounce);
}

.feature-item:hover .feature-icon {
  transform: rotate(10deg) scale(1.1);
}

.feature-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- FAQ SECTION --- */
.faq-container {
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

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

.faq-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--primary);
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: 50%;
  width: 36px; height: 36px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 2rem 2rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* --- CTA SECTION --- */
.cta-section {
  padding: 8rem 0;
}

.cta-box {
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 6s ease infinite;
  border-radius: 40px;
  padding: 7rem 4rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.4);
}

.cta-box::before, .cta-box::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  backdrop-filter: blur(10px);
}

.cta-box::before {
  width: 400px; height: 400px;
  top: -150px; left: -150px;
  animation: float-complex 15s infinite;
}

.cta-box::after {
  width: 500px; height: 500px;
  bottom: -200px; right: -150px;
  animation: float-complex 18s infinite reverse;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  opacity: 0.95;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn-white {
  background: white;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-white:hover {
  background: #f8fafc;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.2);
  border-color: white;
  transform: translateY(-2px);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 8rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 6s ease infinite;
}

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

.footer-brand .logo {
  font-size: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 350px;
  font-size: 1.05rem;
}

.social-links {
  display: flex;
  gap: 1.25rem;
}

.social-link {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-main);
  transition: var(--transition-bounce);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  border-color: transparent;
  transform: translateY(-5px) rotate(5deg);
  box-shadow: var(--shadow-glow);
}

.footer-col h4 {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(6px);
}

.footer-bottom {
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes gradient-xy {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-complex {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(40px, -60px) scale(1.1) rotate(10deg); }
  66% { transform: translate(-30px, 30px) scale(0.9) rotate(-5deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUpIn {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Scroll Fade Up Classes */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1200px) {
  .hero h1 { font-size: 3.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 { font-size: 3rem; }
  .section-header h2 { font-size: 2.5rem; }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cta-box {
    padding: 4rem 2rem;
  }
  
  .cta-content h2 { font-size: 2.5rem; }
  
  .cta-buttons {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .hero h1 { font-size: 2.5rem; }
  .section-header h2 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1.5rem; text-align: center; }
  .suggestion-list { grid-template-columns: 1fr; }
  .hero-search input { padding-right: 1.5rem; }
  .hero-search-btn { position: relative; width: 100%; top: 0; right: 0; transform: none; margin-top: 1rem; border-radius: 12px; }
  .hero-search-btn:hover { transform: translateY(-2px); }
}

/* --- TOOL PAGE SPECIFIC STYLES --- */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
}

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

.breadcrumb i {
  font-size: 1rem;
}

/* Tool Header Area */
.tool-header-area {
  text-align: center;
  margin-bottom: 3rem;
}

.tool-header-area h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.tool-header-area p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* Upload Area */
.upload-container {
  max-width: 800px;
  margin: 0 auto 3rem;
  background: var(--grad-surface);
  border: 2px dashed var(--border-color);
  border-radius: 32px;
  padding: 4rem 2rem;
  text-align: center;
  transition: var(--transition-bounce);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.upload-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(59, 130, 246, 0.05);
  opacity: 0;
  transition: var(--transition);
}

.upload-container:hover, .upload-container.dragover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.upload-container:hover::before, .upload-container.dragover::before {
  opacity: 1;
}

.upload-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 4s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 2;
}

.upload-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.upload-subtext {
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

.upload-container input[type="file"] {
  display: none;
}

/* File List */
.file-list-container {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: grab;
}

.file-item:active {
  cursor: grabbing;
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.drag-handle {
  color: var(--text-light);
  cursor: grab;
  padding: 0.5rem;
  transition: var(--transition);
}

.drag-handle:hover {
  color: var(--primary);
}

.file-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.file-info {
  flex-grow: 1;
  overflow: hidden;
}

.file-name {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
}

.remove-btn {
  color: var(--text-light);
  background: var(--bg-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  transform: rotate(90deg);
}

/* Action Area */
.tool-action-area {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.progress-container {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  display: none;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--grad-animated);
  background-size: 300% 300%;
  animation: gradient-xy 3s ease infinite;
  transition: width 0.3s ease;
}

.status-message {
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  min-height: 24px;
}

/* =========================================
   PDF SPLIT TOOL SPECIFIC STYLES
========================================= */

.split-options-panel {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 2rem;
}

.split-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.radio-card {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--bg-secondary);
}

.radio-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: var(--bg-surface);
  transform: translateY(-2px);
}

.radio-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.radio-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.1rem;
}

.radio-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.range-input-container {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.range-input-container.active {
  display: block;
}

.custom-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.custom-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: var(--bg-surface);
}

.input-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
}

.download-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.download-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-name {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

.download-btn-small {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  background: #10B981;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
}

.download-btn-small:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* =========================================
   PDF COMPRESS TOOL SPECIFIC STYLES
========================================= */

.stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  flex: 1;
  min-width: 150px;
  max-width: 250px;
  text-align: center;
  transition: var(--transition);
}

.stat-box.success {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-value.highlight {
  color: #10B981;
}

/* =========================================
   JPG TO PDF TOOL SPECIFIC STYLES
========================================= */

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.image-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.image-preview-card.dragging {
  opacity: 0.5;
  border: 2px dashed var(--primary);
}

.image-thumbnail {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.image-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.image-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.image-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.image-remove-btn:hover {
  background: #EF4444;
  transform: scale(1.1);
}

.settings-group {
  margin-bottom: 1.5rem;
}

.settings-label {
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--text-main);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.setting-radio {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  text-align: center;
  background: var(--bg-secondary);
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}

.setting-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.setting-radio:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: var(--bg-surface);
}

.setting-radio.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  color: var(--primary);
}

/* --- ANIMATIONS --- */
@keyframes gradient-xy {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-complex {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -50px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

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

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-20deg); }
  100% { transform: translateX(200%) skewX(-20deg); }
}

/* Apply fade-up to elements that need it */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

