reel-studio-2 / web /src /styles.css
xvepkj's picture
Add editor changes
dee8981
Raw
History Blame
13 kB
:root {
--bg: #0f1117;
--panel: #181b24;
--panel-2: #1f2330;
--border: #2a2f3e;
--text: #e8eaf0;
--muted: #9aa1b3;
--accent: #6c8cff;
--accent-2: #4f6ef0;
--good: #4ecf8a;
--bad: #ff6b6b;
--warn: #ffd166;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 15px;
line-height: 1.5;
}
#root { min-height: 100vh; }
.layout { display: flex; min-height: 100vh; }
/* ---- stepper sidebar ---- */
.sidebar {
width: 230px;
flex-shrink: 0;
background: var(--panel);
border-right: 1px solid var(--border);
padding: 20px 0;
}
.sidebar h1 {
font-size: 17px;
padding: 0 20px 14px;
margin: 0;
border-bottom: 1px solid var(--border);
}
.sidebar h1 span { color: var(--accent); }
.step-item {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 11px 20px;
background: none;
border: none;
color: var(--muted);
font-size: 14px;
text-align: left;
cursor: pointer;
}
.step-item:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.step-item.active { color: var(--text); background: var(--panel-2); border-right: 2px solid var(--accent); }
.step-item.done .step-num { background: var(--good); color: #08130c; }
.step-item:disabled { opacity: 0.4; cursor: default; }
.step-num {
width: 22px; height: 22px;
border-radius: 50%;
background: var(--border);
color: var(--text);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
flex-shrink: 0;
}
.sidebar .home-link {
display: block;
margin: 0 20px 4px;
font-size: 13px;
color: var(--accent);
background: none; border: none;
cursor: pointer;
padding: 4px 0;
}
.home-link:hover { text-decoration: underline; }
.sidebar .project-name {
margin: 0 20px 12px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
font-size: 14px;
font-weight: 600;
color: var(--text);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ---- main panel ---- */
.main { flex: 1; padding: 28px 36px; max-width: 1100px; }
.main h2 { margin: 0 0 4px; font-size: 21px; }
.main .subtitle { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
/* ---- common ---- */
.card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px;
margin-bottom: 14px;
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
label.field { display: block; margin-bottom: 14px; }
label.field .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type='text'], input[type='number'], textarea, select {
width: 100%;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 7px;
color: var(--text);
padding: 9px 11px;
font-size: 14px;
font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 60px; }
button.btn {
background: var(--accent-2);
border: none;
color: white;
border-radius: 7px;
padding: 9px 16px;
font-size: 14px;
cursor: pointer;
font-family: inherit;
}
button.btn:hover:not(:disabled) { background: var(--accent); }
button.btn:disabled { opacity: 0.45; cursor: default; }
button.btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
button.btn.secondary:hover:not(:disabled) { border-color: var(--accent); background: var(--panel-2); }
button.btn.danger { background: transparent; border: 1px solid var(--border); color: var(--bad); }
button.btn.small { padding: 5px 10px; font-size: 13px; }
.tag {
display: inline-block;
font-size: 11px;
padding: 2px 8px;
border-radius: 20px;
background: var(--panel-2);
border: 1px solid var(--border);
color: var(--muted);
}
.tag.ig { color: var(--warn); border-color: var(--warn); cursor: help; }
.error-box {
background: rgba(255, 107, 107, 0.1);
border: 1px solid var(--bad);
color: var(--bad);
border-radius: 8px;
padding: 10px 14px;
margin-bottom: 14px;
font-size: 14px;
white-space: pre-wrap;
}
.progress-box {
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 12px 14px;
margin-bottom: 14px;
font-size: 13px;
color: var(--muted);
max-height: 140px;
overflow-y: auto;
}
.progress-box .latest { color: var(--text); }
.spinner {
display: inline-block;
width: 14px; height: 14px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin-right: 8px;
vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bar {
height: 6px;
background: var(--panel-2);
border-radius: 3px;
overflow: hidden;
margin: 10px 0;
}
.bar .fill { height: 100%; background: var(--accent); transition: width 0.4s; }
/* ---- topics ---- */
.topic-row {
display: flex; gap: 10px; align-items: flex-start;
padding: 11px 0;
border-bottom: 1px solid var(--border);
}
.topic-row:last-child { border-bottom: none; }
.topic-row.selected { background: rgba(108, 140, 255, 0.07); margin: 0 -10px; padding: 11px 10px; border-radius: 8px; }
.topic-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.signal-list {
margin: 6px 0 0;
padding-left: 18px;
font-size: 12.5px;
color: var(--muted);
}
.signal-list li { margin: 2px 0; }
.signal-list li::marker { content: '📈 '; }
/* ---- script ---- */
.hook-option {
display: block; width: 100%;
text-align: left;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text);
padding: 10px 12px;
margin-bottom: 8px;
cursor: pointer;
font-size: 14px;
font-family: inherit;
}
.hook-option.selected { border-color: var(--accent); background: rgba(108, 140, 255, 0.1); }
.scene-card { border-left: 3px solid var(--accent); }
/* ---- media ---- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.clip-thumb {
width: 100%;
aspect-ratio: 9/16;
max-height: 260px;
object-fit: cover;
border-radius: 8px;
background: #000;
border: 1px solid var(--border);
}
/* ---- clip picker (thumbnail grid, click to choose) ---- */
.clip-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.clip-option {
position: relative;
width: 84px; height: 132px;
border-radius: 8px;
border: 2px solid var(--border);
background: #000;
padding: 0; overflow: hidden; cursor: pointer;
flex-shrink: 0;
}
.clip-option:hover:not(:disabled) { border-color: var(--accent); }
.clip-option.chosen { border-color: var(--good); }
.clip-option video, .clip-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-option .clip-blank { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; }
.chosen-badge {
position: absolute; top: 4px; right: 4px;
background: var(--good); color: #08130c;
width: 18px; height: 18px; border-radius: 50%;
display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.src-badge {
position: absolute; bottom: 4px; left: 4px;
background: rgba(0,0,0,0.7); color: var(--warn);
font-size: 10px; padding: 1px 5px; border-radius: 4px;
}
.upload-tile {
display: flex; align-items: center; justify-content: center;
border-style: dashed; color: var(--muted); font-size: 12px; text-align: center;
background: var(--panel-2);
}
.upload-tile:hover { color: var(--accent); }
/* ---- effects / overlay editor ---- */
.fx-canvas {
position: relative;
background: linear-gradient(135deg, #2a3550, #1a2030);
border: 2px solid var(--border);
border-radius: 10px;
overflow: hidden;
flex-shrink: 0;
user-select: none;
}
.fx-el {
position: absolute;
cursor: grab;
display: flex; align-items: center; justify-content: center;
line-height: 1;
}
.fx-el:active { cursor: grabbing; }
.fx-el.sel { outline: 1px dashed var(--accent); outline-offset: 4px; }
/* ---- timeline ---- */
.timeline {
position: relative;
margin-top: 10px;
background: var(--panel-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 4px;
cursor: text;
user-select: none;
}
.tl-lane {
position: relative;
height: 26px;
margin: 3px 0;
background: rgba(0,0,0,0.18);
border-radius: 4px;
}
.tl-clip {
position: absolute; top: 2px; height: 22px;
background: var(--border); color: var(--muted);
font-size: 11px; line-height: 22px; text-align: center;
border-radius: 3px; overflow: hidden; white-space: nowrap;
border-right: 1px solid var(--bg);
}
.tl-bar {
position: absolute; top: 2px; height: 22px;
border-radius: 3px; cursor: grab;
font-size: 11px; line-height: 22px; color: #08130c; font-weight: 700;
padding: 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tl-bar:active { cursor: grabbing; }
.tl-bar.sel { outline: 2px solid #fff; }
.tl-bar.sfx { padding: 0; text-align: center; }
.tl-playhead {
position: absolute; top: 0; bottom: 0; width: 2px;
background: var(--accent); pointer-events: none;
}
.tl-playhead::before {
content: ''; position: absolute; top: -2px; left: -4px;
border-left: 5px solid transparent; border-right: 5px solid transparent;
border-top: 7px solid var(--accent);
}
.tl-legend { font-size: 11px; margin-top: 6px; }
/* ---- docked editor: preview/timeline stay put, controls scroll beside ---- */
.fx-body { display: flex; gap: 14px; align-items: flex-start; }
.fx-stage {
position: sticky; top: 8px; flex: 0 0 auto;
display: flex; flex-direction: column; gap: 8px;
max-height: calc(100vh - 24px); overflow: auto; padding-right: 2px;
}
.fx-rightcol {
flex: 1 1 auto; min-width: 0;
max-height: calc(100vh - 24px); overflow-y: auto;
display: flex; flex-direction: column; gap: 12px; padding-right: 2px;
}
.fx-rightcol .card { margin: 0; }
.fx-secnav {
position: sticky; top: 0; z-index: 5;
display: flex; gap: 4px; flex-wrap: wrap;
padding: 6px; margin: -2px 0 2px; border-radius: 8px;
background: var(--panel); border: 1px solid var(--border);
}
.fx-secnav button {
background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.fx-secnav button:hover { color: var(--text); }
/* ---- render/review ---- */
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.variant-card { text-align: center; }
.variant-card video {
width: 100%;
max-width: 250px;
border-radius: 10px;
background: #000;
border: 2px solid var(--border);
}
.variant-card.picked video { border-color: var(--good); }
/* ---- project list ---- */
.project-tile {
display: flex; justify-content: space-between; align-items: center;
padding: 14px 18px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
margin-bottom: 10px;
cursor: pointer;
}
.project-tile:hover { border-color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }
.spacer { height: 10px; }
/* ---- reel selector (sidebar) ---- */
.reel-section {
margin: 8px 12px 0;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.reel-section .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 0 8px 6px; }
.reel-item {
display: flex; align-items: center; gap: 6px;
width: 100%;
padding: 7px 8px;
background: none; border: none;
color: var(--muted); font-size: 13px;
text-align: left; cursor: pointer;
border-radius: 6px;
}
.reel-item:hover { background: var(--panel-2); color: var(--text); }
.reel-item.active { background: var(--panel-2); color: var(--text); }
.reel-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.reel-item.active .dot { background: var(--accent); }
.reel-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-item .x { opacity: 0; color: var(--bad); font-size: 15px; padding: 0 2px; }
.reel-item:hover .x { opacity: 0.7; }
.reel-item .x:hover { opacity: 1; }
.new-reel { color: var(--accent); }
/* ---- prompt editor panel ---- */
.prompt-panel { margin-bottom: 14px; }
.prompt-toggle {
background: none; border: none; color: var(--muted);
font-size: 13px; cursor: pointer; padding: 4px 0;
}
.prompt-toggle:hover { color: var(--accent); }
.prompt-area {
width: 100%;
min-height: 220px;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12.5px;
line-height: 1.5;
white-space: pre;
overflow-wrap: normal;
margin: 8px 0;
}
.prompt-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.edited-badge { color: var(--warn); font-size: 11px; margin-left: 8px; }