:root{--bg:#0f0f13;--surface:#1a1a24;--border:#2a2a3a;--text:#e8e8ed;--text-muted:#8888a0;--primary:#6c6cff;--primary-hover:#5a5aee;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--radius:12px}[data-theme=light]{--bg:#f5f5f7;--surface:#fff;--border:#e0e0e6;--text:#1a1a24;--text-muted:#6b6b80;--primary:#5856d6;--primary-hover:#4744d0}*{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg);color:var(--text);min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.app-container{max-width:720px;margin:0 auto;padding:2rem 1.5rem}.app-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;margin-bottom:2rem;padding:1rem 0 2rem;display:flex}.app-title{align-items:center;gap:.5rem;font-size:2rem;font-weight:700;display:flex}.app-icon{font-size:1.6rem}.app-subtitle{color:var(--text-muted);margin-top:.25rem;font-size:.95rem}.header-actions{align-items:center;gap:.75rem;display:flex}.theme-toggle{background:var(--surface);border:1px solid var(--border);cursor:pointer;border-radius:8px;padding:.5rem .65rem;font-size:1.1rem;transition:all .2s}.theme-toggle:hover{border-color:var(--primary)}.upload-zone{border:2px dashed var(--border);border-radius:var(--radius);text-align:center;cursor:pointer;background:0 0;padding:4rem 2rem;transition:all .3s}.upload-zone:hover,.upload-zone.drag-over{border-color:var(--primary);background:#6c6cff0a}.upload-zone input[type=file]{display:none}.upload-icon{margin-bottom:1rem;font-size:3.5rem}.upload-title{margin-bottom:.5rem;font-size:1.2rem;font-weight:500}.upload-hint{color:var(--text-muted);font-size:.95rem}.url-section{margin-top:1.5rem}.url-divider{align-items:center;gap:1rem;margin-bottom:1rem;display:flex}.url-divider:before,.url-divider:after{content:"";background:var(--border);flex:1;height:1px}.url-divider span{color:var(--text-muted);white-space:nowrap;font-size:.9rem}.url-input-row{gap:.75rem;display:flex}.url-input{background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:10px;outline:none;flex:1;padding:.85rem 1rem;font-family:inherit;font-size:.95rem;transition:border-color .2s}.url-input:focus{border-color:var(--primary)}.url-input::placeholder{color:var(--text-muted)}.btn-url-submit{background:var(--primary);color:#fff;cursor:pointer;white-space:nowrap;border:none;border-radius:10px;align-items:center;gap:.5rem;padding:.85rem 1.5rem;font-size:.95rem;font-weight:600;transition:all .2s;display:flex}.btn-url-submit:hover:not(:disabled){filter:brightness(1.1);transform:translateY(-1px)}.btn-url-submit:disabled{opacity:.5;cursor:not-allowed}.url-error{color:#ef4444;margin-top:.5rem;font-size:.9rem}.url-hint{color:var(--text-muted);margin-top:.5rem;font-size:.85rem;font-style:italic}.preview-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.video-preview{aspect-ratio:16/9;background:#000;justify-content:center;align-items:center;display:flex}.video-player{object-fit:contain;width:100%;height:100%;max-height:400px}.file-info{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.5rem;display:flex}.file-name{font-size:1rem;font-weight:500}.file-size{color:var(--text-muted);font-size:.9rem}.action-buttons{gap:.75rem;padding:1.5rem;display:flex}.btn-process{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:10px;flex:1;justify-content:center;align-items:center;gap:.5rem;padding:.9rem 1.5rem;font-size:1.05rem;font-weight:600;transition:all .2s;display:flex}.btn-process:hover:not(:disabled){background:var(--primary-hover);transform:translateY(-1px)}.btn-process:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{color:var(--text);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:10px;padding:.9rem 1.5rem;font-size:.95rem;transition:all .2s}.btn-secondary:hover{border-color:var(--text-muted)}.full-width{width:100%;margin-top:1.5rem}.spinner{border:2px solid #ffffff4d;border-top-color:#fff;border-radius:50%;width:18px;height:18px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.result-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem}.result-header{justify-content:space-between;align-items:flex-start;margin-bottom:1.5rem;display:flex}.result-header h2{font-size:1.3rem;font-weight:600}.job-meta{color:var(--text-muted);margin-top:.25rem;font-size:.85rem}.badge{border-radius:8px;padding:.4rem .9rem;font-size:.85rem;font-weight:500}.badge-success{color:var(--success);background:#4ade8026}.badge-error{color:var(--error);background:#f8717126}.badge-primary{color:var(--primary);background:#6c6cff26}.badge-warning{color:var(--warning);background:#fbbf2426}.badge-default{background:var(--border);color:var(--text-muted)}.pipeline-steps{flex-direction:column;gap:.5rem;margin-bottom:1.5rem;display:flex}.pipeline-step{border-radius:8px;align-items:center;gap:.75rem;padding:.6rem .75rem;font-size:.9rem;transition:all .3s;display:flex}.pipeline-step.completed{opacity:.5}.pipeline-step.active{background:#6c6cff14;border:1px solid #6c6cff33}.pipeline-step.pending{opacity:.35}.step-icon{text-align:center;width:1.5rem;font-size:1rem}.step-label{flex:1}.step-progress{color:var(--primary);font-size:.85rem;font-weight:600}.progress-section{margin-bottom:1.5rem}.progress-bar{background:var(--border);border-radius:10px;height:10px;margin-bottom:.75rem;overflow:hidden}.progress-fill{background:linear-gradient(90deg, var(--primary), #9c9cff);border-radius:10px;height:100%;transition:width .5s}.progress-message{color:var(--text-muted);text-align:center;font-size:.9rem}.status-banner{border-radius:8px;align-items:center;gap:.75rem;margin-bottom:1.5rem;padding:1rem;display:flex}.status-banner.success{background:#4ade8014}.status-banner.error{background:#f8717114}.status-banner.queued{background:#fbbf2414}.pulse{animation:2s infinite pulse}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}.downloads-section{margin-bottom:1rem}.downloads-section h3{margin-bottom:.75rem;font-size:1rem;font-weight:600}.download-list{flex-direction:column;gap:.5rem;display:flex}.download-item{background:var(--bg);border:1px solid var(--border);color:var(--text);cursor:pointer;border-radius:8px;align-items:center;gap:.75rem;width:100%;padding:.75rem 1rem;font-family:inherit;font-size:1rem;text-decoration:none;transition:all .2s;display:flex}.download-item:hover{border-color:var(--primary)}.download-name{flex:1}.download-action{color:var(--primary);font-size:.9rem;font-weight:500}.fade-in{animation:.3s fadeIn}@keyframes fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.history-section{margin-top:2rem}.history-title{color:var(--text-muted);margin-bottom:1rem;font-size:1.1rem;font-weight:600}.history-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.75rem;display:grid}.history-card{background:var(--surface);border:1px solid var(--border);cursor:pointer;text-align:left;color:var(--text);border-radius:10px;padding:0;font-family:inherit;transition:border-color .15s,transform .15s;overflow:hidden}.history-card:hover{border-color:var(--primary);transform:translateY(-2px)}.history-card-thumb{aspect-ratio:9/16;background:var(--bg);justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.history-thumb-img{object-fit:cover;width:100%;height:100%}.history-thumb-placeholder{opacity:.4;font-size:2rem}.history-card-badges{flex-direction:column;align-items:flex-end;gap:.25rem;display:flex;position:absolute;top:.4rem;right:.4rem}.history-card-body{flex-direction:column;gap:.2rem;padding:.6rem .75rem;display:flex}.history-filename{white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;font-weight:500;overflow:hidden}.history-meta{color:var(--text-muted);font-size:.72rem}.btn-report{color:#fff;cursor:pointer;background:linear-gradient(135deg,#6c6cff,#9c9cff);border:none;border-radius:10px;margin-top:.75rem;padding:.9rem 1.5rem;font-size:1rem;font-weight:600;transition:all .2s}.btn-report:hover{transform:translateY(-1px);box-shadow:0 4px 12px #6c6cff4d}.report-overlay{z-index:1000;background:#000000b3;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.report-modal{background:var(--surface);border:1px solid var(--border);border-radius:16px;flex-direction:column;width:100%;max-width:700px;max-height:85vh;display:flex;overflow:hidden}.report-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1.25rem 1.5rem;display:flex}.report-header h2{font-size:1.3rem;font-weight:600}.report-close{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:.25rem;font-size:1.5rem;line-height:1}.report-close:hover{color:var(--text)}.report-content{padding:1.5rem;overflow-y:auto}.report-section{margin-bottom:1.75rem}.report-section h3{color:var(--text);margin-bottom:.75rem;font-size:1.05rem;font-weight:600}.report-stats{grid-template-columns:repeat(2,1fr);gap:.75rem;display:grid}.stat-item{background:var(--bg);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:.25rem;padding:.75rem;display:flex}.stat-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;font-size:.8rem}.stat-value{color:var(--text);font-size:1.1rem;font-weight:600}.segment-list{flex-direction:column;gap:.5rem;display:flex}.segment-item{background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:.75rem 1rem}.segment-item.selected{border-left:3px solid var(--success)}.segment-item.rejected{border-left:3px solid var(--error);opacity:.85}.segment-time{color:var(--primary);margin-bottom:.25rem;font-size:.9rem;font-weight:500}.segment-duration{color:var(--text-muted);margin-left:.5rem;font-weight:400}.segment-meta{gap:.75rem;margin-bottom:.25rem;display:flex}.segment-source{color:var(--text-muted);background:var(--surface);border-radius:4px;padding:.15rem .5rem;font-size:.8rem}.segment-confidence{color:var(--success);font-size:.8rem}.segment-text{color:var(--text);margin-top:.25rem;font-size:.9rem;font-style:italic}.segment-reason{color:var(--error);margin-top:.25rem;font-size:.85rem}.no-data{color:var(--text-muted);font-size:.9rem;font-style:italic}.segment-virality{flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.virality-score{color:var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);border-radius:4px;padding:.15rem .5rem;font-size:.85rem;font-weight:600}.virality-reason{color:var(--text-muted);font-size:.8rem;font-style:italic}.virality-tags{flex-wrap:wrap;gap:.3rem;display:flex}.virality-tag{color:var(--text-muted);background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:.1rem .4rem;font-size:.75rem}.caption-style-picker{margin-bottom:1.25rem}.caption-style-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:.5rem;font-size:.8rem}.caption-style-buttons{flex-wrap:wrap;gap:.5rem;display:flex}.caption-style-btn{cursor:pointer;border:1px solid var(--border);background:var(--surface);min-width:80px;color:var(--text-muted);border-radius:8px;flex:1;padding:.5rem .75rem;font-size:.8rem;font-weight:500;transition:border-color .15s,color .15s,background .15s}.caption-style-btn:hover{border-color:var(--primary);color:var(--text)}.caption-style-btn.active{border-color:var(--primary);background:color-mix(in srgb, var(--primary) 15%, transparent);color:var(--primary);font-weight:600}.clips-section h3{color:var(--text);margin-bottom:1rem}.clip-cards{flex-direction:column;gap:1rem;display:flex}.clip-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}.clip-video{object-fit:contain;background:#000;width:100%;max-height:480px;display:block}.clip-card-footer{justify-content:space-between;align-items:center;gap:.75rem;padding:.65rem .9rem;display:flex}.clip-card-info{align-items:center;gap:.6rem;min-width:0;display:flex}.clip-name{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.clip-virality-badge{color:var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);white-space:nowrap;border-radius:4px;flex-shrink:0;padding:.1rem .45rem;font-size:.75rem;font-weight:600}.btn-download-clip{border:1px solid var(--border);background:var(--bg);color:var(--text);cursor:pointer;white-space:nowrap;border-radius:6px;flex-shrink:0;padding:.35rem .8rem;font-size:.8rem;transition:border-color .15s}.btn-download-clip:hover{border-color:var(--primary);color:var(--primary)}.brief-section{margin-top:.75rem}.brief-input{border:1px solid var(--border);background:var(--surface);width:100%;color:var(--text);box-sizing:border-box;border-radius:8px;padding:.65rem 1rem;font-size:.9rem;transition:border-color .15s}.brief-input:focus{border-color:var(--primary);outline:none}.brief-input::placeholder{color:var(--text-muted)}.clips-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.clips-header h3{margin:0}.btn-apply-edits{cursor:pointer;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 15%, transparent);color:var(--primary);border-radius:8px;padding:.45rem 1rem;font-size:.85rem;font-weight:600;transition:background .15s}.btn-apply-edits:hover:not(:disabled){background:color-mix(in srgb, var(--primary) 25%, transparent)}.btn-apply-edits:disabled{opacity:.6;cursor:not-allowed}.clip-card-wrapper{cursor:grab;flex-direction:column;gap:0;display:flex;position:relative}.clip-card-wrapper:active{cursor:grabbing}.drag-handle{background:var(--surface);border:1px solid var(--border);color:var(--text-muted);cursor:grab;-webkit-user-select:none;user-select:none;border-bottom:none;border-radius:10px 10px 0 0;padding:.3rem .75rem;font-size:1rem}.clip-card-wrapper .clip-card{border-radius:0}.trim-controls{background:var(--surface);border:1px solid var(--border);border-top:none;border-radius:0 0 10px 10px;flex-direction:column;gap:.5rem;padding:.75rem 1rem;display:flex}.trim-label{color:var(--text-muted);align-items:center;gap:.5rem;font-size:.8rem;display:flex}.trim-label span{text-align:right;font-variant-numeric:tabular-nums;width:3rem;color:var(--text);font-weight:500}.trim-label input[type=range]{accent-color:var(--primary);flex:1}
