/* 图快手 · 网页版样式：现代简洁风，系统字体，零外部资源 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1f2430;
  --ink-2: #5b6474;
  --ink-3: #8a93a5;
  --line: #e6e9f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --brand: #e8442e;
  --brand-dark: #c93321;
  --accent: #2563eb;
  --green: #179b5f;
  --amber: #b7791f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 30, 48, .05), 0 8px 24px rgba(23, 30, 48, .06);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 48px;
}

/* 顶栏 */
.topbar {
  background: linear-gradient(135deg, #232946 0%, #2f3a5e 60%, #433070 100%);
  color: #fff;
}
.topbar-in {
  max-width: 1060px; margin: 0 auto; padding: 26px 20px 30px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo {
  width: 56px; height: 56px; border-radius: 16px; flex: none;
  background: var(--brand); color: #fff;
  font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(232, 68, 46, .45);
}
.title-box { flex: 1 1 260px; min-width: 220px; }
.title-box h1 { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.title-sub { font-size: 17px; font-weight: 600; opacity: .85; }
.tagline { margin-top: 4px; font-size: 13.5px; opacity: .75; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
}
.badge-green { background: rgba(35, 197, 118, .22); border-color: rgba(35, 197, 118, .5); }

/* 布局与卡片 */
.wrap { max-width: 1060px; margin: 22px auto 0; padding: 0 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px;
}
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.step {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.head-note { font-size: 13px; color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin-top: 8px; }
.hidden { display: none !important; }

/* 按钮 */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 20px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, transform .05s;
  text-decoration: none; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #d7dce6; color: #8a93a5; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #c6cdd9; color: var(--ink); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-big { width: 100%; justify-content: center; padding: 14px; font-size: 16.5px; border-radius: 12px; }

/* 拖放区 */
.dropzone {
  border: 2px dashed #ccd4e2; border-radius: 14px; padding: 30px 18px 24px;
  text-align: center; background: #fafbfe; transition: border-color .15s, background .15s;
}
.dropzone.drag-over { border-color: var(--brand); background: #fff5f2; }
.dz-icon { font-size: 38px; margin-bottom: 8px; }
.dz-main { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
.dz-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dz-sub { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

/* 文件网格 */
.file-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px; margin-top: 16px;
}
.file-item {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
  position: relative;
}
.file-item img { width: 100%; height: 104px; object-fit: cover; display: block; background: #eef1f6; }
.file-item .fi-meta { padding: 8px 10px 9px; }
.file-item .fi-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-size { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.file-item .fi-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border: none; border-radius: 50%; background: rgba(20, 24, 35, .62); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.file-item.error { border-color: #f0c4bc; background: #fff7f5; }
.file-item .fi-err { font-size: 12px; color: var(--brand-dark); padding: 10px; line-height: 1.5; }
.row-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* 选项块 */
.opt-block { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.opt-block:first-of-type { border-top: none; padding-top: 2px; }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-row.no-switch { cursor: default; }
.switch-row input[type="checkbox"] { display: none; }
.switch {
  width: 42px; height: 24px; border-radius: 999px; background: #d5dae4; flex: none;
  position: relative; transition: background .18s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { left: 21px; }
.opt-title { font-size: 15.5px; font-weight: 700; }
.opt-body { margin: 12px 0 8px 52px; display: none; }
.opt-body.open, .opt-body.always { display: block; }
@media (max-width: 640px) { .opt-body { margin-left: 0; } }

.inline-field { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 10px 0; }
.inline-field.wrap-gap { flex-wrap: wrap; }
.inline-field input[type="number"] {
  width: 96px; padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.inline-field input[type="text"] {
  padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; min-width: 150px;
}
.inline-field input[type="text"].grow { flex: 1 1 220px; }
.inline-field select {
  padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.inline-field input[type="range"] { flex: 0 1 210px; accent-color: var(--brand); }
.inline-field input[type="color"] {
  width: 38px; height: 30px; padding: 2px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: pointer;
}
.range-val { font-size: 13px; color: var(--ink-2); min-width: 40px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.check-inline input { accent-color: var(--brand); width: 16px; height: 16px; }

/* chips 与分段控件 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.chip {
  font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: #eef1f6; color: var(--ink-2); border: 1px solid transparent;
}
.chip.on { background: #fdeee9; color: var(--brand-dark); border-color: #f3c1b4; font-weight: 600; }
.seg { display: inline-flex; background: #eef1f6; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-btn {
  font: inherit; font-size: 13.5px; padding: 7px 16px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-2); cursor: pointer; font-weight: 500;
}
.seg-btn.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(23,30,48,.14); }
.seg-sm .seg-btn { padding: 6px 13px; font-size: 13px; }

/* 预设列表 */
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preset-item {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13.5px;
  background: #fff;
}
.preset-item input { accent-color: var(--brand); width: 15px; height: 15px; }
.preset-item:has(input:checked) { border-color: #f3c1b4; background: #fff7f4; font-weight: 600; }

/* 九宫格位置 */
.pos-grid { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px; }
.pos-btn {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line);
  background: #f2f4f8; cursor: pointer; padding: 0;
}
.pos-btn.on { background: var(--brand); border-color: var(--brand); }

/* 进度 */
.progress { margin-top: 14px; }
.progress-bar { height: 9px; border-radius: 999px; background: #e8ecf3; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--brand); border-radius: 999px; transition: width .2s; }

/* 结果 */
.result-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.result-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13.5px;
}
.result-item .ri-name { font-weight: 600; word-break: break-all; }
.result-item .ri-size { color: var(--ink-2); white-space: nowrap; }
.result-item .ri-size b { color: var(--green); font-weight: 700; }
.result-item .ri-note { color: var(--amber); font-size: 12.5px; flex-basis: 100%; }
.result-item .ri-group {
  font-size: 11.5px; background: #eef1f6; color: var(--ink-2);
  border-radius: 999px; padding: 2.5px 9px; white-space: nowrap;
}
.result-item .ri-dl { margin-left: auto; color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.result-item.error { border-color: #f0c4bc; background: #fff7f5; color: var(--brand-dark); }

.foot { text-align: center; color: var(--ink-3); font-size: 12.5px; line-height: 1.7; padding: 6px 10px 0; }

/* 访问码锁屏 */
body.locked .topbar, body.locked .wrap { display: none; }
.lock-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #232946 0%, #2f3a5e 60%, #433070 100%);
}
body:not(.locked) .lock-screen { display: none; }
.lock-card {
  background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(10, 14, 28, .35);
  max-width: 420px; width: 100%; padding: 34px 30px 28px; text-align: center;
}
.lock-logo { margin: 0 auto 16px; }
.lock-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.lock-desc { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.lock-form { display: flex; gap: 9px; margin: 20px 0 6px; }
.lock-form input {
  flex: 1 1 auto; min-width: 0; padding: 11px 13px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 10px; text-align: center; letter-spacing: 1px;
}
.lock-form input:focus { outline: none; border-color: var(--brand); }
.lock-form .btn { flex: none; }
.lock-err { color: var(--brand-dark); font-size: 13px; margin-top: 10px; }
.lock-hint { color: var(--ink-3); font-size: 12.5px; line-height: 1.65; margin-top: 14px; }
