:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --secondary: #ec4899;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #f5f5f5;
  --bg-soft: #fafafa;
  --bg-muted: #f0f0f0;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-card: 0 1px 2px 0 rgb(15 23 42 / 0.04), 0 1px 3px 0 rgb(15 23 42 / 0.02);
  --shadow-card-hover: 0 10px 25px -5px rgb(79 70 229 / 0.12), 0 4px 8px -4px rgb(15 23 42 / 0.08);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1400px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

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

/* 对用户不可见、对搜索引擎可见（SEO H1 用） */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.logo-img {
  width: 28px;
  height: 28px;
  display: block;
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-50);
}

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

.lang-switch {
  position: relative;
  display: inline-block;
}

.lang-switch-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.lang-switch-toggle:hover {
  border-color: var(--border);
  color: var(--text);
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 110px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgb(15 23 42 / 0.15), 0 4px 10px -2px rgb(15 23 42 / 0.08);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 100;
}

.lang-switch.open .lang-switch-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switch-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch-item:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.lang-switch-item.active {
  background: var(--primary);
  color: #fff;
}

.lang-switch-item.active:hover {
  background: var(--primary-dark, #4f46e5);
  color: #fff;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: var(--transition);
  background: var(--bg-soft);
}

.theme-toggle:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text);
}

/* ===== Nav Mega Menu (All Tools dropdown) ===== */
.nav-item-mega {
  position: relative;
}

.nav-mega-caret {
  font-size: 10px;
  margin-left: 4px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-item-mega:hover .nav-mega-caret {
  transform: rotate(180deg);
  color: var(--primary);
}

.nav-mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 640px;
  max-width: calc(100vw - 32px);
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgb(15 23 42 / 0.18), 0 8px 16px -6px rgb(15 23 42 / 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
  overflow: hidden;
}

.nav-mega::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

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

.nav-mega-cats {
  width: 210px;
  flex-shrink: 0;
  padding: 10px;
  border-right: 1px solid var(--border-light);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mega-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-mega-cat-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg);
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-mega-cat-name {
  flex: 1;
  min-width: 0;
}

.nav-mega-cat-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
}

.nav-mega-cat-arrow {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.nav-mega-cat:hover,
.nav-mega-cat.active {
  background: var(--primary-50);
  color: var(--primary);
}

.nav-mega-cat:hover .nav-mega-cat-icon,
.nav-mega-cat.active .nav-mega-cat-icon {
  background: var(--primary);
  color: #fff;
}

.nav-mega-cat:hover .nav-mega-cat-arrow,
.nav-mega-cat.active .nav-mega-cat-arrow {
  opacity: 1;
  color: var(--primary);
}

.nav-mega-panels {
  flex: 1;
  min-width: 0;
  padding: 12px;
}

.nav-mega-panel {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.nav-mega-panel.active {
  display: grid;
}

.nav-mega-tool {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.nav-mega-tool:hover {
  background: var(--bg-soft);
}

.nav-mega-tool-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
}

.nav-mega-tool-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mega-tool-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.nav-mega-tool-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.nav-mega-tool:hover .nav-mega-tool-name {
  color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 80px 0 70px;
  text-align: center;
  background: linear-gradient(
    180deg,
    #eef2ff 0%,
    #fdf4ff 30%,
    #f0fdfa 60%,
    var(--bg) 100%
  );
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.22) 0%,
    rgba(99, 102, 241, 0.08) 40%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-bg::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.18) 0%,
    rgba(236, 72, 153, 0.06) 40%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.16) 0%,
    rgba(16, 185, 129, 0.05) 40%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-blob {
  position: absolute;
  bottom: 10%;
  left: 20%;
  width: 180px;
  height: 180px;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.12) 0%,
    rgba(249, 115, 22, 0.08) 100%
  );
  border-radius: 50%;
  filter: blur(30px);
}

.hero-blob-alt {
  position: absolute;
  top: 30%;
  right: 18%;
  width: 140px;
  height: 140px;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.15) 0%,
    rgba(59, 130, 246, 0.10) 100%
  );
  border-radius: 50%;
  filter: blur(25px);
}

.hero-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 240px;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text);
}

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

.hero .hero-subtitle {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.hero .hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 28px;
}

/* Search */
.search-box {
  max-width: 640px;
  margin: 0 auto 16px;
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 15px;
  background: transparent;
  color: var(--text);
}

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

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: calc(var(--radius-lg) - 4px);
  transition: var(--transition);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.hot-tags .hot-tags-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.hot-tags a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--border-light);
}

.hot-tags a:hover {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}

/* ===== Section ===== */
.section {
  padding: 60px 0;
}

.section.section-alt {
  background: var(--bg-soft);
  padding: 60px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.section-title .title-icon {
  font-size: 18px;
  color: var(--primary);
}

.section-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.section-link:hover {
  color: var(--primary-dark);
  gap: 10px;
}


/* ===== Enhanced Card Effects ===== */
.tool-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.tool-card:hover::after {
  opacity: 0.5;
}

/* Scroll reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Ripple effect on buttons */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* Stats counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-counter-item { animation: countUp 0.6s ease-out both; }

/* ===== Tool Grid ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.tool-card {
  position: relative;
  display: block;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition);
  overflow: hidden;
  text-align: left;
  box-shadow:
    0 4px 10px 0 rgb(15 23 42 / 0.07),
    0 10px 20px -2px rgb(15 23 42 / 0.06),
    0 2px 4px 0 rgb(79 70 229 / 0.05);
}

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

.tool-card:hover {
  border-color: var(--primary-100);
  transform: translateY(-3px);
  box-shadow:
    0 12px 24px -4px rgb(79 70 229 / 0.18),
    0 16px 32px -8px rgb(15 23 42 / 0.12),
    0 6px 12px -4px rgb(15 23 42 / 0.08);
}

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

.tool-card .tool-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  color: #fff;
  margin-bottom: 16px;
}

.tool-card .tool-icon.calculator,
.tool-card .tool-icon.flask {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.tool-card .tool-icon.arrows-up-down-left-right {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}

.tool-card .tool-icon.image {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
}

.tool-card .tool-icon.qrcode {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
}

.tool-card .tool-icon.landmark {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.tool-card .tool-icon.cake-candles {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

.tool-card .tool-icon.wallet {
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.tool-card .tool-icon.clock {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.tool-card .tool-icon.default {
  background: linear-gradient(135deg, #64748b, #475569);
}

.tool-card .tool-icon.images {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.tool-card .tool-icon.hourglass-half {
  background: linear-gradient(135deg, #a855f7, #c084fc);
}

.tool-card .tool-icon.calendar-days {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.tool-card .tool-icon.percent {
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

.tool-card .tool-icon.temperature-high {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.tool-card .tool-icon.file-code {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.tool-card .tool-icon.photo-film {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.tool-card .tool-icon.file-pdf {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.tool-card .tool-icon.lock {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.tool-card .tool-icon.text-height {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.tool-card .tool-icon.language {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

.tool-card .tool-icon.globe {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.tool-card .tool-icon.weight-scale {
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.tool-card .tool-icon.code {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}
.tool-card .tool-icon.palette {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
}
.tool-card .tool-icon.chart-simple {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}
.tool-card .tool-icon.table {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.tool-card .tool-icon.stamp {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.tool-card .tool-icon.film {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
}
.tool-card .tool-icon.youtube {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.tool-card .use-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.tool-card .use-btn:hover {
  background: var(--primary);
  color: #fff;
}

.tool-card .fav-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  color: var(--text-muted);
  z-index: 10;
}

.tool-card:hover .fav-icon {
  opacity: 1;
}

.tool-card .fav-icon:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.tool-card .fav-icon.active {
  opacity: 1;
  color: var(--danger);
  background: var(--danger-light);
}

.tool-card.coming {
  opacity: 0.55;
  pointer-events: none;
}

.tool-card.coming .coming-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 8px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 11px;
  border-radius: 4px;
}

/* ===== Categories ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  box-shadow:
    0 6px 12px 0 rgb(15 23 42 / 0.08),
    0 12px 24px -4px rgb(15 23 42 / 0.07),
    0 3px 6px 0 rgb(79 70 229 / 0.06);
}

.category-item:hover {
  border-color: var(--primary-100);
  background: var(--primary-50);
  transform: translateY(-4px);
  box-shadow:
    0 16px 32px -4px rgb(79 70 229 / 0.22),
    0 20px 40px -8px rgb(15 23 42 / 0.14),
    0 8px 16px -4px rgb(15 23 42 / 0.10);
}

.category-item .cat-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

.category-item[data-cat="calculator"] .cat-icon {
  background: #eef2ff;
  color: #6366f1;
}

.category-item[data-cat="image"] .cat-icon {
  background: #fff7ed;
  color: #f59e0b;
}

.category-item[data-cat="conversion"] .cat-icon {
  background: #ecfdf5;
  color: #10b981;
}

.category-item[data-cat="developer"] .cat-icon {
  background: #f1f5f9;
  color: #475569;
}

.category-item[data-cat="text"] .cat-icon {
  background: #fef3c7;
  color: #d97706;
}

.category-item[data-cat="life"] .cat-icon {
  background: #fce7f3;
  color: #ec4899;
}

body[data-theme="dark"] .category-item[data-cat="calculator"] .cat-icon {
  background: #312e81;
  color: #a5b4fc;
}
body[data-theme="dark"] .category-item[data-cat="image"] .cat-icon {
  background: #78350f;
  color: #fbbf24;
}
body[data-theme="dark"] .category-item[data-cat="conversion"] .cat-icon {
  background: #064e3b;
  color: #34d399;
}
body[data-theme="dark"] .category-item[data-cat="developer"] .cat-icon {
  background: #1e293b;
  color: #94a3b8;
}
body[data-theme="dark"] .category-item[data-cat="text"] .cat-icon {
  background: #78350f;
  color: #fbbf24;
}
body[data-theme="dark"] .category-item[data-cat="life"] .cat-icon {
  background: #831843;
  color: #f9a8d4;
}

.category-item .cat-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.category-item .cat-text span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Category Page Cards ===== */
#cat-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  box-shadow:
    0 6px 14px 0 rgb(15 23 42 / 0.08),
    0 14px 28px -4px rgb(15 23 42 / 0.07),
    0 3px 6px 0 rgb(79 70 229 / 0.06);
}

.cat-card:hover {
  border-color: var(--primary-100);
  transform: translateY(-3px);
  box-shadow:
    0 16px 28px -4px rgb(79 70 229 / 0.20),
    0 24px 40px -8px rgb(15 23 42 / 0.14),
    0 8px 16px -4px rgb(15 23 42 / 0.08);
}

.cat-card .cat-icon-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 24px;
  margin-bottom: 16px;
}

.cat-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cat-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cat-card .cat-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.cat-card .cat-tools a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.cat-card .cat-tools a:hover {
  background: var(--primary-50);
  color: var(--primary);
  transform: translateX(4px);
}

body[data-theme="dark"] .cat-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow:
    0 6px 14px 0 rgb(0 0 0 / 0.55),
    0 14px 28px -4px rgb(0 0 0 / 0.45),
    0 3px 6px 0 rgb(79 70 229 / 0.18);
}

body[data-theme="dark"] .cat-card:hover {
  box-shadow:
    0 16px 28px -4px rgb(79 70 229 / 0.35),
    0 24px 40px -8px rgb(0 0 0 / 0.6),
    0 8px 16px -4px rgb(0 0 0 / 0.5);
}

body[data-theme="dark"] .cat-card .cat-tools a:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
}

@media (max-width: 960px) {
  #cat-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #cat-list {
    grid-template-columns: 1fr;
  }
  .cat-card {
    padding: 22px;
  }
}

/* ===== Features ===== */
.features {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ede9fe, #c7d2fe);
  color: #4f46e5;
}

.feature-item:nth-child(2) .feature-icon {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #16a34a;
}

.feature-item:nth-child(3) .feature-icon {
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  color: #e11d48;
}

.feature-item:nth-child(4) .feature-icon {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #d97706;
}

.feature-item h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow:
    0 2px 6px 0 rgb(15 23 42 / 0.05),
    0 4px 12px -2px rgb(15 23 42 / 0.04);
}

.faq-item.active,
.faq-item:hover {
  border-color: var(--primary-100);
  box-shadow:
    0 4px 10px 0 rgb(79 70 229 / 0.12),
    0 8px 20px -4px rgb(15 23 42 / 0.08);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  gap: 16px;
}

.faq-q h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.faq-q .faq-arrow {
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-a {
  max-height: 300px;
}

.faq-a-inner {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ===== Newsletter & Footer ===== */
.newsletter {
  padding: 50px 0;
  background: var(--bg-soft);
}

.newsletter-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.newsletter-left h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.newsletter-left h3 i {
  color: var(--primary);
}

.newsletter-left p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.newsletter-right form {
  display: flex;
  gap: 8px;
}

.newsletter-right input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}

.newsletter-right input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.newsletter-right button {
  padding: 12px 22px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.newsletter-right button:hover {
  background: var(--primary-dark);
}

.footer {
  padding: 40px 0 24px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 300px;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 13.5px;
  color: var(--text-secondary);
}

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

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 14px;
}

.social-links a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ===== Tool Page Shared ===== */
.tool-hero {
  padding: 30px 0 20px;
  background: var(--bg-soft);
}

.tool-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-hero-row .theme-toggle-page {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.tool-hero-row .theme-toggle-page:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.tool-hero .back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-card);
  flex-shrink: 0;
}

.tool-hero .back-home:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.tool-hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  text-align: center;
  flex: 1;
}

.tool-hero p {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

.tool-main {
  padding: 30px 0 60px;
}

.tool-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow:
    0 2px 4px 0 rgb(15 23 42 / 0.08),
    0 10px 25px -5px rgb(15 23 42 / 0.08),
    0 1px 3px 0 rgb(79 70 229 / 0.05);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 960px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    display: none;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  }

  .nav-mega,
  .nav-mega-caret {
    display: none !important;
  }

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

  .nav-links a {
    padding: 12px 16px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .features-grid {
    padding: 24px;
  }

  .newsletter-box {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .tool-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tool-card {
    padding: 18px;
  }

  .tool-card h3 {
    font-size: 14.5px;
  }

  .search-box {
    padding: 4px;
    border-radius: var(--radius-md);
  }

  .search-input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .search-btn {
    padding: 0 14px;
    height: 40px;
    border-radius: calc(var(--radius-md) - 4px);
    font-size: 13px;
  }

  .search-btn .btn-text {
    display: none;
  }

  .newsletter-right form {
    flex-direction: column;
  }

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

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

  .section-title {
    font-size: 18px;
  }

  .tool-card-box {
    padding: 18px;
  }
}

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

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


/* ===== Cookie Consent Banner ===== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 18px 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.cookie-consent.show {
  transform: translateY(0);
}
.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-consent-left {
  flex: 1;
  min-width: 280px;
}
.cookie-consent-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-consent-title i {
  color: var(--primary);
}
.cookie-consent-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cookie-consent-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-consent-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  border: none;
}
.cookie-consent-btn.accept {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
}
.cookie-consent-btn.accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.cookie-consent-btn.decline {
  background: var(--bg-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.cookie-consent-btn.decline:hover {
  background: var(--bg-muted);
}
.cookie-consent-learn {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 10px;
}
.cookie-consent-learn:hover {
  text-decoration: underline;
}
body[data-theme="dark"] .cookie-consent {
  background: var(--bg-card);
  border-top-color: var(--border);
}
body[data-theme="dark"] .cookie-consent-title {
  color: var(--text);
}
body[data-theme="dark"] .cookie-consent-desc {
  color: var(--text-muted);
}
body[data-theme="dark"] .cookie-consent-btn.decline {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-color: var(--border);
}
@media (max-width: 640px) {
  .cookie-consent {
    padding: 14px 16px;
  }
  .cookie-consent-inner {
    gap: 16px;
  }
  .cookie-consent-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* ===== Page Transition Overlay ===== */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#page-transition-overlay.active {
  opacity: 1;
}

.page-transition-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: expand-ring 0.6s ease-out forwards;
  opacity: 0;
}
@keyframes expand-ring {
  0% { width: 20px; height: 20px; opacity: 0.8; }
  100% { width: 200vmax; height: 200vmax; opacity: 0; }
}

.page-transition-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-transition-text {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.5px;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

/* Theme - Dark Mode */
body[data-theme="dark"] {
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-muted: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #1e293b;
  --border: #334155;
  --border-light: #1e293b;
  --primary-50: #312e81;
  --primary-100: #4338ca;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.3), 0 1px 3px 0 rgb(0 0 0 / 0.2);
  --shadow-card-hover: 0 10px 25px -5px rgb(0 0 0 / 0.4), 0 4px 8px -4px rgb(0 0 0 / 0.3);
}

body[data-theme="dark"] .navbar {
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid var(--border-light);
}

body[data-theme="dark"] .logo {
  color: var(--text);
}

body[data-theme="dark"] .nav-links a {
  color: var(--text-secondary);
}

body[data-theme="dark"] .nav-links a:hover,
body[data-theme="dark"] .nav-links a.active {
  color: var(--primary-light);
  background: var(--primary-50);
}

body[data-theme="dark"] .lang-switch-toggle {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-secondary);
}

body[data-theme="dark"] .lang-switch-toggle:hover {
  background: var(--border);
  color: var(--text);
}

body[data-theme="dark"] .lang-switch-menu {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.5), 0 4px 10px -2px rgb(0 0 0 / 0.3);
}

body[data-theme="dark"] .lang-switch-item:hover {
  background: var(--border);
  color: var(--text);
}

body[data-theme="dark"] .theme-toggle {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

body[data-theme="dark"] .theme-toggle:hover {
  background: var(--border);
  color: var(--text);
}

body[data-theme="dark"] .search-box {
  background: var(--bg-card);
  border-color: var(--border);
}

body[data-theme="dark"] .search-input {
  color: var(--text);
}

body[data-theme="dark"] .hot-tags a {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-secondary);
}

body[data-theme="dark"] .hot-tags a:hover {
  background: var(--primary-50);
  color: var(--primary-light);
  border-color: var(--primary-100);
}

body[data-theme="dark"] .tool-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow:
    0 4px 10px 0 rgb(0 0 0 / 0.5),
    0 10px 20px -2px rgb(0 0 0 / 0.4),
    0 2px 4px 0 rgb(79 70 229 / 0.18);
}

body[data-theme="dark"] .tool-card .fav-icon {
  background: rgba(51, 65, 85, 0.9);
  color: var(--text-muted);
}

body[data-theme="dark"] .tool-card:hover {
  border-color: var(--primary-100);
  box-shadow:
    0 12px 24px -4px rgb(79 70 229 / 0.4),
    0 16px 32px -8px rgb(0 0 0 / 0.55),
    0 6px 12px -4px rgb(0 0 0 / 0.45);
}

body[data-theme="dark"] .tool-card h3 {
  color: var(--text);
}

body[data-theme="dark"] .category-item {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow:
    0 6px 12px 0 rgb(0 0 0 / 0.55),
    0 12px 24px -4px rgb(0 0 0 / 0.45),
    0 3px 6px 0 rgb(79 70 229 / 0.2);
}

body[data-theme="dark"] .category-item:hover {
  border-color: var(--primary-100);
  background: var(--primary-50);
  box-shadow:
    0 16px 32px -4px rgb(79 70 229 / 0.45),
    0 20px 40px -8px rgb(0 0 0 / 0.6),
    0 8px 16px -4px rgb(0 0 0 / 0.5);
}

body[data-theme="dark"] .feature-item h4 {
  color: var(--text);
}

body[data-theme="dark"] .features-grid {
  background: var(--bg-card);
  border-color: var(--border);
}

body[data-theme="dark"] .faq-item {
  background: var(--bg-card);
  border-color: var(--border);
}

body[data-theme="dark"] .faq-item.active,
body[data-theme="dark"] .faq-item:hover {
  border-color: var(--primary-100);
}

body[data-theme="dark"] .faq-q h4 {
  color: var(--text);
}

body[data-theme="dark"] .faq-item.active .faq-arrow {
  color: var(--primary-light);
}

body[data-theme="dark"] .faq-a-inner {
  color: var(--text-secondary);
}

body[data-theme="dark"] .newsletter-box {
  background: var(--bg-card);
  border-color: var(--border);
}

body[data-theme="dark"] .newsletter-left h3 {
  color: var(--text);
}

body[data-theme="dark"] .newsletter-right input {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text);
}

body[data-theme="dark"] .footer {
  background: var(--bg);
  border-top-color: var(--border-light);
}

body[data-theme="dark"] .footer-col h5 {
  color: var(--text);
}

body[data-theme="dark"] .footer-col a {
  color: var(--text-secondary);
}

body[data-theme="dark"] .social-links a {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

body[data-theme="dark"] .social-links a:hover {
  background: var(--primary);
  color: #fff;
}

body[data-theme="dark"] .tool-hero {
  background: var(--bg-soft);
}

body[data-theme="dark"] .tool-hero h1 {
  color: var(--text);
}

body[data-theme="dark"] .tool-card-box {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow:
    0 2px 4px 0 rgb(0 0 0 / 0.3),
    0 10px 25px -5px rgb(0 0 0 / 0.35),
    0 1px 3px 0 rgb(79 70 229 / 0.15);
}

body[data-theme="dark"] .hero {
  background: linear-gradient(
    180deg,
    #1e1b4b 0%,
    #3b0764 30%,
    #064e3b 60%,
    var(--bg) 100%
  );
}

body[data-theme="dark"] .hero-bg::before {
  background: radial-gradient(
    ellipse at center,
    rgba(139, 92, 246, 0.30) 0%,
    rgba(139, 92, 246, 0.12) 40%,
    transparent 70%
  );
}

body[data-theme="dark"] .hero-bg::after {
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.22) 0%,
    rgba(236, 72, 153, 0.08) 40%,
    transparent 70%
  );
}

body[data-theme="dark"] .hero-glow {
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.25) 0%,
    rgba(16, 185, 129, 0.08) 40%,
    transparent 70%
  );
}

body[data-theme="dark"] .hero-blob {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.18) 0%,
    rgba(249, 115, 22, 0.12) 100%
  );
}

body[data-theme="dark"] .hero-blob-alt {
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.22) 0%,
    rgba(99, 102, 241, 0.15) 100%
  );
}

#hero-particles { position: absolute; inset: 0; opacity: 0.4; pointer-events: none; z-index: 0; }
#hero-particles canvas { width: 100%; height: 100%; display: block; }
body[data-theme="dark"] .hero-dots {
  background-image: radial-gradient(circle, rgba(167, 139, 250, 0.3) 1px, transparent 1px);
}

/* ===== Floating Bookmark Toast ===== */
.bookmark-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  max-width: 200px; width: auto;
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border: 1.5px solid #c6d7f5; border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1; transform: translateX(0);
  font-family: inherit;
}
.bookmark-float.collapsed {
  transform: translateX(calc(100% + 24px - 44px));
}
.bookmark-float.hidden {
  opacity: 0; transform: translateY(20px); pointer-events: none;
}
.bookmark-float.hidden.collapsed {
  transform: translateX(calc(100% + 24px - 44px)) translateY(20px);
}
.bookmark-float-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #4f6ef6 0%, #7b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; flex-shrink: 0; cursor: pointer;
  transition: all 0.2s;
}
.bookmark-float-icon:hover {
  transform: scale(1.1);
}
.bookmark-float-body { flex: 1; min-width: 0; overflow: hidden; }
.bookmark-float-desc {
  font-size: 0.82rem; color: #5a6d9e; line-height: 1.35; white-space: nowrap;
}
.bookmark-float-desc kbd {
  display: inline-block; padding: 1px 6px; font-size: 0.7rem;
  border: 1px solid #b0c4e0; border-radius: 4px;
  background: #f8fafc; color: #4a5568; font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin: 0 2px;
}
.bookmark-float-collapse {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d0d7e5;
  background: #fff; color: #6b7daa; cursor: pointer;
  font-size: 9px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s; padding: 0; line-height: 1;
  order: -1;
}
.bookmark-float-collapse:hover {
  background: #f0f3ff; color: #4f46e5; border-color: #4f46e5;
}
.bookmark-float.collapsed .bookmark-float-collapse i {
  transform: rotate(180deg);
}
body[data-theme="dark"] .bookmark-float {
  background: linear-gradient(135deg, #1e293b 0%, #1a2340 100%);
  border-color: rgba(148, 179, 255, 0.2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
}
body[data-theme="dark"] .bookmark-float-desc { color: #94a3c0; }
body[data-theme="dark"] .bookmark-float-desc kbd {
  background: rgba(255, 255, 255, 0.06); border-color: rgba(148, 179, 255, 0.25); color: #bcc8e8;
}
body[data-theme="dark"] .bookmark-float-collapse {
  background: #1e293b; border-color: rgba(148, 179, 255, 0.25); color: #7b8db0;
}
body[data-theme="dark"] .bookmark-float-collapse:hover {
  background: #2d3a50; color: #93a4ff; border-color: #93a4ff;
}

@media (max-width: 480px) {
  .bookmark-float { bottom: 16px; right: 12px; padding: 8px 12px; gap: 6px; }
  .bookmark-float-icon { width: 28px; height: 28px; border-radius: 6px; font-size: 12px; }
  .bookmark-float-desc { font-size: 0.75rem; }
}

/* ===== SEO section (bottom of tool pages) ===== */
.calc-seo-wrap {
  margin-top: 24px;
  padding: 32px 0;
  background: var(--bg-soft);
}
.calc-seo {
  padding: 24px;
}
.calc-seo h2 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.calc-seo p { font-size: 13px; color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.calc-seo p:last-of-type { margin-bottom: 16px; }
.seo-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-tags span {
  padding: 5px 14px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
body[data-theme="dark"] .calc-seo-wrap {
  background: var(--bg-soft);
  border-top-color: var(--border);
}

