/* PK 血条 — 抖音式：名字+计时在上、分数在条内、贡献榜在条下，悬浮视频区顶部 */
.pk-score-bar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 9;
  pointer-events: none;
  color: #fff;
  padding: 0 10px;
  box-sizing: border-box;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}
.pk-score-bar[hidden] {
  display: none !important;
}

/* 名字 | 计时 | 名字 */
.pk-blood-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.pk-blood-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.pk-blood-name--left {
  text-align: left;
  color: #ffcdd2;
}
.pk-blood-name--right {
  text-align: right;
  color: #bbdefb;
}

.pk-blood-meta-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pk-blood-mult {
  flex-shrink: 0;
  margin-left: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff3e0;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.92), rgba(255, 152, 0, 0.88));
  box-shadow: 0 1px 4px rgba(255, 87, 34, 0.45);
}
.pk-blood-mult[hidden] {
  display: none !important;
}

.pk-blood-timer {
  position: static;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: #fff8e1;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}
.pk-blood-timer.is-urgent {
  color: #ff5252;
  animation: pk-timer-flash 0.55s ease-in-out infinite;
  background: rgba(40, 0, 0, 0.82);
  border-color: rgba(255, 82, 82, 0.55);
}
@keyframes pk-timer-flash {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.06);
  }
}

/* 血条本体：分数叠在条内两端 */
.pk-blood-track {
  position: relative;
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
  background: #1a1a2e;
}
.pk-blood-fill {
  height: 100%;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}
.pk-blood-fill--blue {
  background: linear-gradient(180deg, #ff6b9d 0%, #e91e63 55%, #c2185b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.pk-blood-fill--red {
  margin-left: auto;
  background: linear-gradient(180deg, #64b5f6 0%, #1e88e5 55%, #1565c0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.pk-blood-divider {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 3px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, #ffe082, #ffd54f, #ffe082);
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.85);
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
  border-radius: 2px;
}
.pk-blood-score {
  position: absolute;
  top: 50%;
  z-index: 3;
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transform: translateY(-50%);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}
.pk-blood-score--left {
  left: 8px;
  color: #fff;
}
.pk-blood-score--right {
  right: 8px;
  color: #fff;
}

/* 贡献榜：条下方左右各一排小头像 chip */
.pk-blood-contrib {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  min-height: 0;
}
.pk-blood-mvp {
  display: flex;
  gap: 4px;
  min-height: 0;
  flex: 1;
  min-width: 0;
}
.pk-blood-mvp[hidden] {
  display: none !important;
}
.pk-blood-mvp--left {
  justify-content: flex-start;
}
.pk-blood-mvp--right {
  justify-content: flex-end;
}
.pk-mvp-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 72px;
}
.pk-mvp-rank {
  color: #ffd54f;
  font-size: 9px;
}
.pk-mvp-nick {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-score-pop {
  position: absolute;
  top: 50%;
  z-index: 4;
  font-size: 13px;
  font-weight: 900;
  color: #fff59d;
  text-shadow: 0 0 8px rgba(255, 235, 59, 0.9);
  animation: pk-score-pop 1.1s ease-out forwards;
  pointer-events: none;
}
.pk-score-pop--left {
  left: 18%;
}
.pk-score-pop--right {
  right: 18%;
}
@keyframes pk-score-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1);
  }
}

.pk-score-bar.is-ready .pk-blood-track {
  opacity: 0.75;
  filter: saturate(0.7);
}

/* 血条客人端定位见 pk-layout.css（需高于 app.css 竖屏全屏优先级） */

/* PK 中徽章：叠在分屏中线底部 */
.pk-stage-badge {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.video-frame.is-pk-dual .pk-stage-badge {
  display: block;
}
.video-frame.is-pk-dual .pk-stage-badge[hidden] {
  display: none !important;
}

/* 准备倒计时全屏层 */
.pk-ready-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.pk-ready-overlay[hidden] {
  display: none !important;
}
.pk-ready-overlay.is-active .pk-ready-num {
  display: block;
}
.pk-ready-num {
  font-size: 72px;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 24px rgba(255, 82, 82, 0.85),
    0 4px 16px rgba(0, 0, 0, 0.65);
  line-height: 1;
}
.pk-ready-bounce {
  animation: pk-ready-bounce 0.85s ease-out;
}
@keyframes pk-ready-bounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
}

/* 结算层增强 */
.pk-result-sheet.is-win .pk-result-title {
  color: #ffd54f;
}
.pk-result-punish {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

/* 旧结构兼容（若缓存 HTML 未更新） */
.pk-blood-scores {
  display: none;
}
