/* ============================================================
   多功能工具站 · 设计系统
   渐变 / 高光 / 精细阴影 / 过渡动画
   ============================================================ */
:root {
  --bg: #0b1020;
  --bg2: #0f162e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border2: rgba(255, 255, 255, 0.18);
  --ink: #eef2ff;
  --ink2: #c7ccdd;
  --muted: #8b93ad;
  --brand: #6366f1;
  --brand2: #22d3ee;
  --brand3: #a855f7;
  --accent: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.14));
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(255,255,255,.06), 0 20px 50px rgba(99,102,241,.30);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: .35s;
  --font-sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at -10% -12%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(1100px 700px at 112% 0%, rgba(34,211,238,.16), transparent 60%),
    radial-gradient(1000px 800px at 40% 120%, rgba(168,85,247,.18), transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 细腻网格叠层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 42px);
  mask-image: radial-gradient(900px 600px at 50% 20%, #000 0%, transparent 80%);
  opacity: .6;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
  white-space: nowrap;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--glow); background-size: 160% 160%; }
.btn-primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 26px 60px rgba(99,102,241,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface2); color: var(--ink); border: 1px solid var(--border2); }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(11,16,32,.62); border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-size: 19px; box-shadow: var(--glow);
}
.brand b { font-size: 18px; letter-spacing: .5px; }
.brand small { display: block; font-size: 11px; letter-spacing: 3px; color: var(--muted); font-weight: 600; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink2); font-weight: 600; font-size: 15px; transition: color var(--dur); }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; color: var(--ink); font-size: 22px; padding: 6px; }
.mobile-menu { display: none; }

/* ============ Hero ============ */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 1.5px;
  font-weight: 700; color: var(--brand2); padding: 7px 16px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--border2); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.hero p { color: var(--ink2); font-size: 18px; margin: 20px 0 32px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border2); aspect-ratio: 4/3.4; object-fit: cover;
}
.hero-visual::after {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%); filter: blur(30px); z-index: -1;
}

/* ============ 区块标题 ============ */
section { padding: 72px 0; position: relative; z-index: 1; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.sec-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 2px;
  font-weight: 700; color: var(--brand3); padding: 6px 15px; border-radius: 999px;
  background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.24); margin-bottom: 16px;
}
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; }
.sec-head p { color: var(--ink2); margin-top: 12px; font-size: 16px; }

/* ============ 工具卡片矩阵 ============ */
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 26px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
}
.tool-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity var(--dur);
  pointer-events: none;
}
.tool-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--border2); }
.tool-card:hover::before { opacity: 1; }
.tool-card.is-soon { opacity: .72; }
.tool-thumb {
  height: 132px; border-radius: var(--r-md); overflow: hidden; position: relative;
  background: var(--grad-soft);
}
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tool-card:hover .tool-thumb img { transform: scale(1.08); }
.tool-icon {
  position: absolute; left: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--grad-brand);
  box-shadow: var(--shadow-md); z-index: 2;
}
.tool-body { flex: 1; }
.tool-body h3 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.tool-body p { color: var(--ink2); font-size: 14.5px; margin-top: 8px; }
.tool-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(52,211,153,.15); color: var(--ok); border: 1px solid rgba(52,211,153,.3);
}
.tool-badge.soon { background: rgba(251,191,36,.14); color: var(--warn); border-color: rgba(251,191,36,.3); }
.tool-foot { display: flex; align-items: center; justify-content: space-between; }
/* 整卡可点击：拉伸链接覆盖整张卡片 */
.tool-card > .card-cover { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.tool-link { position: relative; z-index: 4; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--brand2); font-size: 15px; }
.tool-link i { transition: transform var(--dur); }
.tool-card:hover .tool-link i { transform: translateX(4px); }

/* ============ 页脚 ============ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }

/* 进入动画 */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: rise .6s var(--ease) both; }

/* ============ 响应式 ============ */
@media (max-width: 1023px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 560px; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav .nav-cta { display: none; }
  .mobile-menu {
    display: none; flex-direction: column; gap: 4px; padding: 12px 24px 20px;
    background: rgba(11,16,32,.96); border-bottom: 1px solid var(--border);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { padding: 12px 8px; color: var(--ink2); font-weight: 600; border-radius: 10px; }
  .mobile-menu a:hover { background: var(--surface2); color: var(--ink); }
  .mobile-menu .btn { margin-top: 8px; }
  .tools-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
  .wrap { padding: 0 18px; }
}

/* ============================================================
   工具页 · 抖音去水印
   ============================================================ */
.tool-page { padding: 56px 0 80px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); font-weight: 600; margin-bottom: 22px; transition: color var(--dur); }
.back-link:hover { color: var(--ink); }
.tool-hero { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.tool-hero .tool-icon-lg {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 30px; color: #fff; background: var(--grad-brand); box-shadow: var(--glow);
}
.tool-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.tool-hero p { color: var(--ink2); margin-top: 12px; font-size: 16px; }

/* 步骤指示 */
.steps { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 8px; }
.step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.step b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface2); color: var(--ink2); }
.step.active { color: var(--ink); border-color: var(--border2); }
.step.active b { background: var(--grad-brand); color: #fff; }

/* 面板 */
.panel {
  max-width: 760px; margin: 0 auto; padding: 30px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.field-label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.input-row { display: flex; gap: 12px; }
.input-row textarea {
  flex: 1; min-width: 0; max-width: 100%; padding: 14px 16px; border-radius: var(--r-md); resize: vertical; min-height: 58px;
  background: rgba(0,0,0,.25); border: 1px solid var(--border2); color: var(--ink); font-size: 15px;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.input-row textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.input-row textarea::placeholder { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.msg { margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; display: none; }
.msg.show { display: block; animation: rise .3s var(--ease) both; }
.msg.error { background: rgba(251,113,133,.14); color: var(--danger); border: 1px solid rgba(251,113,133,.3); }
.msg.warn { background: rgba(251,191,36,.12); color: var(--warn); border: 1px solid rgba(251,191,36,.28); }

/* 加载态 */
.loading { display: none; align-items: center; gap: 12px; justify-content: center; padding: 30px; color: var(--ink2); }
.loading.show { display: flex; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border2); border-top-color: var(--brand2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果区 */
.result { display: none; margin-top: 26px; }
.result.show { display: block; animation: rise .45s var(--ease) both; }
.result-card { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.video-wrap { position: relative; width: 100%; }
.result-video { width: 100%; display: block; border-radius: var(--r-md); background: #000; border: 1px solid var(--border2); box-shadow: var(--shadow-md); aspect-ratio: 9/16; object-fit: contain; }
.video-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; padding-left: 4px; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: transform .18s var(--ease), background .18s var(--ease), opacity .25s var(--ease); }
.video-play:hover { background: var(--brand, #6c5ce7); transform: scale(1.08); }
.video-play.hide { opacity: 0; pointer-events: none; transform: scale(.85); }
.result-meta h3 { font-size: 20px; font-weight: 800; }
.result-meta .author { color: var(--brand2); font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ============================================================
   通用工具组件（图片压缩 / 二维码 / JSON）
   ============================================================ */
/* 拖拽上传区 */
.dropzone {
  border: 2px dashed var(--border2); border-radius: var(--r-md); padding: 40px 24px;
  text-align: center; color: var(--ink2); cursor: pointer; background: var(--surface);
  transition: border-color var(--dur), background var(--dur), transform var(--dur);
}
.dropzone:hover { border-color: var(--brand); background: var(--surface2); }
.dropzone.dragover { border-color: var(--brand2); background: rgba(34,211,238,.08); transform: scale(1.01); }
.dropzone .dz-icon { font-size: 40px; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dropzone h4 { font-size: 17px; font-weight: 700; margin: 12px 0 6px; color: var(--ink); }
.dropzone p { font-size: 13px; color: var(--muted); }

/* 参数控制行 */
.controls { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; }
.range-row { flex: 1; min-width: 220px; }
.range-row label { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.range-row label b { color: var(--brand2); font-weight: 800; }
.range-row input[type="range"] { width: 100%; accent-color: var(--brand); height: 6px; cursor: pointer; }
.select { display: inline-flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 14px; }
.select select {
  background: var(--surface2); color: var(--ink); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; cursor: pointer; min-width: 130px;
}
.select select:focus { outline: none; border-color: var(--brand); }
.select select option { background: #ffffff; color: #333333; }

/* 体积对比 */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 8px; }
.compare .box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; text-align: center; }
.compare .box small { color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.compare .box b { display: block; font-size: 22px; font-weight: 800; margin-top: 6px; }
.compare .arrow { color: var(--brand2); font-size: 22px; }
.compare .box.saved b { color: var(--ok); }

/* 预览图 */
.preview-img { max-width: 100%; max-height: 320px; margin: 0 auto; border-radius: var(--r-md); border: 1px solid var(--border2); box-shadow: var(--shadow-md); }

/* 代码 / 文本区 */
.code-area {
  width: 100%; min-height: 220px; resize: vertical; background: #0a0e1c; color: var(--ink);
  border: 1px solid var(--border2); border-radius: var(--r-md); padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13.5px; line-height: 1.6;
}

/* JSON 工具页：放宽面板并最大化编辑区 */
.json-tool .panel { max-width: 1120px; }
.json-tool .editor-col { display: flex; flex-direction: column; }
.json-tool .code-area {
  min-height: clamp(360px, 58vh, 680px); height: clamp(360px, 58vh, 680px); flex: 1;
}
.code-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.editor-col label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }

/* ============ Markdown 预览工具 ============ */
.md-tool .panel { max-width: 1120px; }
.md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.md-tool .code-area,
.md-tool .md-preview {
  min-height: clamp(360px, 58vh, 680px); height: clamp(360px, 58vh, 680px);
}
.md-preview {
  overflow: auto; background: #0a0e1c; border: 1px solid var(--border2);
  border-radius: var(--r-md); padding: 18px 22px; color: var(--ink); line-height: 1.7;
  min-width: 0; overflow-wrap: break-word; word-break: break-word;
}
.md-grid > .editor-col, .editor-grid > .editor-col { min-width: 0; }
.paste-area:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.paste-area:empty::before { content: attr(data-placeholder); color: var(--ink2); }
.md-preview h1, .md-preview h2, .md-preview h3 { font-weight: 800; margin: 18px 0 10px; line-height: 1.3; }
.md-preview h1 { font-size: 26px; border-bottom: 1px solid var(--border2); padding-bottom: 8px; }
.md-preview h2 { font-size: 21px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.md-preview h3 { font-size: 18px; }
.md-preview p { margin: 10px 0; }
.md-preview ul, .md-preview ol { margin: 10px 0 10px 24px; }
.md-preview ul { list-style: disc; }
.md-preview ol { list-style: decimal; }
.md-preview li { margin: 4px 0; }
.md-preview a { color: var(--brand2); text-decoration: underline; }
.md-preview code {
  background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px;
  font-family: Consolas, Menlo, monospace; font-size: 13px;
}
.md-preview pre { background: #06090f; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; overflow: auto; margin: 12px 0; }
.md-preview pre code { background: none; padding: 0; font-size: 13px; }
.md-preview blockquote { border-left: 3px solid var(--brand); padding: 4px 16px; margin: 12px 0; color: var(--ink2); background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.md-preview table { border-collapse: collapse; margin: 12px 0; width: 100%; }
.md-preview th, .md-preview td { border: 1px solid var(--border2); padding: 8px 12px; text-align: left; }
.md-preview th { background: var(--surface2); font-weight: 700; }
.md-preview img { max-width: 100%; border-radius: var(--r-sm); margin: 8px 0; }
.md-preview hr { border: none; border-top: 1px solid var(--border2); margin: 18px 0; }

/* 二维码画布容器 */
.qr-canvas {
  display: inline-grid; place-items: center; background: #fff; padding: 18px;
  border-radius: var(--r-md); box-shadow: var(--shadow-md); min-width: 160px; min-height: 160px;
}
.qr-stage { text-align: center; margin-top: 26px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ============ 图片裁剪缩放工具 ============ */
.crop-wrap { text-align: center; margin: 8px 0 0; }
.crop-stage {
  position: relative; display: inline-block; max-width: 100%;
  line-height: 0; user-select: none; touch-action: none;
  background: repeating-conic-gradient(#1b2236 0% 25%, #141a2c 0% 50%) 50% / 20px 20px;
}
.crop-stage img { max-width: 100%; max-height: 420px; display: block; }
.crop-box {
  position: absolute; border: 2px solid var(--brand2); box-sizing: border-box;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move;
}
.crop-handle {
  position: absolute; width: 14px; height: 14px; background: var(--brand2);
  border: 2px solid #fff; border-radius: 50%;
}
.crop-handle[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.ratio-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ratio-label { font-weight: 700; font-size: 14px; margin-right: 4px; }
.ratio-btn {
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--surface2); color: var(--ink2); border: 1px solid var(--border2);
  transition: all var(--dur);
}
.ratio-btn:hover { color: var(--ink); border-color: var(--brand); }
.ratio-btn.active { background: var(--grad-brand); color: #fff; border-color: transparent; }
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group label { font-weight: 700; font-size: 14px; }
.num-input {
  width: 110px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface2); border: 1px solid var(--border2); color: var(--ink); font-size: 15px;
}
.num-input:focus { outline: none; border-color: var(--brand); }
.color-input { width: 60px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface2); cursor: pointer; }

/* ============ PDF 处理：文件列表 ============ */
.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.file-item .file-name { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .file-name i { color: var(--danger); margin-right: 6px; }
.file-item .file-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.file-ctrl { display: flex; gap: 4px; }
.file-ctrl button {
  width: 32px; height: 32px; border-radius: 8px; color: var(--ink2);
  background: var(--surface2); border: 1px solid var(--border2); transition: all var(--dur);
}
.file-ctrl button:hover { color: var(--ink); border-color: var(--brand); }

/* ============================================================
   通用文本输入 / 时间戳工具页
   ============================================================ */
.text-input {
  flex: 1; padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(0,0,0,.25); border: 1px solid var(--border2); color: var(--ink); font-size: 15px;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.text-input::placeholder { color: var(--muted); }

.now-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
.now-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; text-align: center; }
.now-item small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .5px; }
.now-item b { display: block; font-size: 17px; font-weight: 800; margin-top: 6px; color: var(--brand2); word-break: break-all; }

.conv-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.ts-result { display: none; margin-top: 16px; }
.ts-result.show { display: block; animation: rise .35s var(--ease) both; }
.ts-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); margin-top: 8px; }
.ts-row span { color: var(--muted); font-size: 14px; }
.ts-row b { font-size: 16px; font-weight: 800; word-break: break-all; }

@media (max-width: 767px) {
  .input-row { flex-direction: column; }
  .now-bar { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-video { max-width: 320px; margin: 0 auto; }
  .panel { padding: 22px; }
  .editor-grid { grid-template-columns: 1fr; }
  .md-grid { grid-template-columns: 1fr; }
  .md-tool .code-area, .md-tool .md-preview { min-height: clamp(220px, 40vh, 360px); height: clamp(220px, 40vh, 360px); }
  .json-tool .code-area { min-height: clamp(220px, 40vh, 360px); height: clamp(220px, 40vh, 360px); }
  .compare { grid-template-columns: 1fr; }
  .compare .arrow { transform: rotate(90deg); }
  .controls { flex-direction: column; gap: 16px; }
}
