/* ══════════════════════════════════════════════════════
   智能剪辑模块样式
   布局：顶部工具栏 + 三栏内容区
   ══════════════════════════════════════════════════════ */

/* 根容器 */
.sc-root {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #0a0a12;
  color: #e0ddd8;
  overflow: hidden;
}

.sc-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── 顶部工具栏 ── */
.sc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  min-height: 48px;
  background: #111118;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

.sc-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sc-back-btn.sc-back-btn--icon-only {
  gap: 0;
  padding: 6px 8px;
  min-width: 36px;
  justify-content: center;
}
.sc-back-btn.sc-back-btn--icon-only svg {
  flex-shrink: 0;
}

.sc-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #7a756e;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}
.sc-back-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e0ddd8;
}

.sc-project-name {
  font-size: 14px;
  font-weight: 600;
  color: #e0ddd8;
  white-space: nowrap;
}

.sc-video-info {
  font-size: 12px;
  color: #7a756e;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-toolbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.sc-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 管道进度条 */
.sc-pipeline-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #7a756e;
  white-space: nowrap;
}

.sc-step {
  padding: 2px 8px;
  border-radius: 10px;
  transition: all 0.2s;
}
.sc-step--active {
  background: rgba(6, 182, 212, 0.15);
  color: #06B6D4;
}
.sc-step--done {
  color: #10B981;
}

.sc-step-arrow {
  color: rgba(255, 255, 255, 0.12);
  font-size: 10px;
}

/* 按钮 */
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sc-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sc-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #a0a0a0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sc-btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #e0ddd8;
}

.sc-btn--primary {
  background: #06B6D4;
  color: #fff;
}
.sc-btn--primary:hover:not(:disabled) {
  background: #0891B2;
}

/* ── 三栏内容区 ── */
.sc-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 左侧资源检索面板 */
.sc-left-panel {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d0d15;
  transition: width 0.25s, min-width 0.25s, opacity 0.25s;
}
.sc-left-panel.sc-panel--collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}

/* 右侧 Chat 面板 */
.sc-right-panel {
  width: 320px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d0d15;
  transition: width 0.25s, min-width 0.25s, opacity 0.25s;
}
.sc-right-panel.sc-panel--collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}

/* 中间场景时间线 */
.sc-center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sc-center-panel--dragover {
  outline: 2px dashed rgba(6, 182, 212, 0.55);
  outline-offset: -6px;
  background: rgba(6, 182, 212, 0.06);
}

/* 面板头部 */
.sc-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #a0a0a0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-panel-collapse-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
}
.sc-panel-collapse-btn:hover {
  color: #a0a0a0;
  background: rgba(255, 255, 255, 0.04);
}

.sc-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── 空状态 ── */
.sc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: #555;
  padding: 40px;
  text-align: center;
}
.sc-empty-state p {
  font-size: 13px;
}

.sc-drop-zone {
  cursor: pointer;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s, background 0.15s;
}
.sc-drop-zone:hover {
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.06);
  color: #7a756e;
}
.sc-drop-zone:focus-visible {
  outline: 2px solid rgba(6, 182, 212, 0.7);
  outline-offset: 2px;
}
.sc-drop-zone__title {
  font-size: 14px !important;
  font-weight: 500;
  color: #a0a0a0 !important;
  margin: 0;
}
.sc-drop-zone__hint {
  font-size: 12px !important;
  color: #555 !important;
  max-width: 320px;
  line-height: 1.45;
  margin: 0;
}

/* ── 时间线 ── */
.sc-timeline-mount {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
}

.sc-timeline {
  position: relative;
  width: 100%;
  height: 140px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  overflow: hidden;
}

.sc-timeline__ruler {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-ruler-mark {
  position: absolute;
  font-size: 9px;
  color: #555;
  transform: translateX(-50%);
  top: 4px;
}

.sc-timeline__scenes {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 30px;
}

.sc-boundary {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-1px);
}
.sc-boundary--start { background: #06B6D4; }
.sc-boundary--visual { background: #8B5CF6; }
.sc-boundary--silence { background: #F59E0B; }
.sc-boundary--mixed { background: #EC4899; }

.sc-timeline__highlights {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  height: 24px;
}

.sc-highlight {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(6, 182, 212, 0.25);
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.sc-timeline__clips {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: 28px;
}

.sc-clip-segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.sc-clip--keep {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.sc-clip--cut {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sc-clip-label {
  font-size: 10px;
}

.sc-timeline__playhead {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #06B6D4;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 4px rgba(6, 182, 212, 0.5);
}

/* ── Chat 面板 ── */
.sc-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sc-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-chat__msg {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 95%;
  word-wrap: break-word;
}

.sc-chat__msg--user {
  align-self: flex-end;
  background: rgba(6, 182, 212, 0.12);
  color: #e0ddd8;
  border-bottom-right-radius: 2px;
}

.sc-chat__msg--system {
  align-self: center;
  background: rgba(255, 255, 255, 0.03);
  color: #7a756e;
  font-size: 12px;
  text-align: center;
}

.sc-chat__msg--ai {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.1);
  color: #e0ddd8;
  border-bottom-left-radius: 2px;
}

.sc-chat__clips {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-chat__clip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.sc-chat__clip--keep {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.sc-chat__clip--cut {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
}

.sc-chat__clip-action {
  flex-shrink: 0;
}

.sc-chat__clip-time {
  color: #7a756e;
  font-family: "SF Mono", "Fira Code", monospace;
}

.sc-chat__clip-reason {
  color: #a0a0a0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 快捷建议 */
.sc-chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-chip {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.06);
  color: #06B6D4;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sc-chip:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
}

/* 输入区 */
.sc-chat__input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sc-chat__input {
  flex: 1;
  resize: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  color: #e0ddd8;
  font-size: 13px;
  line-height: 1.4;
  max-height: 120px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.sc-chat__input:focus {
  border-color: rgba(6, 182, 212, 0.4);
}
.sc-chat__input::placeholder {
  color: #555;
}

.sc-chat__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #06B6D4;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.sc-chat__send:hover {
  background: #0891B2;
}

/* ── 资源检索面板 ── */
.sc-search {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  gap: 10px;
}

.sc-search__bar {
  display: flex;
  gap: 6px;
}

.sc-search__input {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e0ddd8;
  font-size: 13px;
  outline: none;
}
.sc-search__input:focus {
  border-color: rgba(6, 182, 212, 0.4);
}
.sc-search__input::placeholder {
  color: #555;
}

.sc-search__btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: #06B6D4;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.sc-search__btn:hover {
  background: #0891B2;
}

.sc-search__platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-search__platform-chip {
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #7a756e;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.sc-search__platform-chip--active,
.sc-search__platform-chip:hover {
  border-color: rgba(6, 182, 212, 0.3);
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.06);
}

.sc-search__results {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-search__result {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.sc-search__result:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(6, 182, 212, 0.2);
}

.sc-search__thumb {
  width: 80px;
  height: 45px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  overflow: hidden;
}
.sc-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc-search__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sc-search__title {
  font-size: 12px;
  color: #e0ddd8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-search__meta {
  font-size: 11px;
  color: #555;
  display: flex;
  gap: 8px;
}

.sc-search__error {
  padding: 12px;
  color: #EF4444;
  font-size: 12px;
  text-align: center;
}

.sc-search__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #555;
  font-size: 12px;
  gap: 8px;
}

/* 滚动条 */
.sc-panel-body::-webkit-scrollbar,
.sc-chat__messages::-webkit-scrollbar,
.sc-search__results::-webkit-scrollbar {
  width: 4px;
}
.sc-panel-body::-webkit-scrollbar-track,
.sc-chat__messages::-webkit-scrollbar-track,
.sc-search__results::-webkit-scrollbar-track {
  background: transparent;
}
.sc-panel-body::-webkit-scrollbar-thumb,
.sc-chat__messages::-webkit-scrollbar-thumb,
.sc-search__results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
