/* ═══════════════════════════════════════════════
   UltimateTools Hub — Global Style System
   style.css | BEM Naming | CSS Variables
   ═══════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS / CSS VARIABLES ─────────── */
:root {
  /* Dark Mode Defaults */
  --bg-primary:      #0f0f0f;
  --bg-secondary:    #1e1e1e;
  --bg-card:         #1a1a2e;
  --bg-nav:          rgba(15, 15, 15, 0.85);

  --text-primary:    #f0f0f0;
  --text-secondary:  #a0a0b0;
  --text-muted:      #606070;

  --accent:          #00d4ff;
  --accent-dark:     #0099cc;
  --accent-glow:     rgba(0, 212, 255, 0.18);
  --accent-hover:    #33ddff;

  --success:         #00e676;
  --warning:         #ffab00;
  --danger:          #ff5252;
  --premium:         #ffd700;

  --border:          rgba(255, 255, 255, 0.08);
  --border-hover:    rgba(0, 212, 255, 0.35);
  --border-focus:    rgba(0, 212, 255, 0.6);

  --shadow-sm:       0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:       0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg:       0 20px 50px rgba(0,0,0,0.6);
  --shadow-glow:     0 0 30px rgba(0, 212, 255, 0.15);

  --radius-xs:       4px;
  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-pill:     999px;

  --font-heading:    'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:       'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 72px;
  --container-max: 1400px;
  --sidebar-w: 280px;
}

/* Light Mode Overrides */
body.light-mode {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f5f5f5;
  --bg-card:       #ffffff;
  --bg-nav:        rgba(255, 255, 255, 0.92);

  --text-primary:  #111111;
  --text-secondary:#444455;
  --text-muted:    #888899;

  --accent:        #0057ff;
  --accent-dark:   #003fbb;
  --accent-glow:   rgba(0, 87, 255, 0.12);
  --accent-hover:  #1a6fff;

  --border:        rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 87, 255, 0.3);
  --border-focus:  rgba(0, 87, 255, 0.5);

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg:     0 20px 50px rgba(0,0,0,0.15);
  --shadow-glow:   0 0 30px rgba(0, 87, 255, 0.1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0,212,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body.light-mode::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0,87,255,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.02) 0%, transparent 60%);
}

img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── 3. TYPOGRAPHY SCALE ──────────────────────── */
.text--display {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text--h1 { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1.15; }
.text--h2 { font-family: var(--font-heading); font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; }
.text--h3 { font-family: var(--font-heading); font-size: clamp(1.2rem, 2vw, 1.75rem); font-weight: 700; }
.text--h4 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; }
.text--body { font-size: 1rem; line-height: 1.7; }
.text--small { font-size: 0.875rem; }
.text--xs { font-size: 0.75rem; }

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

.text--muted { color: var(--text-secondary); }
.text--accent { color: var(--accent); }
.text--center { text-align: center; }

/* ── 4. LAYOUT UTILITIES ─────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section { padding: 5rem 0; }
.section--sm { padding: 3rem 0; }
.section--lg { padding: 7rem 0; }

.grid { display: grid; }
.flex { display: flex; }
.flex--center { display: flex; align-items: center; justify-content: center; }
.flex--between { display: flex; align-items: center; justify-content: space-between; }
.flex--gap-sm { gap: 0.5rem; }
.flex--gap-md { gap: 1rem; }
.flex--gap-lg { gap: 1.5rem; }

/* ── 5. NAVBAR ────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--bg-nav);
}

.navbar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar__logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.3);
}

.navbar__logo-text span {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search */
.navbar__search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.navbar__search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}

.navbar__search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}

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

.navbar__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Search Dropdown */
.navbar__search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
}

.navbar__search-results.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-secondary); }

.search-result-item__icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.search-result-item__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-item__cat {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Nav Links */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.navbar__link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.navbar__link:hover, .navbar__link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: calc(var(--nav-height) - 1px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  display: none;
  z-index: 999;
  transition: all var(--transition-normal);
}

.mega-menu.open { display: block; }

.mega-menu__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.mega-menu__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: 1px solid transparent;
}

.mega-menu__item:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
}

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

.mega-menu__item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mega-menu__item-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Nav Actions */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Dark/Light Toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

body.light-mode .theme-toggle .icon-moon { opacity: 0; transform: translateY(-20px); }
body.light-mode .theme-toggle .icon-sun  { opacity: 1; transform: translateY(0); }
body:not(.light-mode) .theme-toggle .icon-sun  { opacity: 0; transform: translateY(20px); }
body:not(.light-mode) .theme-toggle .icon-moon { opacity: 1; transform: translateY(0); }

/* Upgrade Button */
.btn--upgrade {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  background: linear-gradient(135deg, #ffd700, #ffab00);
  color: #111;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(255,215,0,0.3);
  white-space: nowrap;
}

.btn--upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,215,0,0.4);
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  padding: 0;
}

.navbar__hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-normal);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-primary);
  padding: calc(var(--nav-height) + 1rem) 1.5rem 2rem;
  overflow-y: auto;
  flex-direction: column;
  gap: 1rem;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.mobile-nav.open { display: flex; }

.mobile-nav__link {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
}

.mobile-nav__link:hover {
  border-color: var(--border-hover);
  color: var(--accent);
}

/* Page offset for fixed nav */
.page-content {
  padding-top: var(--nav-height);
}

/* ── 6. HERO SECTION ─────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 5rem;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  z-index: 0;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
}

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

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-mode .hero__title {
  background: linear-gradient(135deg, #111 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Hero Search */
.hero-search {
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-search__wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.4rem 0.4rem 1.2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.hero-search__wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md);
}

.hero-search__icon {
  color: var(--text-muted);
  font-size: 1rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.hero-search__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.hero-search__input::placeholder { color: var(--text-muted); }

.hero-search__btn {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.hero-search__btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px var(--accent-glow);
}

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

.hero-search__results.active { display: block; }

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat__value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-stat__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── 7. STATS DASHBOARD ──────────────────────── */
.stats-section {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.stat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card__value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── 8. CATEGORY GRID ────────────────────────── */
.categories-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

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

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

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

.category-card__icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
  transition: transform var(--transition-normal);
}

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

.category-card__name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.category-card__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  display: inline-block;
}

/* ── 9. TOOLS GRID ───────────────────────────── */
.tools-section {
  padding: 5rem 0;
  background: var(--bg-secondary);
}

.tools-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Sidebar */
.tools-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.tools-sidebar__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-filter__btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
  width: 100%;
}

.sidebar-filter__btn i {
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-filter__btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.sidebar-filter__btn.active {
  background: var(--accent-glow);
  border-color: rgba(0,212,255,0.2);
  color: var(--accent);
}

body.light-mode .sidebar-filter__btn.active {
  border-color: rgba(0,87,255,0.2);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.tool-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

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

.tool-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tool-card__bookmark {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.tool-card__bookmark:hover, .tool-card__bookmark.active { color: #fbbf24; }

.tool-card__premium-badge {
  background: linear-gradient(135deg, #ffd700, #ffab00);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-card__body {
  flex: 1;
  margin-bottom: 1rem;
}

.tool-card__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.tool-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.tool-card__tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.tool-card__open {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

.tool-card__open:hover {
  gap: 0.5rem;
}

/* ── 10. FEATURED TOOLS SCROLL ───────────────── */
.featured-section {
  padding: 5rem 0;
}

.featured-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.featured-scroll::-webkit-scrollbar { height: 6px; }
.featured-scroll::-webkit-scrollbar-track { background: transparent; }
.featured-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.featured-card {
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

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

/* ── 11. PREMIUM TEASER ──────────────────────── */
.premium-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a0f2e 50%, #0f1a0f 100%);
  position: relative;
  overflow: hidden;
}

body.light-mode .premium-section {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef9ff 50%, #f0fff4 100%);
}

.premium-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,215,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.premium-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.premium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,215,0,0.35);
}

.premium-card__lock {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  z-index: 5;
}

body.light-mode .premium-card__lock {
  background: rgba(255,255,255,0.75);
}

.premium-card__lock-icon {
  font-size: 2rem;
  color: var(--premium);
}

.premium-card__lock-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--premium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── 12. BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn--sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn--md { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
.btn--lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn--xl { padding: 1.1rem 2.5rem; font-size: 1.05rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

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

.btn--secondary:hover {
  border-color: var(--border-hover);
  color: var(--accent);
}

.btn--ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

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

.btn--copy {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn--copy:hover { border-color: var(--border-hover); color: var(--accent); }
.btn--copy.copied { color: var(--success); border-color: var(--success); }

/* ── 13. FORMS ───────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── 14. BREADCRUMB ──────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.breadcrumb__sep { color: var(--border); }
.breadcrumb__current { color: var(--text-secondary); font-weight: 600; }

/* ── 15. AD PLACEHOLDERS ─────────────────────── */
.ad-slot {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-slot--banner { width: 100%; height: 90px; margin: 1.5rem 0; }
.ad-slot--sidebar { width: 100%; height: 280px; margin: 1.5rem 0; }
.ad-slot--rectangle { width: 300px; height: 250px; }

/* ── 16. TOOL PAGE LAYOUT ────────────────────── */
.tool-page {
  min-height: calc(100vh - var(--nav-height));
  padding: 2rem 0 4rem;
}

.tool-page__layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.tool-page__main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.tool-page__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tool-card-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tool-card-widget__title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* How to Use Steps */
.how-to-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
}

.how-to-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.how-to-step__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.how-to-step__text {
  padding-top: 0.3rem;
}

.how-to-step__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.how-to-step__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── 17. OUTPUT BOX ──────────────────────────── */
.output-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  position: relative;
  min-height: 80px;
}

.output-box__text {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.output-box__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ── 18. TOASTS / ALERTS ─────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 260px;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.3s ease forwards;
  font-size: 0.88rem;
  font-weight: 600;
}

.toast--success { border-color: var(--success); }
.toast--success .toast__icon { color: var(--success); }
.toast--error   { border-color: var(--danger); }
.toast--error   .toast__icon { color: var(--danger); }
.toast--warning { border-color: var(--warning); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info    { border-color: var(--accent); }
.toast--info    .toast__icon { color: var(--accent); }

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

/* ── 19. FOOTER ──────────────────────────────── */
.footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
}

body.light-mode .footer { background: #0d1117; }

.footer__grid {
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 1.2fr 1.2fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer__brand-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__brand-logo span {
  background: linear-gradient(135deg, #00d4ff, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__brand-desc {
  color: #666;
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.9rem;
}

.footer__social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.footer__col-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer__col-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__col-list a {
  color: #666;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer__col-list a:hover { color: #fff; }

.footer__bottom {
  border-top: 1px solid #1a1a1a;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  color: #444;
  font-size: 0.82rem;
}

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

.footer__bottom-links a {
  color: #444;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__bottom-links a:hover { color: #888; }

/* ── 20. FLOATING ELEMENTS ───────────────────── */
.floating-badge {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 900;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: default;
}

.floating-badge__icon { color: var(--premium); }

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  z-index: 900;
  transition: var(--transition-fast);
}

.scroll-top.visible { display: flex; }
.scroll-top:hover { transform: translateY(-3px); }

/* ── 21. LOADING / SKELETON ──────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ── 22. BADGES ──────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--new      { background: rgba(0,230,118,0.15); color: var(--success); border: 1px solid rgba(0,230,118,0.25); }
.badge--hot      { background: rgba(255,82,82,0.15);  color: var(--danger);  border: 1px solid rgba(255,82,82,0.25); }
.badge--premium  { background: rgba(255,215,0,0.15); color: var(--premium); border: 1px solid rgba(255,215,0,0.25); }
.badge--free     { background: rgba(0,212,255,0.1);  color: var(--accent);  border: 1px solid rgba(0,212,255,0.2); }

/* ── 23. UTILITY CLASSES ─────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* ── 24. SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

body.light-mode ::-webkit-scrollbar-track { background: #f0f0f0; }
body.light-mode ::-webkit-scrollbar-thumb { background: #ccc; }
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ── 25. FOCUS RING ──────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
