/* 🏀 BASKETBALL PVP STYLES - PROFESSIONAL UX FIX */

/* Import the same fonts as leaderboard */
@font-face {
    font-family: 'Neue Pixel Sans';
    src: url('../fonts/NeuePixelSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Chicago Bulls Color Scheme */
:root {
    --bulls-red: #CE1141;
    --bulls-black: #000000;
    --bulls-white: #FFFFFF;
    --bulls-gold: #FFD700;
    --bulls-dark-red: #8B0000;
    --bulls-gray: #333333;
    --bulls-light-gray: #666666;
    
    /* Background and overlay colors */
    --overlay-bg: rgba(0, 0, 0, 0.9);
    --overlay-content-bg: rgba(0, 0, 0, 0.8);
    --overlay-border: var(--bulls-red);
    --overlay-shadow: rgba(206, 17, 65, 0.3);
    
    /* Text colors */
    --text-primary: var(--bulls-white);
    --text-secondary: var(--bulls-light-gray);
    --text-accent: var(--bulls-gold);
    --text-red: var(--bulls-red);
}

/* ======================================== */
/* CRITICAL FIX: PROFESSIONAL PVP HUD */
/* ======================================== */

#pvp-hud {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(45,45,45,0.95) 100%) !important;
    border-bottom: 3px solid #CE1141 !important;
    color: #fff !important;
    font-family: 'Neue Pixel Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    pointer-events: none !important;
    display: none !important;
    box-shadow: 0 4px 20px rgba(206, 17, 65, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 60px !important;
    max-height: 80px !important;
    overflow: hidden !important;
}

#pvp-hud.show {
    display: flex !important;
}

#pvp-hud > div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 10px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Player containers - FIXED ALIGNMENT */
#pvp-hud .player-container {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
    max-width: 35% !important;
}

#pvp-hud .player-container.left {
    justify-content: flex-start !important;
}

#pvp-hud .player-container.right {
    justify-content: flex-end !important;
}

/* CRITICAL FIX: Telegram Profile Pictures */
#pvp-hud-your-avatar,
#pvp-hud-opponent-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 2px solid #FFD700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(206, 17, 65, 0.6) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    flex-shrink: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    overflow: hidden !important;
    position: relative !important;
}

#pvp-hud-your-avatar {
    background: linear-gradient(135deg, #CE1141 0%, #8B0000 100%) !important;
}

#pvp-hud-opponent-avatar {
    background: linear-gradient(135deg, #552583 0%, #FDB927 100%) !important;
}

/* CRITICAL FIX: Telegram Profile Picture Overlay */
#pvp-hud-your-avatar img,
#pvp-hud-opponent-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2 !important;
}

#pvp-hud-your-avatar .fallback-emoji,
#pvp-hud-opponent-avatar .fallback-emoji {
    position: relative !important;
    z-index: 1 !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* Player info containers */
#pvp-hud .player-info {
    min-width: 0 !important;
    overflow: hidden !important;
    flex: 1 !important;
}

#pvp-hud .player-info.left {
    text-align: left !important;
}

#pvp-hud .player-info.right {
    text-align: right !important;
}

/* Player names */
#pvp-your-name,
#pvp-opponent-name {
    font-size: 12px !important;
    color: #FFD700 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5) !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
}

/* Player scores */
#pvp-your-score,
#pvp-opponent-score {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
    font-family: 'Press Start 2P', monospace !important;
    line-height: 1.2 !important;
    min-height: 24px !important;
}

/* Timer container - FIXED ALIGNMENT */
#pvp-hud-timer-container {
    background: linear-gradient(135deg, #000 0%, #333 100%) !important;
    border: 2px solid #CE1141 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #FFD700 !important;
    text-align: center !important;
    min-width: 80px !important;
    max-width: 120px !important;
    flex-shrink: 0 !important;
    font-family: 'Press Start 2P', monospace !important;
    text-shadow: rgba(255, 215, 0, 0.5) 0px 0px 10px !important;
    box-shadow: rgba(206, 17, 65, 0.4) 0px 4px 15px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* ======================================== */
/* CRITICAL FIX: GAME OVER OVERLAYS */
/* ======================================== */

/* Touch Blocker - CRITICAL FIX */
#pvp-touch-blocker {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: transparent !important;
    z-index: 15000 !important;
    display: none !important;
    pointer-events: auto !important;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

#pvp-touch-blocker.show {
    display: block !important;
}

/* Player Eliminated Overlay */
#player-eliminated-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 20000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#player-eliminated-overlay.show {
    display: flex !important;
}

#player-eliminated-overlay .eliminated-content,
#player-eliminated-overlay .eliminated-icon,
#player-eliminated-overlay .eliminated-title,
#player-eliminated-overlay .eliminated-message,
#player-eliminated-overlay .eliminated-timer {
    font-family: 'Neue Pixel Sans', monospace !important;
}

#player-eliminated-overlay .eliminated-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border: 3px solid #CE1141 !important;
    border-radius: 15px !important;
    padding: 40px !important;
    text-align: center !important;
    max-width: 400px !important;
    width: 90% !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.3) !important;
}

#player-eliminated-overlay .eliminated-icon {
    font-size: 48px !important;
    margin-bottom: 20px !important;
}

#player-eliminated-overlay .eliminated-title {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #CE1141 !important;
    margin-bottom: 15px !important;
    text-shadow: 0 0 10px rgba(206, 17, 65, 0.5) !important;
}

#player-eliminated-overlay .eliminated-message {
    font-size: 16px !important;
    color: #ccc !important;
    margin-bottom: 20px !important;
    line-height: 1.4 !important;
}

#player-eliminated-overlay .eliminated-timer {
    font-size: 18px !important;
    color: #FFD700 !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

/* Timer Expired Overlay */
#pvp-timer-expired-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 20000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#pvp-timer-expired-overlay.show {
    display: flex !important;
}

#pvp-timer-expired-overlay .timer-expired-content,
#pvp-timer-expired-overlay .timer-expired-icon,
#pvp-timer-expired-overlay .timer-expired-title,
#pvp-timer-expired-overlay .timer-expired-message {
    font-family: 'Neue Pixel Sans', monospace !important;
}

#pvp-timer-expired-overlay .timer-expired-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border: 3px solid #FFD700 !important;
    border-radius: 15px !important;
    padding: 40px !important;
    text-align: center !important;
    max-width: 400px !important;
    width: 90% !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.3) !important;
}

#pvp-timer-expired-overlay .timer-expired-icon {
    font-size: 48px !important;
    margin-bottom: 20px !important;
}

#pvp-timer-expired-overlay .timer-expired-title {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #FFD700 !important;
    margin-bottom: 15px !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

#pvp-timer-expired-overlay .timer-expired-message {
    font-size: 16px !important;
    color: #ccc !important;
    line-height: 1.4 !important;
}

/* ======================================== */
/* RESPONSIVE DESIGN FIXES */
/* ======================================== */

@media (max-width: 480px) {
    #pvp-hud {
        min-height: 50px !important;
        max-height: 70px !important;
    }
    
    #pvp-hud > div {
        padding: 8px 12px !important;
        gap: 8px !important;
    }
    
    #pvp-hud-your-avatar,
    #pvp-hud-opponent-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    
    #pvp-your-name,
    #pvp-opponent-name {
        font-size: 10px !important;
    }
    
    #pvp-your-score,
    #pvp-opponent-score {
        font-size: 16px !important;
        min-height: 20px !important;
    }
    
    #pvp-hud-timer-container {
        font-size: 14px !important;
        padding: 6px 10px !important;
        min-width: 70px !important;
        max-width: 100px !important;
    }
    
    #pvp-hud .player-container {
        max-width: 40% !important;
    }
}

/* iOS Specific Fixes */
body.ios #pvp-hud,
body.ios .overlay-content,
body.ios .pvp-modal {
    transform: scale(1.25) !important;
    transform-origin: top center !important;
}

body.ios #pvp-hud-your-avatar,
body.ios #pvp-hud-opponent-avatar {
    width: 52px !important;
    height: 52px !important;
    font-size: 24px !important;
}

body.ios #pvp-your-name,
body.ios #pvp-opponent-name {
    font-size: 18px !important;
}

body.ios #pvp-your-score,
body.ios #pvp-opponent-score {
    font-size: 32px !important;
    min-height: 32px !important;
}

body.ios #pvp-hud-timer-container {
    font-size: 22px !important;
    padding: 14px 20px !important;
    min-width: 110px !important;
    max-width: 160px !important;
}

body.ios .overlay-content,
body.ios .pvp-modal {
    padding: 40px 24px !important;
    font-size: 20px !important;
}

body.ios .mode-button,
body.ios .epic-ready-button,
body.ios .pvp-button {
    font-size: 22px !important;
    padding: 22px 38px !important;
    min-width: 180px !important;
    border-radius: 16px !important;
}

/* ======================================== */
/* ANIMATIONS */
/* ======================================== */

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
    100% { transform: scale(1); }
}

@keyframes timerWarning {
    0%, 100% { color: #FFD700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { color: #FF4444; text-shadow: 0 0 15px rgba(255, 68, 68, 0.8); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(206, 17, 65, 0.6), 0 0 20px rgba(255,215,0,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(206, 17, 65, 0.8), 0 0 25px rgba(255,215,0,0.7); }
}

.score-updated {
    animation: scoreUpdate 0.3s ease-in-out !important;
}

.timer-warning {
    animation: timerWarning 1s ease-in-out infinite !important;
}

.score-glow {
    animation: pulse 0.5s ease-in-out !important;
}

/* ======================================== */
/* EXISTING OVERLAY STYLES (KEPT FOR COMPATIBILITY) */
/* ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.overlay.show {
    display: flex;
}

.overlay-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #CE1141;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.3);
    color: white;
    font-family: 'Neue Pixel Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.mode-button {
    background: linear-gradient(135deg, #CE1141 0%, #8B0000 100%);
    border: 2px solid #CE1141;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    font-family: 'Neue Pixel Sans', sans-serif;
}

.mode-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(206, 17, 65, 0.4);
}

.mode-button.back-button {
    background: linear-gradient(135deg, #666 0%, #333 100%);
    border-color: #666;
}

.mode-button.back-button:hover {
    background: linear-gradient(135deg, #777 0%, #444 100%);
}

.mode-button.primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
}

/* ======================================== */
/* MATCHMAKING OVERLAY STYLES */
/* ======================================== */

#matchmaking-overlay .overlay-content {
    max-width: 90vw;
    width: 90vw;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #CE1141;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(206, 17, 65, 0.3);
    margin: 10px;
    border-radius: 15px;
}

#matchmaking-overlay h2 {
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 2px 2px #CE1141, -2px -2px #000;
    font-family: 'Press Start 2P', monospace;
    text-align: center;
}

.matchmaking-container {
    margin: 30px 0;
    text-align: center;
}

.epic-matchmaking-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.epic-status-text {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
}

.epic-vs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.player-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.epic-player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CE1141 0%, #8B0000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #FFD700;
    box-shadow: 0 8px 20px rgba(206, 17, 65, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.epic-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.epic-player-avatar .fallback-emoji {
    font-size: 32px;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.epic-player-avatar.waiting {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    border-color: #666;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.epic-player-badge {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.epic-player-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epic-vs-text {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin: 0 10px;
}

.epic-vs-lightning {
    font-size: 24px;
    color: #FFD700;
    animation: lightningFlash 1s ease-in-out infinite;
}

@keyframes lightningFlash {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ======================================== */
/* MATCH READY OVERLAY STYLES */
/* ======================================== */

#match-ready-overlay .overlay-content {
    max-width: 90vw;
    width: 90vw;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #CE1141;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(206, 17, 65, 0.3);
    margin: 10px;
    border-radius: 15px;
}

.epic-ready-button {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: 2px solid #22c55e;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    font-family: 'Neue Pixel Sans', sans-serif;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.epic-ready-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

.epic-ready-button:disabled {
    background: linear-gradient(135deg, #666 0%, #333 100%);
    border-color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.epic-ready-button.readying-up {
    animation: readyingUpPulse 1s ease-in-out infinite;
}

@keyframes readyingUpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.epic-ready-button.ready-success {
    animation: readySuccessPulse 0.5s ease-in-out;
}

@keyframes readySuccessPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.epic-countdown {
    font-size: 48px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: countdownPulse 1s ease-in-out infinite;
    margin: 20px 0;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ======================================== */
/* CHALLENGE OVERLAY STYLES */
/* ======================================== */

#challenge-overlay .overlay-content {
    max-width: 500px;
    padding: 30px;
}

#challenge-overlay h2 {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.challenge-form {
    text-align: left;
    margin: 20px 0;
}

.challenge-form p {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.4;
}

.challenge-link-container {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.challenge-link-container p {
    color: #22c55e;
    margin-bottom: 15px;
}

.challenge-link-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #CE1141;
    border-radius: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-family: monospace;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.challenge-link-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ======================================== */
/* MOBILE RESPONSIVE FIXES */
/* ======================================== */

@media (max-width: 768px) {
    .overlay-content {
        padding: 20px;
        margin: 20px;
    }
    
    #pvp-mode-overlay h2,
    #matchmaking-overlay h2,
    #match-ready-overlay h2,
    #challenge-overlay h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .pvp-mode-card {
        padding: 15px;
    }
    
    .pvp-mode-card h3 {
        font-size: 16px;
    }
    
    .pvp-mode-card p {
        font-size: 14px;
    }
    
    .mode-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .epic-ready-button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .pvp-hud {
        min-height: 50px;
    }
    
    .pvp-hud > div {
        padding: 8px 12px;
    }
    
    .hud-player-avatar {
        width: 32px;
        height: 32px;
    }
    
    .player-name {
        font-size: 10px;
    }
    
    .player-score {
        font-size: 16px;
    }
    
    .match-timer {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .vs-text {
        font-size: 18px;
    }
    
    .challenge-status {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pvp-hud > div {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .hud-player-avatar {
        width: 28px;
        height: 28px;
    }
    
    .player-name {
        font-size: 9px;
    }
    
    .player-score {
        font-size: 14px;
    }
    
    #pvp-hud-timer-container {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 60px;
    }
}

body.ios .player-name,
body.ios .epic-player-name {
    font-size: 28px !important;
    line-height: 1.2 !important;
}
body.ios .player-score,
body.ios .epic-score-value {
    font-size: 38px !important;
    min-height: 38px !important;
    line-height: 1.2 !important;
}
body.ios .match-timer,
body.ios .epic-countdown {
    font-size: 36px !important;
    min-width: 90px !important;
    padding: 14px 24px !important;
}
body.ios .epic-vs-text,
body.ios .vs-text {
    font-size: 32px !important;
}
body.ios .epic-player-badge {
    font-size: 20px !important;
    padding: 8px 16px !important;
}
body.ios .challenge-status {
    font-size: 22px !important;
}
body.ios .overlay-content h2,
body.ios .epic-status-text {
    font-size: 32px !important;
}

/* iOS HUD Responsive Fixes */
body.ios #pvp-hud {
    min-height: 90px !important;
    max-height: 140px !important;
    box-sizing: border-box !important;
    padding-left: 15vw !important;
    padding-right: 15vw !important;
    width: 100vw !important;
    overflow: visible !important;
}
body.ios #pvp-hud > div {
    padding: 14px 0 !important;
    gap: 8px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}
body.ios #pvp-hud-your-avatar,
body.ios #pvp-hud-opponent-avatar {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
}
body.ios #pvp-your-name,
body.ios #pvp-opponent-name {
    font-size: 16px !important;
}
body.ios #pvp-your-score,
body.ios #pvp-opponent-score {
    font-size: 28px !important;
    min-height: 28px !important;
}
body.ios #pvp-hud-timer-container {
    font-size: 20px !important;
    padding: 10px 16px !important;
    min-width: 80px !important;
    max-width: 120px !important;
}