/* ================= 快工具 KuaiTools ================= */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #12162b;
  --muted: #5c6378;
  --line: #e6e8f0;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef0fe;
  --success: #0a9d6c;
  --success-soft: #e7f7f1;
  --warn: #c2410c;
  --warn-soft: #fef3ec;
  --danger: #dc2626;
  --gold: #b45309;
  --shadow: 0 1px 2px rgba(18, 22, 43, .05), 0 8px 24px rgba(18, 22, 43, .06);
  --shadow-lg: 0 12px 40px rgba(18, 22, 43, .14);
  --radius: 14px;
  --grad: linear-gradient(135deg, #4f46e5, #7c3aed);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, .35);
}
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.license-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted);
}
.license-badge.pro { background: #fff8eb; border-color: #f5d98f; color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  padding: 10px 20px; transition: .18s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(79, 70, 229, .4); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #c9cddd; background: #fafbfd; }
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 4px 14px rgba(217, 119, 6, .32); }
.btn-gold:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

/* ---------------- Hero ---------------- */
.hero { padding: 84px 0 64px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(600px 300px at 20% 30%, rgba(79, 70, 229, .10), transparent 65%),
    radial-gradient(600px 300px at 80% 30%, rgba(124, 58, 237, .10), transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--success-soft); color: var(--success);
  border: 1px solid #bfe8d8; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; padding: 7px 16px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; line-height: 1.18; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { max-width: 640px; margin: 20px auto 32px; color: var(--muted); font-size: 17.5px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 36px; color: var(--muted); font-size: 14px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------------- 区块标题 ---------------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin-top: 10px; }

/* ---------------- 工具卡片 ---------------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; cursor: pointer; transition: .18s; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; text-align: left;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d5d9ea; }
.tool-card .icon {
  width: 46px; height: 46px; border-radius: 12px; font-size: 22px;
  display: grid; place-items: center; background: var(--brand-soft);
}
.tool-card h3 { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tool-card p { color: var(--muted); font-size: 13.5px; flex: 1; }
.tool-card .go { color: var(--brand); font-size: 13.5px; font-weight: 600; }
.tag {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: .02em;
}
.tag-free { background: var(--success-soft); color: var(--success); }
.tag-pro { background: #fff3d6; color: var(--gold); }

/* ---------------- 工作区 ---------------- */
.workspace { display: none; }
.workspace.active { display: block; }
.ws-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-top: 28px;
}
.ws-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.ws-top h2 { font-size: 22px; font-weight: 800; flex: 1; }
.ws-desc { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.dropzone {
  border: 2px dashed #c9cee3; border-radius: 12px; background: #fafbfe;
  padding: 44px 20px; text-align: center; transition: .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon { font-size: 34px; margin-bottom: 8px; }
.dropzone p { color: var(--muted); font-size: 14.5px; }
.dropzone p strong { color: var(--brand); }
.dz-hint { font-size: 12.5px; color: #9aa1b5; margin-top: 6px; }

.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  font-size: 14px;
}
.file-row .f-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-size { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.file-row button {
  border: none; background: none; font-size: 15px; color: var(--muted); padding: 2px 6px; border-radius: 6px;
}
.file-row button:hover { background: #eef0f6; color: var(--ink); }

.options { margin-top: 22px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.opt label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.opt .opt-hint { font-size: 12px; color: #9aa1b5; margin-top: 5px; }
.opt input[type="text"], .opt select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
}
.opt input[type="text"]:focus, .opt select:focus { outline: 2px solid rgba(79, 70, 229, .25); border-color: var(--brand); }
.opt-inline { display: flex; align-items: center; gap: 10px; }
.opt-inline input[type="range"] { flex: 1; accent-color: var(--brand); }
.opt-inline .range-val { min-width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.opt-full { grid-column: 1 / -1; }

.run-bar { margin-top: 26px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.run-status { color: var(--muted); font-size: 13.5px; }

.progress { height: 6px; background: #eceef5; border-radius: 99px; overflow: hidden; margin-top: 18px; display: none; }
.progress.active { display: block; }
.progress-bar { height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .25s; }

/* ---------------- 结果区 ---------------- */
.results { margin-top: 26px; display: none; }
.results.active { display: block; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head h3 { font-size: 16px; }
.result-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--success-soft); border: 1px solid #c9ead9;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 8px;
}
.result-row .r-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row .r-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------------- 定价 ---------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; max-width: 780px; margin: 0 auto; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 28px; box-shadow: var(--shadow); position: relative;
}
.price-card.hot { border: 2px solid var(--brand); box-shadow: 0 16px 44px rgba(79, 70, 229, .16); }
.price-card .plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 18px; font-weight: 800; }
.price-card .price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.price-card .price .num { font-size: 42px; font-weight: 800; letter-spacing: -.02em; }
.price-card .price .per { color: var(--muted); font-size: 14px; }
.price-card .price .was { color: #a3a9bc; text-decoration: line-through; font-size: 16px; }
.price-card .bill-note { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 18px 0 26px; }
.price-card ul li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink); }
.price-card ul li::before { content: "✓"; color: var(--success); font-weight: 800; }
.price-card ul li.no { color: #a3a9bc; }
.price-card ul li.no::before { content: "—"; color: #c5cad8; }
.price-card .btn { width: 100%; }

/* ---------------- FAQ ---------------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 14.5px; margin-top: 12px; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 34px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; align-items: center; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 38, .5); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 30px;
  position: relative; animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: var(--muted); line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.modal .modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.pay-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.pay-price .num { font-size: 40px; font-weight: 800; color: var(--gold); }
.pay-price .was { color: #a3a9bc; text-decoration: line-through; }
.pay-qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.pay-qr { border: 1.5px dashed #d9dde9; border-radius: 12px; padding: 16px; text-align: center; }
.pay-qr .qr-box {
  width: 132px; height: 132px; margin: 0 auto 10px; border-radius: 10px;
  background: repeating-conic-gradient(#e8eaf2 0 25%, #f6f7fb 0 50%) 0 0 / 18px 18px;
  display: grid; place-items: center; font-size: 11.5px; color: #8b91a7; text-align: center; padding: 8px;
}
.pay-qr .qr-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pay-qr p { font-size: 13.5px; font-weight: 600; }
.pay-tip { background: var(--warn-soft); border: 1px solid #f3dcc8; color: var(--warn); font-size: 13px; border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; }

.activate-row { display: flex; gap: 10px; margin-top: 6px; }
.activate-row input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase;
}
.activate-row input:focus { outline: 2px solid rgba(79, 70, 229, .25); border-color: var(--brand); }
.trial-row { margin-top: 16px; text-align: center; }
.trial-row button { background: none; border: none; color: var(--brand); font-size: 13.5px; font-weight: 600; }
.trial-row button:hover { text-decoration: underline; }
.pro-done { text-align: center; padding: 14px 0 6px; }
.pro-done .big { font-size: 44px; }
.pro-done h4 { font-size: 18px; margin: 8px 0 4px; }
.pro-done p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: #171b30; color: #fff; font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: 10px; box-shadow: var(--shadow-lg);
  animation: rise .22s ease; max-width: 90vw;
}
.toast.ok { background: #0c7a55; }
.toast.err { background: #b91c1c; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------------- 导航用户区 ---------------- */
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.user-chip .nick { font-weight: 700; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .plan { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.user-chip .plan.free { background: #fff3d6; color: var(--gold); }
.user-chip .plan.pro { background: var(--success-soft); color: var(--success); }
.user-chip a { font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------------- 专业版用户免打扰：隐藏一切引导购买内容 ---------------- */
body.is-pro #pricing,
body.is-pro .pro-cta { display: none !important; }

/* ---------------- 扫码配对 ---------------- */
.pair-qr-box { text-align: center; padding: 8px 0 4px; }
.pair-qr-box img { width: 220px; height: 220px; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 0 auto; background: #fff; }
.pair-status { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pair-status.ok { color: var(--success); }
.pair-status.scanned { color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .license-badge { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .pay-qrs { grid-template-columns: 1fr; }
  .ws-card { padding: 20px 16px; }
}
