AI video skill for Claude Code & Codex — cinematic, editable product promos with Remotion: 124 shot recipe cards, 150 motion previews, beat sync, sound design, Motion Workbench & JianYing (CapCut CN) export.
TypeScript agent-skillsai-agentsai-videoclaude-codeclaude-code-skillsclaude-skillscodexmotion-designmotion-graphicsproduct-videopromo-videoremotionvideo-generationvideo-production
/* —— ShotCraft Workbench · Apple 风格暗色工作台(源出 video-talkcraft/workbench) ——
参照 macOS 专业应用(Final Cut / Logic)的暗色 chrome:
近黑分层底 + 发丝线分隔 + SF 字系 + 单一 accent(#0a84ff)+ 克制的圆角与投影。 */
:root {
--bg: #121215;
--panel: #1d1d20;
--panel-2: #28282d;
--inset: rgba(0, 0, 0, 0.26);
--line: rgba(255, 255, 255, 0.08);
--line-strong: rgba(255, 255, 255, 0.16);
--text: #f5f5f7;
--text-dim: #98989f;
--accent: #0a84ff;
--accent-soft: rgba(10, 132, 255, 0.35);
--danger: #ff453a;
--r-s: 6px;
--r-m: 8px;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
"PingFang SC", "Hiragino Sans GB", sans-serif;
font-size: 13px;
-webkit-font-smoothing: antialiased;
overflow: hidden;
user-select: none;
}
.app { display: flex; flex-direction: column; height: 100%; }
.dim { color: var(--text-dim); }
/* —— 顶栏 —— */
.topbar {
display: flex; align-items: center; gap: 8px;
height: 50px; padding: 0 16px;
background: var(--panel); border-bottom: 1px solid var(--line);
flex: none;
}
.logo { font-size: 13px; letter-spacing: 0.2px; color: var(--text-dim); }
.logo b { color: var(--text); font-weight: 600; }
.project-name {
background: transparent; border: 1px solid transparent; border-radius: var(--r-s);
color: var(--text); font-size: 13px; font-weight: 500; padding: 6px 10px; width: 190px;
font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.project-name:hover, .project-name:focus {
border-color: var(--line); background: var(--inset); outline: none;
}
/* —— 按钮 —— */
.btn {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
color: var(--text);
border: 0; border-radius: 7px;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.25);
padding: 6px 12px; font-size: 12px; font-weight: 500; font-family: inherit;
cursor: pointer; white-space: nowrap;
transition: filter 0.15s, transform 0.08s, box-shadow 0.15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.22); }
.btn:active:not(:disabled) { transform: scale(0.97); filter: brightness(0.95); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary {
background: linear-gradient(180deg, #2e94ff, #0871e6);
color: #fff; font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1px 4px rgba(10, 132, 255, 0.35);
}
.btn.danger {
color: #ff8078;
background: linear-gradient(180deg, rgba(255, 69, 58, 0.2), rgba(255, 69, 58, 0.12));
box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.28);
}
.btn.wide { width: 100%; margin-bottom: 10px; }
.btn-play {
width: 32px; height: 32px; min-width: 32px; padding: 0; border-radius: 50%;
display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.mini {
background: transparent; color: var(--text-dim);
border: 0; border-radius: var(--r-s);
padding: 3px 8px; font-size: 11px; font-family: inherit; cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.mini:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.mini.preset.on { color: var(--accent); background: rgba(10, 132, 255, 0.14); }
/* —— 主区三栏 —— */
.main { display: flex; flex: 1; min-height: 0; }
.panel-title {
padding: 11px 14px; font-weight: 600; font-size: 13px; letter-spacing: 0.2px;
border-bottom: 1px solid var(--line); flex: none;
}
/* 可调尺寸面板容器 + 分隔条 */
.panel-wrap { flex: none; display: flex; min-width: 0; min-height: 0; }
.panel-wrap > * { flex: 1; min-width: 0; min-height: 0; }
.splitter { flex: none; background: transparent; transition: background 0.15s; z-index: 20; }
.splitter.v { width: 5px; cursor: col-resize; margin: 0 -1px; }
.splitter.h { height: 5px; cursor: row-resize; margin: -1px 0; }
.splitter:hover, .splitter:active { background: var(--accent-soft); }
/* —— 素材库 —— */
.library {
width: 100%; display: flex; flex-direction: column;
background: var(--panel); border-right: 1px solid var(--line);
}
/* 分段控件式 tab(macOS segmented control) */
.lib-tabs {
display: flex; gap: 2px; flex: none;
margin: 10px 10px 8px; padding: 2px;
background: var(--inset); border-radius: 9px;
}
.lib-tab {
flex: 1; background: transparent; border: 0; border-radius: 7px;
color: var(--text-dim); font-family: inherit;
padding: 6px 0; font-size: 12px; font-weight: 500; cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.lib-tab.on {
color: var(--text); font-weight: 600; background: #3b3b41;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
}
.library-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.lib-cat {
padding: 12px 2px 6px; font-size: 11px; font-weight: 600;
letter-spacing: 0.4px; color: var(--text-dim);
}
/* 列表行(音效等无画面素材):无框,悬停浮起 */
.lib-card {
display: flex; align-items: center; gap: 8px; width: 100%;
background: transparent; border: 0; border-radius: 7px;
color: var(--text); padding: 7px 8px; margin-bottom: 1px;
cursor: grab; font-size: 12px; text-align: left;
transition: background 0.12s;
}
.lib-card:hover { background: rgba(255, 255, 255, 0.07); }
.lib-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.lib-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-dur { color: var(--text-dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.lib-foot {
padding: 10px 14px; font-size: 11px; border-top: 1px solid var(--line); line-height: 1.6;
}
/* 分类标题:纯文字行,无框 */
.lib-cat-toggle {
display: flex; align-items: center; gap: 6px; width: 100%;
background: transparent; border: 0; border-radius: var(--r-s);
color: var(--text); font-size: 12.5px; font-weight: 600; font-family: inherit;
padding: 8px 4px; margin: 2px 0; cursor: pointer;
transition: color 0.15s;
}
.lib-cat-toggle:hover { color: var(--accent); }
.lib-cat-toggle .dim { font-weight: 400; font-variant-numeric: tabular-nums; }
.caret { display: inline-block; transition: transform 0.15s; color: var(--text-dim); font-size: 10px; }
.caret.open { transform: rotate(90deg); }
/* 素材网格(循环视频/实时卡片预览) */
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; margin-bottom: 10px; }
.lib-cell { cursor: grab; min-width: 0; }
.lib-thumb {
display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover;
background: #0c0c0e; border: 0; border-radius: var(--r-m); pointer-events: none;
outline: 1px solid rgba(255, 255, 255, 0.13); outline-offset: -1px;
overflow: hidden;
}
.lib-cell:hover .lib-thumb { outline: 2px solid var(--accent); outline-offset: -2px; }
.lib-thumb-empty {
display: flex; align-items: center; justify-content: center;
font-size: 17px; font-weight: 600; color: var(--text-dim);
}
.lib-cell-name {
padding: 6px 2px 0; font-size: 11px; font-weight: 500;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-cell-meta { padding: 1px 2px 0; font-size: 10px; font-variant-numeric: tabular-nums; }
.lib-card:active, .lib-cell:active { cursor: grabbing; }
/* —— 素材预览模式 —— */
.preview-media { max-width: 100%; max-height: 100%; border-radius: var(--r-m); }
.preview-audio {
display: flex; flex-direction: column; align-items: center; gap: 16px;
color: var(--text); font-size: 16px;
}
.preview-tag {
background: var(--accent); color: #fff; border-radius: 999px;
padding: 3px 10px; font-size: 11px; font-weight: 600;
}
/* —— 预览 —— */
.preview-panel {
flex: 1; min-width: 0; display: flex; flex-direction: column;
background: #0a0a0c;
}
.preview-stage {
flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
padding: 20px;
}
.preview-stage > div { max-width: 100%; max-height: 100%; }
.transport {
display: flex; align-items: center; gap: 10px;
height: 46px; padding: 0 14px; flex: none;
background: var(--panel); border-top: 1px solid var(--line);
}
.timecode {
font-variant-numeric: tabular-nums; font-size: 12.5px; letter-spacing: 0.3px;
}
.loop-toggle {
display: flex; align-items: center; gap: 5px;
color: var(--text-dim); font-size: 12px; cursor: pointer;
}
.loop-toggle input { accent-color: var(--accent); }
/* —— 属性面板 —— */
.inspector {
width: 100%; display: flex; flex-direction: column;
background: var(--panel); border-left: 1px solid var(--line);
}
.inspector-empty { padding: 22px 16px; line-height: 1.8; font-size: 12px; }
.inspector-scroll { flex: 1; overflow-y: auto; padding: 6px 14px 20px; }
.inspector section { margin-top: 14px; }
.sec-title {
font-size: 11px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.8px;
padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.prop-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.prop-label { width: 88px; flex: none; color: var(--text-dim); font-size: 12px; }
.prop-ctl { flex: 1; min-width: 0; }
.ctl-row { display: flex; align-items: center; gap: 6px; }
.preset-row { gap: 4px; }
.unit { color: var(--text-dim); font-size: 11px; }
.slider-val {
min-width: 42px; text-align: right; font-size: 11px; color: var(--text-dim);
font-variant-numeric: tabular-nums;
}
.inspector input[type="text"],
.inspector input[type="number"],
.inspector textarea,
.inspector select {
width: 100%; background: var(--inset);
border: 1px solid var(--line); border-radius: 7px;
color: var(--text); padding: 6px 9px; font-size: 12px;
font-family: inherit;
transition: border-color 0.15s, box-shadow 0.15s;
}
.inspector input:focus, .inspector textarea:focus, .inspector select:focus {
outline: none; border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}
.inspector textarea { resize: vertical; line-height: 1.5; }
.inspector input[type="number"] { width: 76px; }
.inspector input[type="range"] { flex: 1; accent-color: var(--accent); }
.inspector input[type="color"] {
width: 30px; height: 26px; padding: 1px; border: 1px solid var(--line);
border-radius: 7px; background: var(--inset); cursor: pointer;
}
.color-text { flex: 1; }
/* —— 时间轴 —— */
.timeline {
height: 100%; width: 100%; display: flex; flex-direction: column;
background: var(--panel); border-top: 1px solid var(--line);
}
.tl-toolbar {
display: flex; align-items: center; gap: 8px;
height: 40px; padding: 0 12px; flex: none;
border-bottom: 1px solid var(--line);
}
.tl-toolbar input[type="range"] { accent-color: var(--accent); }
.tl-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px; }
.tl-scroller { flex: 1; overflow: auto; position: relative; }
.tl-content { position: relative; min-height: 100%; }
.tl-ruler-row { display: flex; position: sticky; top: 0; z-index: 6; }
.tl-corner {
flex: none; position: sticky; left: 0; z-index: 7;
background: var(--panel); border-bottom: 1px solid var(--line);
}
.ruler {
position: relative; height: 26px; flex: none;
background: var(--panel); border-bottom: 1px solid var(--line);
cursor: ew-resize;
}
.tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: rgba(255, 255, 255, 0.22); }
.tick.major { height: 10px; background: rgba(255, 255, 255, 0.4); }
.tick-label {
position: absolute; bottom: 10px; left: 4px;
font-size: 10px; color: var(--text-dim); white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.tl-row { display: flex; }
.tl-track-head {
flex: none; position: sticky; left: 0; z-index: 5;
display: flex; align-items: center; justify-content: space-between; gap: 4px;
height: 56px; padding: 0 8px 0 12px;
background: var(--panel); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.tl-track-head { cursor: grab; }
.track-grip { flex: none; font-size: 10px; letter-spacing: -3px; color: var(--text-dim); opacity: 0.5; margin-right: 4px; }
.track-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-actions { display: flex; gap: 2px; flex: none; }
.track-actions .mini { padding: 2px 6px; }
/* 轨道拖拽排序 */
.tl-row.dragging { opacity: 0.45; }
.timeline.track-dragging, .timeline.track-dragging * { cursor: grabbing !important; user-select: none; }
.track-drop-line {
position: absolute; left: 0; right: 0; height: 2px;
background: var(--accent); z-index: 7; pointer-events: none;
box-shadow: 0 0 6px rgba(10, 132, 255, 0.6);
}
.track-drop-line::before {
content: ""; position: absolute; left: 6px; top: -3px;
width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.tl-lane {
position: relative; height: 56px; flex: none;
background:
repeating-linear-gradient(to right, transparent 0, transparent 59px, rgba(255, 255, 255, 0.035) 59px, rgba(255, 255, 255, 0.035) 60px),
#19191c;
border-bottom: 1px solid var(--line);
}
.tl-lane.hidden-track { opacity: 0.35; }
/* clip */
.clip {
position: absolute; top: 5px; height: 46px;
background: linear-gradient(180deg, #3c3c44, #2f2f36);
border: 0; border-left: 3px solid #71717a;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 1px 3px rgba(0, 0, 0, 0.3);
border-radius: 7px; cursor: grab; overflow: hidden;
transition: box-shadow 0.12s;
}
.clip:active { cursor: grabbing; }
.clip.selected {
border-left-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent), 0 1px 8px rgba(10, 132, 255, 0.35);
}
.clip-label {
display: flex; flex-direction: column; justify-content: center; gap: 2px;
height: 100%; padding: 0 10px; pointer-events: none;
}
.clip-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-meta { font-size: 10px; color: var(--text-dim); display: flex; gap: 5px; align-items: center; }
.badge {
font-style: normal; background: rgba(255, 255, 255, 0.13); border-radius: 4px;
padding: 0 4px; color: #d5d5dc; font-size: 10px; font-variant-numeric: tabular-nums;
}
.trim {
position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2;
}
.trim-l { left: 0; }
.trim-r { right: 0; }
.clip.selected .trim::after {
content: ""; position: absolute; top: 12px; bottom: 12px; width: 3px;
background: #fff; opacity: 0.85; border-radius: 2px;
}
.trim-l::after { left: 3px; }
.trim-r::after { right: 3px; }
/* 播放头(Apple 系统红) */
.playhead {
position: absolute; top: 0; bottom: 0; width: 1px;
background: var(--danger); z-index: 4; pointer-events: none;
}
.playhead-cap {
position: absolute; top: 0; left: -5px;
border: 5px solid transparent; border-top: 7px solid var(--danger);
}
/* —— 滚动条 —— */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.14); border-radius: 5px;
border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.26); }
::-webkit-scrollbar-corner { background: transparent; }
.theme-panel { padding: 5px 2px; }
.theme-panel-heading { font-size: 13px; font-weight: 600; }
.theme-panel-hint, .theme-panel-note, .theme-panel-empty { color: var(--text-dim); font-size: 11px; line-height: 1.7; }
.theme-panel-hint { margin: 5px 0 14px; }
.theme-options { display: flex; flex-direction: column; gap: 10px; }
.theme-option { width: 100%; padding: 9px; color: var(--text); font: inherit; text-align: left; background: var(--inset); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.theme-option:hover { border-color: var(--text-dim); }
.theme-option.active { border-color: var(--accent); }
.theme-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-palette { display: flex; height: 42px; overflow: hidden; border-radius: 5px; border: 1px solid rgba(128, 128, 128, .2); }
.theme-palette > span { flex: 1; }
.theme-palette > span:first-child { flex: 2.5; }
.theme-option-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; margin-top: 9px; font-size: 11px; }
.theme-option-label strong { font-size: 12px; font-weight: 500; }
.theme-option-label > span { color: var(--text-dim); font-size: 10px; }
.theme-option.active .theme-option-label > span { color: var(--accent); }
.theme-panel-note { margin-top: 16px; }
/* Presets and palette editing share the existing sidebar. */
.theme-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.theme-option { padding: 6px; }
.theme-palette { height: 26px; }
.theme-option-label { margin-top: 6px; gap: 2px; }
.theme-option-label strong { font-size: 11px; }
.theme-editor { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.theme-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.theme-reset { background: none; border: 0; color: var(--accent); font: inherit; font-size: 10px; cursor: pointer; padding: 3px 0; }
.theme-reset:disabled { color: var(--text-dim); opacity: .5; cursor: default; }
.theme-color-row { display: grid; grid-template-columns: minmax(0,1fr) 24px 74px; gap: 6px; align-items: center; margin: 9px 0; font-size: 11px; }
.theme-color-row input[type=color] { width: 24px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.theme-color-row input[type=text] { width: 100%; min-width: 0; background: var(--inset); border: 1px solid var(--line); border-radius: 4px; color: var(--text); padding: 5px; font: 11px monospace; }
.theme-color-row input:focus-visible,.theme-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-color-row input[aria-invalid=true] { border-color: var(--danger); }
.saved-palettes { margin-top:16px; }
.saved-palette { display:flex; align-items:center; gap:4px; margin-top:6px; }
.saved-palette button { background:var(--inset); color:var(--text); border:1px solid var(--line); border-radius:5px; padding:6px; font:inherit; font-size:11px; cursor:pointer; }
.saved-palette button:first-child { flex:1; min-width:0; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.saved-palette button span { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; }
.palette-name { width:100%; margin-top:12px; padding:6px; background:var(--inset); color:var(--text); border:1px solid var(--line); border-radius:4px; font:11px sans-serif; }
.palette-actions { display:flex; gap:4px; margin-top:7px; }
.palette-actions .btn { flex:1; min-width:0; padding:5px 2px; font-size:10px; }
.palette-name:focus-visible,.saved-palette button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }