/* ============================================================
   host-pk.css · 常规 PK：倒计时 / 礼物值计分 / 入场碰撞 / 结算结果
   ------------------------------------------------------------
   从 host-interaction.css 拆出。PK 匹配流程在 host-match.css。
   ============================================================ */
/* ============ 常规 PK：倒计时、礼物值与入场动画 ============ */
.pk-battle-hud {
    position: absolute;
    top: var(--comic-stage-top);
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
}

/* PK 中只显示对战倒计时，隐藏右上角直播状态入口。 */
.video-stage.pk-active ~ .live-top-bar .live-status-trigger {
    display: none;
}

.pk-battle-hud[hidden],
.pk-intro[hidden],
.pk-result[hidden] {
    display: none !important;
}

.pk-battle-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.pk-battle-mark {
    font-size: 13px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    text-shadow: none;
    transform: skewX(-9deg);
}

.pk-battle-mark-p {
    color: #ff4e9c;
}

.pk-battle-mark-k {
    color: #3694ff;
}

.pk-battle-time {
    min-width: 32px;
}

.pk-score-track {
    --pk-divider: 50%;
    position: relative;
    height: 16px;
    display: flex;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(4, 7, 13, 0.55);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: opacity 180ms ease;
}

.pk-score-side {
    min-width: 8%;
    height: 100%;
    display: flex;
    align-items: center;
    transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pk-score-side span {
    position: sticky;
    padding: 0 7px;
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.48);
}

.pk-score-self {
    justify-content: flex-start;
    background: linear-gradient(90deg, #e9205f, #ff4d7e);
    box-shadow: inset 0 0 10px rgba(255, 204, 222, 0.18);
}

.pk-score-opponent {
    justify-content: flex-end;
    background: linear-gradient(90deg, #3b8ff0, #1568d6);
    box-shadow: inset 0 0 10px rgba(193, 226, 255, 0.2);
}

.pk-score-clash {
    position: absolute;
    top: -2px;
    bottom: -2px;
    left: var(--pk-divider);
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 6px #fff;
    transform: translateX(-1px);
    transition: left 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pk-intro,
.pk-result {
    position: absolute;
    top: var(--comic-stage-top);
    left: 0;
    width: 100%;
    height: var(--comic-stage-height);
    z-index: 12;
    pointer-events: none;
}

.pk-intro-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #fff;
    font-size: 68px;
    font-weight: 950;
    font-style: italic;
    line-height: 1;
    opacity: 0;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.88);
    paint-order: stroke fill;
}

.pk-intro-p {
    color: #ff3e83;
    text-shadow:
        0 5px 0 #9c164b,
        0 0 24px rgba(255, 48, 126, 0.92);
}

.pk-intro-k {
    color: #3694ff;
    text-shadow:
        0 5px 0 #145aaa,
        0 0 24px rgba(48, 145, 255, 0.94);
}

.pk-intro.playing .pk-intro-p {
    animation: pkIntroP 1.7s cubic-bezier(0.18, 0.82, 0.2, 1) both;
}

.pk-intro.playing .pk-intro-k {
    animation: pkIntroK 1.7s cubic-bezier(0.18, 0.82, 0.2, 1) both;
}

.pk-intro-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 84px;
    height: 84px;
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    opacity: 0;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.85),
        0 0 42px rgba(154, 100, 255, 0.72);
    transform: translate(-50%, -50%) scale(0.1);
}

.pk-intro.playing .pk-intro-burst {
    animation: pkIntroBurst 1.7s ease-out both;
}

.pk-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    opacity: 0;
}

.pk-result.show {
    animation: pkResultShow 1.8s ease both;
}

.pk-result-title {
    padding: 8px 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, rgba(231, 37, 100, 0.9), rgba(40, 127, 235, 0.9));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
}

.pk-result-score {
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

@keyframes pkIntroP {
    0% {
        opacity: 0;
        transform: translate(-210px, 130px) rotate(-24deg) scale(0.35);
    }
    42% {
        opacity: 1;
    }
    68% {
        opacity: 1;
        transform: translate(-57px, -50%) rotate(-7deg) scale(1.08);
    }
    78% {
        opacity: 1;
        transform: translate(-55px, -50%) rotate(-7deg) scale(0.94);
    }
    90% {
        opacity: 1;
        transform: translate(-55px, -50%) rotate(-7deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-55px, -50%) rotate(-7deg) scale(1.08);
    }
}

@keyframes pkIntroK {
    0% {
        opacity: 0;
        transform: translate(150px, -170px) rotate(22deg) scale(0.35);
    }
    42% {
        opacity: 1;
    }
    68% {
        opacity: 1;
        transform: translate(-2px, -50%) rotate(5deg) scale(1.08);
    }
    78% {
        opacity: 1;
        transform: translate(-4px, -50%) rotate(5deg) scale(0.94);
    }
    90% {
        opacity: 1;
        transform: translate(-4px, -50%) rotate(5deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-4px, -50%) rotate(5deg) scale(1.08);
    }
}

@keyframes pkIntroBurst {
    0%,
    58% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }
    69% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(0.35);
    }
    88% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.55);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.75);
    }
}

@keyframes pkResultShow {
    0% {
        opacity: 0;
        transform: scale(0.72);
    }
    18%,
    72% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}
