/* ============================================================
   BGRemover — original design (light theme, teal accent)
   ============================================================ */
:root {
  --teal-900: #134e4a;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-300: #5eead4;
  --teal-50:  #f0fdfa;
  --ink-900: #0f172a;
  --ink-600: #475569;
  --ink-400: #94a3b8;
  --line:    #e2e8f0;
  --bg:      #f6f8fb;
  --card:    #ffffff;
  --amber:   #f59e0b;
  --danger:  #dc2626;
  --radius:  18px;
  --shadow:  0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-name { font-size: 1.22rem; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a { color: var(--ink-600); text-decoration: none; font-size: .95rem; font-weight: 500; }
.header-nav a:hover { color: var(--teal-700); }
.lang-select {
  border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px;
  background: #fff; color: var(--ink-600); font-size: .88rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(900px 340px at 12% -8%, rgba(94,234,212,.25), transparent 60%),
    radial-gradient(700px 300px at 88% 0%, rgba(13,148,136,.14), transparent 55%),
    var(--bg);
  text-align: center;
}
.hero-badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--teal-50); color: var(--teal-700);
  border: 1px solid #99f6e4; font-size: .82rem; font-weight: 600;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
  max-width: 780px; margin: 0 auto 16px;
}
.hero-subtitle { color: var(--ink-600); font-size: 1.08rem; max-width: 640px; margin: 0 auto 34px; }

/* ---------- Tool card ---------- */
.tool-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  padding: 26px; max-width: 860px; margin: 0 auto; text-align: left;
}
.dropzone {
  border: 2.5px dashed #99f6e4; border-radius: 14px;
  background: linear-gradient(180deg, var(--teal-50), #fff);
  padding: 44px 24px; text-align: center; transition: border-color .2s, background .2s, transform .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--teal-600); outline: none; }
.dropzone.dragover { border-color: var(--teal-700); background: #ccfbf1; transform: scale(1.005); }
.dz-icon { color: var(--teal-600); margin-bottom: 10px; }
.dz-main { font-size: 1.14rem; font-weight: 700; margin-bottom: 4px; }
.dz-sub { color: var(--ink-600); font-size: .92rem; margin-bottom: 18px; }
.dz-hint { color: var(--ink-400); font-size: .8rem; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 12px 22px; font-weight: 700; font-size: .97rem;
  border: 1px solid transparent; transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: 0 6px 16px rgba(15,118,110,.28); }
.btn-primary:hover { background: var(--teal-600); }
.btn-primary:disabled { background: var(--ink-400); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--teal-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal-600); }
.btn-text { background: none; color: var(--ink-600); }
.btn-text:hover { color: var(--teal-700); }
.dz-btn { min-width: 210px; }

/* ---------- Progress ---------- */
.progress-wrap { padding: 30px 6px; text-align: center; }
.progress-label { font-weight: 600; color: var(--ink-600); margin-bottom: 14px; }
.progress-bar { height: 10px; border-radius: 99px; background: #e6fffa; overflow: hidden; }
.progress-fill {
  height: 100%; width: 5%; border-radius: 99px;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-300));
  transition: width .3s ease;
}
.progress-fill.indeterminate { animation: slide 1.2s ease-in-out infinite; width: 38% !important; }
@keyframes slide { 0% { margin-left: 0 } 50% { margin-left: 62% } 100% { margin-left: 0 } }

/* ---------- Compare / result ---------- */
.result-wrap { padding-top: 6px; }
.compare {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); user-select: none; touch-action: none;
  min-height: 220px;
}
.compare-bg {
  position: absolute; inset: 0;
  background-image: conic-gradient(#e2e8f0 0 25%, #fff 0 50%, #e2e8f0 0 75%, #fff 0);
  background-size: 22px 22px;
}
.compare-bg.has-bg { background: none center/cover no-repeat; }
.compare-img { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.compare-clip {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  width: 50%; background: #fff;
  border-right: 2px solid #fff;
  box-shadow: 4px 0 12px rgba(0,0,0,.12);
}
.compare-clip .compare-img { width: 100vw; max-width: none; }
.compare-handle {
  position: absolute; top: 0; bottom: 0; z-index: 3; width: 0;
  left: 50%; cursor: ew-resize;
}
.compare-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--teal-700); box-shadow: 0 4px 12px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.compare-handle span::before { content: "◀ ▶"; color: #fff; font-size: .68rem; letter-spacing: 1px; }
.compare-tag {
  position: absolute; top: 12px; z-index: 4; padding: 3px 11px; border-radius: 99px;
  font-size: .74rem; font-weight: 700; color: #fff; background: rgba(15,23,42,.65);
}
.tag-before { left: 12px; }
.tag-after { right: 12px; background: var(--teal-700); }

/* ---------- Background panel ---------- */
.bg-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.bg-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink-600);
  padding: 8px 16px; border-radius: 99px; font-size: .88rem; font-weight: 600;
}
.bg-tab.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.bg-options { margin-top: 12px; }
.bg-opt-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px; border-radius: 9px; border: 2px solid rgba(0,0,0,.08);
  cursor: pointer; padding: 0;
}
.swatch.active { border-color: var(--teal-700); box-shadow: 0 0 0 2px var(--teal-300); }
.color-pick { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-600); cursor: pointer; }
.color-pick input { width: 34px; height: 34px; border: none; background: none; padding: 0; cursor: pointer; }
.range-label { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--ink-600); }
.range-label input { accent-color: var(--teal-700); width: 180px; }

.action-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Batch ---------- */
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.batch-title { font-size: 1.15rem; }
.batch-actions { display: flex; gap: 10px; }
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.batch-item {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
}
.batch-thumb {
  aspect-ratio: 1; background-image: conic-gradient(#e2e8f0 0 25%, #fff 0 50%, #e2e8f0 0 75%, #fff 0);
  background-size: 18px 18px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.batch-thumb img { width: 100%; height: 100%; object-fit: contain; }
.batch-meta { padding: 8px 10px; font-size: .78rem; color: var(--ink-600); }
.batch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-900); }
.batch-status { margin-top: 2px; }
.batch-status.ok { color: var(--teal-700); font-weight: 700; }
.batch-status.err { color: var(--danger); }
.batch-dl { margin: 0 10px 10px; font-size: .8rem; padding: 6px 10px; }
.batch-spinner {
  width: 26px; height: 26px; border: 3px solid #ccfbf1; border-top-color: var(--teal-700);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.privacy-note {
  margin-top: 22px; color: var(--teal-900); font-size: .9rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--ink-600); margin-bottom: 44px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 26px 22px; transition: transform .18s, box-shadow .2s;
}
.section-alt .feature-card { background: var(--bg); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 1.7rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 7px; }
.feature-card p { color: var(--ink-600); font-size: .92rem; }

.steps { display: flex; align-items: stretch; justify-content: center; gap: 18px; }
.step {
  flex: 1; max-width: 260px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 15px; padding: 26px 20px; text-align: center;
}
.step-num {
  width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--teal-700); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--ink-600); font-size: .9rem; }
.step-arrow { align-self: center; color: var(--teal-300); font-size: 1.6rem; font-weight: 800; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative;
}
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  color: var(--teal-700); font-size: 1.3rem; font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--ink-600); padding: 0 0 16px; font-size: .94rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: #cbd5e1; margin-top: 40px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-top: 40px; padding-bottom: 26px; flex-wrap: wrap;
}
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: .86rem; color: var(--ink-400); margin-top: 6px; max-width: 320px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: var(--teal-300); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #1e293b; padding-top: 18px; padding-bottom: 22px;
  font-size: .8rem; color: var(--ink-400);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink-900); color: #fff; padding: 12px 22px; border-radius: 11px;
  font-size: .9rem; box-shadow: var(--shadow-lg); z-index: 100; max-width: 90vw;
}
.toast.err { background: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .header-inner { height: 56px; }
  .header-nav { gap: 13px; }
  .header-nav a { display: none; }
  .hero { padding: 40px 0 52px; }
  .tool-card { padding: 16px; }
  .dropzone { padding: 30px 14px; }
  .dz-btn { width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 100%; width: 100%; }
  .step-arrow { transform: rotate(90deg); }
  .action-row .btn { flex: 1 1 100%; }
  .batch-actions { width: 100%; }
  .batch-actions .btn-primary { flex: 1; }
  .section { padding: 52px 0; }
  .footer-inner { flex-direction: column; }
}
