/* ============================================================
   视频工厂 - 样式表 v7
   深色主题 · 背景 #15202e · 主色 #4361ee
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #15202e;
  --bg-panel: #1e2a3a;
  --bg-card: #263449;
  --bg-input: #2c3a52;
  --border: #35445c;
  --primary: #4361ee;
  --primary-hover: #3a56d4;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #e8edf5;
  --text-sub: #94a3b8;
  --text-mute: #64748b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.vf-app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* ============================================================
   顶部导航
   ============================================================ */

.vf-nav-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px 0 32px;
  flex-wrap: wrap;
}

.vf-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.vf-nav-btn:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--text-sub);
}

.vf-nav-btn.vf-nav-btn-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.vf-nav-icon { font-size: 16px; line-height: 1; }

/* ============================================================
   视图容器
   ============================================================ */

.vf-view { animation: vf-fade-in 0.25s ease; }

@keyframes vf-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   首页：功能卡片
   ============================================================ */

.vf-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.vf-home-card {
  padding: 32px 28px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.vf-home-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.vf-home-card:hover:not(.vf-home-card-disabled) {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(67, 97, 238, 0.18);
}

.vf-home-card:hover:not(.vf-home-card-disabled)::before { opacity: 1; }

.vf-home-card-disabled { opacity: 0.45; cursor: not-allowed; }

.vf-home-card-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 18px;
  position: relative;
}

.vf-home-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
}

.vf-home-card p {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
  line-height: 1.5;
  position: relative;
}

.vf-home-card-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  position: relative;
}

.vf-badge-online { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.vf-badge-soon { background: rgba(148, 163, 184, 0.12); color: var(--text-mute); }

/* ============================================================
   配置页头部
   ============================================================ */

.vf-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}

.vf-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vf-page-back:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--text-sub);
}

.vf-page-title { font-size: 20px; font-weight: 600; color: var(--text); }

/* ============================================================
   主区域（左 6 : 右 4）
   ============================================================ */

.vf-main {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 20px;
  align-items: start;
}

.vf-panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}

.vf-section { margin-bottom: 22px; }
.vf-section:last-child { margin-bottom: 0; }

.vf-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.vf-hint {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 400;
  margin-left: 6px;
}

/* ============================================================
   用途选择
   ============================================================ */

.vf-mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vf-mode-card { position: relative; display: block; cursor: pointer; }

.vf-mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vf-mode-content {
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  text-align: center;
  height: 100%;
}

.vf-mode-card:hover .vf-mode-content { background: #2d3d54; }

.vf-mode-card input:checked + .vf-mode-content {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.12);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.vf-mode-icon { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.vf-mode-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.vf-mode-desc { font-size: 12px; color: var(--text-sub); line-height: 1.5; }

/* ============================================================
   上传区
   ============================================================ */

.vf-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(44, 58, 82, 0.3);
}

.vf-upload-zone:hover,
.vf-upload-zone.vf-dragover {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.08);
}

.vf-upload-icon {
  font-size: 36px;
  color: var(--text-mute);
  font-weight: 200;
  line-height: 1;
  margin-bottom: 10px;
}

.vf-upload-text { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.vf-upload-sub { font-size: 12px; color: var(--text-mute); }

/* ============================================================
   每张图卡片（新增核心）
   ============================================================ */

.vf-image-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.vf-image-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.vf-image-card.vf-card-active {
  border-color: var(--primary);
}

/* 缩略图 */
.vf-image-card-thumb {
  position: relative;
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-deep);
}

.vf-image-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vf-image-card-thumb.vf-uploading img { opacity: 0.4; }

.vf-image-card-thumb.vf-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: vf-spin 0.8s linear infinite;
}

.vf-image-card-thumb.vf-upload-failed { border: 1px solid var(--danger); }

.vf-image-card-thumb.vf-upload-failed::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: var(--danger);
  font-size: 22px;
  font-weight: bold;
}

.vf-image-card-seq {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.vf-image-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}

.vf-image-card:hover .vf-image-card-remove { opacity: 1; }

@keyframes vf-spin { to { transform: rotate(360deg); } }

/* 右侧信息区 */
.vf-image-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 品类标签 */
.vf-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(67, 97, 238, 0.15);
  color: #c9d1e6;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  align-self: flex-start;
}

.vf-category-tag.vf-recognizing {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.vf-category-tag.vf-recognizing::before {
  content: '';
  width: 10px;
  height: 10px;
  border: 2px solid transparent;
  border-top-color: var(--warning);
  border-radius: 50%;
  animation: vf-spin 0.8s linear infinite;
}

.vf-ai-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 2px;
}

/* 该图的模板选择 */
.vf-image-card-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vf-template-option {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vf-template-option:hover {
  background: #324663;
  color: var(--text);
}

.vf-template-option.vf-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.vf-template-price {
  font-size: 10px;
  opacity: 0.75;
  margin-left: 2px;
}

/* ============================================================
   多角度展示的轮播方式
   ============================================================ */

.vf-slideshow-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vf-slideshow-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vf-slideshow-option:hover { background: #2d3d54; }

.vf-slideshow-option.vf-active {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.12);
}

.vf-slideshow-option-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-mute);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.vf-slideshow-option.vf-active .vf-slideshow-option-radio {
  border-color: var(--primary);
}

.vf-slideshow-option.vf-active .vf-slideshow-option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}

.vf-slideshow-option-info { flex: 1; }

.vf-slideshow-option-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.vf-slideshow-option-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.vf-slideshow-option-price {
  font-size: 12px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.vf-slideshow-recommend {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 6px;
}

/* 全局品类显示 */
.vf-category-global {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(67, 97, 238, 0.1);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.vf-category-label { color: var(--text-sub); }
.vf-category-value { color: var(--text); font-weight: 500; }

/* ============================================================
   比例选择
   ============================================================ */

.vf-ratio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.vf-ratio-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.vf-ratio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vf-ratio-content {
  padding: 14px 8px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: all 0.2s ease;
}

.vf-ratio-card:hover .vf-ratio-content { background: #2d3d54; }

.vf-ratio-card input:checked + .vf-ratio-content {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.12);
}

.vf-ratio-icon {
  background: var(--text-sub);
  margin: 0 auto 8px;
  border-radius: 3px;
  transition: background 0.2s;
}

.vf-ratio-card input:checked + .vf-ratio-content .vf-ratio-icon { background: var(--primary); }

.vf-ratio-1-1 { width: 28px; height: 28px; }
.vf-ratio-9-16 { width: 18px; height: 32px; }
.vf-ratio-3-4 { width: 24px; height: 32px; }

.vf-ratio-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.vf-ratio-desc { font-size: 11px; color: var(--text-sub); }

/* ============================================================
   Chip 按钮组
   ============================================================ */

.vf-duration-group,
.vf-bgm-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vf-chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.vf-chip:hover { background: #2d3d54; color: var(--text); }

.vf-chip.vf-chip-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.35);
}

.vf-duration-tip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-mute);
  min-height: 18px;
}

.vf-duration-tip.vf-tip-warning { color: var(--warning); }

/* ============================================================
   提交区
   ============================================================ */

.vf-section-submit {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.vf-cost-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.vf-cost-label { font-size: 12px; color: var(--text-sub); display: block; margin-bottom: 2px; }
.vf-cost-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.vf-cost-unit { font-size: 13px; color: var(--text-sub); margin-left: 2px; }
.vf-cost-right { text-align: right; }
.vf-cost-available { font-size: 16px; font-weight: 600; color: var(--text); }

.vf-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #4361ee, #6366f1);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.vf-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.45);
}

.vf-submit-btn:disabled {
  background: var(--bg-card);
  color: var(--text-mute);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.vf-err-msg {
  margin-top: 10px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  min-height: 20px;
}

/* ============================================================
   右栏结果区
   ============================================================ */

.vf-panel-result {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.vf-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.vf-result-header h3 { font-size: 14px; font-weight: 600; }

.vf-btn-ghost {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vf-btn-ghost:hover { background: var(--bg-card); color: var(--text); }

.vf-result-body {
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
}

.vf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.vf-empty-icon { font-size: 56px; opacity: 0.3; margin-bottom: 16px; line-height: 1; }
.vf-empty-title { font-size: 15px; color: var(--text-sub); margin-bottom: 6px; }
.vf-empty-desc { font-size: 13px; color: var(--text-mute); }

.vf-result-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vf-result-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.vf-result-card.vf-card-processing { border-color: var(--primary); }
.vf-result-card.vf-card-completed { border-color: var(--success); }
.vf-result-card.vf-card-failed { border-color: var(--danger); }

.vf-card-video {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vf-card-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vf-card-progress { padding: 20px; text-align: center; }

.vf-card-progress-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
}

.vf-card-progress-inner {
  height: 100%;
  background: linear-gradient(90deg, #4361ee, #6366f1);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.vf-card-progress-inner.vf-progress-indeterminate {
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: vf-progress-slide 1.5s ease-in-out infinite;
}

@keyframes vf-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.vf-card-status { font-size: 13px; color: var(--text-sub); }

.vf-card-status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vf-card-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: vf-pulse 1.5s ease-in-out infinite;
}

@keyframes vf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.vf-card-info {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.vf-card-info-left { flex: 1; min-width: 0; }

.vf-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vf-card-meta { font-size: 11px; color: var(--text-mute); }
.vf-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

.vf-card-btn {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.vf-card-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.vf-result-body::-webkit-scrollbar { width: 6px; }
.vf-result-body::-webkit-scrollbar-track { background: transparent; }
.vf-result-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.vf-result-body::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

/* ============================================================
   登录遮罩
   ============================================================ */

.vf-login-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(21, 32, 46, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: vf-fade-in 0.25s ease;
}

.vf-login-mask-inner {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  text-align: center;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vf-login-icon { font-size: 48px; line-height: 1; margin-bottom: 16px; opacity: 0.9; }
.vf-login-mask-inner h3 { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.vf-login-mask-inner p { font-size: 13px; color: var(--text-sub); margin-bottom: 24px; }

.vf-login-btn {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #4361ee, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
  font-family: inherit;
}

.vf-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.45);
}

/* ============================================================
   移动端适配
   ============================================================ */

@media (max-width: 1024px) {
  .vf-main { grid-template-columns: 1fr; }
  .vf-panel-result { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .vf-app { padding: 16px 12px 32px; }

  .vf-nav-bar { gap: 8px; padding-bottom: 20px; }
  .vf-nav-btn { padding: 9px 16px; font-size: 13px; }
  .vf-nav-icon { font-size: 14px; }

  .vf-home-card { padding: 24px 20px; }
  .vf-home-card-icon { font-size: 36px; margin-bottom: 12px; }
  .vf-home-card h3 { font-size: 16px; }

  .vf-page-header { gap: 10px; padding-bottom: 16px; }
  .vf-page-title { font-size: 17px; }

  .vf-panel { padding: 16px; }
  .vf-mode-group { grid-template-columns: 1fr; }
  .vf-ratio-group { gap: 8px; }
  .vf-ratio-content { padding: 10px 4px; }
  .vf-ratio-name { font-size: 13px; }
  .vf-ratio-desc { font-size: 10px; }

  .vf-cost-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .vf-cost-right { text-align: left; }

  .vf-card-info { flex-direction: column; align-items: stretch; }
  .vf-card-actions { justify-content: stretch; }
  .vf-card-btn { flex: 1; }

  /* 图片卡片改竖向 */
  .vf-image-card { flex-direction: column; }
  .vf-image-card-thumb { width: 100%; height: 160px; }
}



/* ============================================================
   上传区下方"支持效果"提示行（仅批量出片显示）
   ============================================================ */

.vf-upload-tip {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(67, 97, 238, 0.08);
  border: 1px solid rgba(67, 97, 238, 0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.8;
}

.vf-upload-tip-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vf-upload-tip-line + .vf-upload-tip-line {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(67, 97, 238, 0.15);
}

.vf-upload-tip strong {
  color: var(--text);
  font-weight: 500;
  margin-right: 4px;
}

.vf-upload-tip .vf-upload-tip-item {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text);
}

.vf-upload-tip-ai {
  color: var(--warning) !important;
  font-size: 12px;
}


/* ============================================================
   爆款复刻（viral）专用样式 - v8 增量
   ============================================================ */

/* ---------- 视频上传预览 ---------- */
.vf-video-preview {
  position: relative;
  margin-top: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.vf-video-preview video {
  width: 100%;
  max-height: 320px;
  display: block;
  object-fit: contain;
}

.vf-video-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s;
}

.vf-video-remove:hover { transform: scale(1.1); }

/* ---------- 步骤按钮（生成脚本 / 解析等） ---------- */
.vf-step-btn {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, #4361ee, #6366f1);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.vf-step-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.45);
}

.vf-step-btn:disabled {
  background: var(--bg-card);
  color: var(--text-mute);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.vf-step-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vf-step-btn-cost {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  white-space: nowrap;
}

.vf-step-btn:disabled .vf-step-btn-cost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-mute);
}

.vf-step-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-mute);
  min-height: 18px;
  text-align: center;
}

.vf-step-status.vf-status-ok { color: var(--success); }
.vf-step-status.vf-status-err { color: var(--danger); }
.vf-step-status.vf-status-loading { color: var(--warning); }

/* ---------- 解析结果 ---------- */
.vf-analysis-block {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.vf-analysis-block:last-child { margin-bottom: 0; }

.vf-analysis-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.vf-analysis-content {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
  word-break: break-word;
}

.vf-analysis-content .vf-analysis-shot {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 6px;
}

.vf-analysis-content .vf-analysis-shot:last-child { margin-bottom: 0; }

.vf-analysis-content .vf-analysis-shot-time {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-right: 6px;
}

/* ---------- 通用文本域 ---------- */
.vf-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease;
  margin-bottom: 10px;
}

.vf-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.vf-textarea::placeholder { color: var(--text-mute); }

/* ---------- 双栏脚本编辑 ---------- */
.vf-script-shots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vf-script-shot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color 0.2s;
}

.vf-script-shot:hover { border-color: rgba(67, 97, 238, 0.5); }

.vf-script-shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.vf-script-shot-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.vf-script-shot-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(67, 97, 238, 0.15);
  color: #c9d1e6;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.vf-script-shot-time {
  font-size: 11px;
  color: var(--text-mute);
}

.vf-script-shot-ref {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.vf-script-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vf-script-col {
  display: flex;
  flex-direction: column;
}

.vf-script-col-label {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.vf-script-col textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s ease;
}

.vf-script-col textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}

/* ---------- 设置行 ---------- */
.vf-setting-row {
  margin-bottom: 14px;
}

.vf-setting-row:last-child { margin-bottom: 0; }

.vf-setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.vf-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.vf-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.vf-select option {
  background: var(--bg-card);
  color: var(--text);
}

/* ---------- Chip 组（比例 / 分辨率） ---------- */
.vf-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vf-chip-group .vf-chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vf-chip-group .vf-chip:hover {
  background: #2d3d54;
  color: var(--text);
}

.vf-chip-group .vf-chip.vf-chip-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.35);
}

/* ---------- 时长滑块 ---------- */
.vf-duration-slider {
  padding: 4px 2px;
}

.vf-duration-slider input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.vf-duration-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.4);
  border: 2px solid #fff;
}

.vf-duration-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.4);
  border: 2px solid #fff;
}

.vf-duration-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-mute);
}

.vf-duration-current {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

/* ---------- 复刻进度 ---------- */
.vf-viral-progress {
  padding: 24px 16px;
  text-align: center;
}

.vf-viral-progress-status {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 14px;
}

.vf-viral-progress-hint {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 14px;
}

/* ---------- 原视频 vs 复刻视频 对比 ---------- */
.vf-viral-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vf-compare-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.vf-compare-label {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.3px;
}

.vf-compare-label-new {
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}

.vf-compare-item video {
  width: 100%;
  display: block;
  background: #000;
  max-height: 360px;
  object-fit: contain;
}

.vf-compare-actions {
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .vf-script-cols {
    grid-template-columns: 1fr;
  }

  .vf-video-preview video {
    max-height: 220px;
  }

  .vf-compare-item video {
    max-height: 260px;
  }

  .vf-step-btn {
    padding: 12px 14px;
    font-size: 13px;
  }

  .vf-step-btn-cost {
    font-size: 11px;
    padding: 2px 8px;
  }
}


/* ============================================================
   爆款复刻：商品图网格布局（v8 增量）
   只覆盖 viral 视图内的卡片，不影响商品动态视频
   ============================================================ */

#viral-image-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

#viral-image-cards .vf-image-card {
  flex-direction: column;
  padding: 8px;
  gap: 6px;
  align-items: stretch;
}

#viral-image-cards .vf-image-card-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

#viral-image-cards .vf-image-card-info {
  gap: 4px;
  align-items: center;
  text-align: center;
  padding: 0;
}

#viral-image-cards .vf-category-tag {
  font-size: 11px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 移动端：宽度更小时，一行放 3 个 */
@media (max-width: 640px) {
  #viral-image-cards {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }

  #viral-image-cards .vf-image-card {
    padding: 6px;
  }

  #viral-image-cards .vf-category-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* ============================================================
   爆款复刻：上传商品图引导提示（v8 增量）
   ============================================================ */

.vf-upload-guide-viral {
  margin-top: 14px;
  padding: 8px 16px;
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  color: #fbbf24;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  max-width: 100%;
}

@media (max-width: 640px) {
  .vf-upload-guide-viral {
    font-size: 11px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
  }
}



/* ============================================================
   爆款复刻：标题旁「可选」标签（v8 增量）
   ============================================================ */

.vf-hint-optional {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  line-height: 1.4;
}



/* ============================================================
   场景带货（scene）专用样式 - 最终版
   ============================================================ */

/* ---------- 场景图片卡片网格 ---------- */
#scene-image-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

#scene-image-cards .vf-image-card {
  flex-direction: column;
  padding: 8px;
  gap: 6px;
  align-items: stretch;
}

#scene-image-cards .vf-image-card-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

#scene-image-cards .vf-image-card-info {
  gap: 4px;
  align-items: center;
  text-align: center;
  padding: 0;
}

#scene-image-cards .vf-category-tag {
  font-size: 11px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- 脚本预览（首页左侧，应用脚本后） ---------- */
.vf-scene-script-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-sub);
}

.vf-scene-script-preview .vf-scene-script-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.vf-scene-script-preview .vf-scene-script-shot {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 10px;
}

.vf-scene-script-preview .vf-scene-script-shot:last-child { margin-bottom: 0; }

.vf-scene-script-preview .vf-scene-script-shot-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.vf-scene-script-preview .vf-scene-script-voiceover {
  color: var(--text);
  margin-bottom: 4px;
}

.vf-scene-script-preview .vf-scene-script-visual {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.8;
  word-break: break-word;
}

/* ---------- [图片X] 占位符内联缩略图 ---------- */
.vf-scene-script-thumbnail {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: middle;
  margin: 0 3px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 6px rgba(67, 97, 238, 0.4);
  cursor: pointer;
}

/* ---------- 三步向导弹窗 ---------- */
.vf-scene-wizard {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(21, 32, 46, 0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: vf-fade-in 0.25s ease;
}

.vf-scene-wizard-panel {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}

.vf-scene-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.vf-scene-wizard-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.vf-scene-wizard-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.vf-scene-wizard-close:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--danger);
}

/* 步骤条 */
.vf-scene-wizard-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.vf-scene-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.6;
}

.vf-scene-step.vf-scene-step-active {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.12);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.vf-scene-step.vf-scene-step-done {
  opacity: 1;
}

.vf-scene-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.vf-scene-step.vf-scene-step-active .vf-scene-step-num {
  background: var(--primary);
  color: #fff;
}

.vf-scene-step.vf-scene-step-done .vf-scene-step-num {
  background: var(--success);
  color: #fff;
}

.vf-scene-step-info { flex: 1; min-width: 0; }

.vf-scene-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.vf-scene-step-desc {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 内容区 */
.vf-scene-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 320px;
  will-change: scroll-position;
  contain: layout style;
}

/* 底部按钮 */
.vf-scene-wizard-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.vf-scene-wizard-next {
  padding: 12px 32px;
  background: linear-gradient(135deg, #4361ee, #6366f1);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.vf-scene-wizard-next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.45);
}

.vf-scene-wizard-next:disabled {
  background: var(--bg-card);
  color: var(--text-mute);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---------- Step 1：分析素材（两栏布局） ---------- */
.vf-scene-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.vf-scene-analysis-grid-full {
  grid-column: 1 / -1;
}

/* 只读显示块（商品名、类目，可点击编辑） */
.vf-scene-analysis-readonly {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.vf-scene-analysis-readonly .vf-scene-analysis-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.vf-scene-analysis-readonly .vf-scene-analysis-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  outline: none;
  cursor: text;
}

.vf-scene-analysis-readonly .vf-scene-analysis-value:focus {
  background: rgba(67, 97, 238, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;
}

/* 数组型分析块（产品特性 / 核心卖点 / 目标人群 / 使用场景） */
.vf-scene-analysis-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.vf-scene-analysis-block .vf-scene-analysis-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.vf-scene-analysis-block .vf-scene-analysis-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vf-scene-analysis-block .vf-scene-analysis-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.vf-scene-analysis-block .vf-scene-analysis-item-text {
  flex: 1;
  color: var(--text);
  word-break: break-word;
  cursor: text;
  outline: none;
  min-height: 20px;
}

.vf-scene-analysis-block .vf-scene-analysis-item-text:focus {
  background: rgba(67, 97, 238, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;
}

.vf-scene-analysis-block .vf-scene-analysis-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}

.vf-scene-analysis-block .vf-scene-analysis-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.vf-scene-analysis-block .vf-scene-analysis-add {
  margin-top: 8px;
  padding: 5px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.vf-scene-analysis-block .vf-scene-analysis-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(67, 97, 238, 0.08);
}

/* ---------- Step 2：创作脚本（区块化） ---------- */
.vf-scene-form-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.vf-scene-form-block:last-child {
  margin-bottom: 0;
}

.vf-scene-form-block .vf-scene-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vf-scene-form-block .vf-scene-form-label-icon {
  font-size: 15px;
}

.vf-scene-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vf-scene-option {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vf-scene-option:hover {
  border-color: var(--primary);
  color: var(--text);
}

.vf-scene-option.vf-scene-option-active {
  background: rgba(67, 97, 238, 0.15);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* ---------- Step 3：预览脚本（带缩略图） ---------- */
.vf-scene-preview-shots {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vf-scene-preview-shot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.vf-scene-preview-shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.vf-scene-preview-shot-no {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.vf-scene-preview-shot-time {
  font-size: 12px;
  color: var(--text-mute);
}

.vf-scene-preview-row {
  margin-bottom: 8px;
}

.vf-scene-preview-row:last-child { margin-bottom: 0; }

.vf-scene-preview-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.vf-scene-preview-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  word-break: break-word;
}

.vf-scene-preview-visual {
  color: var(--text-sub);
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  #scene-image-cards {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }

  .vf-scene-analysis-grid {
    grid-template-columns: 1fr;
  }

  .vf-scene-wizard-steps {
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
  }

  .vf-scene-step-desc { display: none; }

  .vf-scene-wizard-body { padding: 16px; }

  .vf-scene-wizard-footer { padding: 12px 16px; }

  .vf-scene-wizard-next {
    padding: 10px 20px;
    font-size: 13px;
  }
}



/* ============================================================
   场景模块：Step 3 脚本编辑区交互优化
   ============================================================ */

.vf-scene-preview-text[contenteditable="true"] {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s;
  cursor: text;
}

.vf-scene-preview-text[contenteditable="true"]:hover {
  border-color: rgba(67, 97, 238, 0.3);
}

.vf-scene-preview-text[contenteditable="true"]:focus {
  outline: none;
  background: rgba(67, 97, 238, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
}