/* 添加与EpisodeOverview.css一致的色彩变量 */
:root {
  --primary-color: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --dark-color: #1e293b;
  --gray-color: #64748b;
  --light-gray: #f1f5f9;
  --card-radius: 16px;
  --border-radius: 8px;
  --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --glass-background: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(10px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --primary-gradient: linear-gradient(135deg, #7c3aed, #2563eb);
}

.image-processing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--dark-color);
}

h2 {
  margin-bottom: 20px;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.upload-section {
  margin-bottom: 40px;
}

.upload-box {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
  margin-bottom: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-box:hover {
  border-color: #007bff;
}

.upload-box.drag-over {
  border-color: #007bff;
  background-color: #f0f8ff;
}

.upload-box.has-images {
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: default;
  overflow: hidden;
  height: auto;
  max-height: 600px; /* 限制最大高度 */
  margin: 0 auto; /* 居中显示 */
  width: 100%;
  max-width: 1000px; /* 限制最大宽度 */
}

.upload-box i {
  font-size: 48px;
  color: #aaa;
  margin-bottom: 10px;
}

.preview {
  max-height: 300px;
  overflow: hidden;
  width: 100%;
}

.preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

button {
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.primary-button {
  background: var(--primary-gradient);
  color: white;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(124, 58, 237, 0.2);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--primary-dark), #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(124, 58, 237, 0.3);
}

.tertiary-button {
  margin-left: 10px;
  background-color: transparent;
  color: var(--gray-color);
  border: 1px solid var(--primary-light) !important;
  transition: all 0.3s ease;
}

.tertiary-button:hover {
  background-color: rgba(124, 58, 237, 0.05);
  color: var(--primary-color);
  border-color: var(--primary-color) !important;
}

.error-message {
  color: #dc3545;
  text-align: center;
  margin-top: 20px;
}

.uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #007bff;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.progress-bar {
  width: 80%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-top: 15px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #007bff;
  transition: width 0.3s ease;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.processing-logs {
  margin-top: 40px;
  border-top: 1px solid var(--light-gray);
  padding-top: 20px;
}

.log-container {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 15px;
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 14px;
}

.log-item {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.log-time {
  color: var(--primary-color);
  margin-right: 8px;
}

.log-message {
  color: #333;
}

/* 图片对比滑块样式 */
.image-comparison-slider {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-height: 600px; 
  min-height: 300px; /* 添加最小高度确保内容可见 */
}

.comparison-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 300px; /* 确保容器有足够高度 */
  overflow: hidden;
  user-select: none;
  touch-action: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 处理后的图片（底层） */
.enhanced-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 确保图片完整显示 */
  max-height: 100%;
}

/* 原图（上层） - 使用绝对定位完全覆盖处理后图片 */
.original-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 确保图片完整显示 */
  clip-path: polygon(0 0, var(--slider-pos) 0, var(--slider-pos) 100%, 0 100%);
  z-index: 5;
  max-height: 100%;
}

/* 滑块控件 */
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--slider-pos);
  width: 40px;
  margin-left: -20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: col-resize;
  z-index: 10;
  touch-action: none;
}

.slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
}

.slider-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease;
}

.slider-button:hover,
.slider-button:active {
  transform: scale(1.1);
}

.slider-button i {
  font-size: 12px;
  color: #007bff;
  transition: color 0.2s ease;
}

.slider-button i:first-child {
  margin-right: 4px;
}

.slider-button i:last-child {
  margin-left: 4px;
}

/* 标签样式 */
.comparison-labels {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  box-sizing: border-box;
  z-index: 9;
  pointer-events: none;
}

.original-label, 
.enhanced-label {
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .image-processing-container {
    padding: 15px 10px; /* 减小内边距 */
  }
  
  .upload-box {
    padding: 20px;
  }
  
  .upload-box.has-images {
    min-height: 300px;
  }
  
  .slider-button {
    width: 30px;
    height: 30px;
  }
  
  .slider-handle {
    width: 30px;
    margin-left: -15px;
  }
  
  .comparison-labels {
    padding: 0 10px;
  }
  
  .original-label, 
  .enhanced-label {
    font-size: 12px;
    padding: 3px 6px;
  }
  
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 350px; /* 移动端增加最小高度，确保图片完整显示 */
    margin-bottom: 15px; /* 减小底部间距 */
  }
  
  /* 确保结果视图中的图片容器有足够高度 */
  .result-view .image-comparison-slider {
    min-height: 300px;
  }
  
  .comparison-container {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .image-processing-container {
    padding: 10px 8px; /* 进一步减小内边距 */
  }
  
  .upload-box {
    padding: 20px;
  }
  
  .upload-box.has-images {
    min-height: 300px;
  }
  
  .slider-button {
    width: 30px;
    height: 30px;
  }
  
  .slider-handle {
    width: 30px;
    margin-left: -15px;
  }
  
  .comparison-labels {
    padding: 0 10px;
  }
  
  .original-label, 
  .enhanced-label {
    font-size: 12px;
    padding: 3px 6px;
  }
  
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 300px; /* 小屏幕设备保持足够的最小高度 */
  }
}

@media (max-width: 360px) {
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 250px; /* 超小屏幕设备最小高度 */
  }
}

.queue-info {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* 上传空状态样式 */
.upload-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    border: 2px dashed var(--light-gray);
    border-radius: var(--card-radius);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--box-shadow);
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
  }
  
  .upload-empty-state:hover {
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.1);
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 100%),
             radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.1) 0%, transparent 100%);
  }
  
  .upload-icon-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 50%;
    margin-bottom: 20px;
  }
  
  .upload-icon-container i {
    font-size: 36px;
    color: var(--primary-color);
  }
  
  .upload-text-container {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .upload-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
  }
  
  .upload-description {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
  }
  
  .upload-browse {
    color: #4dabf7;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
  }
  
  .upload-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
  }
  
  .feature-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
  }
  
  .feature-item i {
    font-size: 14px;
    color: var(--primary-color);
    margin-right: 8px;
  }
  
  .feature-item span {
    font-size: 14px;
    color: #495057;
  }
  
  /* 拖放激活状态 */
  .drag-over .upload-empty-state {
    border-color: #4dabf7;
    background: linear-gradient(to bottom, #e7f5ff, #d0ebff);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.15);
  }
  
  .drag-over .upload-icon-container {
    background-color: rgba(0, 123, 255, 0.2);
    transform: scale(1.1);
  }
  
  .drag-over .upload-icon-container i {
    color: #339af0;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .upload-features {
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: space-around;
      gap: 10px;
    }
    
    .feature-item {
      padding: 6px 10px;
      flex: 0 1 auto;
    }
    
    .feature-item i {
      font-size: 12px;
      margin-right: 4px;
    }
    
    .feature-item span {
      font-size: 12px;
      white-space: nowrap;
    }
    
    .upload-title {
      font-size: 18px;
    }
    
    .upload-description {
      font-size: 14px;
    }
    
    /* 调整上传区域大小 */
    .standalone-upload {
      padding: 20px 15px;
      min-height: 200px; /* 大幅减小最小高度 */
    }
    
    .upload-icon-container {
      width: 60px;
      height: 60px;
      margin-bottom: 15px;
    }
    
    .upload-icon-container i {
      font-size: 28px;
    }
    
    .upload-text-container {
      margin-bottom: 20px;
    }
    
    /* 调整左右两栏的高度 */
    .upload-empty-state.standalone-upload,
    .preview-container,
    .result-view,
    .processing-progress-container {
      min-height: 200px; /* 减小最小高度 */
    }
  }
  
  /* 进度条组件样式 */
  .processing-progress-container {
    margin: 40px 0;
    padding: 25px;
    border-radius: 12px;
    /* background: #f8f9fa; */
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .progress-stages {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
  }
  
  .progress-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .stage-indicator {
    display: flex;
    align-items: center;
    position: relative;
    width: auto;
    margin-right: 15px;
  }
  
  .stage-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e9ecef;
    border: 3px solid #dee2e6;
    z-index: 2;
    transition: all 0.3s ease;
  }
  
  .stage-line {
    height: 3px;
    background: #e9ecef;
    flex-grow: 1;
    margin: 0 5px;
    z-index: 1;
    transition: all 0.3s ease;
  }
  
  .stage-name {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
    white-space: nowrap;
  }
  
  .stage-percent {
    font-size: 10px;
    color: #adb5bd;
  }
  
  /* 激活状态 */
  .progress-stage.active .stage-dot {
    background: #4dabf7;
    border-color: #c5e3ff;
  }
  
  .progress-stage.active .stage-line {
    background: #4dabf7;
  }
  
  .progress-stage.active .stage-name {
    color: #495057;
  }
  
  .progress-stage.active .stage-percent {
    color: #6c757d;
  }
  
  /* 当前阶段 */
  .progress-stage.current .stage-dot {
    background: #228be6;
    border-color: #a5d8ff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
    transform: scale(1.2);
  }
  
  .progress-stage.current .stage-name {
    color: #1971c2;
    font-weight: 600;
  }
  
  /* 进度条 */
  .progress-bar-container {
    margin: 30px 0;
  }
  
  .progress-status {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .status-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
  }
  
  .status-icon i {
    font-size: 18px;
    color: #6c757d;
  }
  
  .status-icon.success i {
    color: #40c057;
  }
  
  .progress-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-top-color: #4dabf7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  .status-text {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
  }
  
  .progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
  }
  
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4dabf7, #228be6);
    border-radius: 6px;
    transition: width 0.3s ease;
  }
  
  .progress-indicator {
    position: absolute;
    top: -24px;
    transform: translateX(-50%);
    transition: left 0.3s ease;
  }
  
  .progress-percentage {
    background: #228be6;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    position: relative;
  }
  
  .progress-percentage:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #228be6;
  }
  
  /* 队列状态 */
  .queue-status {
    display: flex;
    align-items: center;
    background: #e7f5ff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
  }
  
  .queue-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
  }
  
  .queue-icon i {
    font-size: 18px;
    color: #1c7ed6;
  }
  
  .queue-text {
    font-size: 14px;
    color: #1971c2;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .progress-stages {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
    }
    
    .progress-stage {
      flex-direction: row;
      width: 100%;
    }
    
    .stage-indicator {
      width: auto;
      margin-right: 15px;
    }
    
    .stage-dot {
      width: 16px;
      height: 16px;
    }
    
    .stage-line {
      display: none;
    }
    
    .stage-content {
      margin-top: 0;
      text-align: left;
      flex-grow: 1;
    }
  }


/* 左右布局样式 */
.layout-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px; /* 增加间距 */
  margin-bottom: 20px;
}

.left-column,
.right-column {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.right-column {
  width: 350px;
  max-width: 350px;
  justify-content: flex-start;
}

/* 使左右两栏高度保持一致 */
.upload-empty-state.standalone-upload,
.preview-container,
.result-view,
.processing-progress-container,
.demo-video-container {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 500px; /* PC端恢复原来的最小高度 */
  margin-top: 0;
  margin-bottom: 20px;
}

.upload-empty-state.standalone-upload {
  justify-content: center;
}

.preview-container {
  align-items: center;
  justify-content: center;
}

.result-view .image-comparison-slider {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-container {
  width: 100%;
  height: 100%;
  /* max-height: 450px; */
  position: relative;
}

/* 处理视图样式 */
.processing-view {
  width: 100%;
  background-color: #f7f9fc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 20px;
}

.processing-view .uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  margin-bottom: 20px;
}

.processing-view .processing-progress-container {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* 结果视图样式 */
.result-view {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--card-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.result-view h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--dark-color);
  font-size: 1.5rem;
}

.result-view .image-comparison-slider {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px; /* 确保有足够的最小高度 */
}

/* 独立的上传区域样式 */
.standalone-upload {
  width: 100%;
  background-color: #f7f9fc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 15px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px dashed #d1d9e6;
  min-height: 180px;
}

.standalone-upload:hover {
  border-color: #4a90e2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.standalone-upload.drag-over {
  border-color: #4a90e2;
  background-color: #eef4fd;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.15);
}

/* 预览容器样式 */
.preview-container {
  width: 100%;
  background-color: #f7f9fc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.preview-container img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 4px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* 处理进度组件样式 */
.processing-progress-container {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--card-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.processing-progress-container h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.progress-stages-container {
  margin-top: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* 垂直排列的进度阶段 */
.progress-stages {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative; /* 用于放置连接线 */
  padding-left: 0; /* 移除左侧的内边距，重新计算位置 */
  flex-grow: 1;
}

/* 创建一个贯穿整个进度的背景线 */
.progress-stages:before {
  content: '';
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background-color: var(--light-gray);
  z-index: 1;
}

/* 进度阶段样式 */
.progress-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 0; /* 增加垂直间距，使各阶段更加分明 */
  position: relative;
  z-index: 2;
  opacity: 0.7; /* 未激活状态稍微透明 */
  transition: all 0.3s ease;
}

/* 为每个阶段添加一个线段，默认为灰色 */
.progress-stage:not(:last-child):after {
  content: '';
  position: absolute;
  left: 8px; /* 与主线对齐 */
  top: 30px; /* 从当前圆点的底部开始，16px(圆点大小) + 12px(padding-top) + 2px(边框) */
  height: calc(100% - 30px); /* 延伸到下一个圆点的顶部 */
  width: 2px;
  background-color: var(--light-gray);
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* 当阶段激活时，其对应的线段变为蓝色 */
.progress-stage.active:not(:last-child):after {
  background-color: var(--primary-color);
}

/* 确保只有已完成的阶段或当前阶段的线段才变色 */
.progress-stage:not(.active):not(.completed):after {
  background-color: #e0e0e0 !important;
}

.progress-stage.active {
  opacity: 1;
}

.progress-stage.current {
  font-weight: bold;
}

.progress-stage.current .stage-name {
  color: var(--primary-color);
}

.stage-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-right: 15px;
}

.stage-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid var(--light-gray);
  z-index: 3;
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box; /* 确保边框计入总宽高 */
}

.progress-stage.active .stage-dot {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.progress-stage.completed .stage-dot {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.progress-stage.completed .stage-dot:after {
  content: '✓';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
}

.stage-content {
  display: flex;
  align-items: center;
  text-align: left;
  min-width: 80px;
  margin-top: 0; /* 确保没有顶部边距 */
}

.stage-name {
  font-size: 14px;
  color: var(--dark-color);
  font-weight: 500;
  transition: color 0.3s ease;
  line-height: 1.2;
}

.progress-spinner {
  border: 2px solid rgba(74, 144, 226, 0.2);
  border-top-color: #4a90e2;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 队列状态样式 */
.queue-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto; /* 将队列状态推到底部 */
  margin-bottom: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.queue-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.queue-text {
  font-size: 14px;
  color: var(--dark-color);
}

/* 按钮区域样式 */
.actions {
  /* background-color: #f7f9fc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.actions button {
  padding: 10px 15px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.primary-button {
  background-color: #4a90e2;
  color: white;
}

.primary-button:hover {
  background-color: #3a7bc8;
}

.tertiary-button {
  margin-left: 10px;
  background-color: transparent;
  color: #666;
  border: 1px solid #d1d9e6 !important;
}

.tertiary-button:hover {
  background-color: #f0f0f0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
    gap: 15px; /* 减小间距 */
  }
  
  .right-column {
    width: 100%;
    max-width: 100%;
  }
  
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 350px; /* 移动端增加最小高度，确保图片完整显示 */
    margin-bottom: 15px; /* 减小底部间距 */
  }
  
  /* 确保结果视图中的图片容器有足够高度 */
  .result-view .image-comparison-slider {
    min-height: 300px;
  }
  
  .comparison-container {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 300px; /* 小屏幕设备保持足够的最小高度 */
  }
}

@media (max-width: 360px) {
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 250px; /* 超小屏幕设备最小高度 */
  }
}

/* Element Plus 步骤条样式自定义 */
.progress-stages-container .el-steps {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  /* padding: 20px 0; */
}

/* .progress-stages-container .el-step {
  margin-bottom: 15px;
} */

.progress-stages-container .el-step__icon {
  width: 24px;
  height: 24px;
  font-size: 14px;
}

.progress-stages-container .el-step__title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.progress-stages-container .el-step.is-process .el-step__title {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-stages-container .el-step.is-success .el-step__title {
  color: var(--primary-dark);
}

.progress-stages-container .el-step__line {
  background-color: #e0e0e0;
}

.progress-stages-container .el-step.is-process .el-step__line,
.progress-stages-container .el-step.is-success .el-step__line {
  background-color: var(--primary-color);
}

.progress-stages-container .is-rotating {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 队列状态样式 */
.queue-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto; /* 将队列状态推到底部 */
  margin-bottom: 0;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
}

.queue-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.queue-text {
  font-size: 14px;
  color: #666;
}

/* 处理中提示样式 */
.processing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(30, 41, 59, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.processing-text {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 15px 25px;
  background: var(--primary-gradient);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* 介绍部分样式 */
.intro-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--card-radius);
  box-shadow: var(--box-shadow);
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
             radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

.intro-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--dark-color);
  max-width: 850px;
  margin: 0 auto 25px;
}

.intro-features {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.intro-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.intro-feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.15);
}

.intro-feature-item i {
  font-size: 18px;
}

.intro-feature-item span {
  font-size: 16px;
  font-weight: 500;
  color: var(--dark-color);
}

@media (max-width: 768px) {
  .intro-section h1 {
    font-size: 2rem;
  }
  
  .intro-text {
    font-size: 1rem;
  }
  
  .intro-features {
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: space-around;
  }
  
  .intro-feature-item {
    padding: 6px 10px;
    flex: 0 1 auto;
    min-width: 0;
    font-size: 0.9rem;
  }
  
  .intro-feature-item i {
    font-size: 16px;
  }
  
  .intro-feature-item span {
    font-size: 14px;
    white-space: nowrap;
  }
}

/* 小屏幕移动设备的额外调整 */
@media (max-width: 480px) {
  .intro-feature-item {
    padding: 5px 8px; /* 进一步减小内边距 */
  }
  
  .intro-feature-item i {
    font-size: 14px; /* 进一步减小图标 */
    margin-right: 4px; /* 减小间距 */
  }
  
  .intro-feature-item span {
    font-size: 12px; /* 进一步减小文字 */
  }
  
  /* 上传区域进一步优化 */
  .standalone-upload {
    padding: 15px 10px; /* 进一步减小内边距 */
    min-height: 180px; /* 进一步减小最小高度 */
  }
  
  .upload-icon-container {
    width: 50px; /* 进一步减小图标容器 */
    height: 50px;
    margin-bottom: 10px;
  }
  
  .upload-icon-container i {
    font-size: 24px; /* 进一步减小图标 */
  }
  
  .upload-title {
    font-size: 16px; /* 减小标题字体 */
    margin-bottom: 5px; /* 减小底部间距 */
  }
  
  .upload-text-container {
    margin-bottom: 15px; /* 减小底部间距 */
  }
  
  .feature-item {
    padding: 4px 8px; /* 进一步减小内边距 */
  }
  
  .feature-item i {
    font-size: 11px; /* 进一步减小图标 */
    margin-right: 3px; /* 减小间距 */
  }
  
  .feature-item span {
    font-size: 11px; /* 进一步减小文字 */
  }
  
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 180px; /* 减小最小高度 */
  }
}

/* 演示视频容器样式 */
.demo-video-container {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  background-color: rgba(0, 0, 0, 0.05); /* 更改为深色背景，让视频边缘更自然 */
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  /* 添加容器比例，保持16:9的视频比例 */
  aspect-ratio: 16/9;
  display: flex; /* 使用flex布局 */
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
}

.demo-video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 改为cover确保视频铺满容器 */
  display: block;
  position: absolute; /* 绝对定位以铺满容器 */
  top: 0;
  left: 0;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  z-index: 2; /* 确保覆盖层在视频上方 */
}

.video-caption {
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .demo-video-container {
    aspect-ratio: 16/9; /* 保持视频比例 */
    height: auto; /* 高度自适应 */
  }
  
  .demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保在移动端也是cover模式 */
  }
  
  .video-caption {
    font-size: 16px; /* 稍微减小字体大小 */
    padding: 8px 0; /* 增加一些内边距 */
  }
  
  .video-overlay {
    padding: 10px; /* 减小内边距 */
  }
}

/* 小型移动设备（如iPhone SE等） */
@media (max-width: 375px) {
  .demo-video-container {
    aspect-ratio: 16/9; /* 保持16:9比例，更符合视频标准 */
    min-height: 200px; /* 设置最小高度 */
  }
  
  .video-caption {
    font-size: 14px; /* 进一步减小字体大小 */
  }
}

/* 确保在横屏模式下也能正常显示 */
@media (max-width: 896px) and (orientation: landscape) {
  .demo-video-container {
    aspect-ratio: 16/9; /* 保持视频比例 */
    height: auto;
    min-height: 200px; /* 横屏模式下减小最小高度 */
    max-height: 80vh; /* 限制最大高度为视口高度的80% */
  }
}

/* 确保在超小屏幕设备上也能良好显示 */
@media (max-width: 360px) {
  .intro-features {
    gap: 5px; /* 进一步减小间距 */
  }
  
  .intro-feature-item {
    padding: 4px 6px; /* 最小内边距 */
  }
  
  .intro-feature-item i {
    font-size: 12px; /* 最小图标 */
    margin-right: 3px; /* 最小间距 */
  }
  
  .intro-feature-item span {
    font-size: 10px; /* 最小文字 */
  }
  
  /* 上传区域极小屏幕优化 */
  .standalone-upload {
    padding: 12px 8px; /* 最小内边距 */
    min-height: 150px; /* 最小高度 */
  }
  
  .upload-icon-container {
    width: 40px; /* 最小图标容器 */
    height: 40px;
    margin-bottom: 8px;
  }
  
  .upload-icon-container i {
    font-size: 20px; /* 最小图标 */
  }
  
  .upload-features {
    gap: 5px; /* 最小间距 */
  }
  
  .feature-item {
    padding: 3px 6px; /* 最小内边距 */
  }
  
  .feature-item i {
    font-size: 10px; /* 最小图标 */
    margin-right: 2px; /* 最小间距 */
  }
  
  .feature-item span {
    font-size: 10px; /* 最小文字 */
  }
  
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 150px; /* 减小最小高度 */
  }
}

/* 在移动端响应式样式中也需要调整 */
@media (max-width: 768px) {
  .stage-content {
    display: flex;
    align-items: center;
    margin-top: 0; /* 确保在移动端也没有顶部边距 */
  }
}

@media (max-width: 360px) {
  /* 调整左右两栏的高度 */
  .upload-empty-state.standalone-upload,
  .preview-container,
  .result-view,
  .processing-progress-container,
  .demo-video-container {
    min-height: 150px; /* 超小屏幕设备最小高度 */
  }
}

