/* styles.css — 网页版自动剪辑 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #14151a; --panel: #1e2027; --panel2: #262a33; --border: #333846;
  --text: #e8eaf0; --muted: #8b93a7; --accent: #4f8cff; --accent2: #34d399;
  --danger: #ef6a6a; --warn: #f0b34f;
}
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  display: flex; flex-direction: column; overflow: hidden; font-size: 14px;
}
#app { display: flex; flex-direction: column; height: 100vh; }

/* 顶部 */
#topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand-name { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--muted); }
.job-status { flex: 1; display: flex; align-items: center; gap: 10px; max-width: 460px; }
.job-status .job-text { font-size: 13px; }
.job-pct { font-size: 13px; color: var(--muted); min-width: 34px; }
.job-bar { flex: 1; height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.job-bar-fill { height: 100%; width: 0%; background: var(--accent); transition: width .3s; }
.engine-badge { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.engine-badge.ready { color: var(--accent2); border-color: rgba(52,211,153,.4); }

/* 三栏 */
#main { flex: 1; display: grid; grid-template-columns: 250px 300px 1fr; min-height: 0; }
.panel { padding: 12px; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); overflow-y: auto; }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-title { font-weight: 600; }
.sub-title { font-size: 12px; color: var(--muted); margin-left: 6px; }
.badge { background: var(--panel2); border-radius: 10px; padding: 1px 9px; font-size: 12px; color: var(--muted); }

/* 按钮 */
.btn {
  padding: 8px 14px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #fff; background: var(--panel2);
  transition: filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); margin-bottom: 8px; width: 100%; }
.btn-accent { background: linear-gradient(135deg, #7c5cff, #4f8cff); width: 100%; }
.btn-success { background: var(--accent2); color: #062; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-small { padding: 4px 10px; font-size: 12px; width: auto; margin-left: auto; }
.btn-tiny { padding: 2px 10px; font-size: 12px; }

/* 列表 */
.video-list, .voice-list, .plan-list {
  flex: 1; min-height: 120px; border: 1px dashed var(--border); border-radius: 8px;
  padding: 10px; overflow-y: auto; font-size: 13px; color: var(--muted);
}
.video-list.empty, .voice-list.empty, .plan-list.empty { display: flex; align-items: center; justify-content: center; text-align: center; }
.item {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; margin-bottom: 6px;
  background: var(--panel2); border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.item:hover { border-color: var(--accent); }
.item.active { border-color: var(--accent); background: rgba(79,140,255,.12); }
.item .thumb { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; background: #000; flex-shrink: 0; }
.item .info { flex: 1; min-width: 0; }
.item .info .name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .info .meta { font-size: 11px; color: var(--muted); }
.item .tag-chip { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(124,92,255,.25); color: #b9a8ff; white-space: nowrap; }
.item .rm { color: var(--danger); cursor: pointer; font-size: 15px; padding: 0 3px; flex-shrink: 0; }

/* 预览 */
.video-box { position: relative; background: #000; border-radius: 10px; aspect-ratio: 9/16; max-height: 46vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video-box video { width: 100%; height: 100%; object-fit: contain; }
.preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.time-display { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0; }
.controls-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.setting { flex: 1; min-width: 120px; }
.setting label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.setting input {
  width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 13px;
}
.hint { font-size: 12px; color: var(--muted); }

/* 时间线 */
#timeline { background: var(--panel); border-top: 1px solid var(--border); padding: 10px 16px; }
.timeline-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.timeline-title { font-weight: 600; font-size: 13px; }
.timeline-info { font-size: 12px; color: var(--muted); flex: 1; }
.timeline-actions { display: flex; gap: 6px; }
.track { display: flex; gap: 8px; margin-bottom: 6px; align-items: stretch; }
.track-label { width: 34px; font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: center; background: var(--panel2); border-radius: 6px; }
.track-body { flex: 1; height: 44px; border-radius: 8px; background: var(--panel2); display: flex; overflow-x: auto; }
.track-body.drop-hint { align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.clip-chip {
  height: 100%; min-width: 54px; border-radius: 6px; margin: 4px 2px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(79,140,255,.2); border: 1px solid rgba(79,140,255,.5); font-size: 10px;
}
.clip-chip.audio { background: rgba(52,211,153,.15); border-color: rgba(52,211,153,.45); }
.clip-chip .t { color: #fff; font-weight: 600; }
.clip-chip .d { color: var(--muted); }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #2b2f3a; border: 1px solid var(--border); color: var(--text);
  padding: 10px 20px; border-radius: 10px; font-size: 13px; z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .25s; max-width: 80vw;
}
.toast.show { opacity: 1; }
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--accent2); }
