:root {
  --brand: #0ea5b7;
  --brand-600: #0891a3;
  --brand-700: #0c7d8c;
  --brand-light: #e6fbfd;
  --brand-dark: #064e57;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f6fafb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(14, 165, 183, 0.12);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --maxw: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-700)); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-2); font-size: 15px; }
.nav-links a:hover { color: var(--brand-700); text-decoration: none; }
.lang-select { font-family: var(--font); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: #fff; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.lang-select:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; background: radial-gradient(1200px 500px at 80% -10%, var(--brand-light), transparent 60%), var(--bg); }
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--brand-600); }
.hero p.lead { font-size: 18px; color: var(--ink-3); max-width: 620px; margin: 0 auto 26px; }
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.badge { font-size: 13px; color: var(--brand-700); background: var(--brand-light); border: 1px solid #c6eef3; padding: 6px 14px; border-radius: 999px; }

/* ---------- Dropzone ---------- */
.converter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin: 0 auto; max-width: 760px; }
.dropzone { border: 2px dashed #b9e6ec; border-radius: var(--radius); background: var(--bg-soft); padding: 40px 20px; text-align: center; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-light); }
.dropzone .icon { font-size: 40px; }
.dropzone h3 { margin: 10px 0 4px; font-size: 18px; }
.dropzone p { margin: 0; color: var(--ink-3); font-size: 14px; }
#fileInput { display: none; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.opt label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; font-weight: 600; }
.opt select, .opt input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font); font-size: 14px; background: #fff; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.btn { border: none; border-radius: 999px; padding: 13px 28px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: .15s; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.file-meta { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

/* ---------- Progress ---------- */
.progress-wrap { margin-top: 20px; display: none; }
.progress-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-700)); transition: width .2s; }
.progress-text { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* ---------- Results ---------- */
.results { margin-top: 26px; display: none; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.thumb { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.thumb img { width: 100%; display: block; background: #f1f5f9; }
.thumb .thumb-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; color: var(--ink-3); }
.thumb .thumb-foot a { font-weight: 700; }

/* ---------- Sections ---------- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--bg-soft); }
h2.section-title { font-size: clamp(24px, 3.5vw, 34px); text-align: center; margin: 0 0 12px; letter-spacing: -0.01em; }
p.section-sub { text-align: center; color: var(--ink-3); max-width: 640px; margin: 0 auto 36px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.feature .ficon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-light); color: var(--brand-700); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--ink-3); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 22px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.step h3 { margin: 6px 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--ink-3); font-size: 14px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 12px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-700); font-size: 22px; font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }

/* Use cases */
.usecases { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.uc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: #fff; }
.uc h3 { margin: 0 0 6px; font-size: 16px; }
.uc p { margin: 0; color: var(--ink-3); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: #cbeef3; padding: 48px 0 28px; margin-top: 20px; }
.site-footer a { color: #a9e3ec; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-about p { font-size: 14px; color: #9fd9e0; margin: 0 0 12px; }
.footer-links li { list-style: none; margin-bottom: 9px; font-size: 14px; }
.footer-links ul { padding: 0; margin: 0; }
.friend-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.friend-links a { font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 20px; font-size: 13px; color: #8fc6cf; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* language notice banner */
.lang-banner { display: none; background: var(--brand-light); border-bottom: 1px solid #c6eef3; font-size: 14px; }
.lang-banner .wrap { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 20px; flex-wrap: wrap; }
.lang-banner a.btn-mini { background: var(--brand); color: #fff; padding: 5px 14px; border-radius: 999px; font-weight: 700; }
.lang-banner a.btn-mini:hover { text-decoration: none; filter: brightness(1.05); }

@media (max-width: 760px) {
  .nav-links { gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 28px; }
}
