/* LOVE视觉AI婚纱摄影馆 — 深色科技风 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0d14;
  --bg-2: #0f1420;
  --card: #151a27;
  --card-hover: #1c2233;
  --border: #262e42;
  --border-glow: #3a4a6a;
  --text: #e6eaf2;
  --text-light: #7b8ba5;
  --text-dim: #4a5672;
  --accent: #00d4ff;        /* 霓虹青 */
  --accent-2: #0099cc;
  --accent-glow: rgba(0, 212, 255, .25);
  --ai-red: #ff3b5c;        /* AI 红 */
  --ai-red-glow: rgba(255, 59, 92, .35);
  --success: #00e676;
  --warn: #ffb800;
  --radius: 12px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* 背景装饰网格 */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(0, 212, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, .03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(255,59,92,.08), transparent 50%),
              radial-gradient(ellipse at 80% 100%, rgba(0,212,255,.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 顶栏 */
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(15, 20, 32, .85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}
.topbar::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .5;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.logo {
  font-size: 22px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}
.topbar h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
}
.brand-ai {
  color: var(--ai-red);
  text-shadow: 0 0 12px var(--ai-red-glow);
  margin: 0 2px;
  font-weight: 900;
  font-size: 1.15em;
}
.subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }

.btn-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(0,212,255,.05));
  color: var(--accent);
  border: 1px solid rgba(0,212,255,.4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-balance:hover {
  background: linear-gradient(135deg, rgba(0,212,255,.25), rgba(0,212,255,.1));
  box-shadow: 0 0 16px var(--accent-glow);
}
.credits {
  font-size: 12px; color: var(--text-light);
  background: var(--bg-2); padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border);
}
.btn-icon {
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 18px; cursor: pointer;
  width: 34px; height: 34px; border-radius: 10px;
  color: var(--text-light);
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--card-hover); border-color: var(--accent); color: var(--accent); }

.btn-upscale-entry {
  border: 1px solid rgba(255,184,0,.5);
  background: linear-gradient(135deg, rgba(255,184,0,.12), rgba(255,184,0,.04));
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-upscale-entry:hover {
  border-color: var(--warn);
  box-shadow: 0 0 12px rgba(255,184,0,.25);
  transform: translateY(-1px);
}

/* 布局 */
.layout {
  display: flex;
  height: calc(100vh - 60px);
  position: relative;
  z-index: 1;
}
.form-panel {
  width: 430px;
  min-width: 430px;
  overflow-y: auto;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 20px 120px;
}
.result-panel {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 40px;
  background: var(--bg);
}

/* 分组 */
.group {
  margin-bottom: 22px;
  padding-bottom: 6px;
}
.group-title {
  font-size: 14px; font-weight: 700;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.group-title::before {
  content: '';
  width: 3px; height: 14px;
  background: linear-gradient(180deg, var(--accent), var(--ai-red));
  border-radius: 2px;
}
.optional {
  font-size: 11px; font-weight: 400; color: var(--text-dim);
  background: var(--bg); padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--border);
}
.field { margin-bottom: 16px; }
.field-label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
  color: var(--text);
}
.field-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.req {
  font-size: 11px; color: #fff; background: var(--ai-red);
  padding: 1px 7px; border-radius: 9px; margin-left: 4px; font-weight: 400;
}

input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
input[type="text"]:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
input[type="text"]::placeholder { color: var(--text-dim); }

/* 单选/复选 */
.radio-col { display: flex; flex-direction: column; gap: 8px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; font-size: 13px;
  flex: 1; min-width: 120px;
  transition: all .15s;
  background: var(--card);
}
.radio-col .radio-item { flex: none; min-width: 0; }
.radio-item:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0,212,255,.08);
  box-shadow: 0 0 10px var(--accent-glow);
}
.radio-item input { accent-color: var(--accent); }
.radio-item .tip { display: block; font-size: 11px; color: var(--text-dim); }
.radio-item b { display: block; font-size: 13px; }
.radio-item i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }
.radio-row .radio-item span { line-height: 1.35; }

.check-col { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; font-size: 13px;
  transition: all .15s;
  background: var(--card);
}
.check-item:has(input:checked) { border-color: var(--accent); background: rgba(0,212,255,.08); }
.check-item input { accent-color: var(--accent); width: 15px; height: 15px; }
.check-item b { display: block; font-size: 13px; }
.check-item i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* 上传 */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 14px;
  text-align: center;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  transition: all .2s;
  background: var(--card);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent);
  background: rgba(0,212,255,.05);
  color: var(--accent);
}
.upload-area.small { padding: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.thumb-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumb {
  position: relative; width: 74px; height: 74px;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.thumb .remove {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,59,92,.85); color: #fff;
  border: none; cursor: pointer; font-size: 11px; line-height: 18px; padding: 0;
}
.thumb .tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 10px; background: rgba(0,212,255,.85); color: #fff;
  text-align: center; padding: 1px 0;
}
.thumb.sheet-locked { border-color: rgba(0,230,118,.75); box-shadow: 0 0 8px rgba(0,230,118,.25); }
.thumb .sheet-tag {
  background: rgba(0,230,118,.92); color: #06140d; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb .sheet-unlink {
  position: absolute; top: 4px; left: 4px; z-index: 3;
  border: none; border-radius: 6px; padding: 3px 6px;
  font-size: 10px; line-height: 1.2; cursor: pointer;
  background: rgba(255,80,80,.92); color: #fff; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); white-space: nowrap;
}
.thumb .sheet-unlink:hover { background: rgba(255,60,60,1); }

.btn-sheet-only {
  margin-left: auto; padding: 4px 10px; font-size: 12px; line-height: 1.3;
  border-radius: 6px; white-space: nowrap; flex-shrink: 0;
}

/* 画幅chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 12px; font-size: 12px; cursor: pointer;
  background: var(--card); transition: all .15s;
  display: flex; align-items: center; gap: 6px;
  color: var(--text-light);
}
.chip:hover { border-color: var(--border-glow); }
.chip.active { border-color: var(--accent); background: rgba(0,212,255,.1); color: var(--accent); font-weight: 600; }
.chip .ratio-box {
  display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; opacity: .7;
}
.chip.multi.on { border-color: var(--accent); background: rgba(0,212,255,.1); color: var(--accent); }

.custom-add { display: flex; gap: 8px; margin-top: 8px; }
.custom-add input { flex: 1; }
.custom-add button {
  border: 1px solid var(--accent); background: rgba(0,212,255,.1); color: var(--accent);
  border-radius: 10px; padding: 0 14px; cursor: pointer; font-size: 13px;
}

/* 自定义风格保存/删除 */
.btn-save-style {
  width: 100%; margin-top: 8px;
  border: 1px solid rgba(0,212,255,.5);
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(0,212,255,.05));
  color: var(--accent);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.btn-save-style:hover { background: rgba(0,212,255,.22); box-shadow: 0 0 12px var(--accent-glow); }
.btn-del-style {
  border: 1px solid rgba(255,59,92,.4); background: rgba(255,59,92,.08);
  color: var(--ai-red);
  border-radius: 10px; padding: 6px 12px; cursor: pointer; font-size: 12px;
  transition: all .15s;
}
.btn-del-style:hover { background: rgba(255,59,92,.18); }

/* 狗十三提示词润色 */
.polish-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.btn-polish {
  border: 1px solid rgba(0,212,255,.5);
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(0,212,255,.05));
  color: var(--accent);
  border-radius: 20px; padding: 7px 16px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  transition: all .15s;
}
.btn-polish:hover:not(:disabled) { background: rgba(0,212,255,.25); box-shadow: 0 0 12px var(--accent-glow); }
.btn-polish:disabled { opacity: .6; cursor: wait; }
.btn-polish-undo {
  border: 1px solid var(--border); background: transparent; color: var(--text-light);
  border-radius: 20px; padding: 6px 12px; cursor: pointer; font-size: 12px;
}
.btn-polish-undo:hover { border-color: var(--warn); color: var(--warn); }

/* 分段选择 */
.seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.seg button {
  flex: 1; border: none; background: transparent; padding: 8px 6px;
  font-size: 13px; cursor: pointer; color: var(--text-dim);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  line-height: 1.2;
  transition: all .15s;
}
.seg button:last-child { border-right: none; }
.seg button.active { background: rgba(0,212,255,.12); color: var(--accent); font-weight: 700; }
.seg .seg-title { font-size: 14px; font-weight: 600; }
.seg .seg-sub { font-size: 11px; opacity: 0.7; }
.seg .res-premium {
  color: var(--ai-red); font-weight: 700; font-size: 11px;
  background: rgba(255,59,92,.15); border-radius: 8px; padding: 0 4px; margin-left: 2px;
}
.seg button.disabled {
  opacity: 0.3; cursor: not-allowed; pointer-events: none;
  text-decoration: line-through;
}

/* 步进器 */
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 16px; cursor: pointer; color: var(--text);
  transition: all .15s;
}
.stepper button:hover { border-color: var(--accent); color: var(--accent); }
.stepper span { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }

/* 提交栏 */
.submit-bar {
  position: fixed; bottom: 0; left: 0; width: 430px;
  background: rgba(15, 20, 32, .95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 20;
}
.cost { font-size: 13px; color: var(--text-dim); }
.cost span { color: var(--accent); font-weight: 700; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0077aa);
  color: #fff; border: none; border-radius: 24px;
  padding: 12px 34px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 22px var(--accent-glow); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  border-radius: 20px; padding: 10px 24px; font-size: 14px; cursor: pointer; color: var(--text-light);
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--text-light); color: var(--text); }

.anchor-bar {
  margin-top: 12px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--accent);
  background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.3);
  border-radius: 10px; padding: 8px 12px;
}
.anchor-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }
.anchor-bar a { color: var(--text-dim); font-size: 12px; }

/* 结果区 */
.result-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px;
}
.result-head h2 { font-size: 16px; color: var(--text); }
.result-tip { font-size: 12px; color: var(--text-dim); }

.progress-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.progress-overall {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
}
.progress-overall .progress-track {
  flex: 1; height: 6px; border-radius: 3px;
  overflow: hidden; background: rgba(255, 255, 255, .06);
}
.progress-fill { height: 100%; width: 0; border-radius: 3px; transition: width .4s ease; }
.progress-fill.running {
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-2));
  background-size: 200% 100%;
  animation: progressSlide 1.5s linear infinite;
}
.progress-fill.full { width: 100%; background: var(--success); animation: none; }
.progress-fill.failed { width: 100%; background: var(--ai-red); animation: none; }
.progress-overall .progress-count { font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.progress-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; font-size: 13px;
}
.progress-item .progress-row { display: flex; align-items: center; gap: 8px; }
.progress-item .spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite; flex-shrink: 0;
}
.progress-item .done-ic { flex-shrink: 0; font-size: 13px; }
.progress-item.fail .progress-label { color: var(--ai-red); }
.progress-note {
  font-size: 12px; line-height: 1.55; color: var(--text-light);
  padding: 1px 14px 1px 26px; white-space: pre-wrap; word-break: break-word;
}
.progress-note:first-of-type { padding-top: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progressSlide { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 110px 0; color: var(--text-dim);
}
.empty-icon { font-size: 46px; margin-bottom: 14px; opacity: .5; }

.img-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
}
.img-card:hover { border-color: var(--border-glow); box-shadow: 0 4px 24px rgba(0,0,0,.3); }
.img-card .img-wrap {
  padding: 10px;
  display: flex; align-items: center; justify-content: center;
  min-height: 220px;
  background:
    linear-gradient(45deg, #1a1f2e 25%, transparent 25%, transparent 75%, #1a1f2e 75%),
    linear-gradient(45deg, #1a1f2e 25%, transparent 25%, transparent 75%, #1a1f2e 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
}
.img-card img {
  max-width: 100%; max-height: 520px;
  object-fit: contain;
  cursor: zoom-in;
}
.img-card .img-meta {
  padding: 10px 14px; font-size: 12px; color: var(--text-dim);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.img-card .img-meta > span:first-child { flex: 0 0 auto; }
.img-card .img-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 auto; }
.img-card .img-actions button, .img-card .img-actions a {
  border: 1px solid var(--border); background: var(--bg-2);
  border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  color: var(--text-light); text-decoration: none;
  transition: all .15s;
  white-space: nowrap; flex: 0 0 auto;
}
.img-card .img-actions button:hover, .img-card .img-actions a:hover {
  border-color: var(--accent); color: var(--accent);
}
.img-card .img-actions .set-anchor { color: var(--accent); }
.img-card .img-actions .upscale-btn { color: var(--warn); border-color: rgba(255,184,0,.4); }
.img-card .img-actions .del-btn { color: #ff5a5a; border-color: rgba(255,90,90,.35); }
.img-card .img-actions .del-btn:hover { border-color: #ff5a5a; color: #ff5a5a; }

/* 角色设定图卡片 */
.char-sheet-card { border-color: rgba(0,212,255,.55); box-shadow: 0 0 14px rgba(0,212,255,.12); }
.char-sheet-card .img-wrap { position: relative; }
.char-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  padding: 12px;
}
.char-sheet-cell { position: relative; display: flex; flex-direction: column; gap: 6px; }
.char-sheet-cell img {
  width: 100%; border-radius: 8px; cursor: zoom-in;
  border: 1px solid var(--border); background: var(--bg);
}
.char-regen-btn { font-size: 12px; padding: 5px 10px; width: 100%; }
.char-sheet-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,212,255,.92); color: #06121c;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  pointer-events: none; white-space: nowrap;
}

/* 放大预览 */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(5,8,14,.92);
  align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 94vw; max-height: 94vh; object-fit: contain; }

/* 弹窗 */
.modal {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(5,8,14,.75);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal.show { display: flex; }
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px;
  width: 420px; max-width: 92vw; padding: 24px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-box h2 { font-size: 16px; margin-bottom: 16px; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-glow); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .layout { flex-direction: column; height: auto; }
  .form-panel { width: 100%; min-width: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .submit-bar { width: 100%; }
  .history-panel { width: 100%; max-height: 300px; border-left: none; border-top: 1px solid var(--border); }
}

/* ===== 历史面板 ===== */
.history-panel {
  width: 240px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.history-header h3 { font-size: 13px; font-weight: 600; color: var(--text); }
.btn-clear { font-size: 12px; padding: 2px 8px; }
.history-box {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-content: start;
}
.history-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 10px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}
.history-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color .2s;
}
.history-item:hover { border-color: var(--border-glow); }
.history-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.history-item:hover img { transform: scale(1.05); }
.history-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(5,8,14,.9));
  color: #fff;
  padding: 14px 6px 4px;
  font-size: 10px;
  line-height: 1.3;
  pointer-events: none; /* 文字层不拦截点击，点击穿透到卡片 */
}
.history-time { font-weight: 600; white-space: nowrap; }
.history-info { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 更早的历史记录折叠区（默认只显示最近 10 张） */
.history-toggle {
  grid-column: 1 / -1;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.history-toggle:hover {
  border-color: var(--border-glow);
  border-style: solid;
  color: var(--text);
  background: var(--card);
}
.history-older {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.history-older.collapsed { display: none; }

/* ===== 高清放大弹窗 ===== */
.upscale-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upscale-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.upscale-preview-label {
  position: absolute;
  top: 6px; left: 8px;
  background: rgba(0,212,255,.85);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  z-index: 2;
}
.upscale-change-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6);
  color: var(--text-light);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 2;
  transition: all .2s;
  white-space: nowrap;
}
.upscale-preview:hover .upscale-change-hint {
  background: rgba(0,212,255,.85);
  color: #fff;
}
.upscale-preview {
  cursor: pointer;
}

/* 历史记录弹窗 */
.history-modal-box {
  max-width: 560px;
  width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.history-modal-header h2 { font-size: 16px; margin: 0; }
.history-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-modal-img-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.history-modal-img-wrap img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
}
.history-modal-info {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}
.history-modal-time { font-weight: 600; margin-bottom: 4px; }
.history-modal-detail { font-size: 12px; opacity: .8; }
.history-modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.history-modal-actions button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
}

/* 发送到工作区 */
.history-modal-send {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.history-send-btn {
  padding: 8px 12px !important;
  font-size: 12.5px !important;
  border-color: rgba(0,212,255,.45) !important;
  color: var(--accent) !important;
}
.history-send-btn:hover { background: rgba(0,212,255,.1) !important; }
.history-send-btn:disabled { opacity: .4; cursor: not-allowed; }
.history-send-tip { font-size: 12px; color: var(--text-dim); width: 100%; }

/* 历史图片缓存丢失占位 */
.img-missing-ph {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; height: 100%;
  font-size: 12px; color: var(--text-dim);
  background:
    linear-gradient(135deg, rgba(255,59,92,.08), rgba(0,212,255,.08)),
    var(--bg-2);
}
.history-modal-img-wrap .img-missing-ph { min-height: 300px; font-size: 14px; }

.upscale-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.upscale-cost {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.img-actions button.set-anchor,
.img-actions button.upscale-btn {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-light);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.img-actions button.set-anchor:hover,
.img-actions button.upscale-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.img-actions button.upscale-btn {
  color: var(--warn);
  border-color: rgba(255,184,0,.4);
}
.img-actions button.upscale-btn:hover {
  border-color: var(--warn);
}

/* ===== 充值弹窗 ===== */
.recharge-box {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}
.recharge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.recharge-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }

.balance-card {
  margin: 18px 24px 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,212,255,.15) 0%, rgba(255,59,92,.1) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(0,212,255,.15);
}
.balance-label { font-size: 12px; color: var(--text-dim); }
.balance-amount {
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--ai-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin: 4px 0 6px;
}
.balance-amount small { font-size: 14px; font-weight: 500; margin-left: 4px; color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); }
.balance-tip { font-size: 11px; color: var(--text-dim); }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 20px 24px 10px;
}
.btn-clear-history {
  font-size: 12px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text-dim);
  font-family: inherit;
}
.btn-clear-history:hover { color: var(--ai-red); border-color: var(--ai-red); }

.recharge-packs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 24px;
}
.recharge-pack {
  position: relative;
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  font-family: inherit;
}
.recharge-pack:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,212,255,.15);
}
.recharge-pack.active {
  border-color: var(--accent);
  background: rgba(0,212,255,.1);
  box-shadow: 0 0 0 2px var(--accent-glow), 0 6px 20px rgba(0,212,255,.2);
}
.recharge-pack.hot {
  border-color: rgba(0,212,255,.5);
  background: rgba(0,212,255,.05);
}
.recharge-pack.best {
  border-color: rgba(255,59,92,.5);
  background: rgba(255,59,92,.05);
}
.pack-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pack-price { font-size: 18px; font-weight: 700; color: var(--text); }
.pack-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text-dim);
}
.pack-tag.hot-tag { background: rgba(0,212,255,.15); color: var(--accent); }
.pack-tag.best-tag { background: rgba(255,59,92,.15); color: var(--ai-red); }
.pack-credits {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.pack-credits small { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-left: 2px; }
.pack-bonus {
  font-size: 11px;
  color: var(--success);
  margin-top: 4px;
}
.pack-bonus b { color: var(--warn); }

.recharge-mode-tip {
  text-align: center;
  padding: 14px 24px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== 收款二维码区 ===== */
.qr-pay-section {
  margin: 0 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.qr-pay-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.qr-pay-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.qr-pay-tab.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  background: rgba(0,212,255,.06);
}
.qr-pay-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-pay-img-wrap {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.qr-pay-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-pay-empty {
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: 10px;
}
.qr-pay-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--warn);
}
.qr-pay-tip {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}
.qr-payer-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
}
.qr-payer-input::placeholder { color: var(--text-dim); }
.qr-payer-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.qr-pay-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 4px;
}
.qr-pay-submit:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.dev-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,184,0,.15);
  color: var(--warn);
  font-size: 11px;
  margin-right: 6px;
  font-weight: 600;
}

/* ===== 积分明细 ===== */
.credits-log {
  padding: 0 24px 20px;
  max-height: 200px;
  overflow-y: auto;
}
.credits-log-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-dim);
  font-size: 13px;
}
.log-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}
.log-row:last-child { border-bottom: none; }
.log-row.recharge .log-amount { color: var(--success); font-weight: 600; }
.log-row.consume .log-amount { color: var(--ai-red); font-weight: 600; }
.log-reason { color: var(--text); }
.log-before { color: var(--text-dim); font-size: 11px; }
.log-time { color: var(--text-dim); font-size: 11px; white-space: nowrap; }

/* ===== 顶部用户区 ===== */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
}
.user-chip .user-name { color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-link {
  background: none; border: none; color: var(--text-light);
  cursor: pointer; font-size: 12px; padding: 0;
}
.btn-link:hover { color: var(--ai-red); }

/* ===== 登录 / 注册弹窗 ===== */
.login-modal { z-index: 1000; }
.login-box { max-width: 400px; }
.login-box h2 { margin-bottom: 4px; }
.login-sub {
  font-size: 12.5px; color: var(--text-light);
  margin: 0 0 18px; line-height: 1.5;
}
.login-tabs {
  display: flex; gap: 6px;
  background: var(--bg); padding: 4px;
  border-radius: 10px; margin-bottom: 18px;
}
.login-tab {
  flex: 1; padding: 8px;
  background: transparent; border: none;
  color: var(--text-light); cursor: pointer;
  border-radius: 7px; font-size: 13px;
  transition: all .15s;
}
.login-tab.active {
  background: var(--card); color: var(--text);
  box-shadow: 0 0 0 1px var(--border-glow);
}
.login-tip {
  font-size: 12px; color: var(--text-dim);
  padding: 8px 10px; background: var(--bg);
  border-radius: 6px; line-height: 1.5;
}
.login-error {
  padding: 8px 12px; margin: 4px 0 12px;
  background: rgba(255, 59, 92, .12);
  border: 1px solid rgba(255, 59, 92, .35);
  border-radius: 8px; color: #ff8a9e;
  font-size: 13px;
}
.login-box .modal-actions { justify-content: stretch; margin-top: 12px; }
.login-box .modal-actions .btn-primary { width: 100%; }

/* ===== 视频功能 ===== */
.video-box {
  max-width: 640px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.video-modal-header h2 { font-size: 17px; margin: 0; }
.video-modal-body {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 顶部：首帧 + 参考图并排 */
.video-top {
  display: flex;
  gap: 20px;
}
.video-source-section {
  flex: 1;
  min-width: 0;
}
.video-ref-section {
  flex: 1;
  min-width: 0;
}
.video-ref-section .field-label {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-ref-section .tip {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: normal;
}

/* 参数区：两列网格 */
.video-params {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.param-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.param-item {
  min-width: 0;
}
.param-item .field-label {
  margin-bottom: 8px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  font-weight: 400;
}
.check-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* @ 引用下拉 */
.prompt-wrap {
  position: relative;
}
.mention-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.mention-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}
.mention-item:hover,
.mention-item.active {
  background: rgba(0,212,255,.1);
  color: var(--accent);
}

.video-source-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  max-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-source-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.video-source-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(5,8,14,.85));
  color: var(--text-light);
  font-size: 11px;
  padding: 8px 10px 4px;
  text-align: center;
}

.video-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 12px;
}
.video-cost {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.video-balance { color: var(--text-light); }

.video-warn {
  padding: 8px 12px;
  margin: 8px 0;
  background: rgba(255, 184, 0, .1);
  border: 1px solid rgba(255, 184, 0, .3);
  border-radius: 8px;
  font-size: 12px;
  color: var(--warn);
}

/* 响应式：小屏幕调整 */
@media (max-width: 640px) {
  .video-box {
    width: 95vw;
    max-width: 95vw;
  }
  .video-top {
    flex-direction: column;
  }
  .param-row {
    grid-template-columns: 1fr;
  }
}

/* 我的视频列表 */
.video-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}
.video-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 10px;
  color: var(--text-dim);
  font-size: 13px;
}
.video-item {
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: border-color .2s;
}
.video-item:hover { border-color: var(--border-glow); }
.video-item.done { border-color: rgba(0, 230, 118, .3); }
.video-item.failed { border-color: rgba(255, 59, 92, .3); }
.video-item.processing { border-color: rgba(0, 212, 255, .3); }

.video-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1f2e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-cover-placeholder {
  font-size: 32px;
  opacity: .4;
}
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.video-item:hover .video-play-overlay { opacity: 1; }

.video-info {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
}
.video-status { font-weight: 600; margin-bottom: 2px; }
.video-item.done .video-status { color: var(--success); }
.video-item.failed .video-status { color: var(--ai-red); }
.video-item.processing .video-status { color: var(--accent); }
.video-meta { color: var(--text-dim); }
.video-time { color: var(--text-dim); opacity: .7; }

/* 视频按钮 */
.video-btn {
  border: 1px solid rgba(255, 59, 92, .4) !important;
  background: var(--bg-2) !important;
  color: var(--ai-red) !important;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.video-btn:hover {
  border-color: var(--ai-red) !important;
  box-shadow: 0 0 8px var(--ai-red-glow);
}

/* 强化锁脸重拍按钮 */
.relock-btn {
  border: 1px solid rgba(0, 230, 118, .45) !important;
  background: var(--bg-2) !important;
  color: var(--success) !important;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.relock-btn:hover:not(:disabled) {
  border-color: var(--success) !important;
  box-shadow: 0 0 8px rgba(0, 230, 118, .3);
}
.relock-btn:disabled { opacity: .55; cursor: wait; }
@keyframes relockPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,.5); }
  50% { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}
.relock-pulse { animation: relockPulse 1.4s infinite; }

/* 人脸相似度自动校验栏 */
.face-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.face-bar.checking { color: var(--text-light); }
.face-bar-title { font-weight: 700; margin-right: 2px; }
.face-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
}
.face-chip.good { color: var(--success); background: rgba(0,230,118,.12); }
.face-chip.warn { color: var(--warn); background: rgba(255,184,0,.12); }
.face-chip.weak { color: #ffb020; background: rgba(255,159,10,.16); }
.face-chip.bad { color: #fff; background: rgba(255,59,92,.85); }
.face-chip.none { color: var(--text-dim); background: var(--card-hover); }
.face-bar.good { border-color: rgba(0,230,118,.4); }
.face-bar.warn { border-color: rgba(255,184,0,.45); }
.face-bar.weak { border-color: rgba(255,159,10,.5); background: rgba(255,159,10,.06); }
.face-bar.bad { border-color: rgba(255,59,92,.55); background: rgba(255,59,92,.06); }
.face-bar-note { width: 100%; color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.face-bar.bad .face-bar-note { color: var(--ai-red); font-weight: 600; }
.face-bar.weak .face-bar-note { color: #ffb020; font-weight: 600; }
.face-bar.skip { color: var(--text-dim); }

/* 历史卡片上的视频按钮 */
.history-video {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(0,0,0,.7);
  color: var(--ai-red);
  font-size: 14px;
  cursor: pointer;
  opacity: 1;
  transition: transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.history-video:hover { transform: scale(1.1); background: rgba(0,0,0,.85); }

/* ============ 爆款复刻模式 ============ */
.video-mode-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.video-mode-tab {
  flex: 1; padding: 9px 0; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .15s;
}
.video-mode-tab:hover { border-color: var(--accent); color: var(--accent); }
.video-mode-tab.active { border-color: var(--accent); background: rgba(0, 212, 255, .08); color: var(--accent); }
.video-remake-block {
  border: 1px dashed var(--border); border-radius: 10px;
  padding: 12px; margin-bottom: 12px; background: rgba(255, 255, 255, .02);
}
.video-checklist { font-size: 12px; line-height: 2; margin: 4px 0 10px; }
.video-checklist .ok { color: #4caf7d; margin-right: 12px; }
.video-checklist .miss { color: #c0564f; margin-right: 12px; }
/* 复刻模式：首帧区隐藏后参考图占满整行 */
.video-top.remake-mode { display: block; }
.video-top.remake-mode .video-ref-section { margin-top: 0; }

/* ============ 分镜脚本 & 素材匹配 ============ */
.script-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  background: rgba(255,255,255,.02);
}
.script-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.script-time { color: var(--accent); font-weight: 700; font-size: 11px; }
.script-scene { font-weight: 600; color: var(--text); }
.script-desc { color: var(--text-dim); line-height: 1.5; margin-bottom: 4px; }
.script-materials { color: var(--accent); font-size: 11px; }
.script-materials b { color: var(--accent); }

.material-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  background: rgba(255,255,255,.02);
}
.material-scene { color: var(--text); font-weight: 600; font-size: 12px; margin-bottom: 2px; }
.material-desc { color: var(--text-dim); font-size: 11px; line-height: 1.4; margin-bottom: 6px; }
.material-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.material-thumb {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
  border: 2px solid transparent; cursor: pointer; transition: all .15s;
}
.material-thumb:hover { border-color: var(--accent); }
.material-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,212,255,.2); }
.material-none { color: var(--text-dim); font-size: 11px; font-style: italic; }
