/* ============================================
   FreeTools Hub — Design System v3.0
   Minimal, Modern, European-style
   ============================================ */

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

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  --secondary-hover: #059669;
  --secondary-light: #d1fae5;
  --accent: #8b5cf6;
  --accent-light: #ede9fe;

  /* Neutrals */
  --bg: #f9fafb;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-hover: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --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 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Container */
  --container-max: 1200px;
  --container-narrow: 800px;

  /* Header */
  --header-height: 72px;

  /* Z-index layers */
  --z-header: 100;
  --z-dropdown: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-cookie: 500;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-hover: #475569;
  --primary-light: #1e3a5f;
  --secondary-light: #064e3b;
  --accent-light: #2e1065;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5), 0 10px 10px -5px rgba(0,0,0,0.3);
}

/* ── Global Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

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

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background var(--transition), border var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .header {
  background: rgba(15,23,42,0.85);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-lg);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__nav-link {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-switcher__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  min-width: 140px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: var(--z-dropdown);
}

.lang-switcher__dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}

.lang-switcher__option:hover {
  background: var(--primary-light);
}

.lang-switcher__option.active {
  color: var(--primary);
  font-weight: 600;
}

/* Dark Mode Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(15deg);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: var(--z-header);
  padding: var(--space-lg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav__link {
  display: block;
  padding: var(--space-md) 0;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: var(--space-4xl) 0;
  text-align: center;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 30%, #dbeafe 60%, #ede9fe 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 30%, #172554 60%, #0f172a 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(37,99,235,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(139,92,246,0.06) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -10px); }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease;
}

[data-theme="dark"] .hero__badge {
  background: rgba(37,99,235,0.2);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero__title-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* Search Box */
.hero__search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero__search-input {
  width: 100%;
  padding: 18px 24px 18px 54px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 1.05rem;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}

.hero__search-input::placeholder {
  color: var(--text-muted);
}

.hero__search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(37,99,235,0.1);
}

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

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 360px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  display: none;
}

.search-results.active {
  display: block;
  animation: fadeInUp 0.2s ease;
}

.search-results__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--transition);
}

.search-results__item:hover,
.search-results__item.selected {
  background: var(--primary-light);
}

.search-results__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-results__info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.search-results__info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-results__empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Category Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}

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

.category-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform var(--transition-bounce);
}

.category-card:hover .category-card__icon {
  transform: scale(1.1);
}

.category-card__icon--text { background: #dbeafe; color: #2563eb; }
.category-card__icon--image { background: #fce7f3; color: #db2777; }
.category-card__icon--dev { background: #d1fae5; color: #059669; }
.category-card__icon--calc { background: #fef3c7; color: #d97706; }
.category-card__icon--security { background: #ede9fe; color: #7c3aed; }
.category-card__icon--pdf { background: #fee2e2; color: #dc2626; }
.category-card__icon--qr { background: #e0e7ff; color: #4338ca; }
.category-card__icon--eu { background: #cffafe; color: #0891b2; }
.category-card__icon--seo { background: #fef9c3; color: #ca8a04; }

[data-theme="dark"] .category-card__icon--text { background: rgba(37,99,235,0.2); }
[data-theme="dark"] .category-card__icon--image { background: rgba(219,39,119,0.2); }
[data-theme="dark"] .category-card__icon--dev { background: rgba(5,150,105,0.2); }
[data-theme="dark"] .category-card__icon--calc { background: rgba(217,119,6,0.2); }
[data-theme="dark"] .category-card__icon--security { background: rgba(124,58,237,0.2); }
[data-theme="dark"] .category-card__icon--pdf { background: rgba(220,38,38,0.2); }
[data-theme="dark"] .category-card__icon--qr { background: rgba(67,56,202,0.2); }
[data-theme="dark"] .category-card__icon--eu { background: rgba(8,145,178,0.2); }
[data-theme="dark"] .category-card__icon--seo { background: rgba(202,138,4,0.2); }

.category-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.category-card__count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   POPULAR TOOLS SECTION
   ============================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}

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

.tool-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.tool-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.tool-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.tool-card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.tool-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap var(--transition);
}

.tool-card:hover .tool-card__action {
  gap: 10px;
}

/* ============================================
   WHY CHOOSE US
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--primary-light);
  color: var(--primary);
}

.feature-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

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

/* ============================================
   TRUST BANNER
   ============================================ */
.trust-banner {
  background: var(--primary-light);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-top: var(--space-2xl);
}

[data-theme="dark"] .trust-banner {
  background: rgba(37,99,235,0.1);
  border-color: rgba(37,99,235,0.2);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.trust-item__icon {
  color: var(--secondary);
  font-size: 1.1rem;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.newsletter__box {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl) var(--space-xl);
  color: white;
}

.newsletter__title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  color: white;
}

.newsletter__text {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.newsletter__form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: var(--space-sm);
}

.newsletter__input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 0.95rem;
}

.newsletter__input::placeholder {
  color: rgba(255,255,255,0.7);
}

.newsletter__btn {
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all var(--transition);
}

.newsletter__btn:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: var(--space-md);
}

.footer__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.footer__social-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.footer__column h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.footer__link {
  display: block;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__badges {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

/* ============================================
   COOKIE CONSENT
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-cookie);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: var(--space-lg) var(--space-xl);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cookie-banner__text a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 280px;
  max-width: 400px;
  animation: toastIn 0.3s ease;
  font-size: 0.9rem;
}

.toast--success { border-left: 4px solid var(--secondary); }
.toast--error { border-left: 4px solid #ef4444; }
.toast--info { border-left: 4px solid var(--primary); }

.toast__icon { font-size: 1.2rem; flex-shrink: 0; }
.toast--success .toast__icon { color: var(--secondary); }
.toast--error .toast__icon { color: #ef4444; }
.toast--info .toast__icon { color: var(--primary); }

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

.btn--primary {
  background: var(--primary);
  color: white;
}
.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn--secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--success {
  background: var(--secondary);
  color: white;
}
.btn--success:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn--ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn--full {
  width: 100%;
}

.btn--rounded {
  border-radius: var(--radius-full);
}

/* ============================================
   TOOL PAGE LAYOUT
   ============================================ */
.tool-page {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-4xl);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

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

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

.breadcrumb__separator {
  font-size: 0.7rem;
}

.tool-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.tool-header__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.tool-header__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Trust Message */
.tool-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--secondary-light);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--secondary);
  margin-top: var(--space-md);
}

[data-theme="dark"] .tool-trust {
  background: rgba(16,185,129,0.15);
}

/* Tool Card (the main tool area) */
.tool-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow);
}

.tool-main__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.tool-input-area,
.tool-output-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tool-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Input Fields */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.input--textarea {
  min-height: 200px;
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.6;
}

.input--code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  tab-size: 2;
}

/* Output Area */
.output-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  min-height: 200px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow: auto;
  word-break: break-word;
}

.output-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-zone__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.drop-zone__text {
  font-size: 1rem;
  color: var(--text-secondary);
}

.drop-zone__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ============================================
   HOW TO USE / FAQ SECTIONS
   ============================================ */
.how-to-use {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.how-to-use h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.step {
  display: flex;
  gap: var(--space-md);
}

.step__number {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step__content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.step__content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* FAQ Accordion */
.faq {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.faq h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
}

.faq-question__icon {
  transition: transform var(--transition);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.faq-item.active .faq-question__icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: var(--space-md);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Related Tools */
.related-tools {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
}

.related-tools h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.related-tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

/* ============================================
   AD PLACEMENT
   ============================================ */
.ad-space {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-xl) 0;
}

/* ============================================
   SUPPORT PAGES (Privacy, Terms, Contact)
   ============================================ */
.content-page {
  padding: var(--space-2xl) 0 var(--space-4xl);
}

.content-page h1 {
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

.content-page h2 {
  font-size: 1.4rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.content-page p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.content-page ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.content-page ul li {
  list-style: disc;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner--lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

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

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-error { color: #ef4444; }
.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: var(--font-mono); }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tool-main__grid {
    grid-template-columns: 1fr;
  }
}

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

  .header__nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero__stats {
    gap: var(--space-lg);
  }

  .hero__stat-number {
    font-size: 1.4rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .trust-banner {
    flex-direction: column;
    gap: var(--space-md);
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__btn {
    width: 100%;
  }

  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .category-card {
    padding: var(--space-md);
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ============================================
   INLINE SVG ICON SYSTEM
   ============================================ */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 20px; height: 20px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header, .footer, .cookie-banner, .toast-container, .ad-space { 
    display: none !important; 
  }
  body { 
    background: white; 
    color: black; 
  }
}

/* ============================================
   MISSING TOOL PAGE FORM STYLES
   These classes are used by injected tool UIs
   ============================================ */

/* Settings Grid — 2-column responsive form layout */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

/* Input Group — label + field wrapper */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* Global form element styling */
.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="email"],
.input-group input[type="url"],
.input-group input[type="password"],
.input-group textarea,
.input-group select,
.tool-main input[type="text"],
.tool-main input[type="number"],
.tool-main input[type="email"],
.tool-main input[type="url"],
.tool-main input[type="password"],
.tool-main textarea,
.tool-main select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus,
.tool-main input:focus,
.tool-main textarea:focus,
.tool-main select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.input-group input::placeholder,
.input-group textarea::placeholder,
.tool-main input::placeholder,
.tool-main textarea::placeholder {
  color: var(--text-muted);
}

/* Select arrow indicator */
.input-group select,
.tool-main select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
  cursor: pointer;
}

/* File Input — modern styled */
.input-group input[type="file"],
.tool-main input[type="file"] {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.input-group input[type="file"]:hover,
.tool-main input[type="file"]:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.input-group input[type="file"]::file-selector-button,
.tool-main input[type="file"]::file-selector-button {
  padding: 8px 16px;
  margin-right: 12px;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.input-group input[type="file"]::file-selector-button:hover,
.tool-main input[type="file"]::file-selector-button:hover {
  background: var(--primary-hover);
}

/* Textarea auto-height */
.input-group textarea,
.tool-main textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-mono), monospace;
  line-height: 1.6;
}

/* ============================================
   CATEGORY GRID (All Tools Section)
   ============================================ */
.category-section {
  margin-bottom: var(--space-2xl);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.category-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

/* ============================================
   ENHANCED TOOL CARD STYLES
   ============================================ */
.category-grid .tool-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.category-grid .tool-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.category-grid .tool-card:hover::after {
  opacity: 1;
}

.category-grid .tool-card__icon {
  width: 44px;
  height: 44px;
}

.category-grid .tool-card__icon .icon {
  width: 100%;
  height: 100%;
}

/* ============================================
   ENHANCED TOOL PAGE MAIN AREA
   ============================================ */
.tool-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl) var(--space-xl) var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.tool-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

/* ============================================
   TOOL PLACEHOLDER (for results areas)
   ============================================ */
.tool-placeholder {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  min-height: 60px;
  transition: border-color var(--transition);
}

.tool-placeholder:empty::before {
  content: 'Results will appear here...';
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* ============================================
   ENHANCED HERO — FLOATING SHAPES
   ============================================ */
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================
   ENHANCED FEATURE CARDS — GRADIENT HOVER
   ============================================ */
.feature-card {
  position: relative;
  overflow: hidden;
}

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

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

/* ============================================
   ENHANCED BUTTONS — SUBTLE ANIMATIONS
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ============================================
   ENHANCED NEWSLETTER — GLASS EFFECT
   ============================================ */
.newsletter__box {
  background: linear-gradient(135deg, #2563eb, #7c3aed, #8b5cf6);
  position: relative;
  overflow: hidden;
}

.newsletter__box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.newsletter__box::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================
   ENHANCED TRUST BANNER
   ============================================ */
.trust-banner {
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(139,92,246,0.06));
  border: 1px solid rgba(37,99,235,0.12);
}

/* ============================================
   RESPONSIVE — Category Grid
   ============================================ */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-main {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}
