/* ===== 格式转换工具箱 v1.4 ===== */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1b2432;
  --ink-2: #5b6b82;
  --ink-3: #8c9aad;
  --line: #e4e9f2;
  --brand: #2563eb;
  --brand-2: #4f46e5;
  --brand-soft: #eef3ff;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部 ---------- */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  padding: 40px 0 52px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(560px 240px at 15% 0%, rgba(255,255,255,.20), transparent 70%),
    radial-gradient(460px 220px at 88% 12%, rgba(255,255,255,.14), transparent 70%);
  pointer-events: none;
}
.hero h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: .3px; font-weight: 700; }
.hero p { margin: 0; opacity: .92; font-size: 15px; max-width: 720px; }
.hero .badges { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .badges span {
  font-size: 12.5px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
}

/* ---------- 主体：左侧栏目 + 右侧内容 ---------- */
main { margin-top: 22px; position: relative; z-index: 2; padding-bottom: 40px; }

.layout {
  display: flex; gap: 18px; align-items: flex-start;
}

/* 左侧栏目列 */
.side {
  width: 200px; flex: none; position: sticky; top: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 4px;
}
.side-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; background: transparent; cursor: pointer;
  padding: 11px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-2); transition: .16s; text-align: left; font-family: inherit;
}
.side-item:hover { background: #f5f8fe; color: var(--brand); }
.side-item.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.side-item .si-ico { font-size: 17px; flex: none; }
.side-item .si-name { flex: 1; }
.side-item .si-n {
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  background: #f1f4f9; border-radius: 999px; padding: 1px 8px; flex: none;
}
.side-item.on .si-n { background: rgba(255,255,255,.22); color: #fff; }
.side-tip {
  margin-top: 8px; padding: 10px 12px; font-size: 11.5px; color: var(--ink-3);
  background: #f7f9fc; border-radius: 10px; line-height: 1.8;
}

/* 右侧内容 */
.content { flex: 1; min-width: 0; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; cursor: pointer; transition: .18s; position: relative;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.card:hover { border-color: #c7d7fe; transform: translateY(-2px); box-shadow: var(--shadow); }
.card .ico {
  font-size: 22px; width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; }
.card p { margin: 0; font-size: 12.8px; color: var(--ink-3); line-height: 1.6; }
.card .tag {
  position: absolute; top: 14px; right: 14px; font-size: 11px;
  color: var(--brand); background: var(--brand-soft);
  padding: 2px 8px; border-radius: 999px;
}
.card .cat-chip {
  position: absolute; bottom: 14px; right: 14px; font-size: 11px;
  color: var(--ink-3); border: 1px solid var(--line);
  padding: 1px 8px; border-radius: 999px; background: #fafbfe;
}

/* ---------- 工作区 ---------- */
.work {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.work.hidden { display: none; }
.work-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 14px;
}
.work-head .ico { font-size: 21px; }
.work-head .wt { min-width: 0; }
.work-head h2 { margin: 0 0 3px; font-size: 17px; }
.work-head p { margin: 0; font-size: 12.8px; color: var(--ink-3); }
.work-head .share {
  margin-left: auto; flex: none; border: 1px solid #c7d7fe; background: var(--brand-soft);
  color: var(--brand); width: auto; height: 32px; padding: 0 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: .16s;
}
.work-head .share:hover { filter: brightness(1.03); box-shadow: 0 3px 10px -4px rgba(37,99,235,.5); }
.work-body { padding: 20px 22px 24px; }

.drop {
  border: 2px dashed #cbd6e8; border-radius: 12px; padding: 30px 18px;
  text-align: center; cursor: pointer; transition: .18s; background: #fbfcfe;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .big { font-size: 30px; }
.drop .t1 { font-weight: 600; margin: 8px 0 4px; font-size: 14.5px; }
.drop .t2 { font-size: 12.5px; color: var(--ink-3); }

.filelist { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.fileitem {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.fileitem .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileitem .sz { color: var(--ink-3); font-size: 12px; }
.fileitem .rm {
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.fileitem .rm:hover { color: var(--err); }

.opts { margin-top: 18px; display: grid; gap: 14px;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.opt label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.opt select, .opt input[type=text], .opt input[type=number], .opt textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; background: #fff; color: var(--ink); outline: none;
  font-family: inherit;
}
.opt select:focus, .opt input:focus, .opt textarea:focus { border-color: var(--brand); }
.opt textarea { min-height: 82px; resize: vertical; }
.opt .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.opt input[type=color] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }

.actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 10px; padding: 11px 26px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: .18s; font-family: inherit;
}
.btn-main { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
            box-shadow: 0 6px 16px -8px rgba(37,99,235,.9); }
.btn-main:hover { filter: brightness(1.06); }
.btn-main:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #f1f4f9; color: var(--ink-2); }
.btn-ghost:hover { background: #e7ecf5; }

.status { font-size: 13px; color: var(--ink-2); }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }

.bar { width: 100%; height: 6px; background: #eef2f8; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }

.results { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 18px; }
.results h4 { margin: 0 0 12px; font-size: 14.5px; }
.rlist { display: grid; gap: 10px; }
.ritem {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 11px;
}
.ritem .th { width: 46px; height: 46px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
             display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.ritem .th img { max-width: 100%; max-height: 100%; }
.ritem .meta { flex: 1; min-width: 0; }
.ritem .meta .n { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ritem .meta .s { font-size: 12px; color: var(--ink-3); }
.ritem .dl {
  background: var(--brand); color: #fff; border: 0; border-radius: 9px;
  padding: 8px 18px; font-size: 13px; cursor: pointer; font-weight: 600; flex: none;
}
.ritem .dl:hover { filter: brightness(1.08); }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #c7d7fe;
        border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite;
        vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }

footer {
  text-align: center; color: var(--ink-3); font-size: 12.5px;
  padding: 26px 20px 40px;
}

.note {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 12.6px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
}

/* ---------- 功能界面下方的更多推荐 ---------- */
.rec {
  margin-top: 24px; padding: 16px 16px 14px;
  background: #f8fafd; border: 1px solid var(--line); border-radius: 12px;
}
.rec h4 { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); font-weight: 650; }
.rec-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.rec-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: .16s; color: var(--ink);
}
.rec-item:hover {
  border-color: #c7d7fe; background: var(--brand-soft);
  transform: translateY(-1px); box-shadow: 0 4px 12px -6px rgba(37,99,235,.45);
}
.rec-item .ri-ico {
  font-size: 15px; width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); border-radius: 8px;
}
.rec-item:hover .ri-ico { background: #fff; }
.rec-item .ri-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side {
    position: static; width: 100%; flex-direction: row; overflow-x: auto;
    padding: 6px; gap: 2px;
  }
  .side-item { width: auto; flex: none; padding: 9px 13px; }
  .side-item .si-n { display: none; }
  .side-tip { display: none; }
  .hero { padding: 32px 0 66px; }
  .hero h1 { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .work-body, .work-head { padding-left: 16px; padding-right: 16px; }
  .ritem { flex-wrap: wrap; }
}
