/* 视频生成页独立布局：保留原页面内联样式的级联顺序与性能回退。 */
.video-suite-page .app-wrapper { display: block; }
.video-suite-page a.system-admin-btn { text-decoration: none; }
.video-main { max-width: 1680px; margin: 0 auto; padding: 0 18px 60px; }
.video-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 22px; }
.video-panel { min-width: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.video-panel-title { font-family: var(--font-heading); font-size: 14px; font-weight: 800; color: var(--text-primary); margin: 0; }
.video-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin: 0 0 6px; }
.video-stack { display: flex; flex-direction: column; gap: 12px; }
.video-collapsible {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid rgba(245,166,35,0.22);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-overlay-soft);
}
.video-collapsible-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.video-collapse-btn {
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 6px;
  background: rgba(245,166,35,0.1);
  color: var(--amber);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.video-collapse-btn:hover { background: rgba(245,166,35,0.18); }
.video-collapsible.is-collapsed #video-listing-search { display: none; }
.video-field { display: flex; flex-direction: column; gap: 6px; }
.video-field label { font-size: 12px; color: var(--text-secondary); font-weight: 700; }
.video-field input, .video-field textarea, .video-field select {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated);
  color: var(--text-primary); font: inherit; font-size: 13px; padding: 9px 10px; outline: none;
}
#video-listing-search {
  box-sizing: border-box;
  width: calc(100% + 12px);
  min-width: 0;
  margin: 2px -6px 2px;
  padding: 12px;
  border: 1px solid rgba(245, 166, 35, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.12), var(--surface-overlay-medium));
  box-shadow: inset 0 1px 0 var(--surface-overlay-medium), 0 8px 24px rgba(0,0,0,0.18);
  overflow: hidden;
}
#video-listing-query {
  box-sizing: border-box;
  min-width: 0;
  border-color: rgba(245, 166, 35, 0.48);
  background: var(--surface-overlay-strong);
  color: var(--text-primary);
}
#video-listing-query::placeholder { color: var(--text-muted); }
.video-field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.video-field input:focus, .video-field textarea:focus, .video-field select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.video-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.video-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); font-size: 12px; color: var(--text-secondary); }
.video-toggle-row input { width: auto; }
.video-mode-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.video-mode-btn { position: relative; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); color: var(--text-secondary); padding: 9px 6px; font-size: 12px; font-weight: 800; cursor: pointer; transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease; }
.video-mode-btn:hover:not(:disabled):not(.active) { border-color: var(--amber); color: var(--text-primary); }
.video-mode-btn.active { border: 2px solid var(--amber); color: var(--amber); background: var(--amber-dim); box-shadow: 0 0 0 3px rgba(245,166,35,0.35); transform: translateY(-1px); font-weight: 900; }
.video-mode-btn.active::after { content: '✓'; position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--amber); }
.video-mode-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.video-help { font-size: 11px; line-height: 1.5; color: var(--text-secondary); min-height: 18px; }
.video-upload { border: 1px dashed var(--border); border-radius: 8px; background: var(--bg-elevated); padding: 18px; text-align: center; cursor: pointer; color: var(--text-secondary); font-size: 13px; }
.video-upload:hover { border-color: var(--amber); }
.video-upload input { display: none; }
.video-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.video-thumb { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 6px; object-fit: cover; width: 100%; background: var(--bg-elevated); }
.video-asset-picker { display: grid; gap: 8px; }
.video-asset-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.video-asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.video-asset-card { display: block; width: 100%; height: auto; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 8px; padding: 0; background: var(--bg-elevated); cursor: pointer; overflow: hidden; position: relative; line-height: normal; text-align: left; }
.video-asset-card:hover, .video-asset-card.active { border-color: var(--amber); }
.video-asset-card.active::after { content: "已选"; position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 5px; background: var(--amber); color: #0a0a0c; font-size: 10px; font-weight: 800; }
.video-asset-card .hover-preview {
  display: none; position: fixed; z-index: 9999; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(60vw, 520px); aspect-ratio: 1; overflow: hidden;
  border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  border: 2px solid var(--border-strong); background: #000;
}
.video-asset-card .hover-preview img { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto; background: #000; }
.video-asset-card:hover .hover-preview { display: block; }
.video-asset-card:hover img:not(.hover-preview img) { opacity: 0.5; }
.video-asset-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: color-mix(in srgb, var(--bg-elevated) 88%, #000 12%); }
.video-asset-card span { display: block; padding: 7px 8px; font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-mini-link { color: var(--amber); text-decoration: none; font-weight: 800; }
.video-bound { display: grid; gap: 7px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.video-bound strong { color: var(--text-primary); font-size: 13px; }
.video-listing-results { display: grid; width: 100%; min-width: 0; gap: 9px; max-height: 260px; overflow: auto; padding-right: 4px; }
.video-listing-results::-webkit-scrollbar { width: 8px; }
.video-listing-results::-webkit-scrollbar-thumb { background: rgba(245,166,35,0.45); border-radius: 999px; }
.video-listing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-content: stretch;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 64px;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, var(--surface-overlay-strong), var(--surface-overlay-strong));
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  line-height: normal;
  white-space: normal;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}
.video-listing-card strong {
  display: block;
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-listing-card div {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-listing-card:hover, .video-listing-card:focus-visible {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(245,166,35,0.2), var(--surface-overlay-strong));
  box-shadow: 0 0 0 3px rgba(245,166,35,0.18), 0 12px 26px rgba(0,0,0,0.22);
  outline: none;
}
.video-action { width: 100%; border: 1px solid var(--amber); border-radius: 6px; background: linear-gradient(135deg, var(--amber), #d98c1e); color: #0a0a0c; padding: 11px 16px; font-weight: 800; cursor: pointer; }
.video-action[data-blocked="1"] { opacity: 0.78; }
.video-action:disabled { opacity: 0.45; cursor: not-allowed; }
.video-cost { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); padding: 9px 10px; font-size: 12px; color: var(--text-secondary); }
.video-cost strong { color: var(--amber); font-family: var(--font-mono); font-size: 13px; }
.video-status { min-height: 20px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.video-status[data-tone="error"] { color: #f87171; }
.video-source-hint { border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); padding: 8px 10px; font-size: 11px; color: var(--text-secondary); line-height: 1.6; }
.video-source-hint[data-tone="warn"] { border-color: rgba(245, 166, 35, 0.55); background: rgba(245, 166, 35, 0.08); color: #f8d28b; }
.video-stage { min-height: 640px; display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.video-preview-wrap { display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated); min-height: 520px; padding: 24px; }
.video-preview-wrap video { max-width: min(100%, 760px); max-height: 70vh; border-radius: 8px; background: #000; }
.video-empty { color: var(--text-secondary); text-align: center; font-size: 13px; line-height: 1.7; }
.video-generation-progress { width: min(100%, 620px); display: grid; gap: 16px; color: var(--text-primary); }
.video-progress-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.video-progress-head strong { display: block; font-size: 15px; line-height: 1.35; letter-spacing: 0; }
.video-progress-head p { margin: 5px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.video-gen-spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--amber); border-radius: 50%; animation: video-spin 1s linear infinite; margin-top: 1px; }
.video-generation-progress[data-tone="success"] .video-gen-spinner,
.video-generation-progress[data-tone="error"] .video-gen-spinner { animation: none; border-color: var(--amber); }
.video-generation-progress[data-tone="error"] .video-gen-spinner { border-color: #f87171; }
.video-progress-track { height: 6px; border-radius: 999px; background: var(--surface-overlay-strong); overflow: hidden; }
.video-progress-track i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(135deg, var(--amber), #8b5cf6); transition: width 0.35s ease; }
.video-generation-progress[data-tone="running"] .video-progress-track i { animation: video-progress-glow 1.8s ease-in-out infinite; }
.video-progress-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.video-progress-step { border: 1px solid var(--border); border-radius: 6px; padding: 8px 6px; text-align: center; color: var(--text-muted); font-size: 11px; font-weight: 800; background: var(--surface-overlay-soft); }
.video-progress-step.done { border-color: rgba(245,166,35,0.5); color: var(--amber); background: rgba(245,166,35,0.1); }
.video-progress-step.active { border-color: var(--amber); color: var(--text-primary); box-shadow: 0 0 0 3px rgba(245,166,35,0.14); }
.video-progress-detail { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.65; }
.video-generation-progress[data-tone="error"] .video-progress-detail { color: #fca5a5; }
.video-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.video-card { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); padding: 10px; display: grid; gap: 8px; }
.video-card video { width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; background: #000; object-fit: cover; }
.video-card-meta { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
@keyframes video-spin { to { transform: rotate(360deg); } }
@keyframes video-progress-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@media (max-width: 940px) {
  .video-grid { grid-template-columns: 1fr; }
  .video-preview-wrap { min-height: 360px; }
  .video-progress-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 视频页性能优化：关闭按钮/控件的实时 backdrop-filter */
.video-suite-page :where(button, .btn, [class*="btn"]),
.video-suite-page :where(button, .btn):hover,
.video-suite-page :where(button, .btn):active {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .video-gen-spinner { animation: none; }
  .video-generation-progress[data-tone="running"] .video-progress-track i { animation: none; }
}
