/* ═══════════════════════════════════════════════════════════════════════════
   iLovePNG — Design System v2.1
   Hero dark gradient • Color-coded cards • Smooth interactions
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ───────────────────────────────────────────────────────────── */
:root {
  --violet-50:  #F5F3FF;
  --violet-100: #EDE9FE;
  --violet-200: #DDD6FE;
  --violet-400: #A78BFA;
  --violet-500: #8B5CF6;
  --violet-600: #7C3AED;
  --violet-700: #6D28D9;
  --violet-800: #5B21B6;
  --gray-50:  #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB;
  --gray-300: #D1D5DB; --gray-400: #9CA3AF; --gray-500: #6B7280;
  --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937; --gray-900: #111827;
  --color-primary: #7C3AED;
  --color-text:    #111827;
  --color-muted:   #6B7280;
  --color-border:  #E5E7EB;
  --color-success: #059669;
  --color-danger:  #DC2626;
  --max-width: 1200px;
  --header-h:  64px;
  --gutter:    clamp(1rem, 4vw, 1.5rem);
  --radius-sm: 6px; --radius: 12px; --radius-lg: 18px; --radius-xl: 24px; --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --dur: 160ms; --dur-md: 240ms;
  --ease: cubic-bezier(.4,0,.2,1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ── 2. Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--color-text); background: #F9FAFB; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4 { margin: 0; line-height: 1.2; color: var(--gray-900); }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 3px; border-radius: 3px; }

/* ── 3. Layout ───────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }

/* ── 4. Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.3rem; font-size: .95rem; font-weight: 600; font-family: var(--font);
  border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  white-space: nowrap; text-decoration: none; line-height: 1.2;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform 80ms var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:hover  { text-decoration: none; }
.btn-primary { background: #7C3AED; color: #fff; border-color: #7C3AED; box-shadow: 0 4px 16px rgba(124,58,237,.35); }
.btn-primary:hover { background: #6D28D9; border-color: #6D28D9; box-shadow: 0 6px 24px rgba(124,58,237,.45); }
.btn-white { background: #fff; color: #5B21B6; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.btn-white:hover { background: #F5F3FF; }
.btn-outline { background: transparent; color: #7C3AED; border-color: var(--gray-200); }
.btn-outline:hover { border-color: #A78BFA; background: #F5F3FF; }
.btn-success { background: #059669; color: #fff; border-color: #059669; }
.btn-success:hover { background: #047857; }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-sm  { padding: .4rem .9rem; font-size: .84rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: .85rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-xl  { padding: 1rem 2.25rem; font-size: 1.1rem; border-radius: var(--radius-lg); }

/* ── 5. Section headings ─────────────────────────────────────────────────── */
.section-title { font-size: clamp(1.4rem, 2.5vw, 1.85rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .75rem; }
.section-title--center { text-align: center; }
.section-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7C3AED; margin-bottom: .6rem; }
.section-intro { font-size: 1.05rem; color: var(--gray-500); line-height: 1.7; max-width: 560px; margin: 0 auto 2.5rem; text-align: center; }

/* ── 6. Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200; height: var(--header-h);
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.07); box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1rem; }
.site-logo { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; text-decoration: none; }
.logo-icon { width: 34px; height: 34px; border-radius: 9px; }
.logo-text { font-size: 1.18rem; font-weight: 900; letter-spacing: -.04em; color: var(--gray-900); }
.site-logo:hover .logo-text { color: #6D28D9; }
.site-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: .1rem; }
.nav-link { display: flex; align-items: center; gap: .25rem; padding: .42rem .8rem; font-size: .88rem; font-weight: 500; color: var(--gray-600); border-radius: var(--radius-sm); border: none; background: none; cursor: pointer; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); text-decoration: none; line-height: 1; }
.nav-link:hover, .nav-link.is-active { color: #6D28D9; background: #F5F3FF; text-decoration: none; }
.nav-link.is-active { font-weight: 600; }
.chevron { transition: transform var(--dur) var(--ease); }
.nav-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 10px); left: -1rem; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: .75rem; min-width: 380px; opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.98); transition: opacity var(--dur-md) var(--ease), transform var(--dur-md) var(--ease); transform-origin: top left; }
.nav-dropdown-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.dropdown-category-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: var(--radius); text-decoration: none; transition: background var(--dur) var(--ease); }
.dropdown-category-link:hover { background: var(--gray-50); text-decoration: none; }
.dropdown-cat-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.dropdown-cat-name { font-size: .875rem; font-weight: 600; color: var(--gray-800); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; border-radius: var(--radius-sm); }
.hamburger-bar { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ── 7. HERO — hardcoded gradient colors (no CSS variable in gradient) ──── */
.hero {
  /* Fallback solid color first, then gradient */
  background-color: #1E1B4B;
  background-image: linear-gradient(140deg, #1E1B4B 0%, #3730A3 45%, #4C1D95 100%);
  color: #ffffff;
  padding: 5rem 0 0;
  overflow: hidden;
  position: relative;
}
/* Grid dot overlay */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0);
  background-size: 32px 32px;
  z-index: 0;
}
/* Glow orb */
.hero::after {
  content: ''; position: absolute; pointer-events: none;
  width: 500px; height: 500px; top: -150px; right: -80px; z-index: 0;
  background: radial-gradient(circle, rgba(139,92,246,.25) 0%, transparent 70%);
}
.hero .container, .hero-stats-bar .container { position: relative; z-index: 1; }

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-bottom: 4rem;
}

/* Force all direct text in hero to white */
.hero, .hero h1, .hero p, .hero span, .hero li, .hero div { color: #fff; }
/* But links and badges override this */
.hero .btn-white { color: #5B21B6; }

.hero-eyebrow-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .32rem .9rem; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: rgba(255,255,255,.92) !important; margin-bottom: 1.25rem;
  width: fit-content;
}
.hero-eyebrow-dot { width: 7px; height: 7px; background: #4ADE80; border-radius: 50%; flex-shrink: 0; animation: pulse-dot 2s ease-in-out infinite; }

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.05;
  color: #ffffff !important; margin-bottom: 1.25rem;
}
.hero-title-accent {
  background: linear-gradient(135deg, #A78BFA 0%, #60A5FA 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,.78) !important; line-height: 1.7; margin-bottom: 2rem; max-width: 480px; }

.hero-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-trust { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-trust-item { display: flex; align-items: center; gap: .4rem; font-size: .83rem; color: rgba(255,255,255,.65) !important; }
.hero-trust-item svg { color: #4ADE80 !important; flex-shrink: 0; }

/* Hero visual — right column preview cards */
.hero-visual { display: flex; flex-direction: column; gap: .5rem; }
.hero-card {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg); padding: .85rem 1.1rem;
  display: flex; align-items: center; gap: .85rem;
  backdrop-filter: blur(12px); text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero-card:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); text-decoration: none; }
.hero-card-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.hero-card-name { font-size: .9rem; font-weight: 600; color: #fff !important; }
.hero-card-meta { font-size: .75rem; color: rgba(255,255,255,.5) !important; margin-top: 1px; }
.hero-card-arrow { margin-left: auto; color: rgba(255,255,255,.4) !important; }

/* Stats strip inside hero */
.hero-stats-bar { background: rgba(255,255,255,.07); border-top: 1px solid rgba(255,255,255,.1); }
.hero-stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-stat { padding: 1.25rem 1rem; border-right: 1px solid rgba(255,255,255,.1); text-align: center; }
.hero-stat:last-child { border-right: none; }
.hero-stat-number { font-size: 1.75rem; font-weight: 900; letter-spacing: -.04em; color: #fff !important; line-height: 1; }
.hero-stat-label { font-size: .76rem; color: rgba(255,255,255,.55) !important; margin-top: .25rem; font-weight: 500; }

/* ── 8. Tool search ──────────────────────────────────────────────────────── */
.tool-search-wrap { max-width: 560px; margin: 0 auto 1.75rem; position: relative; }
.tool-search-input {
  width: 100%; padding: .85rem 1rem .85rem 3rem; background: #fff;
  border: 2px solid var(--gray-200); border-radius: var(--radius-full);
  font-size: .95rem; font-family: var(--font); color: var(--gray-900);
  outline: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tool-search-input:focus { border-color: #A78BFA; box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.tool-search-input::placeholder { color: var(--gray-400); }
.tool-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.tool-search-clear { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: var(--gray-200); border: none; border-radius: 50%; width: 22px; height: 22px; display: none; align-items: center; justify-content: center; color: var(--gray-600); cursor: pointer; font-size: .85rem; font-weight: 700; line-height: 1; }
.tool-search-clear.is-visible { display: flex; }
.tool-search-clear:hover { background: var(--gray-300); }

/* ── 9. Tools section ────────────────────────────────────────────────────── */
.tools-section { padding: 3.5rem 0 2rem; }
.category-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; justify-content: center; }
.cat-tab { padding: .45rem 1.1rem; font-size: .875rem; font-weight: 600; color: var(--gray-500); background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-full); cursor: pointer; transition: all var(--dur) var(--ease); font-family: var(--font); }
.cat-tab:hover { border-color: #A78BFA; color: #6D28D9; background: #F5F3FF; }
.cat-tab.is-active { background: #7C3AED; border-color: #7C3AED; color: #fff; box-shadow: 0 2px 10px rgba(124,58,237,.35); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tool-grid--compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .65rem; }

/* Tool card */
.tool-card {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1rem 1rem 1.1rem;
  background: #fff; border: 1.5px solid var(--gray-100); border-radius: var(--radius-lg);
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--card-accent, #7C3AED);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.tool-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-3px); text-decoration: none; }
.tool-card-icon { width: 46px; height: 46px; min-width: 46px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; transition: transform var(--dur) var(--ease); }
.tool-card:hover .tool-card-icon { transform: scale(1.08); }
.tool-card--small .tool-card-icon { width: 36px; height: 36px; min-width: 36px; }
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-name { display: block; font-size: .93rem; font-weight: 700; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card-desc { display: block; font-size: .79rem; color: var(--gray-500); margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.tool-card--small .tool-card-name { font-size: .85rem; }
.tool-card-arrow { flex-shrink: 0; color: var(--gray-300); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.tool-card:hover .tool-card-arrow { color: #8B5CF6; transform: translateX(4px); }
.tool-card.is-hidden { display: none; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 3rem; color: var(--gray-400); font-size: .95rem; }

/* ── 10. Why section ─────────────────────────────────────────────────────── */
.why-section { background: #fff; padding: 4rem 0; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.why-card { padding: 1.5rem; border: 1.5px solid var(--gray-100); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.why-card:hover { border-color: #DDD6FE; box-shadow: var(--shadow-sm); }
.why-icon { width: 48px; height: 48px; background: #F5F3FF; color: #7C3AED; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.why-card h3 { font-size: .98rem; font-weight: 700; margin-bottom: .4rem; color: var(--gray-900); }
.why-card p { font-size: .88rem; color: var(--gray-500); line-height: 1.65; }

/* ── 11. How it works ────────────────────────────────────────────────────── */
.how-section { padding: 4rem 0; }
.steps { display: flex; align-items: flex-start; margin-top: 2.5rem; }
.step { flex: 1; text-align: center; padding: 0 1.5rem; }
.step-number { width: 56px; height: 56px; background: #7C3AED; color: #fff; font-size: 1.25rem; font-weight: 900; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; box-shadow: 0 4px 16px rgba(124,58,237,.4); }
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .45rem; color: var(--gray-900); }
.step p { font-size: .88rem; color: var(--gray-500); line-height: 1.65; }
.step-connector { flex: none; align-self: flex-start; margin-top: 27px; width: 60px; height: 2px; background: linear-gradient(90deg, #C4B5FD, #DDD6FE); border-radius: 2px; }

/* ── 12. Categories ──────────────────────────────────────────────────────── */
.categories-section { padding: 4rem 0; background: #fff; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.category-card { padding: 1.5rem; border: 1.5px solid var(--gray-100); border-radius: var(--radius-lg); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .5rem; transition: all var(--dur) var(--ease); }
.category-card:hover { border-color: var(--cat-color, #A78BFA); box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; }
.category-card-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: .25rem; }
.category-card-name { font-size: .98rem; font-weight: 700; color: var(--gray-900); }
.category-card-count { font-size: .76rem; color: var(--gray-400); font-weight: 600; }
.category-card-desc { font-size: .84rem; color: var(--gray-500); line-height: 1.5; }

/* ── 13. SEO content ─────────────────────────────────────────────────────── */
.seo-content { padding: 3.5rem 0; }
.seo-content-inner { max-width: 760px; margin: 0 auto; }
.seo-content article h2 { font-size: 1.35rem; font-weight: 700; margin: 1.75rem 0 .65rem; color: var(--gray-900); }
.seo-content article h2:first-child { margin-top: 0; }
.seo-content article h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 .4rem; color: var(--gray-900); }
.seo-content article p { font-size: .95rem; color: var(--gray-600); line-height: 1.8; margin-bottom: .75rem; }
.seo-content article strong { color: var(--gray-800); }

/* ── 14. FAQ ─────────────────────────────────────────────────────────────── */
.faq-section { padding: 3rem 0; border-top: 1px solid var(--gray-100); margin-top: 2rem; }
.faq-list { max-width: 720px; }
.faq-item { border-bottom: 1px solid var(--gray-100); }
.faq-item:first-child { border-top: 1px solid var(--gray-100); }
.faq-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1.1rem 0; background: none; border: none; text-align: left; font-size: .95rem; font-weight: 600; color: var(--gray-900); cursor: pointer; gap: 1rem; font-family: var(--font); line-height: 1.4; }
.faq-btn:hover, .faq-btn[aria-expanded="true"] { color: #6D28D9; }
.faq-chevron { flex-shrink: 0; color: var(--gray-400); transition: transform var(--dur) var(--ease); }
.faq-btn[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); color: #8B5CF6; }
.faq-answer { overflow: hidden; }
.faq-answer-body { padding: 0 0 1.1rem; font-size: .91rem; color: var(--gray-600); line-height: 1.75; }

/* ── 15. Related tools ───────────────────────────────────────────────────── */
.related-tools { padding: 2.5rem 0; border-top: 1px solid var(--gray-100); margin-top: 2rem; }

/* ── 16. Upload zone ─────────────────────────────────────────────────────── */
.tool-widget { background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-xl); padding: 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
.upload-zone {
  position: relative; border: 2.5px dashed var(--gray-200); border-radius: var(--radius-lg);
  padding: 3.5rem 2rem; text-align: center; cursor: pointer; overflow: hidden;
  /* PNG transparency checkerboard */
  background-color: #F8F7FF;
  background-image: linear-gradient(45deg, #EEE 25%, transparent 25%),
                    linear-gradient(-45deg, #EEE 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #EEE 75%),
                    linear-gradient(-45deg, transparent 75%, #EEE 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  transition: border-color var(--dur-md) var(--ease), box-shadow var(--dur-md) var(--ease);
}
.upload-zone::before { content: ''; position: absolute; inset: 0; background: rgba(248,247,255,.88); transition: background var(--dur-md) var(--ease); }
.upload-zone > * { position: relative; z-index: 1; }
.upload-zone:hover, .upload-zone:focus-visible { border-color: #A78BFA; box-shadow: 0 0 0 5px rgba(124,58,237,.08); }
.upload-zone:hover::before { background: rgba(245,243,255,.93); }
.upload-zone.is-dragover { border-color: #7C3AED; border-style: solid; box-shadow: 0 0 0 6px rgba(124,58,237,.14); }
.upload-zone.is-dragover::before { background: rgba(237,233,254,.95); }
.upload-zone-inner { display: flex; flex-direction: column; align-items: center; gap: .65rem; }
.upload-icon-checkerboard { width: 64px; height: 64px; position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin: 0 auto .5rem; }
.upload-icon-checkerboard::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, #D1D5DB 25%, #fff 25%, #fff 50%, #D1D5DB 50%, #D1D5DB 75%, #fff 75%); background-size: 12px 12px; }
.upload-icon-plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(124,58,237,.85); color: #fff; border-radius: 12px; font-size: 2rem; font-weight: 300; line-height: 1; }
.upload-heading { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); }
.upload-sub { font-size: .85rem; color: var(--gray-400); margin: -.1rem 0; }
.upload-formats { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: .1rem; }
.upload-format-badge { padding: .15rem .55rem; background: var(--gray-100); border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .03em; }
.upload-meta { font-size: .79rem; color: var(--gray-400); margin-top: .2rem; }
.upload-paste-hint { font-size: .76rem; color: var(--gray-400); margin-top: .1rem; }
.upload-paste-hint kbd { display: inline-block; padding: .1rem .35rem; background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 4px; font-size: .72rem; font-family: var(--font); }
.upload-zone-overlay { position: absolute; inset: 0; background: #7C3AED; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; opacity: 0; transition: opacity var(--dur) var(--ease); border-radius: calc(var(--radius-lg) - 2px); z-index: 10; font-weight: 700; font-size: 1.1rem; }
.upload-zone.is-dragover .upload-zone-overlay { opacity: 1; }

/* ── 17. Tool controls ───────────────────────────────────────────────────── */
.tool-controls { margin-top: 1rem; padding: 1rem; background: var(--gray-50); border-radius: var(--radius); border: 1.5px solid var(--gray-100); }
.control-group { margin-bottom: 1.25rem; }
.control-group:last-child { margin-bottom: 0; }
.control-label { display: flex; align-items: center; justify-content: space-between; font-size: .86rem; font-weight: 600; color: var(--gray-700); margin-bottom: .5rem; }
.control-value { color: #7C3AED; }
.control-range { width: 100%; height: 6px; appearance: none; -webkit-appearance: none; background: var(--gray-200); border-radius: var(--radius-full); outline: none; cursor: pointer; }
.control-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #7C3AED; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(124,58,237,.4); }
.control-range::-moz-range-thumb { width: 20px; height: 20px; background: #7C3AED; border-radius: 50%; border: none; cursor: pointer; }
.control-input { flex: 1; padding: .5rem .75rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .9rem; font-family: var(--font); color: var(--gray-900); background: #fff; outline: none; transition: border-color var(--dur) var(--ease); }
.control-input:focus { border-color: #A78BFA; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.control-inputs { display: flex; align-items: center; gap: .5rem; }
.control-link-icon { color: var(--gray-400); cursor: pointer; padding: .25rem; border: none; background: none; border-radius: 4px; }
.control-link-icon.is-linked { color: #7C3AED; }
.control-select { width: 100%; padding: .5rem 2rem .5rem .75rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .9rem; font-family: var(--font); color: var(--gray-900); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right .75rem center; appearance: none; -webkit-appearance: none; outline: none; cursor: pointer; }

/* ── 18. File list ───────────────────────────────────────────────────────── */
.file-list { margin-top: 1rem; }
.file-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.file-list-header-left { font-size: .86rem; font-weight: 600; color: var(--gray-500); }
.file-list-actions { display: flex; gap: .5rem; }
.file-items { display: flex; flex-direction: column; gap: .5rem; }
.file-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: .75rem; padding: .75rem; background: var(--gray-50); border: 1.5px solid var(--gray-100); border-radius: var(--radius); }
.file-item.is-done { border-color: rgba(5,150,105,.2); background: #F0FDF4; }
.file-item.is-error { border-color: rgba(220,38,38,.2); background: #FEF2F2; }
.file-item-preview { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--gray-200); display: flex; align-items: center; justify-content: center; }
.file-item-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-item-name { font-size: .87rem; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .2rem; }
.file-item-meta { font-size: .76rem; color: var(--gray-400); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.file-size-reduction { font-weight: 700; }
.file-size-error { color: var(--color-danger); }
.file-item-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.file-progress { height: 3px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; margin-top: .4rem; }
.file-progress-bar { height: 100%; background: #7C3AED; border-radius: var(--radius-full); transition: width .3s var(--ease); width: 0%; }
.file-item.is-done .file-progress-bar { background: #059669; width: 100%; }
.download-all-wrap { margin-top: 1rem; display: flex; justify-content: center; }

/* ── 19. Tool page layout ────────────────────────────────────────────────── */
.tool-page-header { padding: .5rem 0 0; }
.tool-category-badge { display: inline-flex; align-items: center; padding: .25rem .75rem; border-radius: var(--radius-full); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .85rem; text-decoration: none; }
.tool-category-badge:hover { text-decoration: underline; }
.tool-page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -.04em; margin-bottom: .75rem; color: var(--gray-900); }
.tool-page-intro { font-size: 1rem; color: var(--gray-500); max-width: 640px; line-height: 1.7; margin-bottom: 1rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.trust-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .7rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: .76rem; font-weight: 600; color: var(--gray-600); }
.tool-content { max-width: 760px; margin-top: 2rem; }
.how-to-steps { display: flex; flex-direction: column; gap: 0; counter-reset: step-counter; margin-top: 1rem; padding-left: 0; }
.how-to-step { display: flex; gap: 1.25rem; padding-bottom: 1.5rem; counter-increment: step-counter; }
.how-to-step::before { content: counter(step-counter); min-width: 32px; height: 32px; background: #7C3AED; color: #fff; font-size: .82rem; font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: .1rem; box-shadow: 0 2px 8px rgba(124,58,237,.3); flex-shrink: 0; }
.how-to-step-title { font-size: .98rem; font-weight: 700; margin-bottom: .3rem; color: var(--gray-900); }
.how-to-step-detail { font-size: .9rem; color: var(--gray-500); line-height: 1.65; }
.features-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.features-item { display: flex; align-items: flex-start; gap: .6rem; font-size: .91rem; color: var(--gray-700); }
.features-item svg { color: #059669; margin-top: .2rem; flex-shrink: 0; }
.benefits-section, .extra-content-section, .formats-section { margin-top: 2rem; }
.benefits-section p, .extra-content-section p, .formats-section p { font-size: .94rem; color: var(--gray-600); line-height: 1.8; margin-top: .65rem; }

/* ── 20. Category page ───────────────────────────────────────────────────── */
.category-page-header { padding: 2rem 0; text-align: center; }
.page-title { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 900; letter-spacing: -.04em; margin-bottom: .75rem; color: var(--gray-900); }
.page-intro { font-size: 1.05rem; color: var(--gray-500); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ── 21. Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb { padding: 1rem 0; }
.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem; }
.breadcrumb-item { display: flex; align-items: center; gap: .15rem; font-size: .83rem; color: var(--gray-400); }
.breadcrumb-item a { color: var(--gray-500); text-decoration: none; }
.breadcrumb-item a:hover { color: #7C3AED; text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-300); margin-inline: .25rem; }
.breadcrumb-current { color: var(--gray-700); font-weight: 500; }

/* ── 22. Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: #111827; color: rgba(255,255,255,.7); margin-top: 5rem; padding-top: 3.5rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-logo .logo-text { color: #fff; }
.footer-tagline { font-size: .88rem; color: rgba(255,255,255,.5); margin-top: .85rem; line-height: 1.65; }
.footer-privacy-note { display: flex; align-items: center; gap: .4rem; margin-top: 1.1rem; font-size: .78rem; color: rgba(255,255,255,.4); }
.footer-privacy-note svg { color: #4ADE80; flex-shrink: 0; }
.footer-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); margin-bottom: 1rem; }
.footer-list li+li { margin-top: .55rem; }
.footer-list a { font-size: .875rem; color: rgba(255,255,255,.6); text-decoration: none; transition: color var(--dur) var(--ease); }
.footer-list a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding: 1.25rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-copy, .footer-note { font-size: .8rem; color: rgba(255,255,255,.35); }

/* ── 23. Error page ──────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 0; }
.error-number { font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; letter-spacing: -.05em; color: var(--gray-100); line-height: 1; margin-bottom: .5rem; }
.error-title { font-size: 1.85rem; font-weight: 800; margin-bottom: 1rem; color: var(--gray-900); }
.error-desc { font-size: 1rem; color: var(--gray-500); max-width: 440px; margin: 0 auto 2rem; line-height: 1.65; }

/* ── 24. Utility ─────────────────────────────────────────────────────────── */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(124,58,237,.2); border-top-color: #7C3AED; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
.animate-fade-in { animation: fadeIn .25s ease both; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── 25. Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero { padding: 4rem 0 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.1); }
  .hero-stat { border-bottom: 1px solid rgba(255,255,255,.1); }
  .hero-stat:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 768px) {
  .steps { flex-direction: column; align-items: stretch; }
  .step { text-align: left; display: flex; gap: 1rem; padding: 0; margin-bottom: 1.5rem; }
  .step-number { flex-shrink: 0; margin: 0; }
  .step-connector { width: 100%; max-width: 40px; margin: 0 0 0 27px; height: 2px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 1rem; }
  .nav-toggle { display: flex; }
  .nav-list { display: none; flex-direction: column; align-items: stretch; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff; padding: 1rem; overflow-y: auto; z-index: 199; border-top: 1px solid var(--gray-100); gap: .25rem; }
  .nav-list.is-open { display: flex; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: 1px solid var(--gray-100); margin-top: .25rem; min-width: 0; transform: none; opacity: 1; pointer-events: auto; }
  .dropdown-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 0; }
  .hero-title { font-size: 2.1rem; }
  .hero-trust { gap: .75rem; }
  .hero-trust-item { font-size: .78rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .upload-zone { padding: 2.5rem 1rem; }
  .file-item { grid-template-columns: 44px 1fr auto; }
  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
}

/* ── 26. Keyframes ───────────────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin      { to { transform:rotate(360deg); } }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:.3; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
  .reveal { opacity:1; transform:none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Tool Settings Panel — v3
   ══════════════════════════════════════════════════════════════════════════ */
.tool-settings-panel {
  background: #F9FAFB; border: 1.5px solid #E5E7EB; border-radius: 12px;
  padding: 1.25rem 1.25rem .25rem; margin-bottom: 1rem;
  display: none; /* shown by JS when settingsHTML() returns content */
}
.tool-settings-panel:empty { display: none !important; }

.settings-row { margin-bottom: 1.1rem; }
.settings-label { display: flex; align-items: center; justify-content: space-between; font-size: .86rem; font-weight: 600; color: #374151; margin-bottom: .45rem; }
.settings-value { color: #7C3AED; font-variant-numeric: tabular-nums; }
.settings-range { width: 100%; height: 6px; appearance: none; -webkit-appearance: none; background: #E5E7EB; border-radius: 999px; outline: none; cursor: pointer; }
.settings-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #7C3AED; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(124,58,237,.4); }
.settings-range::-moz-range-thumb { width: 20px; height: 20px; background: #7C3AED; border-radius: 50%; border: none; cursor: pointer; }
.settings-hints { display: flex; justify-content: space-between; font-size: .72rem; color: #9CA3AF; margin-top: .25rem; }
.settings-input { padding: .5rem .75rem; border: 1.5px solid #E5E7EB; border-radius: 10px; font-size: .9rem; font-family: inherit; color: #111827; background: #fff; outline: none; width: 100%; transition: border-color .15s; }
.settings-input:focus { border-color: #A78BFA; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.settings-select { width: 100%; padding: .5rem 2rem .5rem .75rem; border: 1.5px solid #E5E7EB; border-radius: 10px; font-size: .9rem; font-family: inherit; color: #111827; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right .75rem center; appearance: none; -webkit-appearance: none; outline: none; cursor: pointer; }
.settings-color { width: 40px; height: 36px; border: 1.5px solid #E5E7EB; border-radius: 8px; cursor: pointer; padding: 2px; background: none; }
.settings-info { display: flex; align-items: flex-start; gap: .5rem; font-size: .87rem; color: #6B7280; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 8px; padding: .75rem; margin-bottom: 1rem; }
.settings-info svg { flex-shrink: 0; margin-top: .1rem; color: #3B82F6; }
.settings-info a { color: #2563EB; }
.settings-muted { font-size: .78rem; color: #9CA3AF; }
.color-row { display: flex; align-items: center; gap: .75rem; }
.inline-row { display: flex; align-items: center; gap: .75rem; }
.inline-check { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: #374151; cursor: pointer; }
.inline-check input { cursor: pointer; width: 16px; height: 16px; }

/* Chip row — compact multi-option selector */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .38rem .85rem; font-size: .84rem; font-weight: 600; color: #6B7280; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 999px; cursor: pointer; transition: all .15s; font-family: inherit; }
.chip:hover { border-color: #A78BFA; color: #6D28D9; }
.chip.is-active { background: #7C3AED; border-color: #7C3AED; color: #fff; }

/* Settings tabs */
.settings-tabs { display: flex; gap: 0; margin-bottom: 1.1rem; border-bottom: 2px solid #E5E7EB; }
.stab { padding: .5rem 1rem; font-size: .875rem; font-weight: 600; color: #6B7280; background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; font-family: inherit; }
.stab:hover { color: #7C3AED; }
.stab.is-active { color: #7C3AED; border-bottom-color: #7C3AED; }

/* Dimension inputs */
.dim-row { display: flex; align-items: center; gap: .6rem; }
.dim-group { flex: 1; }
.dim-label { font-size: .75rem; color: #9CA3AF; display: block; margin-bottom: .25rem; font-weight: 500; }
.dim-input { width: 100%; }
.lock-btn { padding: .5rem; background: none; border: 1.5px solid #E5E7EB; border-radius: 8px; cursor: pointer; color: #9CA3AF; transition: all .15s; flex-shrink: 0; }
.lock-btn.is-linked { border-color: #A78BFA; color: #7C3AED; background: #F5F3FF; }
.lock-btn:hover { border-color: #A78BFA; }

/* Radio row */
.radio-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.radio-row label { display: flex; align-items: center; gap: .35rem; font-size: .875rem; color: #374151; cursor: pointer; }
.radio-row input { cursor: pointer; }

/* Position grid for watermark */
.pos-grid { display: grid; grid-template-columns: repeat(3,40px); gap: 4px; }
.pos-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 8px; cursor: pointer; font-size: 1rem; color: #6B7280; transition: all .15s; }
.pos-btn:hover { border-color: #A78BFA; color: #7C3AED; }
.pos-btn.is-active { background: #7C3AED; border-color: #7C3AED; color: #fff; }

/* Crop workspace */
.crop-wrap { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; user-select: none; background: #E5E7EB; border-radius: 8px; overflow: hidden; margin-bottom: .75rem; }
.crop-wrap canvas { display: block; max-width: 100%; }
.crop-selection { position: absolute; border: 2px solid #7C3AED; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.crop-info-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
