/* ============================================================
   团享内容助手 · 视频创作页
   依赖 style.css / studio.css 的公共变量与按钮、表单、chips
   ============================================================ */

/* hidden 必须能压住 .btn/.vd-empty 等的 display 设定 */
[hidden] { display: none !important; }

.vd-head {
  padding: 54px 0 26px;
  background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line-2);
}
.vd-head h1 {
  font-size: 34px; line-height: 1.28; letter-spacing: -.4px;
  margin: 14px 0 12px; font-weight: 700; color: var(--ink);
}
.vd-head p { max-width: 760px; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }

/* ---------------- 栅格 ---------------- */
.vd-body { padding: 28px 0 64px; }
.vd-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 320px);
  gap: 26px; align-items: start; max-width: 1320px;
}
.vd-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 20px;
}
.vd-panel h3 {
  font-size: 14px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.vd-panel h3 .num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; font-style: normal;
}
.vd-panel h3 small {
  margin-left: auto; font-size: 11.5px; font-weight: 400; color: var(--ink-3);
}
.vd-panel h4 { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 16px 0 8px; }
.vd-h3 { margin-top: 24px !important; }

/* ---------------- 上传 ---------------- */
.vd-drop {
  border: 1.5px dashed #CBD7EA; border-radius: 11px; background: #FAFCFF;
  padding: 16px 14px; text-align: center; transition: .16s;
}
.vd-drop.hot { border-color: var(--blue); background: var(--blue-l); }
.vd-drop p { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; margin-top: 9px; }
.vd-drop .up-btn { width: 100%; }

.vd-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.vd-th {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 3 / 4; background: #EEF2F8; border: 1px solid var(--line);
}
.vd-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-th .no {
  position: absolute; left: 4px; top: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 4px; background: rgba(10,18,32,.66); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
}
.vd-th .del {
  position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: rgba(10,18,32,.6); color: #fff; font-size: 12px; line-height: 18px;
  cursor: pointer; padding: 0;
}
.vd-th .del:hover { background: #D64545; }

/* ---------------- 风格块 ---------------- */
.vd-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.vd-sty {
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 9px 10px; cursor: pointer; transition: .14s; text-align: left;
  font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px;
  font-family: inherit;
}
.vd-sty i {
  width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block;
}
.vd-sty:hover { border-color: #C6D6F2; }
.vd-sty.on { border-color: var(--blue); background: var(--blue-l); color: var(--blue-d); font-weight: 600; }

/* ---------------- 分段按钮 ---------------- */
.vd-row { display: flex; gap: 10px; margin-top: 14px; }
.vd-seg-wrap { flex: 1; min-width: 0; }
.vd-seg-wrap > label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.vd-seg { display: flex; background: #F3F6FB; border-radius: 8px; padding: 3px; gap: 2px; }
.vd-seg button {
  flex: 1; border: 0; background: transparent; border-radius: 6px;
  font-size: 11.5px; color: var(--ink-2); padding: 6px 0; cursor: pointer;
  font-family: inherit; transition: .14s; white-space: nowrap;
}
.vd-seg button.on { background: #fff; color: var(--blue-d); font-weight: 600; box-shadow: 0 1px 3px rgba(18,22,31,.1); }

/* ---------------- 预览区 ---------------- */
.vd-preview { position: sticky; top: 76px; }
.vd-stage {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #0E1218; aspect-ratio: 9 / 16; max-height: 74vh; margin: 0 auto;
  width: auto; box-shadow: 0 14px 40px rgba(18,22,31,.18);
  display: flex; align-items: center; justify-content: center;
}
.vd-stage canvas, .vd-stage video {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
/* hidden 属性必须压得住 display 设定，否则空状态会盖在成片上 */
.vd-stage [hidden], .vd-stage .vd-empty[hidden] { display: none !important; }
.vd-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #8A96A8; font-size: 12.5px; text-align: center; padding: 0 26px;
  background: radial-gradient(120% 80% at 50% 20%, #1B2534 0%, #0E1218 70%);
}
.vd-empty b { color: #E8EEF8; font-size: 15px; font-weight: 600; }
.vd-empty span { line-height: 1.7; }

.vd-prog { height: 4px; border-radius: 999px; background: #EDF1F8; margin: 14px 0 8px; overflow: hidden; }
.vd-prog i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #4D8BFF); transition: width .12s linear; }
.vd-status { font-size: 11.5px; color: var(--ink-3); text-align: center; min-height: 17px; margin-bottom: 12px; }
.vd-status.ok { color: #1D7A46; }
.vd-status.err { color: #C0392B; }

.vd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vd-actions .btn { font-size: 13px; padding: 11px 8px; }
.vd-actions .btn-primary { grid-column: 1 / -1; }
.vd-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.vd-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.75; margin-top: 12px; }
.vd-note b { color: var(--ink-2); }

/* 本机能力自查 */
.vd-check { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vd-check button {
  font: inherit; font-size: 11.5px; color: var(--blue); background: none; border: none;
  padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.vd-check-out {
  margin-top: 8px; padding: 10px 12px; border-radius: 9px; background: #F6F8FC;
  border: 1px solid #E4EAF4; font-size: 11.5px; color: var(--ink-2); line-height: 1.85;
  white-space: pre-wrap; word-break: break-all;
}
.vd-check-out[hidden] { display: none; }
.vd-check-out b { color: var(--ink); }

/* ---------------- 文案 ---------------- */
.vd-gen { display: flex; gap: 7px; }
.vd-gen .up-btn { flex: 1; }
.vd-gen .up-del { flex: none; }
.vd-copy-list { display: grid; gap: 7px; margin: 12px 0 4px; max-height: 224px; overflow-y: auto; }
.vd-copy {
  text-align: left; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; padding: 9px 11px; cursor: pointer; transition: .14s;
  font-family: inherit; width: 100%;
}
.vd-copy:hover { border-color: #C6D6F2; background: #FBFCFF; }
.vd-copy.on { border-color: var(--blue); background: #F7FAFF; box-shadow: 0 0 0 2px rgba(22,87,214,.08); }
.vd-copy b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 3px; font-weight: 600; }
.vd-copy span { display: block; font-size: 11.5px; color: var(--ink-2); line-height: 1.65; }

/* ---------------- 说明 ---------------- */
.vd-foot-note { padding: 0 0 70px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .vd-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .vd-preview { grid-column: 2; grid-row: 1; position: static; }
  .vd-panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .vd-head { padding: 34px 0 20px; }
  .vd-head h1 { font-size: 25px; }
  .vd-head p { font-size: 13.5px; }
  .vd-grid { grid-template-columns: 1fr; gap: 18px; }
  /* 手机上按使用顺序排：素材 → 文案 → 成片。桌面端那种左右并排的"边写边看"在小屏上
     只会让人来回滚，不如把生成结果放在最后一步。 */
  .vd-panel:first-child { order: 1; }
  .vd-panel:last-child { order: 2; }
  .vd-preview { grid-column: 1; grid-row: auto; order: 3; }
  .vd-stage { max-height: 62vh; }
  .vd-panel { padding: 15px 14px 17px; }
  .vd-actions .btn { font-size: 12.5px; }
}
