/* 88-video-editor.css — 视频编辑工作台 (方案1: 弹窗 Modal, 裁剪时长/片段, 画面裁切/缩放, 比例切换) */

.ve-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.ve-modal-mask.active {
  opacity: 1;
  pointer-events: auto;
}

.ve-modal {
  width: 92vw;
  max-width: 1080px;
  max-height: 92vh;
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ve-modal-mask.active .ve-modal {
  transform: scale(1) translateY(0);
}

/* 头部 */
.ve-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 27, 38, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ve-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
}
.ve-meta-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-weight: normal;
}
.ve-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ve-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

/* 主体预览与构图区 */
.ve-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 18px;
  gap: 10px;
}

.ve-preview-stage {
  flex: 1;
  min-height: 320px;
  max-height: 560px;
  background: radial-gradient(circle at center, #111522 0%, #06080d 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 14px;
  box-sizing: border-box;
}

.ve-player-wrap {
  position: relative;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: grab;
  touch-action: none;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  box-sizing: border-box;
}

.ve-player-wrap:active {
  cursor: grabbing;
}

.ve-player-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: #000;
  transform-origin: center center;
}

/* 可视化交互裁剪框 Overlay */
.ve-crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

/* 裁剪框本体 */
.ve-crop-box {
  position: absolute;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 189, 248, 0.35);
  cursor: grab;
  touch-action: none;
  box-sizing: border-box;
}
.ve-crop-box:active {
  cursor: grabbing;
}

/* 三分构图网格线 */
.ve-crop-grid-h, .ve-crop-grid-v {
  position: absolute;
  pointer-events: none;
  opacity: 0.35;
}
.ve-crop-grid-h {
  left: 0; right: 0;
  height: 1px;
  background: #fff;
}
.ve-crop-grid-h.line-1 { top: 33.33%; }
.ve-crop-grid-h.line-2 { top: 66.66%; }
.ve-crop-grid-v {
  top: 0; bottom: 0;
  width: 1px;
  background: #fff;
}
.ve-crop-grid-v.line-1 { left: 33.33%; }
.ve-crop-grid-v.line-2 { left: 66.66%; }

/* 8 个控制手柄 */
.ve-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #0284c7;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}
.ve-handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.ve-handle.n  { top: -6px; left: calc(50% - 6px); cursor: ns-resize; border-radius: 2px; }
.ve-handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.ve-handle.e  { top: calc(50% - 6px); right: -6px; cursor: ew-resize; border-radius: 2px; }
.ve-handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.ve-handle.s  { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; border-radius: 2px; }
.ve-handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.ve-handle.w  { top: calc(50% - 6px); left: -6px; cursor: ew-resize; border-radius: 2px; }

/* 画面控制工具栏 (比例 / 缩放 / 镜像 / 旋转) */
.ve-tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(22, 27, 38, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.ve-tools-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ve-tools-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  margin-right: 4px;
}
.ve-ratio-btn {
  background: rgba(30, 36, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.ve-ratio-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #f8fafc;
}
.ve-ratio-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.ve-action-btn {
  background: rgba(30, 36, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.ve-action-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #f8fafc;
}
.ve-action-btn.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* 缩放滑块 */
.ve-zoom-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ve-zoom-slider {
  width: 90px;
  accent-color: #0284c7;
  cursor: pointer;
}
.ve-zoom-val {
  font-size: 12px;
  color: #cbd5e1;
  min-width: 38px;
}

/* 去水印快捷预设胶囊栏 */
.ve-preset-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.ve-preset-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
  margin-right: 4px;
  white-space: nowrap;
}
.ve-preset-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.ve-preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #f0f9ff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}
.ve-preset-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}
.ve-preset-btn.highlight {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}
.ve-preset-btn.highlight:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fef3c7;
}
.ve-preset-btn.highlight.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
}
.ve-preset-auto-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.ve-preset-auto-toggle input {
  accent-color: #38bdf8;
  cursor: pointer;
}
.ve-preset-auto-toggle:hover {
  color: #cbd5e1;
}

/* 时间轴剪辑面板 */
.ve-timeline-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(18, 24, 38, 0.7);
  border-radius: 10px;
  padding: 8px 14px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ve-timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ve-play-ctrls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ve-play-btn {
  background: #10b981;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.ve-play-btn:hover {
  background: #059669;
  transform: scale(1.05);
}
.ve-time-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #94a3b8;
}
.ve-time-cur {
  color: #10b981;
  font-weight: 600;
}
.ve-trim-info {
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 500;
}

/* 时间轴双向滑块 Track (极简 6px 荧光绿线设计) */
.ve-track-container {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  background: transparent;
  border: none;
  margin: 2px 0;
}
/* 贯穿全局的灰色极细基准线 (高度 6px) */
.ve-track-container::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.ve-track-waveform-placeholder {
  display: none;
}

/* 选区范围高亮: 6px 荧光激光绿线 */
.ve-trim-range {
  position: absolute;
  top: 8px;
  height: 6px;
  background: linear-gradient(90deg, #10b981 0%, #00ff88 50%, #10b981 100%);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7), 0 0 3px #10b981;
  box-sizing: border-box;
  pointer-events: none;
  border: none;
  z-index: 5;
}

/* 左右裁剪滑块 Handlers: 灵巧翡翠绿药丸手柄 */
.ve-trim-handle {
  position: absolute;
  top: 4px;
  width: 10px;
  height: 14px;
  background: #10b981;
  border: 1.5px solid #ffffff;
  border-radius: 4px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 8px rgba(16, 185, 129, 0.8);
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), background 0.12s;
}
.ve-trim-handle:hover,
.ve-trim-handle:active {
  background: #34d399;
  transform: scale(1.25);
  border-color: #f0fdf4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 255, 136, 0.95);
}
.ve-trim-handle::after {
  content: '';
  width: 2px;
  height: 6px;
  background: #064e3b;
  border-radius: 1px;
}

/* 当前播放指示线 (穿过绿线的游标指针) */
.ve-playhead {
  position: absolute;
  top: 2px;
  height: 18px;
  width: 2px;
  background: #ffffff;
  z-index: 15;
  pointer-events: none;
  box-shadow: 0 0 6px #ffffff, 0 0 10px rgba(0, 255, 136, 0.8);
}
.ve-playhead::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

/* 时间微调步进器 */
.ve-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding-top: 2px;
}
.ve-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ve-step-btn {
  background: rgba(30, 36, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.1s;
}
.ve-step-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}
.ve-start-label,
.ve-end-label {
  color: #34d399 !important;
}
.ve-loop-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #94a3b8;
}
.ve-loop-toggle input {
  accent-color: #10b981;
  cursor: pointer;
}

/* 底部状态与操作区 */
.ve-footer {
  padding: 14px 20px;
  background: rgba(18, 22, 32, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ve-footer-status {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ve-footer-status.processing {
  color: #38bdf8;
}
.ve-footer-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ve-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ve-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ve-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ve-btn-cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}
.ve-btn-replace {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
}
.ve-btn-replace:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857, #059669) !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.65) !important;
  transform: translateY(-1px);
}
.ve-btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}
.ve-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
}
.ve-btn-primary {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ve-btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

/* 导出进度条指示器 */
.ve-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.ve-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #00ff88);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
  border-radius: 3px;
  transition: width 0.15s ease-out;
}
