/* BGM音量スライダー - 大型つまみ + 太いトラック */

.bgm-volume-container {
  display: flex;
  align-items: center;
  gap: 3px; /* 6px → 3px: 音量表記をつまみに寄せる */
  position: relative;
}

.bgm-volume-slider-wrapper {
  position: relative;
  width: 72px;
  height: 32px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0; /* 上下にパディングを追加してタッチ領域を拡張 */
}

.bgm-volume-slider-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: visible; /* つまみがはみ出ても見えるように */
}

.bgm-volume-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
  border-radius: 4px;
  transition: width 0.05s ease;
  pointer-events: none;
}

.bgm-volume-slider-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  border: 2px solid #06b6d4;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.2s ease,
              background 0.2s ease;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.15),
    0 0 0 0 rgba(6, 182, 212, 0);
  pointer-events: auto;
  z-index: 2;
}

/* つまみの内側ハイライト */
.bgm-volume-slider-thumb::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bgm-volume-slider-wrapper:hover .bgm-volume-slider-thumb {
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(6, 182, 212, 0.15);
  border-color: #0891b2;
  background: linear-gradient(135deg, #ffffff 0%, #e0f7fa 100%);
}

.bgm-volume-slider-thumb:active,
.bgm-volume-slider-wrapper.dragging .bgm-volume-slider-thumb {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(6, 182, 212, 0.2);
  border-color: #0e7490;
  background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);
}

.bgm-volume-slider-wrapper.dragging .bgm-volume-slider-track {
  background: #d1d5db; /* ドラッグ中はトラックを少し濃く */
}

.bgm-volume-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  min-width: 36px;
  text-align: center;
  user-select: none;
  pointer-events: none;
  transition: color 0.15s ease, font-weight 0.15s ease, transform 0.15s ease;
}

.bgm-volume-container.dragging .bgm-volume-label {
  color: #3b82f6;
  font-weight: 700;
  transform: scale(1.1);
}

/* モバイル対応 */
@media (max-width: 768px) {
  .bgm-volume-slider-wrapper {
    width: 48px; /* 80px → 60px → 48px: さらに小さく */
    height: 28px; /* 36px → 28px: 小さく */
    padding: 4px 0; /* 6px → 4px: 小さく */
  }
  
  .bgm-volume-slider-track {
    height: 6px; /* 10px → 6px: 小さく */
  }
  
  .bgm-volume-slider-thumb {
    width: 14px; /* 20px → 14px: 小さく */
    height: 14px; /* 20px → 14px: 小さく */
    border-width: 2px;
  }
  
  .bgm-volume-slider-thumb::before {
    width: 6px; /* 9px → 6px: 小さく */
    height: 6px; /* 9px → 6px: 小さく */
  }
  
  .bgm-volume-slider-thumb:active,
  .bgm-volume-slider-wrapper.dragging .bgm-volume-slider-thumb {
    transform: translate(-50%, -50%) scale(1.15); /* 1.2 → 1.15: 小さく */
  }
  
  .bgm-volume-label {
    font-size: 10px; /* 12px → 10px: 小さく */
    min-width: 32px; /* 40px → 32px: 小さく */
  }
  
  .bgm-volume-container {
    gap: 2px; /* モバイルではさらに小さく */
  }
}

