/* /script/mini_video_player.css */

.mvp-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.mvp-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── 컨트롤 레이어 ── */
.mvp-controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.72) 100%);
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
  touch-action: manipulation;
}
.mvp-wrap.show-controls .mvp-controls {
  opacity: 1;
  pointer-events: auto;
}

/* ── 진행 바 ── */
.mvp-progress-area {
  padding: 0 10px 4px;
  touch-action: none;
}
.mvp-progress-track {
  height: 3px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height .15s;
}
.mvp-wrap.show-controls .mvp-progress-track {
  height: 4px;
}
.mvp-progress-fill {
  height: 100%;
  background: #ff3b3b;
  border-radius: 2px;
  pointer-events: none;
  position: relative;
}
.mvp-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .15s;
}
.mvp-wrap.show-controls .mvp-progress-fill::after {
  opacity: 1;
}
.mvp-progress-buffer {
  position: absolute;
  top: 0; left: 0; height: 100%;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  pointer-events: none;
}

/* ── 버튼 행 ── */
.mvp-btn-row {
  display: flex;
  align-items: center;
  padding: 6px 8px 8px;
  gap: 4px;
}
.mvp-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mvp-btn:active {
  background: rgba(255,255,255,.18);
}
.mvp-btn svg {
  width: 20px; height: 20px;
  fill: currentColor;
  pointer-events: none;
}
.mvp-btn.big svg { width: 26px; height: 26px; }

.mvp-time {
  font-size: 11px;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  letter-spacing: .3px;
  padding: 0 4px;
  flex-shrink: 0;
}
.mvp-spacer { flex: 1; }

/* ── 볼륨 슬라이더 ── */
.mvp-vol-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  max-width: 0;
  transition: max-width .25s ease;
}
.mvp-vol-wrap.open { max-width: 80px; }
.mvp-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px; height: 3px;
  background: rgba(255,255,255,.4);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.mvp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

/* ── 배속 버튼 ── */
.mvp-speed-btn {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mvp-speed-btn:active { background: rgba(255,255,255,.3); }

/* ── 중앙 큰 재생/일시정지 ── */
.mvp-center-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 50%;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  touch-action: manipulation;
}
.mvp-center-btn svg { width: 28px; height: 28px; fill: currentColor; }
.mvp-wrap.show-controls .mvp-center-btn {
  pointer-events: auto;
  opacity: 1;
}

/* ── 더블탭 탐색 피드백 ── */
.mvp-seek-feedback {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  white-space: nowrap;
}
.mvp-seek-feedback.left  { left: 16px; }
.mvp-seek-feedback.right { right: 16px; }
.mvp-seek-feedback.show  { opacity: 1; }

/* ── 버퍼링 스피너 ── */
.mvp-spinner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mvp-spin .7s linear infinite;
  display: none;
  pointer-events: none;
}
.mvp-wrap.buffering .mvp-spinner { display: block; }
.mvp-wrap.buffering .mvp-center-btn { opacity: 0; pointer-events: none; }
@keyframes mvp-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── 자막 오버레이 ── */
.mvp-subtitle {
  position: absolute;
  bottom: 52px; left: 8px; right: 8px;
  text-align: center;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7);
  pointer-events: none;
  line-height: 1.5;
  display: none;
}

/* ── 소형 모드 (mini) — 컨트롤 항상 표시, 크기 축소 ── */
.mvp-wrap.mini-mode .mvp-controls {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(transparent 20%, rgba(0,0,0,.8) 100%);
}
.mvp-wrap.mini-mode .mvp-btn-row {
  padding: 4px 4px 6px;
  gap: 2px;
}
.mvp-wrap.mini-mode .mvp-btn svg       { width: 16px; height: 16px; }
.mvp-wrap.mini-mode .mvp-btn.big svg   { width: 20px; height: 20px; }
.mvp-wrap.mini-mode .mvp-center-btn    { display: none; }
.mvp-wrap.mini-mode .mvp-time          { font-size: 9px; }
.mvp-wrap.mini-mode .mvp-speed-btn     { display: none; }
.mvp-wrap.mini-mode .mvp-vol-wrap      { display: none; }
.mvp-wrap.mini-mode .mvp-progress-area { padding: 0 6px 2px; }
.mvp-wrap.mini-mode .mvp-subtitle      { font-size: 10px; bottom: 40px; }
