/* ===== 视频播放器样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  background-image: radial-gradient(circle at 30% 20%, #1a1a2e 0%, transparent 50%),
                    radial-gradient(circle at 70% 80%, #16213e 0%, transparent 50%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  padding: 16px;
}

.player {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6),
              0 0 0 1px rgba(255, 255, 255, .06);
  cursor: pointer;
}

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

/* 加载提示 */
.tip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ddd;
  background: rgba(0, 0, 0, .55);
  z-index: 5;
  text-align: center;
  padding: 24px;
  transition: opacity .3s;
}
.tip small { color: #999; max-width: 420px; line-height: 1.6; }
.tip b { color: #6aa6ff; }
.tip.hide { opacity: 0; pointer-events: none; }

.spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: #6aa6ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 中央大播放按钮 */
.big-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  transition: transform .2s, background .2s, opacity .25s;
  opacity: 0;
}
.player.paused .big-play { opacity: 1; }
.big-play:hover { background: rgba(255,255,255,.28); transform: translate(-50%,-50%) scale(1.08); }
.big-play svg { width: 38px; height: 38px; fill: #fff; margin-left: 5px; }

/* 控制条 */
.controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  z-index: 8;
}
.player.show-ctrl .controls { opacity: 1; transform: translateY(0); }

.ctrl-btn {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background .15s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.18); }
.ctrl-btn svg { width: 22px; height: 22px; fill: #fff; }

.ctrl-btn .icon-pause,
.ctrl-btn .icon-mute,
.ctrl-btn .icon-exit { display: none; }
.player.playing .icon-play { display: none; }
.player.playing .icon-pause { display: block; }
.player.muted .icon-vol { display: none; }
.player.muted .icon-mute { display: block; }
.player.fullscreen .icon-full { display: none; }
.player.fullscreen .icon-exit { display: block; }

.time {
  font-size: 12px;
  color: #ddd;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 进度条 */
.progress {
  flex: 1 1 auto;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  overflow: hidden;
  transition: height .15s;
}
.progress:hover .progress-bar { height: 6px; }
.progress-played {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f8cff, #6aa6ff);
  border-radius: 2px;
  position: relative;
}
.progress-played::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,.4);
  transition: transform .15s;
}
.progress:hover .progress-played::after { transform: translateY(-50%) scale(1); }

.progress-hover {
  position: absolute;
  top: -26px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.progress:hover .progress-hover { opacity: 1; }

/* 音量 */
.vol {
  display: flex;
  align-items: center;
  gap: 2px;
}
.vol-range {
  width: 0;
  opacity: 0;
  cursor: pointer;
  accent-color: #6aa6ff;
  transition: width .2s, opacity .2s;
}
.vol:hover .vol-range { width: 70px; opacity: 1; }

#speedBtn { width: auto; padding: 0 8px; font-weight: 600; }

/* 全屏 */
.player:fullscreen { max-width: none; border-radius: 0; }
.player:fullscreen .controls { padding: 14px 20px; }
