* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: #0a0a0a; color: #e5e5e5; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }
.app { display: flex; flex-direction: column; height: 100vh; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #262626; background: #171717; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-name { font-weight: 600; color: #f5f5f5; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: #737373; margin-left: 4px; }

.btn-primary { display: flex; align-items: center; gap: 8px; background: #f59e0b; color: #0a0a0a; font-weight: 600; border: none; padding: 7px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: background .15s; }
.btn-primary:hover:not(:disabled) { background: #fbbf24; }
.btn-primary:disabled { background: #404040; color: #737373; cursor: not-allowed; }

.body { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 340px; border-right: 1px solid #262626; background: #171717; display: flex; flex-direction: column; overflow-y: auto; padding: 14px; gap: 10px; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.empty-hint { font-size: 11px; color: #525252; text-align: center; padding: 12px 4px; line-height: 1.5; }
.duration-hint { font-size: 11px; color: #a3a3a3; text-align: center; padding-top: 4px; }
.section-divider { font-size: 11px; font-weight: 600; color: #737373; text-transform: uppercase; letter-spacing: .04em; padding: 6px 2px 0; border-top: 1px solid #262626; margin-top: 4px; padding-top: 14px; }

.btn-dashed { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #404040; color: #a3a3a3; background: none; border-radius: 6px; padding: 12px; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s; }
.btn-dashed:hover:not(:disabled) { border-color: #fbbf24; color: #fbbf24; }

.list { display: flex; flex-direction: column; gap: 0; }

.clip-card { background: rgba(38,38,38,.6); border: 1px solid #262626; border-radius: 6px; padding: 10px; }
.clip-card-head { display: flex; align-items: center; gap: 10px; }
.clip-thumb { width: 56px; height: 32px; border-radius: 4px; background: #262626; object-fit: cover; flex-shrink: 0; }
.clip-info { flex: 1; min-width: 0; }
.clip-name { font-size: 12px; color: #d4d4d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.clip-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn { background: none; border: none; color: #737373; cursor: pointer; padding: 2px; display: flex; }
.icon-btn:hover { color: #e5e5e5; }
.icon-btn.danger:hover { color: #f87171; }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.clip-meta { display: flex; justify-content: space-between; font-size: 10px; color: #737373; margin: 8px 0 4px; }
input[type="range"] { width: 100%; accent-color: #fbbf24; height: 4px; margin: 3px 0; }

.transition-row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; margin: 0 auto; }
.transition-line { flex: 1; height: 1px; background: #333; }
.transition-icon { color: #fbbf24; flex-shrink: 0; display: flex; }
.transition-select { background: #0a0a0a; border: 1px solid #404040; color: #d4d4d4; font-size: 11px; border-radius: 4px; padding: 4px 6px; }
.transition-select:focus { border-color: #fbbf24; outline: none; }
.transition-dur { width: 46px; background: #0a0a0a; border: 1px solid #404040; color: #d4d4d4; font-size: 11px; border-radius: 4px; padding: 4px 6px; }

.audio-card { background: rgba(38,38,38,.6); border: 1px solid #262626; border-radius: 6px; padding: 10px; }
.audio-card-head { display: flex; align-items: center; gap: 8px; }
.audio-name { flex: 1; font-size: 12px; color: #d4d4d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 10px; color: #a3a3a3; }
.audio-row label { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.audio-row input[type="number"] { width: 52px; background: #0a0a0a; border-radius: 4px; padding: 3px 5px; border: 1px solid #404040; color: #e5e5e5; font-size: 10px; }
.audio-row input[type="range"] { flex: 1; margin: 0; }
.icon-btn.active { color: #fbbf24; }

.preview { flex: 1; display: flex; align-items: center; justify-content: center; background: #000; padding: 16px; overflow: hidden; position: relative; }
#previewVideo { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,.5); display: none; }
#previewVideo.active { display: block; }
.no-clip-msg { color: #404040; font-size: 13px; }

.transport { border-top: 1px solid #262626; background: #171717; padding: 14px 16px; }
.transport-row { display: flex; align-items: center; gap: 12px; }
.play-btn { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: none; background: #f59e0b; color: #0a0a0a; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.play-btn:disabled { background: #404040; cursor: not-allowed; }
.play-btn svg:first-child { margin-left: 2px; }
.split-btn { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; border: 1px solid #404040; background: #0a0a0a; color: #d4d4d4; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, color .15s; }
.split-btn:hover:not(:disabled) { border-color: #fbbf24; color: #fbbf24; }
.split-btn:disabled { color: #404040; cursor: not-allowed; }
.time-label { font-size: 11px; color: #a3a3a3; font-family: monospace; width: 130px; flex-shrink: 0; }
.timeline-canvas { flex: 1; height: 56px; border-radius: 4px; cursor: crosshair; display: block; width: 100%; }
.hint { font-size: 10px; color: #525252; margin-top: 10px; }
.hint b { color: #a3a3a3; }

.export-progress-wrap { margin-top: 10px; background: #262626; border-radius: 4px; height: 20px; position: relative; overflow: hidden; }
.export-progress-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #f59e0b; width: 0%; transition: width .2s; }
.export-progress-label { position: absolute; left: 8px; top: 2px; font-size: 10px; color: #0a0a0a; font-weight: 600; z-index: 1; }
