:root {
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --primary-violet: #7C3AED;
  --primary-pink: #EC4899;
  --primary-orange: #F97316;
  --primary-grad: linear-gradient(135deg, #7C3AED 0%, #EC4899 50%, #F97316 100%);
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
}

[data-theme="dark"] {
  --bg-main: #0B0B14;
  --bg-card: #171725;
  --bg-card-hover: #1E1E30;
  --bg-header: rgba(11, 11, 20, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-head: #F9FAFB;
  --text-body: #9CA3AF;
  --text-muted: #6B7280;
  --input-bg: #11111E;
}

[data-theme="light"] {
  --bg-main: #F6F5FB;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F9F8FE;
  --bg-header: rgba(246, 245, 251, 0.88);
  --border: #E9E7F5;
  --border-hover: #D0CCE8;
  --text-head: #111827;
  --text-body: #4B5563;
  --text-muted: #9CA3AF;
  --input-bg: #F0EFF8;
}

[data-theme="midnight"] {
  --bg-main: #060814;
  --bg-card: #0F172A;
  --bg-card-hover: #1E293B;
  --bg-header: rgba(6, 8, 20, 0.85);
  --border: rgba(56, 189, 248, 0.15);
  --border-hover: rgba(56, 189, 248, 0.35);
  --text-head: #F8FAFC;
  --text-body: #94A3B8;
  --text-muted: #64748B;
  --input-bg: #0B1120;
}

[data-theme="sunset"] {
  --bg-main: #14080E;
  --bg-card: #24121B;
  --bg-card-hover: #331A27;
  --bg-header: rgba(20, 8, 14, 0.85);
  --border: rgba(244, 63, 94, 0.2);
  --border-hover: rgba(244, 63, 94, 0.4);
  --text-head: #FFF1F2;
  --text-body: #FDA4AF;
  --text-muted: #9F1239;
  --input-bg: #1A0B13;
}


/* ---- VIOLET 3D LOOK (v10) ---- */
/* Hero: floating CSS-3D shapes (violet cube, pink torus, pink sphere).
   Pure CSS — no canvas, no Three.js, no extra downloads. The layer sits
   behind the hero text, never covers it and never takes clicks. */
.hero-section { position: relative; overflow: hidden; perspective: 900px; }
.hero-section > * { position: relative; z-index: 1; }
.hero-section > .hero-3d { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-3d-shape { position: absolute; transform-style: preserve-3d; will-change: transform; }
.hero-3d-spin { width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }

/* Violet cube (left) — floats up/down, spins slowly in 3D. */
.hero-3d-cube { --cube: 72px; left: 2%; top: 60%; width: var(--cube); height: var(--cube); animation: hero-float 7s ease-in-out infinite alternate; }
.hero-3d-cube-spin { animation: hero-spin-cube 16s linear infinite; }
.cube-face { position: absolute; width: var(--cube); height: var(--cube); border: 1px solid rgba(255,255,255,0.35); background: linear-gradient(135deg, rgba(124,58,237,0.92), rgba(168,85,247,0.75)); box-shadow: inset 0 0 24px rgba(255,255,255,0.12); }
.cube-face-front { transform: translateZ(calc(var(--cube) / 2)); }
.cube-face-back { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); background: linear-gradient(135deg, rgba(109,40,217,0.92), rgba(124,58,237,0.75)); }
.cube-face-right { transform: rotateY(90deg) translateZ(calc(var(--cube) / 2)); background: linear-gradient(135deg, rgba(139,92,246,0.92), rgba(124,58,237,0.7)); }
.cube-face-left { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); background: linear-gradient(135deg, rgba(76,29,149,0.92), rgba(109,40,217,0.7)); }
.cube-face-top { transform: rotateX(90deg) translateZ(calc(var(--cube) / 2)); background: linear-gradient(135deg, rgba(167,139,250,0.95), rgba(139,92,246,0.75)); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); background: linear-gradient(135deg, rgba(59,7,100,0.92), rgba(76,29,149,0.75)); }

/* Pink torus (right) — a glowing ring, tilted and slowly spinning. */
.hero-3d-torus { right: 2%; top: 60%; width: 80px; height: 80px; animation: hero-float 9s ease-in-out infinite alternate-reverse; }
.hero-3d-torus-spin { border: 18px solid #EC4899; border-radius: 50%; box-shadow: 0 0 42px rgba(236,72,153,0.45), inset 0 0 22px rgba(236,72,153,0.35); animation: hero-spin-torus 12s linear infinite; }

/* Pink sphere (lower left) — soft radial glow, gentle bob + pulse. */
.hero-3d-sphere { left: 5%; bottom: 4%; width: 56px; height: 56px; animation: hero-float 8s ease-in-out infinite alternate; }
.hero-3d-sphere-spin { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F9A8D4 0%, #EC4899 45%, #7C3AED 100%); box-shadow: 0 0 36px rgba(236,72,153,0.5); animation: hero-pulse 5s ease-in-out infinite alternate; }

/* Small glowing dots for depth. */
.hero-3d-dot { width: 12px; height: 12px; border-radius: 50%; }
.hero-3d-dot-a { left: 28%; top: 5%; background: #F97316; box-shadow: 0 0 18px rgba(249,115,22,0.8); animation: hero-float 6s ease-in-out infinite alternate-reverse; }
.hero-3d-dot-b { right: 26%; top: 6%; background: #A78BFA; box-shadow: 0 0 18px rgba(167,139,250,0.8); animation: hero-float 7.5s ease-in-out infinite alternate; }

@keyframes hero-float { from { transform: translateY(-10px); } to { transform: translateY(12px); } }
@keyframes hero-spin-cube { from { transform: rotateX(-18deg) rotateY(0deg); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@keyframes hero-spin-torus { from { transform: rotateX(62deg) rotateZ(0deg); } to { transform: rotateX(62deg) rotateZ(360deg); } }
@keyframes hero-pulse { from { transform: scale(1); } to { transform: scale(1.1); } }

/* Paused by hero-3d.js when the hero is off-screen or the tab is hidden. */
.hero-3d-paused .hero-3d-shape, .hero-3d-paused .hero-3d-spin { animation-play-state: paused; }

/* Tool cards: subtle 3D tilt (hero-3d.js sets --rx / --ry on hover/touch).
   Transform-only, no layout shift. Hover lift is kept. */
.tools-grid { perspective: 1200px; }
.tool-card { --rx: 0deg; --ry: 0deg; transform: translateY(0) rotateX(var(--rx)) rotateY(var(--ry)); will-change: transform; }
.tool-card:hover { transform: translateY(-4px) rotateX(var(--rx)) rotateY(var(--ry)); }

/* Smaller shapes on phones so they never crowd the hero text. */
@media (max-width: 640px) {
  .hero-3d-cube { --cube: 54px; left: 1%; top: 3%; }
  .hero-3d-torus { width: 62px; height: 62px; right: 1%; top: 3%; }
  .hero-3d-torus-spin { border-width: 12px; }
  .hero-3d-sphere { width: 42px; height: 42px; left: 1%; right: auto; bottom: 3%; }
  .hero-3d-dot-a { display: none; }
  .hero-3d-dot-b { display: none; }
}

/* Respect reduced motion: shapes stay still, cards do not tilt. */
@media (prefers-reduced-motion: reduce) {
  .hero-3d-shape, .hero-3d-spin { animation: none !important; }
  .tool-card { transition: none; }
}
[data-theme="forest"] {
  --bg-main: #06120E;
  --bg-card: #0D231C;
  --bg-card-hover: #14352B;
  --bg-header: rgba(6, 18, 14, 0.85);
  --border: rgba(52, 211, 153, 0.2);
  --border-hover: rgba(52, 211, 153, 0.4);
  --text-head: #ECFDF5;
  --text-body: #A7F3D0;
  --text-muted: #065F46;
  --input-bg: #081B15;
}

[data-theme="ocean"] {
  --bg-main: #06111C;
  --bg-card: #0D2035;
  --bg-card-hover: #14304F;
  --bg-header: rgba(6, 17, 28, 0.85);
  --border: rgba(56, 189, 248, 0.2);
  --border-hover: rgba(56, 189, 248, 0.4);
  --text-head: #F0F9FF;
  --text-body: #BAE6FD;
  --text-muted: #0369A1;
  --input-bg: #081829;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-head); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Radial Glows */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: -1; opacity: 0.18; }
.bg-glow-left { width: 380px; height: 380px; top: -100px; left: -100px; background: #7C3AED; }
.bg-glow-right { width: 420px; height: 420px; top: 100px; right: -120px; background: #EC4899; }

/* Sticky Glass Header */
.glass-header {
  position: sticky; top: 0; z-index: 99;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand-link { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; font-family: var(--font-heading); }
.brand-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.brand-text span { background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-head); font-weight: 600; font-size: 0.85rem;
  transition: all 0.2s ease;
}
.nav-btn:hover { border-color: var(--primary-violet); transform: translateY(-1px); }

/* Theme Menu */
.theme-menu-wrap { position: relative; }
.theme-dropdown {
  position: absolute; right: 0; top: 48px; width: 160px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3); z-index: 100;
}
.theme-dropdown.show { display: flex; }
.theme-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; font-size: 0.85rem; color: var(--text-head);
  width: 100%; text-align: left;
}
.theme-opt:hover { background: var(--input-bg); }
.th-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; display: inline-block; }
.th-dark { background: #171725; border: 1px solid #444; }
.th-light { background: #FFFFFF; border: 1px solid #ccc; }
.th-midnight { background: #0F172A; }
.th-sunset { background: #F43F5E; }
.th-forest { background: #10B981; }
.th-ocean { background: #0284C7; }
.th-chk { width: 14px; height: 14px; color: var(--primary-violet); display: none; }
.theme-opt.active .th-chk { display: inline-block; }
/* Header nav + kebab menu */
.header-nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; margin-right: auto; }
.header-nav-link { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 0.85rem; color: var(--text-head); text-decoration: none; border: 1px solid transparent; transition: all 0.2s ease; white-space: nowrap; }
.header-nav-link:hover { background: var(--bg-card); border-color: var(--primary-violet); transform: translateY(-1px); }
.kebab-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text-head); text-decoration: none; }
.kebab-link:hover { background: var(--input-bg); }
button.kebab-link{ background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; width: 100%; }
.kebab-sep{ height: 1px; background: var(--border); margin: 6px 4px; }
.kebab-label{ padding: 8px 12px 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
#kebab-dropdown{ width: 200px; max-height: calc(100vh - 80px); overflow-y: auto; }
.kebab-mobile-only { display: none; }

/* Ads */
.ad-banner-top { margin-top: 14px; margin-bottom: 8px; }
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-hover); border-radius: 12px;
  background: var(--bg-card); color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
}
.ad-728x90 { min-height: 90px; width: 100%; max-width: 728px; margin: 0 auto; }
.ad-300x250 { min-height: 250px; width: 100%; }

/* Hero */
.hero-section { text-align: center; padding: 32px 0 24px; }
.privacy-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success); font-size: 0.8rem; font-weight: 600; margin-bottom: 16px;
}
.hero-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.gradient-text { background: var(--primary-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: clamp(0.95rem, 2vw, 1.1rem); max-width: 680px; margin: 0 auto 24px; }

/* Search Bar */
.search-box-wrap {
  position: relative; max-width: 640px; margin: 0 auto 20px;
}
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 20px; height: 20px; }
.search-box-wrap input {
  width: 100%; height: 52px; padding: 0 44px;
  border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-head); font-size: 0.95rem; font-family: inherit; outline: none;
  transition: all 0.2s ease;
}
.search-box-wrap input:focus { border-color: var(--primary-violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15); }
.clear-search-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: none; }
.clear-search-btn.show { display: block; }

/* Category Pills */
.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.cat-pill {
  padding: 8px 16px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-head); font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease;
}
.cat-pill:hover, .cat-pill.active { background: var(--primary-grad); color: #fff; border-color: transparent; }

/* Sections */
.section-wrap { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 8px; }
.tool-count-badge { padding: 4px 10px; border-radius: 999px; background: var(--input-bg); font-size: 0.75rem; font-weight: 700; }

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tools-grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

/* Tool Card */
.tool-card {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  transform-style: preserve-3d;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-glow, var(--primary-violet));
  box-shadow: 0 10px 25px -5px var(--card-glow-shadow, rgba(124, 58, 237, 0.2));
}
.tool-card-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.tool-card-star { color: var(--text-muted); padding: 4px; border-radius: 8px; transition: color 0.2s ease; }
.tool-card-star.active { color: #F59E0B; }
.tool-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.tool-card-desc { font-size: 0.85rem; color: var(--text-body); line-height: 1.4; flex-grow: 1; }
.tool-card-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }

/* Mini Tool Card */
.tool-card-mini {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px;
  transition: all 0.2s ease;
}
.tool-card-mini:hover { border-color: var(--primary-violet); transform: translateY(-2px); }
.tool-card-mini .tool-card-icon { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.tool-card-mini h4 { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tool Workspace Layout */
.tool-nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-head); }
.back-link:hover { color: var(--primary-violet); }
.tool-actions-bar { display: flex; gap: 8px; }
.tool-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-head); font-size: 0.85rem; font-weight: 600;
}
.tool-action-btn.active { color: #F59E0B; }
.tool-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.tool-main-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.tool-header-area { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.tool-header-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.tool-category-badge { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--primary-violet); }
.tool-main-heading { font-size: 1.6rem; margin: 4px 0; }
.tool-main-desc { font-size: 0.95rem; }
.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.sidebar-box h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.related-tools-list { display: flex; flex-direction: column; gap: 8px; }

/* Buttons & Inputs in Tools */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 0.9rem;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary-grad); color: #fff; }
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-secondary { background: var(--input-bg); border: 1px solid var(--border); color: var(--text-head); }
.btn-secondary:hover { border-color: var(--primary-violet); }
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; color: var(--text-head); font-family: inherit; font-size: 0.9rem; outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary-violet); }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-head); margin-bottom: 6px; display: block; }
.drop-zone {
  border: 2px dashed var(--border-hover); border-radius: 16px; padding: 32px 16px;
  text-align: center; cursor: pointer; transition: all 0.2s ease; background: var(--input-bg);
}
.drop-zone:hover { border-color: var(--primary-violet); }

/* FAQ Accordion */
.faq-accordion { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-question {
  width: 100%; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; color: var(--text-head); text-align: left; font-size: 0.95rem;
}
.faq-answer { padding: 0 18px 14px; font-size: 0.9rem; line-height: 1.5; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.2s ease; width: 18px; height: 18px; }

/* Legal / Info Page */
.legal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; line-height: 1.7; }
.legal-card h1 { font-size: 1.8rem; margin-bottom: 16px; }
.legal-card h2 { font-size: 1.3rem; margin: 24px 0 10px; }
.legal-card p { margin-bottom: 12px; font-size: 0.95rem; }

/* Toast */
.toast-pop {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #10B981; color: #fff; font-weight: 700; font-size: 0.85rem;
  padding: 10px 18px; border-radius: 10px; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); animation: slideInToast 0.25s ease;
}
@keyframes slideInToast { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Footer */
.app-footer { background: #0B0B14; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 60px; padding: 48px 0 24px; color: #9CA3AF; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-privacy-tag { font-size: 0.85rem; margin-top: 12px; max-width: 380px; }
.footer-links-col h4 { font-size: 0.95rem; color: #F9FAFB; margin-bottom: 12px; }
.footer-links-col a { display: block; font-size: 0.85rem; margin-bottom: 8px; }
.footer-links-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 32px; padding-top: 20px; text-align: center; font-size: 0.8rem; }

/* Back to Top */
.back-to-top-btn {
  position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--primary-grad); color: #fff;
  display: none; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,0.3); z-index: 90;
}
.back-to-top-btn.show { display: flex; }

/* Responsive */
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .desktop-only { display: none; }
    .header-nav { display: none; }
    .kebab-mobile-only { display: flex; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tools-grid-mini { grid-template-columns: 1fr 1fr; }
  .tool-main-card { padding: 18px; }
}

/* Card hover tilt must win over the earlier .tool-card:hover rule. */
.tools-grid .tool-card:hover { transform: translateY(-4px) rotateX(var(--rx)) rotateY(var(--ry)); }
