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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:#f8fafc;
  color:#0f172a;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  line-height:1.6;
}

.container { width:100%; max-width:1080px; margin:0 auto; padding:0 20px; }

/* Header */
.site-header {
  background:#fff;
  border-bottom:1px solid #e2e8f0;
  position:sticky; top:0; z-index:50;
}
.header-inner { display:flex; align-items:center; justify-content:space-between; height:60px; }
.logo { display:flex; align-items:baseline; gap:8px; font-weight:800; font-size:20px; color:#4f46e5; text-decoration:none; }
.logo-mark { color:#4f46e5; font-size:18px; }
.logo-sub { font-size:12px; font-weight:600; color:#64748b; }
.nav { display:flex; gap:4px; }
.nav a {
  padding:6px 12px; border-radius:8px; font-size:14px; color:#475569; text-decoration:none; transition:all .15s;
}
.nav a:hover { background:#eef2ff; color:#4f46e5; }

/* Main */
main { flex:1; padding:40px 0 60px; }

/* Hero */
.hero { text-align:center; padding:24px 0 40px; }
.hero h1 { font-size:36px; font-weight:800; letter-spacing:-0.02em; }
.hero-sub { margin-top:8px; font-size:15px; color:#64748b; font-weight:600; }
.hero-desc { margin-top:12px; font-size:15px; color:#475569; max-width:640px; margin-left:auto; margin-right:auto; }
.hero-desc strong { color:#4f46e5; }

/* Tool grid (home) */
.tool-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; }
.tool-card {
  position:relative;
  display:block; background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:24px;
  text-decoration:none; color:inherit; transition:all .15s;
}
.tool-card:hover { border-color:#c7d2fe; box-shadow:0 4px 16px rgba(79,70,229,.08); transform:translateY(-2px); }
.tool-icon {
  width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:22px; margin-bottom:14px;
}
.tool-name { font-size:18px; font-weight:700; margin-bottom:8px; }
.tool-desc { font-size:14px; color:#64748b; }
.tool-tag {
  position:absolute; top:14px; right:14px; font-size:11px; font-weight:700;
  background:#fef3c7; color:#b45309; padding:3px 8px; border-radius:999px;
}

/* Features */
.features { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:20px; margin-top:48px; }
.feature { background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:20px; }
.feature h3 { font-size:15px; margin-bottom:6px; }
.feature p { font-size:13.5px; color:#64748b; }

/* Tool page layout */
.breadcrumb { display:flex; flex-wrap:wrap; gap:6px; font-size:13px; color:#94a3b8; margin-bottom:16px; }
.breadcrumb a { color:#64748b; text-decoration:none; }
.breadcrumb a:hover { color:#4f46e5; }
.breadcrumb .sep { color:#cbd5e1; }

.tool-page h1 { font-size:28px; font-weight:800; }
.tool-page .tool-blurb { color:#64748b; font-size:14.5px; margin:8px 0 28px; max-width:720px; }

.dropzone {
  border:2px dashed #cbd5e1; border-radius:16px; background:#fff; padding:48px 20px;
  text-align:center; cursor:pointer; transition:all .15s;
}
.dropzone:hover, .dropzone.dragover { border-color:#4f46e5; background:#eef2ff; }
.dropzone-icon { font-size:36px; margin-bottom:10px; }
.dropzone-text { font-size:15px; color:#475569; font-weight:600; }
.dropzone-sub { font-size:13px; color:#94a3b8; margin-top:4px; }
.dropzone input[type=file] { display:none; }

.work-area { margin-top:24px; }
.work-area.hidden { display:none; }

.controls {
  background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:20px; margin-bottom:20px;
  display:flex; flex-wrap:wrap; gap:20px; align-items:flex-end;
}
.control { display:flex; flex-direction:column; gap:6px; min-width:140px; }
.control label { font-size:12.5px; font-weight:600; color:#475569; }
.control input[type=range] { width:100%; accent-color:#4f46e5; }
.control select, .control input[type=number] {
  padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; font-size:14px; background:#fff;
}
.btn {
  display:inline-flex; align-items:center; gap:6px; padding:10px 20px; border-radius:10px;
  font-size:14px; font-weight:700; border:none; cursor:pointer; transition:all .15s; text-decoration:none;
}
.btn-primary { background:#4f46e5; color:#fff; }
.btn-primary:hover { background:#4338ca; }
.btn-primary:disabled { background:#c7d2fe; cursor:not-allowed; }
.btn-secondary { background:#f1f5f9; color:#334155; }
.btn-secondary:hover { background:#e2e8f0; }

.compare { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px; }
.compare-box { background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:14px; }
.compare-box h3 { font-size:13px; color:#64748b; margin-bottom:10px; font-weight:600; }
.compare-box img, .compare-box canvas { max-width:100%; border-radius:8px; display:block; background:repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.compare-meta { font-size:12px; color:#94a3b8; margin-top:8px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.orig-size { color:#dc2626; font-weight:700; }
.new-size { color:#16a34a; font-weight:700; }

/* Status / progress */
.status { display:none; align-items:center; gap:12px; background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:16px 20px; margin-bottom:20px; }
.status.show { display:flex; }
.spinner {
  width:20px; height:20px; border:3px solid #e0e7ff; border-top-color:#4f46e5; border-radius:50%;
  animation:spin 0.8s linear infinite; flex-shrink:0;
}
@keyframes spin { to { transform:rotate(360deg); } }
.progress-track { flex:1; height:8px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.progress-bar { height:100%; width:0%; background:#4f46e5; border-radius:999px; transition:width .2s; }
.status-text { font-size:13.5px; color:#475569; }

.msg-error { background:#fef2f2; border:1px solid #fecaca; color:#b91c1c; border-radius:12px; padding:12px 16px; font-size:14px; margin-bottom:16px; display:none; }

/* FAQ */
.faq-section { margin-top:48px; }
.faq-section h2 { font-size:20px; font-weight:800; margin-bottom:6px; }
.faq-section .faq-sub { font-size:13.5px; color:#64748b; margin-bottom:18px; }
.faq-item { background:#fff; border:1px solid #e2e8f0; border-radius:12px; margin-bottom:10px; overflow:hidden; }
.faq-q { width:100%; text-align:left; background:none; border:none; padding:14px 18px; font-size:15px; font-weight:600; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px; color:#0f172a; }
.faq-q:hover { background:#f8fafc; }
.faq-q .arrow { transition:transform .15s; color:#94a3b8; font-size:12px; }
.faq-item.open .arrow { transform:rotate(180deg); }
.faq-a { display:none; padding:0 18px 14px; font-size:14px; color:#475569; line-height:1.7; }
.faq-item.open .faq-a { display:block; }

/* Related tools / internal links */
.related { margin-top:48px; }
.related h2 { font-size:16px; font-weight:700; margin-bottom:12px; color:#334155; }
.related-links { display:flex; flex-wrap:wrap; gap:8px; }
.related-links a {
  display:inline-flex; align-items:center; gap:6px; padding:8px 14px; background:#fff;
  border:1px solid #e2e8f0; border-radius:999px; font-size:13.5px; color:#475569; text-decoration:none; transition:all .15s;
}
.related-links a:hover { border-color:#c7d2fe; color:#4f46e5; background:#eef2ff; }

/* Footer */
.site-footer { background:#0f172a; border-top:1px solid #1e293b; padding:36px 0 24px; margin-top:auto; color:#94a3b8; font-size:13px; }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:28px; margin-bottom:24px; }
.footer-col h3 { font-size:13px; font-weight:700; color:#e2e8f0; margin-bottom:10px; letter-spacing:.02em; }
.footer-col a { display:block; color:#94a3b8; text-decoration:none; padding:3px 0; }
.footer-col a:hover { color:#a5b4fc; }
.footer-col p { line-height:1.7; }
.footer-bottom { border-top:1px solid #1e293b; padding-top:16px; display:flex; flex-wrap:wrap; gap:8px 20px; justify-content:space-between; }
.footer-bottom a { color:#64748b; text-decoration:none; }
.footer-bottom a:hover { color:#a5b4fc; }
.site-footer .logo { color:#a5b4fc; }

/* Footer (old) */
.footer-inner { font-size:13px; color:#94a3b8; text-align:center; }

/* Hot searches / popular terms */
.hot-searches { margin:48px 0 0; }
.hot-searches h2 { font-size:18px; font-weight:800; margin-bottom:14px; }
.hot-chips { display:flex; flex-wrap:wrap; gap:8px; }
.hot-chips a {
  display:inline-flex; align-items:center; padding:7px 14px; background:#fff;
  border:1px solid #e2e8f0; border-radius:999px; font-size:13px; color:#475569;
  text-decoration:none; transition:all .15s;
}
.hot-chips a:hover { border-color:#c7d2fe; color:#4f46e5; background:#eef2ff; }

@media (max-width:640px){
  .hero h1 { font-size:26px; }
  .header-inner { flex-wrap:wrap; height:auto; padding:10px 0; gap:6px; }
  .nav { order:3; width:100%; justify-content:space-between; }
  .nav a { padding:6px 8px; font-size:13px; }
}