
*{box-sizing:border-box} body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;background:#f6f7fb;color:#1d2433;height:100vh;overflow:hidden}.app-shell{height:100vh;padding:14px;display:flex;flex-direction:column;gap:12px}.topbar{height:82px;display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:14px 18px;box-shadow:0 8px 22px rgba(26,32,44,.05)}h1{font-size:20px;margin:0 0 6px}h2{font-size:15px;margin:0}.topbar p{margin:0;color:#7a8497;font-size:12px}.top-actions{display:flex;align-items:center;gap:8px}button{border:1px solid #dfe5ee;background:#fff;border-radius:12px;padding:9px 13px;cursor:pointer;color:#2a3344}button:hover{background:#f4f7fb}.primary,.send-btn{background:#222a36;color:#fff;border-color:#222a36}.primary:hover,.send-btn:hover{background:#111827}.small{font-size:12px;padding:6px 10px}.grid{flex:1;min-height:0;display:grid;grid-template-columns:1.15fr .85fr;grid-template-rows:1.08fr .92fr;gap:12px}.panel{background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:14px;min-height:0;box-shadow:0 8px 22px rgba(26,32,44,.05);position:relative}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.prompt-panel{display:flex;flex-direction:column}.editor{flex:1;min-height:140px;border:1px dashed #d9e0ea;border-radius:16px;background:#fbfcff;padding:12px;outline:none;overflow:auto;line-height:1.55;font-size:14px}.editor:empty:before{content:attr(data-placeholder);color:#a1a9b8}.hint{font-size:12px;color:#8993a5;margin-top:8px}.ref-tag{display:inline-flex;align-items:center;gap:5px;vertical-align:middle;border:1px solid #dfe7f2;background:#f1f5fb;border-radius:999px;padding:2px 6px;margin:0 2px;cursor:grab;user-select:none}.ref-tag img{width:22px;height:22px;border-radius:6px;object-fit:cover}.ref-tag b{font-size:12px;color:#ef4444;margin-left:2px;cursor:pointer}.mention-popup{position:absolute;z-index:40;width:230px;max-height:190px;overflow:auto;background:#fff;border:1px solid #e4e9f2;border-radius:14px;padding:6px;box-shadow:0 14px 32px rgba(15,23,42,.16);left:28px;bottom:46px}.mention-item{display:flex;align-items:center;gap:8px;padding:6px;border-radius:10px;cursor:pointer}.mention-item:hover{background:#f3f6fb}.mention-item img{width:36px;height:36px;border-radius:8px;object-fit:cover}.hidden{display:none!important}.image-panel{display:flex;flex-direction:column}.image-list{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;align-content:start}.image-list.empty,.task-list.empty{display:flex;align-items:center;justify-content:center;color:#a3acba;font-size:13px;border:1px dashed #dce3ed;border-radius:14px}.image-card{position:relative;border:1px solid #e5ebf4;border-radius:14px;background:#fbfcff;padding:8px;min-height:116px}.image-card.uploading{filter:grayscale(1);opacity:.55}.image-card img{width:100%;height:68px;object-fit:cover;border-radius:10px;display:block;cursor:pointer}.image-card .name{font-size:12px;font-weight:600;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-card .row{display:flex;gap:6px;margin-top:6px}.image-card .row button{flex:1;font-size:11px;padding:4px 6px;border-radius:8px}.del{position:absolute!important;right:4px;top:4px;background:#ef4444!important;color:#fff!important;border:none!important;width:22px;height:22px;border-radius:999px!important;padding:0!important;line-height:22px}.option-panel{display:flex;flex-direction:column;gap:10px}.ratio-row{display:flex;gap:8px;flex-wrap:wrap}.ratio{width:58px;height:48px;border:1px solid #dce4ef;background:#fbfcff;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;gap:4px}.ratio.active{border-color:#222a36;background:#eef2f7}.rect{border:2px solid currentColor;border-radius:3px}.r916{width:14px;height:24px}.r169{width:28px;height:16px}.r43{width:24px;height:18px}.r34{width:18px;height:24px}.r11{width:21px;height:21px}.option-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.option-row label{font-size:12px;color:#6c7586;display:flex;flex-direction:column;gap:4px}.option-row input,.option-row select,.config-bottom input,.config-bottom select{height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff}.send-btn{height:42px;font-size:15px}.status-line{font-size:12px;color:#667085;min-height:18px}.task-panel{display:flex;flex-direction:column}.task-list{flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px}.task-card{border:1px solid #e6ebf3;border-radius:14px;padding:10px;background:#fbfcff;display:grid;grid-template-columns:82px 1fr auto;gap:10px;align-items:center}.fan{height:52px;position:relative}.fan img{position:absolute;width:42px;height:42px;border-radius:10px;object-fit:cover;border:2px solid #fff;box-shadow:0 3px 8px rgba(15,23,42,.18)}.fan img:nth-child(1){left:0;top:4px;transform:rotate(-10deg)}.fan img:nth-child(2){left:22px;top:5px;transform:rotate(4deg)}.fan img:nth-child(3){left:44px;top:6px;transform:rotate(12deg)}.task-main strong{font-size:13px}.task-main p{font-size:12px;color:#667085;margin:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:480px}.task-main em{font-style:normal;font-size:11px;color:#8a94a6}.badge{display:inline-block;border-radius:999px;padding:3px 8px;font-size:11px;background:#ecfdf3;color:#027a48}.badge.fail{background:#fff1f2;color:#be123c}.task-actions{display:flex;flex-direction:column;gap:6px}.modal{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:100;display:flex;align-items:center;justify-content:center}.modal-card{position:relative;background:#fff;border-radius:18px;padding:18px;border:1px solid #e7ecf4;box-shadow:0 20px 60px rgba(15,23,42,.25)}.close{position:absolute;right:12px;top:10px;width:28px;height:28px;border-radius:50%;padding:0}.config-card{width:min(760px,92vw);height:min(620px,88vh);display:flex;flex-direction:column}.config-card p{font-size:12px;color:#667085;margin:8px 38px 10px 0}.config-card textarea{flex:1;min-height:260px;resize:none;border:1px solid #dfe5ee;border-radius:14px;padding:10px;font-family:Consolas,monospace;font-size:12px;overflow:auto}.config-bottom{display:grid;grid-template-columns:150px 130px 1fr 110px 110px;gap:10px;align-items:end;margin-top:10px}.check{font-size:12px;color:#4b5563}.modal-msg{min-height:20px;margin-top:8px;font-size:12px;color:#027a48}.logs-card{width:min(900px,94vw);height:min(650px,88vh);display:flex;flex-direction:column}.log-actions{display:flex;gap:8px;margin:8px 0}.logs-card pre{flex:1;overflow:auto;background:#0f172a;color:#dbeafe;border-radius:14px;padding:12px;font-size:12px;white-space:pre-wrap}.preview-card{max-width:88vw;max-height:88vh}.preview-card img{max-width:82vw;max-height:78vh;border-radius:14px;display:block}@media(max-width:900px){body{overflow:auto}.app-shell{height:auto}.grid{grid-template-columns:1fr;grid-template-rows:auto}.panel{min-height:250px}.topbar{height:auto;align-items:flex-start;gap:10px;flex-direction:column}.top-actions{flex-wrap:wrap}}

/* 修复版布局：左侧 60%，右侧任务队列 40%；图片列表放在提示词框上方横向排列 */
.grid{grid-template-columns:minmax(0,3fr) minmax(340px,2fr);grid-template-rows:minmax(0,1.45fr) minmax(0,.55fr)}
.prompt-panel{grid-column:1;grid-row:1;display:flex;flex-direction:column;min-height:0}
.option-panel{grid-column:1;grid-row:2;min-height:0}
.task-panel{grid-column:2;grid-row:1 / span 2;min-height:0}
.image-shelf{height:128px;border:1px dashed #d9e0ea;border-radius:16px;background:#fbfcff;padding:8px;margin-bottom:10px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s,background .15s}
.image-shelf.over{border-color:#222a36;background:#f3f6fb}
.image-shelf-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#5f6b7d;line-height:1}
.image-shelf-head span{font-weight:700;color:#2a3344}.image-shelf-head em{font-style:normal;color:#8a94a6}
.image-list{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;display:flex;grid-template-columns:none;gap:8px;align-items:stretch;align-content:stretch;padding-bottom:2px}
.image-list.empty{display:flex;align-items:center;justify-content:center;min-height:74px;color:#a3acba;font-size:13px;border:1px dashed #dce3ed;border-radius:12px}
.image-card{flex:0 0 104px;width:104px;min-height:0;height:84px;padding:6px;border-radius:12px}
.image-card img{height:42px;border-radius:8px}.image-card .name{font-size:11px;margin-top:4px}.image-card .row{gap:4px;margin-top:4px}.image-card .row button{font-size:10px;padding:3px 4px;border-radius:7px}.del{right:2px!important;top:2px!important;width:20px;height:20px;line-height:20px!important}
.editor{min-height:120px}.hint{margin-top:6px}.task-card{grid-template-columns:72px 1fr auto}.task-main p{max-width:100%}
@media(max-width:900px){.grid{grid-template-columns:1fr;grid-template-rows:auto}.task-panel,.prompt-panel,.option-panel{grid-column:auto;grid-row:auto}.image-shelf{height:130px}}

/* 文档要求优化：比例预览、拖拽提示、清空按钮、任务时间布局 */
.prompt-actions{display:flex;justify-content:flex-end;margin-top:8px}
.danger{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important}
.danger:hover{background:#dc2626!important;border-color:#dc2626!important}
.editor.over{border-color:#222a36;background:#f3f6fb}
.ref-tag.dragging{opacity:.45}
.mention-popup{bottom:auto}
.ratio{width:66px;height:60px;gap:3px}
.ratio-visual{width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.rect{display:block;border:2px solid currentColor;border-radius:4px;background:rgba(255,255,255,.55)}
.r916{width:18px;height:32px}.r169{width:32px;height:18px}.r43{width:32px;height:24px}.r34{width:24px;height:32px}.r11{width:28px;height:28px}
.image-card{cursor:grab}.image-card:active{cursor:grabbing}
.task-card{display:grid;grid-template-columns:72px 1fr auto;grid-template-areas:"time time time" "fan main actions";align-items:center;gap:8px 10px;padding:11px}
.task-time{grid-area:time;font-size:13px;font-weight:800;color:#111827;line-height:1.2}
.fan{grid-area:fan}.task-main{grid-area:main;min-width:0}.task-actions{grid-area:actions}.task-title{display:flex;align-items:center;gap:6px;min-width:0}.task-main strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:72%}.task-main em{display:block}


/* 文档新增优化：100% 缩放完整显示、全页禁止滚动、任务列表独立滚动、IP 状态点、上传独立状态、请求中任务态 */
html,body{width:100%;height:100%;min-height:100%;overflow:hidden}body{height:100vh;min-height:100vh;overflow:hidden}.app-shell{height:100vh;min-height:0;max-height:100vh;padding:10px;gap:8px;overflow:hidden}.topbar{height:72px;min-height:72px;flex-shrink:0;padding:10px 14px}.grid{min-height:0;overflow:hidden;gap:8px}.panel{overflow:hidden}.prompt-panel,.option-panel,.task-panel{min-height:0;overflow:hidden}.task-list{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-right:2px}.option-row{grid-template-columns:repeat(4,minmax(0,1fr))}.option-row input,.option-row select,.config-bottom input,.config-bottom select{width:100%;min-width:0}.upload-state{position:absolute;left:6px;top:6px;z-index:2;border-radius:999px;padding:2px 6px;font-size:10px;font-weight:700;background:rgba(17,24,39,.72);color:#fff;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-card.upload-ok .upload-state{background:#16a34a}.image-card.upload-failed .upload-state{background:#dc2626}.image-card.upload-failed{opacity:.82}.image-error{font-size:10px;color:#be123c;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ref-tag img{pointer-events:none}.task-card.pending{background:#f3f4f6;border-color:#d1d5db}.badge.pending{background:#eef0f3;color:#4b5563}button:disabled{opacity:.55;cursor:not-allowed}button:disabled:hover{background:inherit}@media(max-height:760px){.app-shell{padding:8px;gap:6px}.topbar{height:64px;min-height:64px;padding:8px 12px}.grid{gap:6px}.panel{padding:9px}.image-shelf{height:104px;margin-bottom:7px}.editor{min-height:76px}.ratio{width:54px;height:46px}.ratio-visual{height:26px}.hint{font-size:11px;margin-top:5px}.option-panel{gap:6px}.send-btn{height:36px}.prompt-actions{margin-top:6px}.config-bottom{grid-template-columns:1fr 1fr}.config-bottom button{grid-column:1 / -1}}@media(max-width:900px){html,body{overflow:hidden}body{overflow:hidden}.app-shell{height:100vh;min-height:0}.topbar{height:72px;min-height:72px;flex-direction:row;align-items:center}.grid{grid-template-columns:1fr;grid-template-rows:minmax(0,1.2fr) minmax(136px,.5fr) minmax(0,1fr);overflow:hidden}.prompt-panel{grid-column:1;grid-row:1}.option-panel{grid-column:1;grid-row:2}.task-panel{grid-column:1;grid-row:3}.task-panel,.prompt-panel,.option-panel{min-height:0}}


/* 修复配置浮窗 checkbox：避免被 .config-bottom input 通用样式拉大和错位 */
.config-bottom .check{
  display:flex;
  align-items:center;
  gap:6px;
  height:34px;
  line-height:1.2;
  margin:0;
  white-space:nowrap;
}
.config-bottom .check input[type="checkbox"]{
  flex:0 0 auto;
  width:14px;
  height:14px;
  min-width:14px;
  margin:0;
  padding:0;
  vertical-align:middle;
  accent-color:#222a36;
}

/* 修复配置浮窗底部代理配置排版：放大浮窗宽度，避免复选框文案与后续字段重叠 */
.config-card{
  width:min(980px,96vw);
  height:min(640px,90vh);
  max-width:96vw;
}
.config-bottom{
  grid-template-columns:minmax(240px,1.25fr) minmax(150px,.78fr) minmax(230px,1.15fr) minmax(138px,.72fr) 148px;
  gap:12px;
  align-items:end;
}
.config-bottom label:not(.check){
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  font-size:12px;
  color:#4b5563;
}
.config-bottom .check{
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.config-bottom .primary{
  width:100%;
  min-width:0;
  height:44px;
}
.modal-msg{
  line-height:1.45;
  white-space:normal;
  word-break:break-word;
}
.line-badge{
  min-width:118px;
  height:40px;
  border-radius:12px;
  background:#f8fafc;
  border-color:#dfe7f2;
  font-size:12px;
  font-weight:700;
  color:#1f2937;
}
.line-badge:hover{background:#eef2f7}
.backend-line-label select{
  height:38px;
  border:1px solid #dfe5ee;
  border-radius:12px;
  padding:0 10px;
  background:#fff;
}
.backend-line-label{
  margin-bottom:10px;
}
@media(max-width:980px), (max-height:760px){
  .config-card{
    width:min(820px,94vw);
    height:min(640px,90vh);
  }
  .config-bottom{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .config-bottom .check{
    grid-column:1 / -1;
    height:auto;
    min-height:34px;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  .config-bottom .primary{
    grid-column:1 / -1;
  }
}

/* 配置浮窗底部在 100% 缩放下的最终列宽修正，避免 1024px 左右视口出现横向挤压 */
.config-bottom{
  grid-template-columns:minmax(235px,1.3fr) minmax(145px,.75fr) minmax(220px,1.15fr) minmax(130px,.7fr) 140px;
  gap:12px;
}
@media(max-width:980px), (max-height:760px){
  .config-bottom{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
}

/* 任务列表：函数5轮询状态 + 右侧视频预览区 */
.task-card{grid-template-columns:minmax(0,2fr) 1px minmax(120px,1fr)!important;align-items:stretch;min-height:136px;gap:12px}.task-left{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:10px;align-items:center;min-width:0}.task-video-divider{width:1px;background:#e5e7eb;align-self:stretch}.task-video-box{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:8px;min-width:0}.task-video-box.empty-video{min-height:112px}.task-cover{width:88px;height:88px;object-fit:cover;border-radius:14px;border:1px solid #e5e7eb;background:#f8fafc;cursor:pointer;box-shadow:0 4px 14px rgba(15,23,42,.12)}.download-video{width:88px;text-align:center}.badge.processing{background:#eef0f3;color:#4b5563}.badge.ok{background:#ecfdf3;color:#027a48}.status-submit_failed,.status-failed,.status-retry{border-color:#fecdd3;background:#fff7f8}.status-processing{border-color:#d1d5db;background:#f9fafb}.status-succeed{border-color:#abefc6;background:#fbfffd}.task-error,.task-poll-note{font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-error{color:#be123c}.task-poll-note{color:#6b7280}.retry-query{border-color:#fecdd3;color:#be123c}.video-card{width:min(74vh,88vw);height:min(74vh,88vw);background:rgba(255,255,255,.82);backdrop-filter:blur(6px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px}.video-frame{width:100%;height:calc(100% - 54px);display:flex;align-items:center;justify-content:center;border-radius:16px;background:rgba(15,23,42,.08);overflow:hidden}.video-frame video{max-width:100%;max-height:100%;width:auto;height:auto;border-radius:12px;background:#000}.video-close{background:rgba(107,114,128,.55)!important;color:#fff!important;border:none!important}.video-download-btn{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);background:rgba(15,23,42,.55);color:#fff;border-color:rgba(255,255,255,.28);backdrop-filter:blur(4px)}.video-download-btn:hover{background:rgba(15,23,42,.72)}@media(max-width:900px){.task-card{grid-template-columns:1fr!important}.task-video-divider{display:none}.task-video-box{align-items:flex-start}.task-left{grid-template-columns:82px minmax(0,1fr)}}

/* 本次修复：任务卡片三栏对齐、左侧扇形图靠最左、提示词按钮可点击、视频分割线紧贴预览区且左右留白一致 */
.task-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:none!important;
  align-items:stretch!important;
  min-height:136px;
  gap:0!important;
  padding:10px 12px!important;
  overflow:hidden;
}
.task-left{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:stretch!important;
  min-width:0;
}
.task-left .fan{
  grid-area:auto!important;
  width:92px!important;
  height:100%!important;
  min-height:112px;
  align-self:stretch;
  position:relative;
  margin:0;
}
.task-left .fan img{
  width:62px!important;
  height:62px!important;
  border-radius:12px!important;
  object-fit:cover;
  border:2px solid #fff;
  box-shadow:0 4px 12px rgba(15,23,42,.18);
}
.task-left .fan img:nth-child(1){left:2px!important;top:50%!important;transform:translateY(-50%) rotate(-10deg)!important;z-index:1}
.task-left .fan img:nth-child(2){left:18px!important;top:50%!important;transform:translateY(-50%) rotate(3deg)!important;z-index:2}
.task-left .fan img:nth-child(3){left:34px!important;top:50%!important;transform:translateY(-50%) rotate(12deg)!important;z-index:3}
.task-main{
  grid-area:auto!important;
  min-width:0;
  display:flex!important;
  flex-direction:column;
  justify-content:space-between;
  align-items:stretch;
  padding:4px 0 2px;
  text-align:left;
}
.task-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
  line-height:1.2;
}
.task-head strong{
  flex:0 0 auto;
  max-width:none!important;
  display:inline!important;
  font-size:14px!important;
  font-weight:900!important;
  color:#111827;
  white-space:nowrap;
}
.task-head .task-time{
  grid-area:auto!important;
  flex:0 1 auto;
  min-width:0;
  font-size:12px!important;
  font-weight:500!important;
  color:#667085!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.task-head .badge{flex:0 0 auto}
.task-prompt,.task-main p.task-prompt{
  width:100%;
  max-width:100%!important;
  flex:1 1 auto;
  margin:7px 0 6px!important;
  padding:0;
  font-size:12px;
  line-height:1.45;
  color:#667085;
  text-align:left;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.task-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.task-info{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  min-width:0;
  color:#8a94a6;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
}
.task-info span{flex:0 0 auto}
.task-actions{
  grid-area:auto!important;
  flex:0 0 auto;
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  position:relative;
  z-index:3;
}
.task-actions button{position:relative;z-index:4;white-space:nowrap}
.task-video-area{
  display:grid;
  grid-template-columns:1px 112px;
  align-items:center;
  align-self:stretch;
  min-width:113px;
  margin-left:12px;
}
.task-video-area .task-video-divider{
  display:block;
  width:1px;
  height:100%;
  background:#e5e7eb;
  align-self:stretch;
}
.task-video-area .task-video-box{
  width:112px;
  min-width:112px;
  min-height:112px;
  display:flex;
  flex-direction:column;
  align-items:center!important;
  justify-content:center;
  gap:8px;
  padding:0;
}
.task-video-area .task-cover{
  width:88px!important;
  height:88px!important;
}
.task-video-area .download-video,
.task-video-area .download-video-original{
  width:88px!important;
  text-align:center;
}
.task-video-area .empty-video{min-height:112px}
.task-error,.task-poll-note{max-width:100%;text-align:left}
@media(max-width:900px){
  .task-card{grid-template-columns:1fr!important;gap:8px!important}
  .task-left{grid-template-columns:92px minmax(0,1fr)!important}
  .task-video-area{grid-template-columns:1px 112px;margin-left:104px;min-height:112px}
}


/* 本次优化：视频预览浮窗放大、不透明，下载按钮放到视频区域下方，避免遮挡 9:16 视频 */
.video-card{
  width:min(920px,96vw)!important;
  height:min(980px,92vh)!important;
  background:#fff!important;
  backdrop-filter:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:12px!important;
  padding:18px!important;
}
.video-frame{
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  background:#111827!important;
}
.video-frame video{
  max-width:100%!important;
  max-height:100%!important;
  width:auto!important;
  height:auto!important;
}
.video-download-btn{
  position:static!important;
  left:auto!important;
  bottom:auto!important;
  transform:none!important;
  flex:0 0 auto!important;
  align-self:center!important;
  background:#111827!important;
  color:#fff!important;
  border-color:#111827!important;
  backdrop-filter:none!important;
}
.video-download-btn:hover{background:#020617!important}
.video-download-actions{
  flex:0 0 auto;
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.video-download-btn:not(.video-original-download-btn){
  background:#fff!important;
  color:#111827!important;
  border-color:#d1d5db!important;
}
.video-download-btn:not(.video-original-download-btn):hover{background:#f3f4f6!important}
.task-poll-note{display:none!important}

/* 新增：高级参数设置浮窗，替代主参数行中的帧间隔输入 */
.option-panel{overflow:visible;z-index:20}
.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.advanced-wrap{position:relative;display:flex;justify-content:flex-end;min-height:34px;z-index:25}
.advanced-btn{height:34px;min-width:132px;font-weight:700;background:#fbfcff}
.advanced-popup{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:60;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;box-shadow:0 18px 42px rgba(15,23,42,.18);max-height:min(320px,calc(100vh - 220px));overflow:auto}
.advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:end}
.advanced-grid label{font-size:12px;color:#5f6b7d;display:flex;flex-direction:column;gap:4px;min-width:0;font-weight:600}
.advanced-grid input,.advanced-grid select{height:34px;width:100%;min-width:0;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff;color:#1d2433;font-weight:500}
.advanced-grid input:focus,.advanced-grid select:focus{outline:none;border-color:#222a36;box-shadow:0 0 0 3px rgba(34,42,54,.08)}
@media(max-height:760px){.advanced-popup{max-height:min(270px,calc(100vh - 150px));padding:10px}.advanced-grid{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.advanced-btn{height:32px}.advanced-grid input,.advanced-grid select{height:32px}}
@media(max-width:900px){.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}.advanced-popup{left:0;right:0;max-height:min(300px,60vh)}.advanced-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.option-row{grid-template-columns:1fr}.advanced-grid{grid-template-columns:1fr}.advanced-wrap{justify-content:stretch}.advanced-btn{width:100%}}

/* 本次修复：高级参数按钮与分辨率/时长/生成条数同排等宽；弹窗仍从按钮处展开 */
.option-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:end}
.advanced-wrap{width:100%;min-width:0;align-self:end;justify-content:stretch!important}
.advanced-btn{width:100%!important;min-width:0!important;height:34px!important;border-radius:10px!important;padding:0 8px!important;white-space:nowrap}
.advanced-popup{left:auto!important;right:0!important;width:min(520px,calc(100vw - 32px))!important;bottom:calc(100% + 8px)!important}
@media(max-width:900px){.option-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}.advanced-popup{right:0!important;left:auto!important}}
@media(max-width:560px){.option-row{grid-template-columns:1fr!important}.advanced-wrap{justify-content:stretch!important}.advanced-popup{left:0!important;right:0!important;width:auto!important}}

/* 本次调整：上传图片列表缩略图固定为 1:1，保留原有横向图片列表与操作逻辑 */
.image-shelf{height:162px}
.image-list{align-items:stretch;scrollbar-gutter:stable}
.image-card{flex:0 0 112px;width:112px;height:126px;padding:6px;display:flex;flex-direction:column;gap:4px;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfcff);box-shadow:0 4px 12px rgba(15,23,42,.04)}
.image-card img{width:66px!important;height:66px!important;aspect-ratio:1/1;object-fit:cover;border-radius:12px;margin:0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);background:#eef2f7;flex:0 0 auto}
.image-card .name{margin-top:0;line-height:1.25;text-align:center;min-height:14px}
.image-card .ref-name{font-size:10px;line-height:1.15;text-align:center;color:#8a94a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:12px}
.image-card .row{margin-top:auto;gap:4px;flex:0 0 auto}
.image-card .row button{min-width:0;height:22px;line-height:1;padding:0 4px}
.image-error{position:absolute;left:6px;right:6px;bottom:30px;margin-top:0;padding:1px 4px;border-radius:6px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px rgba(190,18,60,.08);text-align:center}
@media(max-height:760px){.image-shelf{height:144px}.image-card{flex-basis:102px;width:102px;height:110px;padding:5px;gap:3px}.image-card img{width:54px!important;height:54px!important;border-radius:10px}.image-card .row button{height:20px;font-size:10px}.image-error{bottom:27px}}
@media(max-width:900px){.image-shelf{height:154px}.image-card{height:118px}.image-card img{width:60px!important;height:60px!important}}

/* 文档优化：任务卡片略增高度，避免内容溢出；失败任务在视频按钮区域显示重新生成 */
.task-card{min-height:152px!important;}
.task-left .fan{min-height:128px!important;}
.task-video-area .task-video-box,.task-video-area .empty-video{min-height:128px!important;}
.task-video-area .retry-generate{width:88px!important;text-align:center;}


/* 客户端卡密状态与配置窗口 */
.license-card{min-width:220px;height:50px;padding:7px 12px;border-radius:14px;background:#f7f9fd;border:1px solid #e8edf6;display:flex;flex-direction:column;justify-content:center}
.license-card span{font-size:11px;color:#8a94a6}.license-card strong{font-size:13px}.license-card em{font-size:11px;color:#667085;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}.modal-label{display:flex;flex-direction:column;gap:6px;margin:8px 0 10px;font-size:13px;color:#4b5563}.modal-label input{height:38px;border:1px solid #dfe5ee;border-radius:12px;padding:0 10px;background:#fff}.client-config-bottom{display:flex!important;justify-content:flex-end!important;grid-template-columns:none!important}.client-config-bottom .primary{width:auto!important;min-width:180px}.config-card textarea#licenseTextInput{min-height:250px}
@media(max-width:900px){.top-actions{flex-wrap:wrap;justify-content:flex-end}.license-card{min-width:180px}.topbar{height:auto;min-height:92px}.grid{grid-template-rows:minmax(0,1.05fr) minmax(136px,.5fr) minmax(0,1fr)}}

/* 本次调整：服务器连通测试按钮 + 卡密验证阶段详细错误展示 */
.client-config-bottom{gap:10px;align-items:center;flex-wrap:wrap}
.client-config-bottom button{width:auto!important;min-width:160px;height:40px}
.client-config-bottom .primary{min-width:180px!important}
.config-card .modal-msg{white-space:pre-wrap;word-break:break-word;max-height:170px;overflow:auto;border-radius:10px;padding:0;font-family:Consolas,"Microsoft YaHei",monospace}
.config-card .modal-msg:not(:empty){padding:8px 10px;background:#fff7f8;border:1px solid #fecdd3}
.config-card .modal-msg:not(:empty){color:inherit}
@media(max-width:560px){.client-config-bottom button{width:100%!important}.client-config-bottom .primary{width:100%!important}}

.config-card .modal-msg.success:not(:empty){background:#ecfdf3!important;border-color:#abefc6!important}
.config-card .modal-msg.error:not(:empty){background:#fff7f8!important;border-color:#fecdd3!important}


/* Final client cleanup: fixed backend, no IP card, readable license/quota, preserved prompt line breaks. */
.top-actions{flex-wrap:wrap;justify-content:flex-end;max-width:620px}
.license-card{min-width:310px!important;max-width:390px!important;height:auto!important;min-height:54px!important;padding:8px 12px!important}
.license-card strong,.license-card em{display:block;max-width:100%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}
.editor{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.config-card{width:min(680px,94vw)!important;height:min(560px,88vh)!important}
.config-card textarea#licenseTextInput{min-height:300px!important}
.client-config-bottom{justify-content:flex-end!important;gap:10px!important}
.modal-msg{line-height:1.5!important}
@media(max-width:900px){.top-actions{justify-content:flex-start;max-width:100%}.license-card{min-width:260px!important;max-width:100%!important}.topbar{height:auto!important;min-height:92px!important}}

/* Asset library and concurrency update */
.prompt-section-title{gap:10px}
.prompt-upload-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.asset-open-btn{min-width:78px;background:#0b2a5b!important;border-color:#0b2a5b!important;color:#fff!important;font-weight:700}
.asset-open-btn:hover{background:#071f44!important;border-color:#071f44!important}
.asset-modal{background:rgba(2,6,23,.58)!important}
.asset-card{width:75vw!important;height:75vh!important;max-width:none!important;max-height:none!important;background:#111827!important;color:#f8fafc!important;border:1px solid rgba(148,163,184,.35)!important;border-radius:20px!important;box-shadow:0 28px 80px rgba(0,0,0,.42)!important;display:flex!important;flex-direction:column!important;gap:12px!important;padding:18px!important;overflow:hidden!important}
.asset-close,.asset-preview-close{background:#ef4444!important;color:#fff!important;border:none!important;font-size:22px!important;line-height:1!important}
.asset-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding-right:38px}
.asset-head h2{font-size:18px;color:#fff;margin:0 0 6px}
.asset-head p{margin:0;color:#aab4c4;font-size:12px;line-height:1.45}
.asset-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.asset-head-actions .small{height:32px;min-width:88px}
.asset-grid{position:relative;flex:1 1 auto;min-height:0;overflow:auto;border:1px dashed rgba(148,163,184,.42);border-radius:16px;padding:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:14px;align-content:start;background:rgba(15,23,42,.82);user-select:none}
.asset-grid.empty{display:flex;align-items:center;justify-content:center;text-align:center;color:#94a3b8;font-size:14px;cursor:pointer}
.asset-card.over .asset-grid,.asset-grid:hover{border-color:#93c5fd;background:rgba(15,23,42,.92)}
.asset-item{position:relative;min-width:0;border:1px solid rgba(148,163,184,.24);border-radius:16px;background:#1f2937;padding:10px;display:flex;flex-direction:column;gap:8px;overflow:hidden;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.asset-item.selected{outline:3px solid #60a5fa;border-color:#bfdbfe;background:#24344a}
.asset-item img{width:100%;aspect-ratio:1/1;height:auto;object-fit:cover;border-radius:12px;background:#0f172a;display:block;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.asset-name-row{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:24px}
.asset-name{font-size:13px;line-height:1.3;max-width:calc(100% - 24px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;color:#e5e7eb}
.asset-rename{width:18px;height:18px;min-width:18px;padding:0!important;border:none!important;background:transparent!important;color:#cbd5e1!important;border-radius:4px!important;font-size:14px!important;line-height:18px!important}
.asset-rename:hover{background:rgba(148,163,184,.18)!important;color:#fff!important}
.asset-name-input{width:100%;height:24px;border:1px solid #60a5fa;border-radius:8px;background:#0f172a;color:#fff;text-align:center;padding:0 6px;outline:none;font-size:13px}
.asset-selection-box{position:absolute;z-index:6;border:1px solid #60a5fa;background:rgba(96,165,250,.18);pointer-events:none;border-radius:6px}
.asset-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:38px}
#assetMsg{font-size:12px;color:#bbf7d0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#assetMsg.bad{color:#fecdd3}
.asset-delete-all,.asset-delete-selected{height:36px;min-width:138px;font-weight:700;color:#fff!important;border:none!important;flex:0 0 auto}
.asset-delete-all{background:#dc2626!important}
.asset-delete-all:hover{background:#b91c1c!important}
.asset-delete-selected{background:#6b7280!important}
.asset-delete-selected:hover{background:#4b5563!important}
.asset-delete-all:disabled,.asset-delete-selected:disabled{opacity:.45;cursor:not-allowed}
.asset-preview-modal{background:rgba(2,6,23,.72)!important;cursor:zoom-out}
.asset-preview-card{width:min(920px,90vw)!important;height:min(880px,88vh)!important;background:#0b1120!important;border:1px solid rgba(148,163,184,.35)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:18px!important;cursor:zoom-out}
.asset-preview-card img{max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.45)}
@media(max-width:900px){.asset-card{width:92vw!important;height:82vh!important}.asset-head{align-items:flex-start;flex-direction:column}.asset-head-actions{width:100%;justify-content:flex-end}.asset-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}.prompt-upload-actions{gap:6px}.asset-open-btn{min-width:72px}}

/* Task restore/reroll additions */
.task-actions{flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;gap:6px!important}
.task-actions .reroll-task,.task-actions .use{width:88px!important;text-align:center!important}
.status-restoring{border-color:#d1d5db;background:#f9fafb}


/* Project optimization: per-card task selection and short-card notices */
.hidden{display:none!important}
.task-title-actions{display:flex;align-items:center;gap:8px}
.task-title-actions .danger{background:#be123c!important;border-color:#be123c!important;color:#fff!important;font-weight:700}
.task-title-actions .danger:hover{background:#9f1239!important;border-color:#9f1239!important}
.task-card{position:relative!important}
.task-select{position:absolute;left:10px;top:10px;width:22px;height:22px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:pointer}
.task-select input{position:absolute;opacity:0;pointer-events:none}
.task-select span{width:19px;height:19px;border-radius:50%;border:2px solid #cbd5e1;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.10);display:block}
.task-select input:checked + span{background:#111827;border-color:#111827;box-shadow:inset 0 0 0 4px #fff,0 2px 8px rgba(15,23,42,.16)}
.task-card.task-selected{outline:2px solid #11182722;background:#fbfcff}
.task-card .fan{margin-left:18px}
.config-card textarea#licenseTextInput{min-height:76px!important;height:86px!important;max-height:96px!important;line-height:1.45!important;font-size:13px!important;resize:none!important}
.config-card{height:auto!important;min-height:0!important;max-height:min(460px,88vh)!important}
.expire-notice-modal{background:rgba(15,23,42,.42)!important;z-index:80!important}
.expire-notice-card{width:min(560px,92vw)!important;min-height:310px!important;padding:30px 32px 20px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;text-align:center!important}
.expire-notice-content{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:0}
.expire-notice-content .notice-line{margin:0;text-align:center;line-height:1.7;font-size:20px;color:#111827;font-weight:400}
.expire-notice-content .notice-line-2{margin-top:44px}
.expire-notice-content .notice-line-3{margin-top:44px;color:#dc2626!important;font-weight:800!important;font-size:24px!important}
.expire-notice-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px}
.notice-skip{font-size:13px;color:#4b5563;display:flex;align-items:center;gap:6px;user-select:none}
#expireNoticeCloseBtn{min-width:96px;height:38px}
@media(max-width:560px){.expire-notice-card{padding:24px 18px 18px!important}.expire-notice-content .notice-line{font-size:17px}.expire-notice-content .notice-line-3{font-size:21px!important}.expire-notice-footer{align-items:stretch;flex-direction:column}.notice-skip{justify-content:flex-start}#expireNoticeCloseBtn{width:100%}}


/* Fixed prompt content box */
.fixed-prompt-wrap{display:flex;flex-direction:column;gap:6px;margin-top:8px;flex:0 0 auto;font-size:12px;color:#6c7586}
.fixed-prompt-wrap span{font-weight:700;color:#4b5563}
.fixed-prompt-input{width:100%;min-height:66px;max-height:118px;resize:vertical;border:1px solid #dfe5ee;border-radius:14px;background:#fbfcff;padding:10px 12px;outline:none;line-height:1.45;font-size:13px;font-family:inherit;color:#1d2433}
.fixed-prompt-input:focus{border-color:#94a3b8;background:#fff}
@media(max-height:760px){.fixed-prompt-input{min-height:50px;max-height:84px}.fixed-prompt-wrap{margin-top:6px}}


/* Project optimization requested in uploaded document: image re-upload, stable task previews, and tighter task-left layout */
.image-list.over{border-color:#222a36;background:#f3f6fb}
.image-card .row .reupload{font-weight:700}
.auto-ref-btn{font-weight:700}
.ref-tag .ref-main{font-size:12px;font-weight:700;line-height:1}
.ref-tag .ref-file{font-size:10px;line-height:1;color:#667085;max-width:92px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-card{padding:8px 12px 10px 8px!important}
.task-left{grid-template-columns:76px minmax(0,1fr)!important;gap:8px!important}
.task-left .fan{width:76px!important;min-height:128px!important;margin-left:0!important;transform:translateX(-4px)}
.task-left .fan img{width:58px!important;height:58px!important}
.task-left .fan img:nth-child(1){left:0!important}
.task-left .fan img:nth-child(2){left:12px!important}
.task-left .fan img:nth-child(3){left:24px!important}
.task-select{left:4px!important;top:4px!important;width:20px!important;height:20px!important}
.task-select span{width:17px!important;height:17px!important}
@media(max-width:900px){.task-left{grid-template-columns:76px minmax(0,1fr)!important}.task-video-area{margin-left:88px!important}}
