/* 上传区域 */
.ae-upload-area {
  border: 2px dashed #90caf9;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #e3f2fd;
  position: relative;
}
.ae-upload-area * {
  pointer-events: none;
}
.ae-upload-area:hover,
.ae-upload-area.ae-dragover {
  border-color: #2196F3;
  background: #bbdefb;
  box-shadow: 0 0 12px rgba(33, 150, 243, 0.25);
}
.ae-upload-area .ae-upload-icon {
  font-size: 48px;
  color: #2196F3;
  margin-bottom: 10px;
}
.ae-upload-area .ae-upload-text {
  font-size: 16px;
  color: #555;
  margin-bottom: 6px;
}
.ae-upload-area .ae-upload-hint {
  font-size: 13px;
  color: #999;
}
.ae-upload-area input[type="file"] {
  display: none;
}

/* 预览容器 */
.ae-preview-container {
  display: none;
}
.ae-preview-container.ae-active {
  display: block;
}

/* 视频播放器 */
.ae-video-wrapper {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ae-video-wrapper video {
  width: 100%;
  display: block;
  max-height: 360px;
  object-fit: contain;
  background: #000;
}

/* 自定义视频控制栏 */
.ae-video-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #222;
  border-radius: 0 0 8px 8px;
}
.ae-video-controls button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-video-controls button:hover {
  background: rgba(255,255,255,0.15);
}
.ae-video-controls .ae-time-display {
  color: #ccc;
  font-size: 13px;
  font-family: monospace;
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
}
.ae-progress-track {
  flex: 1;
  height: 6px;
  background: #555;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.ae-progress-fill {
  height: 100%;
  background: #2196F3;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  pointer-events: none;
}
.ae-range-highlight {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(33, 150, 243, 0.3);
  pointer-events: none;
  border-radius: 3px;
}

/* 视频信息条 */
.ae-video-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #e3f2fd;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
}
.ae-video-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ae-video-info .material-icons {
  font-size: 16px;
  color: #2196F3;
}

/* 时间范围选择区 */
.ae-range-section {
  margin-bottom: 16px;
}
.ae-range-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ae-range-section h4 .material-icons {
  font-size: 18px;
  color: #2196F3;
}
.ae-range-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ae-range-inputs label {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ae-range-inputs input[type="text"] {
  width: 80px;
  padding: 4px 8px;
  font-size: 13px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.ae-range-inputs input[type="text"]:focus {
  border-color: #90caf9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
}

/* 双滑块范围选择器 */
.ae-range-slider {
  position: relative;
  height: 28px;
  margin: 4px 0;
}
.ae-range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  height: 6px;
  margin: 0;
  z-index: 2;
}
.ae-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #2196F3;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  position: relative;
  z-index: 3;
}
.ae-range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #2196F3;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ae-range-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  z-index: 1;
}
.ae-range-slider-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: rgba(33, 150, 243, 0.3);
  border-radius: 3px;
  z-index: 1;
}

/* 音频参数设置区 */
.ae-params-section {
  margin-bottom: 16px;
}
.ae-params-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ae-params-section h4 .material-icons {
  font-size: 18px;
  color: #2196F3;
}
.ae-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ae-param-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ae-param-item label {
  font-size: 13px;
  color: #666;
}
.ae-param-item select,
.ae-param-item input[type="number"] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.ae-param-item select:focus,
.ae-param-item input[type="number"]:focus {
  border-color: #90caf9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
}

/* 音频波形预览区 */
.ae-waveform-section {
  margin-bottom: 16px;
  display: none;
}
.ae-waveform-section.ae-active {
  display: block;
}
.ae-waveform-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ae-waveform-section h4 .material-icons {
  font-size: 18px;
  color: #2196F3;
}
.ae-waveform-canvas {
  width: 100%;
  height: 80px;
  background: #f5f5f5;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

/* 提取进度 */
.ae-progress-container {
  display: none;
  margin: 16px 0;
}
.ae-progress-container.ae-active {
  display: block;
}
.ae-progress-bar {
  width: 100%;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.ae-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2196F3, #42a5f5);
  border-radius: 12px;
  transition: width 0.3s ease;
  width: 0;
}
.ae-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #333;
  font-weight: bold;
}
.ae-progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #888;
}

/* 结果区域 */
.ae-result-container {
  display: none;
  margin: 16px 0;
}
.ae-result-container.ae-active {
  display: block;
}
.ae-result-preview {
  margin-bottom: 12px;
}
.ae-result-preview audio {
  width: 100%;
  border-radius: 6px;
}
.ae-result-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #e3f2fd;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
}
.ae-result-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ae-result-info .material-icons {
  font-size: 16px;
  color: #2196F3;
}
.ae-filename-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ae-filename-row label {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}
.ae-filename-row input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.ae-filename-row input[type="text"]:focus {
  border-color: #90caf9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
}

/* 预估大小 */
.ae-estimate {
  margin-top: 10px;
  padding: 8px 12px;
  background: #e3f2fd;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ae-estimate .material-icons {
  font-size: 16px;
  color: #2196F3;
}

/* 响应式 */
@media (max-width: 768px) {
  .ae-params-grid {
    grid-template-columns: 1fr;
  }
  .ae-range-inputs {
    flex-direction: column;
    align-items: flex-start;
  }
}
