/* ==========================================
   视频截取模块样式
   ========================================== */

#video-upload-area {
  margin: 0 12px 8px; padding: 14px 0;
  border: 1.5px dashed #3A3A3A; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; background: #141414; transition: border-color 0.2s;
  position: relative;
}
#video-upload-area:hover { border-color: #00D4FF; }
#video-upload-area span { font-size: 11px; color: #666; margin-top: 4px; }
#video-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

#video-list {
  flex: 1; overflow-y: auto; padding: 0 12px 12px;
}
.video-list-item {
  margin-bottom: 6px; padding: 6px;
  background: #1F1F1F; border-radius: 8px;
  border: 0.5px solid #2A2A2A;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: border-color 0.2s;
  position: relative;
}
.video-list-item:hover { border-color: #3A3A3A; }
.video-list-item.active {
  border-color: #00D4FF;
  box-shadow: 0 0 0 1px rgba(0,212,255,0.3), 0 0 16px rgba(0,212,255,0.08);
}
.video-thumb {
  width: 56px; height: 40px; border-radius: 4px;
  background: #252525; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.video-thumb video { width: 100%; height: 100%; object-fit: cover; }
.duration-badge {
  position: absolute; bottom: 2px; right: 2px;
  background: rgba(0,0,0,0.75); color: #E8E8E8;
  font-size: 9px; padding: 1px 3px; border-radius: 2px;
}
.video-info { flex: 1; min-width: 0; }
.video-name {
  font-size: 11px; color: #E8E8E8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-size { font-size: 10px; color: #666; }
.video-checkbox {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #3A3A3A;
  transition: all 0.2s; cursor: pointer;
}
.video-checkbox:hover { border-color: #555; }
.video-list-item.selected .video-checkbox {
  background: #00D4FF; border-color: #00D4FF;
  box-shadow: 0 0 8px rgba(0,212,255,0.4);
}

.video-delete-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FF4444;
  border: 1.5px solid #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.15s;
  z-index: 2;
  padding: 0;
}

.video-delete-btn:hover {
  transform: scale(1.1);
  background: #FF6666;
}

.video-list-item:hover .video-delete-btn {
  opacity: 1;
}

#video-preview-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; width: 100%; height: 100%; padding: 12px; gap: 12px;
  min-height: 0;
}
.video-container {
  width: min(864px, 78vw);
  max-height: 62vh;
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background: #0a0a0a; border-radius: 6px;
  overflow: hidden;
}
#preview-video {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  background: #000;
}

#timeline-container {
  width: 100%; max-width: 720px;
}
#timeline-track {
  position: relative; height: 32px;
  background: #1A1A1A; border-radius: 6px;
  border: 0.5px solid #2A2A2A; cursor: pointer;
  overflow: hidden;
}
#timeline-progress {
  position: absolute; top: 0; left: 0; height: 100%;
  background: rgba(0,212,255,0.15);
  border-radius: 6px 0 0 6px; pointer-events: none;
}
#timeline-crop {
  position: absolute; top: 4px; height: calc(100% - 8px);
  background: rgba(0,212,255,0.2);
  border: 1px solid #00D4FF;
  border-radius: 4px; pointer-events: none;
}
#timeline-crop-left, #timeline-crop-right {
  position: absolute; top: 0; width: 10px; height: 100%;
  background: #0D0D0D; border: 1.5px solid #00D4FF;
  border-radius: 2px; cursor: ew-resize; pointer-events: auto;
}
#timeline-crop-left { left: -5px; }
#timeline-crop-right { right: -5px; }
#timeline-playhead {
  position: absolute; top: 0; width: 2px; height: 100%;
  background: #FF4444; pointer-events: none; z-index: 5;
}
#timeline-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #666; margin-top: 6px;
}
#timeline-crop-label {
  color: #00D4FF; font-size: 11px;
}

.code-preview {
  background: #0D0D0D; border: 0.5px solid #2A2A2A;
  border-radius: 6px; padding: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10px; color: #AAA; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all;
  max-height: 120px; overflow-y: auto;
}

#video-progress-section {
  padding: 12px 16px;
  border-top: 0.5px solid #2A2A2A;
}
#video-progress-bar {
  height: 6px; background: #1A1A1A;
  border-radius: 3px; overflow: hidden;
  margin-bottom: 4px;
}
#video-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(135deg, #00D4FF, #7B2FFF);
  border-radius: 3px; transition: width 0.3s;
}
#video-progress-text {
  font-size: 11px; color: #888; text-align: center;
}
