/* ============================================
   PVP ENHANCEMENTS - Match HUD, Kill Feed,
   Major Events, Match Summary
   ============================================ */

/* ── MATCH HUD (top-center scoreboard) ────── */
.pvp-match-hud {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1600;
    pointer-events: none;
    font-family: 'Orbitron', sans-serif;
    width: min(520px, calc(100vw - 24px));
}

body #game-ui.pvp-match-active {
    padding-top: calc(var(--ui-top-pad) + 116px);
}

body #game-ui.pvp-match-active #score-display {
    display: none;
}

body #game-ui.pvp-match-active #hud-progress-row {
    display: none;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #score-display {
    display: none;
}

body[data-input-mode='touch'] .run-banner--pvp-match {
    top: auto;
    bottom: calc(clamp(140px, 19dvh, 168px) + env(safe-area-inset-bottom, 0px));
    width: min(300px, calc(100vw - 24px));
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.62rem;
    line-height: 1.16;
    transform: translateX(-50%);
    animation: runBannerIn 0.22s ease-out;
    opacity: 0.9;
}

body[data-input-mode='touch'] .run-banner--pvp-match strong {
    font-size: 0.72rem;
    margin-bottom: 2px;
}

@media (pointer: coarse) and (min-width: 641px) {
    body[data-input-mode='touch'] .run-banner--pvp-match {
        bottom: calc(clamp(180px, 24dvh, 212px) + env(safe-area-inset-bottom, 0px));
        width: min(340px, calc(100vw - 32px));
    }
}

.pvp-mh-board {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: linear-gradient(180deg, rgba(10, 14, 22, 0.94), rgba(6, 10, 18, 0.88));
    border: 1px solid rgba(120, 200, 255, 0.22);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pvp-mh-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.pvp-mh-side--left { align-items: flex-end; text-align: right; }
.pvp-mh-side--right { align-items: flex-start; text-align: left; }

.pvp-mh-left-name, .pvp-mh-right-name {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: rgba(200, 220, 240, 0.8);
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.pvp-mh-left-weapon, .pvp-mh-right-weapon {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.54rem;
    color: rgba(255, 214, 118, 0.74);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1px;
}

.pvp-mh-left-score, .pvp-mh-right-score {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 12px rgba(100, 200, 255, 0.4);
}

.pvp-mh-left-score { color: #44ddff; }
.pvp-mh-right-score { color: #ff6666; }

.pvp-mh-bar {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 4px;
    overflow: hidden;
}

.pvp-mh-left-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1bc6ff, #44ffdd);
    border-radius: 2px;
    transition: width 0.3s ease;
    float: right;
}

.pvp-mh-right-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6666, #ff4444);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.pvp-mh-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    min-width: 80px;
}

.pvp-mh-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.1em;
}

.pvp-mh-timer--critical {
    color: #ff4444;
    animation: pvpTimerPulse 0.5s ease-in-out infinite;
}

@keyframes pvpTimerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pvp-mh-target {
    font-size: 0.52rem;
    color: rgba(180, 200, 220, 0.6);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

#global-leaderboard-list .leaderboard-entry {
    align-items: center;
    gap: 14px;
}

#global-leaderboard-list .player-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#global-leaderboard-list .player-name small {
    color: rgba(157, 216, 167, 0.78);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

#global-leaderboard-list .player-score {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 140px;
    color: rgba(230, 238, 247, 0.86);
}

#global-leaderboard-list .player-score span {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(127, 247, 255, 0.08);
    border: 1px solid rgba(127, 247, 255, 0.13);
    white-space: nowrap;
}

/* Badges row */
.pvp-mh-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.pvp-mh-streak {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b8e4ff;
    background: rgba(40, 120, 200, 0.3);
    border: 1px solid rgba(100, 180, 255, 0.35);
    animation: pvpBadgePop 0.3s ease-out;
}

.pvp-mh-streak--spree {
    color: #ffe0a0;
    background: rgba(200, 140, 20, 0.3);
    border-color: rgba(255, 200, 80, 0.4);
}

.pvp-mh-streak--rampage {
    color: #ffc0a0;
    background: rgba(200, 60, 20, 0.35);
    border-color: rgba(255, 100, 50, 0.5);
    animation: pvpBadgePop 0.3s ease-out, pvpRampagePulse 1s ease-in-out infinite;
}

@keyframes pvpRampagePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 80, 30, 0.3); }
    50% { box-shadow: 0 0 18px rgba(255, 80, 30, 0.6); }
}

.pvp-mh-sudden-death {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff6060;
    background: rgba(160, 20, 20, 0.35);
    border: 1px solid rgba(255, 80, 80, 0.45);
    animation: pvpBadgePop 0.3s ease-out, pvpTimerPulse 0.8s ease-in-out infinite;
}

.pvp-mh-empowered {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d0aaff;
    background: rgba(120, 40, 200, 0.3);
    border: 1px solid rgba(180, 100, 255, 0.4);
    animation: pvpBadgePop 0.3s ease-out;
}

@keyframes pvpBadgePop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ── KILL FEED (top-right) ─────────────────── */
.pvp-killfeed {
    position: fixed;
    top: 74px;
    right: 14px;
    z-index: 1550;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
    max-width: 320px;
}

.pvp-killfeed-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(10, 14, 22, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.78rem;
    color: rgba(220, 230, 240, 0.9);
    animation: pvpKfSlideIn 0.25s ease-out;
    transition: opacity 0.4s ease;
}

.pvp-killfeed-entry--fade { opacity: 0; }

.pvp-killfeed-entry--local {
    border-color: rgba(68, 221, 255, 0.35);
    background: rgba(20, 40, 60, 0.85);
}

.pvp-killfeed-entry--death {
    border-color: rgba(255, 80, 80, 0.35);
    background: rgba(60, 15, 15, 0.85);
}

.pvp-killfeed-entry--first-blood {
    border-color: rgba(255, 34, 68, 0.5);
    background: linear-gradient(90deg, rgba(80, 10, 20, 0.9), rgba(10, 14, 22, 0.85));
}

@keyframes pvpKfSlideIn {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.pvp-kf-killer {
    color: #44ddff;
    font-weight: 600;
}

.pvp-killfeed-entry--death .pvp-kf-killer {
    color: #ff8888;
}

.pvp-kf-weapon {
    color: rgba(180, 190, 200, 0.6);
    font-size: 0.68rem;
}

.pvp-kf-victim {
    color: #ff8888;
}

.pvp-killfeed-entry--local .pvp-kf-victim {
    color: #ff6666;
}

/* ── MAJOR EVENT OVERLAY (center screen) ──── */
.pvp-major-event {
    position: fixed;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    z-index: 1700;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    text-shadow: 0 0 30px currentColor, 0 0 60px currentColor;
}

.pvp-major-event--active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ── MATCH SUMMARY OVERLAY ─────────────────── */
.pvp-match-summary {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.pvp-match-summary.pvp-ms--active {
    opacity: 1;
    pointer-events: auto;
}

.pvp-ms-inner {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    width: min(620px, calc(100vw - 28px));
    max-height: calc(100dvh - 34px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 34px 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(14, 20, 32, 0.96), rgba(6, 10, 18, 0.96));
    border: 1px solid rgba(120, 200, 255, 0.2);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    animation: pvpMsFadeIn 0.5s ease-out;
    touch-action: pan-y;
}

@keyframes pvpMsFadeIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pvp-ms-kicker {
    margin-bottom: 8px;
    color: rgba(127, 247, 255, 0.76);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pvp-ms-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.pvp-ms-title--win {
    color: #44ffaa;
    text-shadow: 0 0 30px rgba(68, 255, 170, 0.5), 0 0 60px rgba(68, 255, 170, 0.3);
}

.pvp-ms-title--loss {
    color: #ff5555;
    text-shadow: 0 0 30px rgba(255, 85, 85, 0.5), 0 0 60px rgba(255, 85, 85, 0.3);
}

.pvp-ms-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
}

.pvp-ms-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pvp-ms-you-name, .pvp-ms-opp-name {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(200, 220, 240, 0.7);
}

.pvp-ms-you-score, .pvp-ms-opp-score {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
}

.pvp-ms-you-score { color: #44ddff; }
.pvp-ms-opp-score { color: #ff6666; }

.pvp-ms-vs {
    font-size: 1rem;
    color: rgba(180, 200, 220, 0.4);
    letter-spacing: 0.15em;
}

.pvp-ms-meta {
    color: rgba(232, 238, 247, 0.84);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2;
}

.pvp-ms-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px auto 0;
}

.pvp-ms-badge {
    padding: 5px 9px;
    border: 1px solid rgba(127, 247, 255, 0.18);
    border-radius: 999px;
    background: rgba(127, 247, 255, 0.07);
    color: rgba(232, 248, 255, 0.86);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pvp-ms-next {
    max-width: 520px;
    margin: 12px auto 0;
    color: rgba(228, 238, 248, 0.78);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    line-height: 1.32;
}

.pvp-ms-rewards {
    font-size: 0.72rem;
    color: #ffd760;
    letter-spacing: 0.08em;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    margin-top: 6px;
}

.pvp-ms-social-note {
    max-width: 520px;
    margin: 10px auto 0;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.88rem;
    line-height: 1.25;
}

/* ── MATCHMAKING WAIT ENHANCEMENTS ────────── */
#matchmaking-wait .matchmaking-content {
    text-align: center;
}

.matchmaking-hints {
    display: grid;
    gap: 6px;
    margin: 12px auto 4px;
    max-width: 460px;
    color: rgba(230, 240, 250, 0.78);
    font-size: 0.95rem;
    line-height: 1.22;
}

.matchmaking-hints span {
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid rgba(127, 247, 255, 0.12);
    background: rgba(127, 247, 255, 0.055);
}

.matchmaking-queue-info {
    width: min(100%, 460px);
    margin: 10px auto 0;
    padding: 8px 10px;
    border: 1px solid rgba(255, 82, 82, 0.28);
    border-radius: 6px;
    background: rgba(255, 82, 82, 0.08);
    color: rgba(255, 245, 245, 0.92);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.98rem;
    line-height: 1.2;
}

.matchmaking-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 460px);
    margin: 10px auto 2px;
}

.matchmaking-status-grid span {
    min-width: 0;
    padding: 8px 7px;
    border: 1px solid rgba(127, 247, 255, 0.16);
    border-radius: 6px;
    background: rgba(7, 12, 18, 0.62);
    box-shadow: inset 0 0 12px rgba(127, 247, 255, 0.05);
}

.matchmaking-status-grid strong,
.matchmaking-status-grid small {
    display: block;
}

.matchmaking-status-grid strong {
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.02rem;
    line-height: 1.1;
}

.matchmaking-status-grid small {
    margin-top: 4px;
    color: rgba(228, 238, 248, 0.66);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.matchmaking-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.matchmaking-actions .menu-btn,
.matchmaking-actions .discord-link {
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.matchmaking-invite-btn {
    border-color: rgba(255, 82, 82, 0.5);
    background:
        linear-gradient(135deg, rgba(255, 82, 82, 0.28), rgba(127, 247, 255, 0.12)),
        rgba(12, 16, 24, 0.88);
    color: #fff5f5;
}

.matchmaking-invite-btn:hover,
.matchmaking-invite-btn:focus-visible {
    border-color: rgba(255, 132, 132, 0.82);
    box-shadow: 0 0 18px rgba(255, 82, 82, 0.25);
}

.matchmaking-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(100, 200, 255, 0.2);
    border-top-color: #44ddff;
    border-radius: 50%;
    margin: 18px auto;
    animation: pvpSpin 0.8s linear infinite;
}

@keyframes pvpSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 380px) and (pointer: coarse) {
    .matchmaking-status-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .matchmaking-queue-info,
    .matchmaking-hints {
        font-size: 0.9rem;
    }
}

/* ── MATCH FOUND ENHANCEMENT ──────────────── */
#match-found-screen .match-found-content {
    text-align: center;
}

#match-found-screen .countdown {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #44ddff;
    text-shadow: 0 0 40px rgba(68, 221, 255, 0.6);
    animation: pvpCountdownPulse 1s ease-in-out infinite;
}

@keyframes pvpCountdownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

@media (max-width: 640px) {
    .pvp-match-hud {
        width: calc(100vw - 18px);
    }

    .pvp-mh-board {
        padding: 6px 8px;
        border-radius: 10px;
    }

    .pvp-mh-center {
        min-width: 62px;
        padding: 0 8px;
    }

    .pvp-mh-left-name,
    .pvp-mh-right-name,
    .pvp-mh-left-weapon,
    .pvp-mh-right-weapon {
        max-width: 92px;
    }

    .pvp-mh-left-name,
    .pvp-mh-right-name {
        font-size: 0.58rem;
    }

    .pvp-mh-left-weapon,
    .pvp-mh-right-weapon,
    .pvp-mh-target {
        font-size: 0.46rem;
    }

    .pvp-mh-left-score,
    .pvp-mh-right-score {
        font-size: 1.34rem;
    }

    .pvp-mh-timer {
        font-size: 0.86rem;
    }

    .pvp-mh-badges {
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 4px;
    }

    .pvp-mh-streak,
    .pvp-mh-sudden-death,
    .pvp-mh-empowered {
        padding: 3px 7px;
        font-size: 0.48rem;
    }

    .pvp-killfeed {
        top: calc(66px + env(safe-area-inset-top, 0px));
        right: 8px;
        max-width: calc(100vw - 16px);
    }

    .pvp-match-summary {
        padding: 12px;
        box-sizing: border-box;
    }

    .pvp-ms-inner {
        width: min(420px, calc(100vw - 24px));
        padding: 28px 18px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .pvp-ms-title {
        font-size: 1.8rem;
        letter-spacing: 0.12em;
    }

    .pvp-ms-scores {
        gap: 14px;
    }

    .pvp-ms-you-score,
    .pvp-ms-opp-score {
        font-size: 2rem;
    }
}

@media (max-width: 380px) and (pointer: coarse) {
    body #game-ui.pvp-match-active {
        padding-top: calc(var(--ui-top-pad) + 104px);
    }

    body[data-input-mode='touch'] .run-banner--pvp-match {
        bottom: calc(132px + env(safe-area-inset-bottom, 0px));
        width: min(300px, calc(100vw - 18px));
        padding: 8px 10px;
        font-size: 0.66rem;
        letter-spacing: 0.05em;
    }

    .pvp-match-hud {
        width: min(360px, calc(100vw - 16px));
    }

    .pvp-mh-board {
        padding: 6px 8px;
        border-radius: 10px;
    }

    .pvp-mh-left-name,
    .pvp-mh-right-name,
    .pvp-mh-left-weapon,
    .pvp-mh-right-weapon {
        max-width: 72px;
    }

    .pvp-mh-left-score,
    .pvp-mh-right-score {
        font-size: 1.18rem;
    }

    .pvp-mh-center {
        min-width: 54px;
        padding: 0 6px;
    }

    .pvp-mh-timer {
        font-size: 0.74rem;
    }
}

@media (pointer: coarse) and (orientation: portrait) and (max-height: 720px) {
    body[data-input-mode='touch'] #game-ui.pvp-match-active {
        padding-top: calc(var(--ui-top-pad) + 26px);
    }

    body[data-input-mode='touch'] #game-ui.pvp-match-active #hud,
    body[data-input-mode='touch'] #game-ui.pvp-match-active #hud-sidebar {
        width: min(188px, 56vw);
    }

    body[data-input-mode='touch'] .run-banner--pvp-match {
        display: none !important;
    }

    body[data-input-mode='touch'] .pvp-match-hud {
        width: min(220px, calc(100vw - 128px));
    }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
    body #game-ui.pvp-match-active {
        padding-top: calc(var(--ui-top-pad) + 86px);
    }

    body[data-input-mode='touch'] .run-banner--pvp-match {
        display: none !important;
    }

    .pvp-match-hud {
        top: calc(5px + env(safe-area-inset-top, 0px));
        width: min(460px, calc(100vw - 150px));
    }

    .pvp-mh-board {
        padding: 5px 8px;
    }

    .pvp-mh-left-score,
    .pvp-mh-right-score {
        font-size: 1.18rem;
    }

    .pvp-mh-left-name,
    .pvp-mh-right-name,
    .pvp-mh-left-weapon,
    .pvp-mh-right-weapon {
        max-width: 84px;
    }

    .pvp-mh-center {
        min-width: 56px;
        padding: 0 7px;
    }

    .pvp-killfeed {
        top: calc(54px + env(safe-area-inset-top, 0px));
    }

    .pvp-major-event {
        font-size: 1.45rem;
    }
}

body[data-input-mode='touch'] #game-ui.pvp-match-active {
    padding-top: calc(var(--ui-top-pad) + 34px);
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #hud {
    grid-template-columns: minmax(148px, 222px);
    width: min(222px, 58vw);
    gap: 0;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #hud-sidebar {
    width: min(222px, 58vw);
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #combat-overview {
    padding: 8px 10px;
    gap: 6px;
    border-radius: 12px;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #health-container,
body[data-input-mode='touch'] #game-ui.pvp-match-active #weapon-display {
    gap: 5px;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #health-bar {
    height: 12px;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #weapon-display {
    padding-top: 6px;
}

body[data-input-mode='touch'] #game-ui.pvp-match-active #weapon-name {
    font-size: calc(0.82rem * var(--hud-font-scale, 1));
}

body[data-input-mode='touch'] .pvp-match-hud {
    top: calc(4px + env(safe-area-inset-top, 0px));
    width: min(260px, calc(100vw - 112px));
    opacity: 0.88;
}

body[data-input-mode='touch'] .pvp-mh-board {
    gap: 7px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(6, 10, 18, 0.78);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.36);
}

body[data-input-mode='touch'] .pvp-mh-left-name,
body[data-input-mode='touch'] .pvp-mh-right-name,
body[data-input-mode='touch'] .pvp-mh-left-weapon,
body[data-input-mode='touch'] .pvp-mh-right-weapon,
body[data-input-mode='touch'] .pvp-mh-target,
body[data-input-mode='touch'] .pvp-mh-badges {
    display: none !important;
}

body[data-input-mode='touch'] .pvp-mh-side {
    flex: 0 0 auto;
    min-width: 34px;
}

body[data-input-mode='touch'] .pvp-mh-left-score,
body[data-input-mode='touch'] .pvp-mh-right-score {
    font-size: 0.98rem;
}

body[data-input-mode='touch'] .pvp-mh-bar {
    width: 34px;
    height: 2px;
    margin-top: 2px;
}

body[data-input-mode='touch'] .pvp-mh-center {
    min-width: 48px;
    padding: 0 2px;
}

body[data-input-mode='touch'] .pvp-mh-timer {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
    body[data-input-mode='touch'] #game-ui.pvp-match-active {
        padding-top: calc(var(--ui-top-pad) + 30px);
    }

    body[data-input-mode='touch'] #game-ui.pvp-match-active #hud,
    body[data-input-mode='touch'] #game-ui.pvp-match-active #hud-sidebar {
        width: min(184px, 30vw);
    }

    body[data-input-mode='touch'] #game-ui.pvp-match-active #combat-overview {
        padding: 6px 8px;
    }

    body[data-input-mode='touch'] .pvp-match-hud {
        top: calc(3px + env(safe-area-inset-top, 0px));
        width: min(230px, calc(100vw - 180px));
    }

    body[data-input-mode='touch'] .pvp-mh-board {
        padding: 3px 7px;
    }
}

.pvp-ms-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.pvp-ms-action {
    min-width: 118px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(127, 247, 255, 0.22);
    background: rgba(12, 20, 32, 0.9);
    color: rgba(232, 246, 255, 0.92);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.pvp-ms-action:hover,
.pvp-ms-action:focus-visible {
    border-color: rgba(127, 247, 255, 0.56);
    background: rgba(24, 42, 62, 0.95);
    outline: none;
}

.pvp-ms-action--primary {
    color: #061018;
    background: linear-gradient(135deg, #44ddff, #44ffaa);
    border-color: rgba(127, 247, 255, 0.72);
    box-shadow: 0 0 22px rgba(68, 221, 255, 0.2);
}

.pvp-ms-action--secondary {
    color: rgba(232, 238, 247, 0.82);
}

.pvp-ms-action--discord {
    border-color: rgba(127, 142, 255, 0.38);
    background:
        linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(68, 221, 255, 0.12)),
        rgba(12, 20, 32, 0.92);
}

.pvp-ms-share-card {
    width: min(100%, 620px);
    margin: 16px auto 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 68, 68, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 68, 68, 0.14), rgba(68, 221, 255, 0.08)),
        rgba(8, 12, 18, 0.78);
    text-align: left;
}

.pvp-ms-share-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(127, 247, 255, 0.82);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pvp-ms-share-copy {
    margin: 0;
    color: rgba(246, 250, 255, 0.94);
    font-size: 0.86rem;
    line-height: 1.36;
}

.pvp-ms-share-status {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    color: rgba(255, 214, 118, 0.92);
    font-size: 0.76rem;
}

@media (max-width: 640px) {
    .pvp-ms-inner {
        padding: 24px 18px;
    }

    .pvp-ms-kicker {
        font-size: 0.7rem;
    }

    .pvp-ms-actions {
        gap: 8px;
    }

    .pvp-ms-action {
        flex: 1 1 132px;
        min-height: 44px;
        padding: 10px 11px;
    }

    .pvp-ms-share-card {
        padding: 10px 11px;
    }

    .pvp-ms-share-copy {
        font-size: 0.78rem;
    }
}
