/* image-converter 图片格式转换工具页样式(uidemo tool-image-converter v2 合体版移植, ic- 前缀沙盒)。
   工作台 = 左列[对比舞台(JS 按图比例定容器尺寸, 顶层图 left:0 锚定裁切层) + 舞台底部转换队列] + 右面板(格式/质量/底色/体积对比);
   色彩沿用原型原始调色板(已定稿视觉), 页面自包含不依赖站内 utility 类。 */
.ic-page { min-height: 100vh; background: #f6f7f9; padding: 24px 0 64px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2937; }
.ic-layout { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ic-crumb { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.ic-crumb a { color: #6b7280; text-decoration: none; }
.ic-crumb a:hover { color: #2563eb; }
.ic-crumb-sep { margin: 0 6px; color: #d1d5db; }
.ic-titlebox h1 { font-size: 26px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.ic-titlebox p { font-size: 14px; color: #6b7280; margin: 0 0 12px; line-height: 1.7; }
.ic-hero-badges { margin-left: 2px; }
.ic-hero-badges span { display: inline-block; font-size: 12px; font-weight: 600; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 7px; padding: 3px 10px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.ic-block { margin-bottom: 24px; }
.ic-block-head h2 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.ic-block-head p { font-size: 13px; color: #9ca3af; margin: 0 0 10px; }
.ic-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ic-hide { display: none !important; }

/* ---------- 工作台(左列 = 舞台 + 底部设置面板; 右列 = 转换队列(可滚动); 定高一屏内) ---------- */
.ic-workbench { display: grid; grid-template-columns: 1fr 340px; height: clamp(540px, calc(100vh - 300px), 800px); }
.ic-left { display: flex; flex-direction: column; border-right: 1px solid #e5e7eb; border-radius: 10px 0 0 10px; overflow: hidden; min-width: 0; }
.ic-stage { position: relative; flex: 1; min-height: 240px; background: repeating-conic-gradient(#f8fafc 0 25%, #fff 0 50%) 0 0/24px 24px; overflow: hidden; }
.ic-stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .15s; background: rgba(255,255,255,.6); padding: 0 16px; text-align: center; }
.ic-stage-empty:hover, .ic-stage-empty.over { background: rgba(239,246,255,.85); }
.ic-empty-icon { font-size: 40px; }
.ic-empty-main { font-size: 16px; color: #374151; }
.ic-empty-link { color: #2563eb; font-weight: 600; text-decoration: underline; }
.ic-empty-sub { font-size: 12px; color: #9ca3af; }

/* 对比视图: 容器由 JS 按图片比例定尺寸, 底图填满容器, 顶层图 left:0 锚定进裁切层 */
.ic-compare { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ic-cv-wrap { position: relative; max-width: 100%; max-height: 100%; overflow: hidden; }
.ic-cv-out { display: block; width: 100%; height: 100%; pointer-events: none; }
.ic-cv-in-clip { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; overflow: hidden; border-right: 2px solid #2563eb; }
.ic-cv-in { display: block; position: absolute; left: 0; top: 0; max-width: none; max-height: none; pointer-events: none; }
.ic-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #2563eb; cursor: ew-resize; transform: translateX(-1px); z-index: 5; }
.ic-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 2px 8px rgba(37,99,235,.45); cursor: ew-resize; user-select: none; }
.ic-tag { position: absolute; top: 10px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(17,24,39,.75); border-radius: 6px; padding: 4px 10px; z-index: 4; backdrop-filter: blur(2px); }
.ic-tag-l { left: 10px; }
.ic-tag-r { right: 10px; }

/* ---------- 设置面板(舞台下方两行工具条: 设置行=格式/质量/底色; 动作行=体积/下载/替换/文件名) ---------- */
.ic-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; padding: 10px 14px; border-top: 1px solid #e5e7eb; }
.ic-panel > .ic-p-card { border: none; border-radius: 0; padding: 0; }
.ic-panel > :nth-child(1) { order: 7; flex: 1 1 140px; min-width: 0; }
.ic-panel > :nth-child(2) { order: 1; }
.ic-panel > :nth-child(3) { order: 2; display: flex; align-items: center; gap: 8px; }
.ic-panel > :nth-child(4) { order: 3; display: flex; align-items: center; gap: 8px; }
.ic-panel > #icResult { order: 4; }
.ic-panel > .ic-dlbtn { order: 5; }
.ic-panel > .ic-swapbtn { order: 6; }
.ic-panel > :nth-child(3) .ic-p-title, .ic-panel > :nth-child(4) .ic-p-title { margin: 0; gap: 4px; justify-content: flex-start; white-space: nowrap; }
.ic-qval { color: #2563eb; font-size: 13px; }
.ic-fileinfo { font-size: 12px; line-height: 1.6; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-fileinfo b { color: #1f2937; }
.ic-fi-dim { color: #9ca3af; }
.ic-outs { display: flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
.ic-out { display: flex; align-items: center; justify-content: center; border: none; background: #f9fafb; border-radius: 0; padding: 7px 15px; cursor: pointer; transition: all .15s; }
.ic-out + .ic-out { border-left: 1px solid #d1d5db; }
.ic-out b { font-size: 13px; color: #1f2937; font-weight: 600; }
.ic-out span { display: none; }
.ic-out:hover { background: #eff6ff; }
.ic-out.on { background: #eff6ff; box-shadow: inset 0 -2px 0 #2563eb; }
.ic-out.on b { color: #2563eb; }
.ic-qrange { width: 110px; accent-color: #2563eb; cursor: pointer; }
.ic-qrange-marks { display: none; }
.ic-bgs { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.ic-bg { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d1d5db; cursor: pointer; padding: 0; transition: all .12s; }
.ic-bg:hover { transform: scale(1.1); }
.ic-bg.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb; }
.ic-bg-custom { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: #9ca3af; cursor: pointer; }
.ic-bg-custom input { width: 22px; height: 22px; border: none; border-radius: 50%; box-shadow: 0 0 0 1px #d1d5db; padding: 0; background: none; cursor: pointer; }
.ic-bg-custom input::-webkit-color-swatch-wrapper { padding: 0; }
.ic-bg-custom input::-webkit-color-swatch { border: none; border-radius: 50%; }
.ic-bg-hint { display: none; }
.ic-r-nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #6b7280; }
.ic-r-nums b { color: #1f2937; }
.ic-r-new { font-size: 13px; font-weight: 700; color: #2563eb; }
.ic-r-arrow { color: #c0c4cc; }
.ic-r-badge { font-size: 12px; font-weight: 700; color: #059669; background: #ecfdf5; border-radius: 6px; padding: 2px 8px; }
.ic-r-badge.up { color: #d97706; background: #fffbeb; }
.ic-r-bars { display: none; }
.ic-r-bar-row { height: 9px; border-radius: 5px; background: #f3f4f6; overflow: hidden; }
.ic-r-bar-row i { display: block; height: 100%; border-radius: 5px; background: #9ca3af; transition: width .25s; }
.ic-r-bar-row i.new { background: #2563eb; }
.ic-dlbtn { border: none; background: #2563eb; color: #fff; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ic-dlbtn:hover:not(:disabled) { background: #1d4ed8; }
.ic-dlbtn:active:not(:disabled) { transform: scale(.97); }
.ic-dlbtn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.ic-swapbtn { border: 1px solid #d1d5db; background: #f9fafb; color: #374151; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.ic-swapbtn:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }

/* ---------- 队列(右列整高, 空态常显占位; 有图时列表区内滚动, 两列卡片) ---------- */
.ic-queuebar { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 12px 12px 14px; }
.ic-queue-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1.5px dashed #e5e7eb; border-radius: 9px; margin-top: 10px; padding: 24px 14px; text-align: center; }
.ic-qe-icon { font-size: 34px; opacity: .85; }
.ic-qe-main { font-size: 14px; font-weight: 600; color: #6b7280; }
.ic-qe-sub { font-size: 12px; color: #9ca3af; line-height: 1.7; max-width: 250px; }
.ic-queue:empty { display: none; }
.ic-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ic-queue-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.ic-queue-acts { display: flex; align-items: center; gap: 8px; }
.ic-save-all-badge { font-size: 12px; color: #059669; background: #ecfdf5; border-radius: 6px; padding: 4px 10px; font-weight: 600; }
.ic-save-all-badge:empty { display: none; }
.ic-act { border: 1px solid #d1d5db; background: #f9fafb; border-radius: 8px; padding: 7px 13px; font-size: 13px; color: #374151; cursor: pointer; transition: all .15s; }
.ic-act:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }
.ic-act:active { transform: scale(.96); }
.ic-act-warn:hover { border-color: #ef4444; color: #dc2626; background: #fef2f2; }
.ic-queue-tip { font-size: 12px; color: #9ca3af; margin-bottom: 10px; }
.ic-queue { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; flex: 1; overflow-y: auto; min-height: 0; align-content: flex-start; }
.ic-queue::-webkit-scrollbar { width: 6px; }
.ic-queue::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.ic-item { display: flex; flex-direction: column; flex: 0 1 calc(50% - 5px); min-width: 0; border: 1px solid #f3f4f6; border-radius: 9px; padding: 8px; cursor: pointer; transition: all .15s; position: relative; }
.ic-item:hover { border-color: #e5e7eb; background: #fafafa; }
.ic-item.cur { border-color: #93c5fd; background: #f8faff; box-shadow: 0 0 0 1px #93c5fd; }
.ic-item.err { border-color: #fecaca; background: #fef2f2; cursor: default; }
.ic-thumb { width: 100%; height: 84px; border-radius: 7px; border: 1px solid #e5e7eb; object-fit: contain; background: repeating-conic-gradient(#f3f4f6 0 25%, #fff 0 50%) 0 0/12px 12px; flex-shrink: 0; margin-bottom: 7px; }
.ic-meta { flex: 1; min-width: 0; }
.ic-name { font-size: 12.5px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-conv { font-size: 11.5px; color: #6b7280; margin-top: 3px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ic-arrow { color: #9ca3af; }
.ic-badge { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; }
.ic-badge.down { color: #059669; background: #ecfdf5; }
.ic-badge.up { color: #d97706; background: #fffbeb; }
.ic-item-act { display: flex; gap: 6px; margin-top: 8px; }
.ic-dl { flex: 1; border: 1px solid #2563eb; background: #2563eb; color: #fff; border-radius: 7px; padding: 6px 10px; font-size: 12px; cursor: pointer; transition: all .15s; text-align: center; }
.ic-dl:hover { background: #1d4ed8; }
.ic-dl:active { transform: scale(.95); }
.ic-rm { position: absolute; top: 5px; right: 5px; border: none; background: rgba(255,255,255,.9); color: #6b7280; font-size: 15px; cursor: pointer; padding: 2px 7px; border-radius: 6px; line-height: 1.2; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ic-rm:hover { color: #dc2626; background: #fef2f2; }
.ic-err-txt { color: #dc2626; }

/* ---------- 特性条 ---------- */
.ic-strip { display: flex; align-items: center; gap: 12px; background: #111827; color: #e5e7eb; border-radius: 10px; padding: 11px 18px; flex-wrap: wrap; justify-content: center; }
.ic-strip span { font-size: 12.5px; font-weight: 500; }
.ic-strip i { width: 1px; height: 14px; background: #374151; }

/* ---------- 特性卡 ---------- */
.ic-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.ic-feat { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px; }
.ic-feat b { display: block; font-size: 15px; margin-bottom: 8px; }
.ic-feat p { font-size: 13px; color: #6b7280; line-height: 1.75; margin: 0; }

/* ---------- 步骤/场景 ---------- */
.ic-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 18px; }
.ic-step b { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #eff6ff; color: #2563eb; font-size: 13px; align-items: center; justify-content: center; margin-bottom: 8px; }
.ic-step h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.ic-step p { font-size: 13px; color: #6b7280; line-height: 1.7; margin: 0; }
.ic-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px; }
.ic-scenes span { font-size: 13px; color: #374151; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; padding: 10px 12px; }

/* ---------- 表格 ---------- */
.ic-table-wrap { overflow-x: auto; padding: 6px 18px; }
.ic-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ic-table th { background: #f9fafb; color: #6b7280; font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.ic-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; color: #6b7280; }
.ic-table td b { color: #1f2937; }
.ic-table tr:last-child td { border-bottom: none; }

/* ---------- 方向矩阵 ---------- */
.ic-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ic-cell { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; transition: all .15s; position: relative; }
.ic-cell b { font-size: 14px; color: #1f2937; }
.ic-cell span { font-size: 11.5px; color: #9ca3af; }
.ic-cell.hot { border-color: #bfdbfe; background: #f8faff; }
.ic-cell.hot b { padding-right: 40px; }
.ic-cell-hot { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 10px; font-weight: 700; color: #2563eb; background: #dbeafe; border-radius: 4px; padding: 1px 6px; }
.ic-cell.soon { opacity: .55; background: #fafafa; }
.ic-cell.soon::after { content: "SOON"; position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 700; color: #9ca3af; border: 1px solid #e5e7eb; border-radius: 4px; padding: 1px 5px; }
a.ic-cell, a.ic-cell:visited { text-decoration: none; }
a.ic-cell:hover { border-color: #93c5fd; }

/* FAQ: 折叠交互/样式统一走 global.min.css 的 jf-faqbox/jf-faq, 页面不自写 */

/* ---------- 相关工具 ---------- */
.ic-related { display: flex; gap: 10px; flex-wrap: wrap; }
.ic-rel { font-size: 13px; color: #374151; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 14px; text-decoration: none; transition: all .15s; }
.ic-rel:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }

/* ---------- 底部 md 文档 ---------- */
.ic-seo { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 8px; }
.ic-seo h2 { font-size: 19px; font-weight: 700; color: #1f2937; margin: 22px 0 10px; }
.ic-seo h2:first-child { margin-top: 0; }
.ic-seo h3 { font-size: 16px; font-weight: 700; color: #1f2937; margin: 18px 0 8px; }
.ic-seo p { font-size: 14px; color: #4b5563; line-height: 1.8; margin: 0 0 10px; }
.ic-seo p b { color: #1f2937; }
.ic-seo ul, .ic-seo ol { margin: 0 0 10px; padding-left: 20px; }
.ic-seo li { font-size: 14px; color: #4b5563; line-height: 1.8; }
.ic-seo code { background: #f3f4f6; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.ic-seo table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 14px; }
.ic-seo th { background: #f9fafb; color: #6b7280; font-weight: 600; padding: 7px 10px; border: 1px solid #eef0f3; text-align: left; }
.ic-seo td { padding: 7px 10px; border: 1px solid #eef0f3; color: #374151; }

/* ---------- toast(JS 自建) ---------- */
.ic-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; font-size: 13px; padding: 10px 20px; border-radius: 8px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999; font-family: system-ui, sans-serif; }
.ic-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
    .ic-workbench { grid-template-columns: 1fr; height: auto; min-height: 480px; }
    .ic-left { border-right: none; border-radius: 10px 10px 0 0; }
    .ic-stage { min-height: 300px; }
    .ic-panel { gap: 8px 10px; padding: 10px 12px; }
    .ic-queuebar { border-top: 1px solid #e5e7eb; }
    .ic-queue { max-height: 56vh; }
    .ic-steps { grid-template-columns: 1fr; }
    .ic-scenes { grid-template-columns: 1fr; }
    .ic-matrix { grid-template-columns: repeat(2, 1fr); }
}
