/* ===================================
MP3カット固有のスタイル
=================================== */

/* ===================================
エディターセクション
=================================== */
.editor-section {
  display: none;
}

/* ===================================
ファイル情報セクション
=================================== */
.file-info {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-info-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-name {
  font-weight: bold;
  color: var(--text-primary);
  font-size: 18px;
}

.file-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-secondary);
}

.file-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-detail-item i {
  color: var(--text-secondary);
  font-size: 14px;
}

.new-file-btn {
  background-color: var(--accent);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.new-file-btn:hover {
  background-color: var(--accent-dark);
}

/* ===================================
波形ビューア
=================================== */
.waveform-viewer {
  background: var(--primary);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  min-height: 250px;
}

.waveform-container {
  position: relative;
  height: 180px;
  margin-bottom: 20px;
  background: var(--primary-dark);
  border-radius: 5px;
  overflow: hidden;
}

.waveform-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.selection-area {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(243, 156, 18, 0.2);
  border-left: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
}

.trim-handle {
  position: absolute;
  top: 0;
  width: 30px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 20;
}

.trim-handle-left {
  left: -15px;
}

.trim-handle-right {
  right: -15px;
}

.trim-handle::before {
  content: '';
  width: 6px;
  height: 60px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.trim-handle:hover::before {
  background: var(--accent-dark);
  height: 70px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.playhead {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--danger);
  pointer-events: none;
  z-index: 5;
  display: none;
  box-shadow: 0 0 4px rgba(231, 76, 60, 0.8);
}

/* タイムライン */
.timeline {
  height: 30px;
  background: var(--primary-dark);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.time-markers {
  display: flex;
  justify-content: space-between;
  height: 100%;
  align-items: center;
  padding: 0 10px;
  color: var(--text-light);
  font-size: 12px;
  font-family: monospace;
}

/* ===================================
コントロールグループ
=================================== */
.control-group {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 20px;
}

.control-title {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-title i {
  color: var(--text-primary);
}

/* ===================================
スライダー
=================================== */
.slider {
  width: 100%;
  height: 6px;
  background: var(--gray-300);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
  background: var(--accent-dark);
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ===================================
プログレス表示
=================================== */
.progress-container {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  display: none;
  margin-bottom: 20px;
  min-height: 150px;
}

.progress-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: var(--gray-300);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transition: width 0.3s;
  color: var(--primary);
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}

.progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

/* ===================================
その他の要素
=================================== */
/* コントロールパネル */
.controls-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

/* 再生コントロール */
.playback-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--info);
  border: none;
  color: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s;
}

.play-btn:hover {
  background: var(--info-hover);
  transform: scale(1.05);
}

.play-btn.playing {
  background: var(--danger);
}

.play-btn.playing:hover {
  background: var(--danger-hover);
}

.stop-btn {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: var(--gray-500);
  border: none;
  color: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s;
}

.stop-btn:hover {
  background: var(--gray-700);
}

.time-display {
  background: var(--primary);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 14px;
  text-align: center;
}

/* トリミングコントロール */
.trim-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.time-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: monospace;
  font-size: 14px;
  transition: border-color 0.3s;
}

.time-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* エフェクトコントロール */
.effects-grid {
  display: grid;
  gap: 20px;
}

.effect-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.effect-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.effect-value {
  font-weight: 500;
  color: var(--text-primary);
}

/* プリセットボタン */
.preset-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.preset-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.preset-btn:hover {
  background: var(--gray-100);
  border-color: var(--accent);
}

.preset-btn.active {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

/* エクスポートセクション */
.export-section {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.format-selection {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.format-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.export-btn {
  background: var(--success);
  color: var(--bg-secondary);
  border: none;
  padding: 15px 40px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.export-btn:hover {
  background: var(--success-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.export-btn:disabled {
  background: var(--gray-500);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 処理中オーバーレイ */
.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.processing-modal {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
}

.processing-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--gray-100);
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.processing-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.processing-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.processing-progress {
  width: 100%;
  height: 6px;
  background: var(--gray-300);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.processing-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .file-info {
    flex-direction: column;
    gap: 15px;
  }
  
  .file-details {
    gap: 15px;
  }
  
  .new-file-btn {
    width: 100%;
  }
  
  .controls-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .trim-inputs {
    grid-template-columns: 1fr;
  }
  
  .format-selection {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .preset-buttons {
    flex-wrap: wrap;
  }
}