/* Professional AAA Game Menu */
/* Шрифт Rajdhani загружается через <link> в index.php для лучшей производительности */

/* =============================================
   TACTICAL MODAL BASE SYSTEM - SHARED STYLES
   Общие стили для всех тактических модалок
   ============================================= */

/* Базовый оверлей для модалок */
.tac-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tac-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Базовый контейнер модалки */
.tac-modal {
    position: relative;
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-left: 3px solid #ffaa00;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    box-shadow: 0 0 50px rgba(255, 170, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: scale(0.95) translateY(-15px);
    transition: transform 0.25s ease;
    max-width: 90%;
    max-height: 85vh;
    overflow: hidden;
}

.tac-modal-overlay.active .tac-modal {
    transform: scale(1) translateY(0);
}

/* Декоративные углы модалки */
.tac-modal::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 170, 0, 0.25) 50%);
    pointer-events: none;
}

.tac-modal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(-45deg, transparent 50%, rgba(255, 170, 0, 0.15) 50%);
    pointer-events: none;
}

/* Заголовок модалки */
.tac-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.08), transparent 70%);
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
}

.tac-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffaa00;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

.tac-modal-title i {
    opacity: 0.8;
}

/* Кнопка закрытия */
.tac-modal-close {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tac-modal-close:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff5555;
}

/* Контент модалки */
.tac-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

/* Футер модалки */
.tac-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 170, 0, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Тактическая кнопка - основная */
.tac-btn-primary {
    padding: 12px 22px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    color: #000;
    background: linear-gradient(135deg, #ffaa00 0%, #ff9500 100%);
    border: none;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 3px 15px rgba(255, 170, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tac-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.tac-btn-primary:hover::before {
    left: 100%;
}

.tac-btn-primary:hover {
    background: linear-gradient(135deg, #ffbb33 0%, #ffaa00 100%);
    box-shadow: 0 5px 25px rgba(255, 170, 0, 0.4);
    transform: translateY(-1px);
}

/* Тактическая кнопка - вторичная */
.tac-btn-secondary {
    padding: 12px 22px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    color: #aaa;
    background: linear-gradient(135deg, rgba(50, 50, 60, 0.9), rgba(35, 35, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tac-btn-secondary:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(65, 65, 75, 0.95), rgba(50, 50, 60, 0.95));
    border-color: rgba(255, 255, 255, 0.2);
}

/* Тактический инпут */
.tac-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'Rajdhani', sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.15);
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    outline: none;
    transition: all 0.2s ease;
}

.tac-input:focus {
    border-color: rgba(255, 170, 0, 0.4);
    background: rgba(255, 170, 0, 0.05);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.1);
}

.tac-input::placeholder {
    color: #555;
}

/* Тактический select */
.tac-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.15);
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.tac-select:hover,
.tac-select:focus {
    border-color: rgba(255, 170, 0, 0.4);
}

/* Тактический checkbox */
.tac-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 170, 0, 0.08);
    clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

.tac-checkbox-row:hover {
    background: rgba(255, 170, 0, 0.05);
    border-color: rgba(255, 170, 0, 0.15);
}

.tac-checkbox-row span {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tac-checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ffaa00;
    cursor: pointer;
}

/* Тактический вкладки */
.tac-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 170, 0, 0.08);
}

.tac-tab {
    flex: 1;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    color: #666;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 2px solid transparent;
    clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%, 0 5px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.tac-tab:hover {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.06);
    border-color: rgba(255, 170, 0, 0.15);
}

.tac-tab.active {
    color: #ffaa00;
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.12), rgba(255, 140, 0, 0.06));
    border-color: rgba(255, 170, 0, 0.25);
    border-bottom-color: #ffaa00;
}

/* Тактические карточки (для выбора) */
.tac-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(15, 15, 25, 0.7));
    border: 1px solid rgba(255, 170, 0, 0.1);
    border-left: 2px solid rgba(255, 170, 0, 0.3);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tac-card:hover {
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.25);
    transform: translateX(3px);
}

.tac-card.selected {
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(20, 15, 10, 0.9));
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.12);
}

/* Мобильная адаптация базовых стилей */
@media (max-width: 768px), (pointer: coarse) {
    .tac-modal {
        width: 94%;
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    }

    .tac-modal::before,
    .tac-modal::after {
        width: 12px;
        height: 12px;
    }

    .tac-modal-header {
        padding: 12px 16px;
    }

    .tac-modal-title {
        font-size: 15px;
        letter-spacing: 1.5px;
        gap: 8px;
    }

    .tac-modal-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .tac-modal-body {
        padding: 14px;
        max-height: calc(85vh - 100px);
    }

    .tac-modal-footer {
        padding: 12px 16px;
    }

    .tac-btn-primary,
    .tac-btn-secondary {
        padding: 10px 18px;
        font-size: 12px;
        clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    }

    .tac-checkbox-row {
        padding: 10px 12px;
    }

    .tac-checkbox-row span {
        font-size: 12px;
    }

    .tac-tabs {
        padding: 10px 12px;
        gap: 4px;
    }

    .tac-tab {
        padding: 8px 10px;
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .tac-modal {
        width: 96%;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    }

    .tac-modal-header {
        padding: 10px 12px;
    }

    .tac-modal-title {
        font-size: 13px;
        gap: 6px;
    }

    .tac-modal-close {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .tac-modal-body {
        padding: 12px;
    }

    .tac-btn-primary,
    .tac-btn-secondary {
        padding: 9px 14px;
        font-size: 11px;
    }

    .tac-checkbox-row span {
        font-size: 11px;
    }

    .tac-tab {
        padding: 7px 8px;
        font-size: 10px;
    }
}

/* ============================================= */

/* =============================================
   TACTICAL SETTINGS MODAL
   ============================================= */

.tac-settings-modal {
    width: 420px;
}

.tac-settings-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tac-settings-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tac-settings-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tac-mobile-ui-btn {
    display: none;
    margin-top: 4px;
}

.tac-mobile-ui-btn i {
    margin-right: 8px;
}

.tac-support-btn {
    display: none;
    margin-top: 8px;
    text-decoration: none;
    color: #ff6b9d;
    border-color: rgba(255, 107, 157, 0.3);
}

.tac-support-btn:hover {
    background: rgba(255, 107, 157, 0.15);
    border-color: rgba(255, 107, 157, 0.5);
}

.tac-support-btn i {
    margin-right: 8px;
    color: #ff6b9d;
}

/* Показываем кнопки на мобильных */
@media (pointer: coarse) {
    .tac-mobile-ui-btn,
    #mobileUISettingsBtn {
        display: flex !important;
    }

    .tac-support-btn {
        display: flex !important;
    }
}

/* Settings modal mobile adaptation */
@media (max-width: 500px) {
    .tac-settings-modal {
        width: 95%;
        max-width: 340px;
    }
}

/* ============================================= */

/* Скрываем кнопки fullscreen для VK на мобильных */
body.vk-mobile #fullscreenBtn,
body.vk-mobile #pauseFullscreenBtn {
    display: none !important;
}

#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 50%, #0a0a15 100%);
    z-index: 9999;
    font-family: 'Rajdhani', sans-serif;
}

.menu-background {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.menu-bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 170, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 170, 255, 0.03) 0%, transparent 50%);
    animation: bgPulse 10s ease infinite;
}

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

.menu-grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 170, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 170, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* =============================================
   TACTICAL MOBILE ADAPTATION - REDESIGN
   ============================================= */

@media (max-width: 768px), (orientation: portrait), (pointer: coarse) {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        background: #0a0a15 !important;
    }

    #startScreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    .menu-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        font-size: 11px !important;
        box-sizing: border-box !important;
        border: none !important;
        border-radius: 0 !important;
    }

    /* === МОБИЛЬНЫЙ ХЕДЕР - ТАКТИЧЕСКИЙ СТИЛЬ === */
    .menu-nav {
        display: flex !important;
        align-items: center !important;
        padding: 4px 8px !important;
        gap: 5px !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(10, 10, 20, 0.85) 100%) !important;
        border-bottom: 1px solid rgba(255, 170, 0, 0.15) !important;
        min-height: 44px !important;
    }

    .menu-nav::after {
        display: none !important;
    }

    /* Настройки - слева */
    .menu-settings-icons {
        display: flex !important;
        gap: 3px !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }

    .setting-icon-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
        background: rgba(30, 30, 40, 0.8) !important;
        border: 1px solid rgba(255, 170, 0, 0.15) !important;
        clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #666 !important;
    }

    .setting-icon-btn:hover,
    .setting-icon-btn.active {
        background: rgba(255, 170, 0, 0.15) !important;
        border-color: rgba(255, 170, 0, 0.3) !important;
        color: #ffaa00 !important;
    }

    /* === ВКЛАДКИ - ТАКТИЧЕСКИЙ СТИЛЬ === */
    .menu-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 3px !important;
        padding: 2px 4px !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        flex: 1 !important;
        min-width: 0 !important;
        order: 2 !important;
        background: transparent !important;
        border: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .menu-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .menu-tab {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        padding: 5px 8px !important;
        min-width: 44px !important;
        flex-shrink: 0 !important;
        background: rgba(20, 20, 30, 0.8) !important;
        border: 1px solid rgba(255, 170, 0, 0.08) !important;
        border-left: 2px solid transparent !important;
        clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px)) !important;
        position: relative !important;
        overflow: visible !important;
        font-size: 0 !important;
    }

    .menu-tab i {
        font-size: 14px !important;
        margin: 0 !important;
        color: #666 !important;
    }

    .menu-tab::after {
        font-size: 7px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        color: #555 !important;
        white-space: nowrap !important;
        letter-spacing: 0.3px !important;
    }

    /* Короткие подписи */
    .menu-tab[data-tab="play"]::after { content: 'ИГРА' !important; }
    .menu-tab[data-tab="arsenal"]::after { content: 'ОРУЖИЕ' !important; }
    .menu-tab[data-tab="leaderboard"]::after { content: 'ТОП' !important; }
    .menu-tab[data-tab="stats"]::after { content: 'СТАТА' !important; }
    .menu-tab[data-tab="achievements"]::after { content: 'НАГРАДЫ' !important; }
    .menu-tab[data-tab="customization"]::after { content: 'СКИН' !important; }

    .menu-tab::before {
        display: none !important;
    }

    .menu-tab.active {
        background: linear-gradient(180deg, rgba(255, 170, 0, 0.15) 0%, rgba(255, 140, 0, 0.08) 100%) !important;
        border-color: rgba(255, 170, 0, 0.25) !important;
        border-left-color: #ffaa00 !important;
    }

    .menu-tab.active i {
        color: #ffaa00 !important;
    }

    .menu-tab.active::after {
        color: #ffaa00 !important;
    }

    /* NEW Badge - мобильный */
    .tab-new-badge {
        position: absolute !important;
        top: -2px !important;
        right: -2px !important;
        font-size: 6px !important;
        padding: 1px 3px !important;
        clip-path: polygon(1px 0, calc(100% - 1px) 0, 100% 1px, 100% calc(100% - 1px), calc(100% - 1px) 100%, 1px 100%, 0 calc(100% - 1px), 0 1px) !important;
        background: linear-gradient(135deg, #ff4444, #cc0000) !important;
        color: #fff !important;
        font-weight: 700 !important;
        z-index: 5 !important;
    }

    /* Locked tab */
    .menu-tab.tab-locked {
        opacity: 0.4 !important;
    }

    .menu-tab.tab-locked::after {
        content: '🔒' !important;
        font-family: inherit !important;
    }

    /* Монеты - тактический стиль */
    .menu-coins-display {
        display: flex !important;
        align-items: center !important;
        padding: 4px 10px !important;
        gap: 4px !important;
        background: rgba(255, 200, 0, 0.1) !important;
        border: 1px solid rgba(255, 200, 0, 0.2) !important;
        border-left: 2px solid rgba(255, 200, 0, 0.5) !important;
        clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%) !important;
        flex-shrink: 0 !important;
        order: 3 !important;
        margin: 0 !important;
    }

    .menu-coins-display i {
        font-size: 11px !important;
        color: #ffd700 !important;
    }

    .coins-amount {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #ffd700 !important;
    }

    /* Профиль - тактический стиль */
    .menu-user-section {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 4px 8px 4px 4px !important;
        margin: 0 !important;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(15, 15, 25, 0.7) 100%) !important;
        border: 1px solid rgba(255, 170, 0, 0.15) !important;
        border-left: 2px solid rgba(255, 170, 0, 0.4) !important;
        clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%) !important;
        flex-shrink: 0 !important;
        order: 4 !important;
    }

    .menu-user-avatar {
        width: 28px !important;
        height: 28px !important;
        border-radius: 3px !important;
        border: 1px solid rgba(255, 170, 0, 0.4) !important;
        flex-shrink: 0 !important;
    }

    .menu-user-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
    }

    .menu-user-name {
        display: none !important;
    }

    .menu-user-level {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
    }

    #userLevelBadge {
        font-size: 8px !important;
        padding: 2px 6px !important;
        clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%) !important;
    }

    /* Прогресс XP - тактический */
    .xp-progress-container {
        display: block !important;
        width: 38px !important;
        height: 3px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        clip-path: polygon(1px 0, 100% 0, calc(100% - 1px) 100%, 0 100%) !important;
        overflow: hidden !important;
        border: none !important;
    }

    .xp-progress-bar,
    #xpProgressBar {
        height: 100% !important;
        background: linear-gradient(90deg, #ffaa00, #ffcc00) !important;
    }

    .xp-text {
        display: block !important;
        font-size: 7px !important;
        color: #777 !important;
        white-space: nowrap !important;
    }

    .menu-user-logout {
        display: none !important;
    }

    /* Кнопки логина - тактический */
    .menu-login-buttons {
        display: flex !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
        order: 3 !important;
    }

    .menu-login-buttons .btn-primary {
        padding: 6px 12px !important;
        font-size: 10px !important;
        clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%) !important;
    }

    .menu-content {
        flex: 1 !important;
        overflow: hidden !important;
    }

    .menu-tab-content {
        padding: 8px !important;
        height: 100% !important;
    }

    #tab-arsenal,
    #tab-customization {
        padding: 0 !important;
    }

    /* Scroll container для кастомизации на мобильных */
    #tab-customization .customization-wrapper {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .customization-tabs {
        position: sticky !important;
        top: 0 !important;
        z-index: 15 !important;
        background: rgba(20, 25, 35, 0.98) !important;
        flex-shrink: 0 !important;
    }

    .menu-tab-content.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #tab-play.active {
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    .play-content {
        display: flex !important;
        flex-direction: row !important;
        padding: 10px !important;
        padding-bottom: 70px !important;
        gap: 15px !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    /* Персонаж - СЛЕВА */
    .play-right {
        order: 1 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
        height: 100% !important;
    }

    /* Режимы - СПРАВА */
    .play-left {
        order: 2 !important;
        flex: 0 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        min-width: 0 !important;
        max-width: 200px !important;
        justify-content: flex-start !important;
        overflow: visible !important;
        height: auto !important;
    }

    /* Чат скрыт на мобильных */
    .play-center {
        display: none !important;
    }

    .mode-preview {
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    #menuCanvas {
        width: auto !important;
        height: 50vh !important;
        max-height: 200px !important;
        aspect-ratio: 3/4 !important;
    }

    /* Карточки режимов - компактный мобильный */
    .play-modes {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        flex: 0 1 auto !important;
    }

    .play-mode-card {
        padding: 6px 10px !important;
        gap: 8px !important;
        flex-direction: row !important;
        align-items: center !important;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(15, 15, 25, 0.85) 100%) !important;
        border: 1px solid rgba(255, 170, 0, 0.1) !important;
        border-left: 2px solid rgba(255, 170, 0, 0.25) !important;
        clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)) !important;
    }

    .play-mode-card:hover {
        transform: none !important;
    }

    .play-mode-card.selected {
        transform: none !important;
        border-left-color: #ffaa00 !important;
        border-color: rgba(255, 170, 0, 0.25) !important;
        background: linear-gradient(135deg, rgba(255, 170, 0, 0.08) 0%, rgba(20, 15, 10, 0.9) 100%) !important;
    }

    .play-mode-icon {
        font-size: 16px !important;
        width: 20px !important;
        text-shadow: 0 0 8px rgba(255, 170, 0, 0.4) !important;
    }

    .play-mode-title {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }

    .play-mode-desc {
        display: block !important;
        font-size: 8px !important;
        color: #666 !important;
    }

    #serverOnlineIndicator {
        font-size: 8px !important;
        padding: 3px 6px !important;
        margin-top: 3px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(0, 255, 0, 0.2) !important;
        clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px) !important;
    }

    /* Кнопка старта - sticky на мобильных */
    .play-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 10px 20px !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        background: linear-gradient(to top, rgba(10, 10, 20, 0.98) 0%, rgba(10, 10, 20, 0.9) 70%, transparent 100%) !important;
        z-index: 100 !important;
        display: flex !important;
        justify-content: center !important;
    }

    #startButton {
        font-size: 13px !important;
        padding: 12px 40px !important;
        width: auto !important;
        max-width: 280px !important;
        clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%) !important;
    }

    .map-selector-group {
        margin-top: 5px !important;
    }

    .map-selector-group label {
        font-size: 10px !important;
        color: #666 !important;
    }

    .map-selector-group select {
        padding: 8px 10px !important;
        font-size: 11px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(255, 170, 0, 0.2) !important;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
    }

    /* Mobile UI Settings button */
    #mobileUISettingsBtn {
        padding: 10px 14px !important;
        font-size: 12px !important;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
        gap: 6px !important;
    }

    #mobileUISettingsBtn i {
        font-size: 14px !important;
    }

    /* Daily reward мобильный */
    .daily-reward-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        margin-right: 5px !important;
        clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px) !important;
    }

    .daily-reward-btn.has-reward::after {
        width: 8px !important;
        height: 8px !important;
        top: 0px !important;
        right: 0px !important;
    }

    /* Стили достижений перенесены в achievements.css */
}

/* === ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ ПО ШИРИНЕ (<400px) === */
@media (max-width: 400px) and (pointer: coarse) {
    .menu-nav {
        padding: 4px 6px !important;
        gap: 4px !important;
    }

    .menu-settings-icons {
        gap: 2px !important;
    }

    .setting-icon-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 10px !important;
        clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px) !important;
    }

    .menu-coins-display {
        padding: 3px 6px !important;
        gap: 3px !important;
    }

    .menu-coins-display i {
        font-size: 10px !important;
    }

    .coins-amount {
        font-size: 10px !important;
    }

    .menu-user-section {
        padding: 3px 6px 3px 3px !important;
        gap: 4px !important;
    }

    .menu-user-avatar {
        width: 26px !important;
        height: 26px !important;
    }

    .menu-user-info {
        min-width: 45px !important;
    }

    #userLevelBadge {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }

    .xp-progress-container {
        width: 40px !important;
        height: 3px !important;
    }

    .menu-tabs {
        gap: 4px !important;
        padding: 5px 6px !important;
    }

    .menu-tab {
        padding: 5px 7px !important;
        min-width: 40px !important;
        clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 3px, 100% 100%, 3px 100%, 0 calc(100% - 3px)) !important;
    }

    .menu-tab i {
        font-size: 14px !important;
    }

    .menu-tab::after {
        font-size: 6px !important;
    }

    .tab-new-badge {
        top: -2px !important;
        right: -2px !important;
        font-size: 5px !important;
        padding: 1px 2px !important;
        clip-path: polygon(1px 0, calc(100% - 1px) 0, 100% 1px, 100% calc(100% - 1px), calc(100% - 1px) 100%, 1px 100%, 0 calc(100% - 1px), 0 1px) !important;
    }

    /* Стили достижений для маленьких экранов в achievements.css */
}

/* Очень маленькие экраны по высоте - тактический стиль */
@media (max-height: 400px) {
    .menu-coins-display {
        padding: 4px 8px !important;
        gap: 4px !important;
        margin-right: 3px !important;
        clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%) !important;
    }

    .menu-coins-display i {
        font-size: 12px !important;
        animation: none !important;
    }

    .coins-amount {
        font-size: 11px !important;
        min-width: 25px !important;
    }

    .play-content {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 3px 8px !important;
    }

    .play-right {
        order: 1 !important;
        flex: 0 0 70px !important;
        align-items: center !important;
    }

    .play-left {
        order: 2 !important;
        flex: 1 !important;
        gap: 4px !important;
    }

    #menuCanvas {
        width: auto !important;
        height: 45vh !important;
        max-height: 150px !important;
        aspect-ratio: 3/4 !important;
    }

    .play-modes {
        gap: 3px !important;
    }

    .play-mode-card {
        padding: 4px 8px !important;
        gap: 6px !important;
        clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)) !important;
    }

    .play-mode-icon {
        font-size: 14px !important;
        width: 18px !important;
    }

    .play-mode-title {
        font-size: 9px !important;
    }

    .play-mode-desc {
        display: block !important;
        font-size: 6px !important;
    }

    #serverOnlineIndicator {
        font-size: 6px !important;
        padding: 1px 3px !important;
        margin-top: 2px !important;
        clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px) !important;
    }

    #startButton {
        padding: 6px 10px !important;
        font-size: 10px !important;
        clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%) !important;
    }

    .play-actions {
        padding-top: 3px !important;
        margin-top: auto !important;
    }

    .map-selector-group label, .time-selector label {
        font-size: 11px !important;
    }

    #mapSelector {
        font-size: 12px !important;
        padding: 8px !important;
        clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px) !important;
    }

    .time-toggle {
        gap: 5px !important;
    }

    .time-btn {
        font-size: 11px !important;
        padding: 8px 12px !important;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
    }

    #arsenalGrid2, #arsenalGrid {
        gap: 6px !important;
        padding: 8px !important;
    }

    .arsenal-content {
        padding: 0 !important;
    }

    .arsenal-tab-content {
        padding: 8px !important;
    }

    .arsenal-left {
        padding: 0 !important;
    }

    .arsenal-right {
        display: none !important;
    }

    /* Мобильный грид - компактные карточки */
    .arsenal-weapons-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 100px)) !important;
        gap: 6px !important;
        padding: 5px !important;
    }

    .weapon-card {
        padding: 4px !important;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
        gap: 2px !important;
        border: 1px solid rgba(255, 170, 0, 0.1) !important;
    }

    .weapon-card-inner {
        gap: 2px !important;
    }

    .weapon-preview-container {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }

    .weapon-preview-canvas {
        width: 100% !important;
        height: 100% !important;
    }

    .weapon-name {
        font-size: 7px !important;
        letter-spacing: 0 !important;
    }

    .weapon-price {
        font-size: 8px !important;
    }

    .weapon-price i {
        font-size: 7px !important;
    }

    .weapon-status,
    .weapon-buy-btn,
    .weapon-requirement {
        font-size: 6px !important;
        padding: 3px 6px !important;
    }

    .weapon-ammo {
        padding: 2px 4px !important;
        font-size: 7px !important;
        gap: 2px !important;
    }

    .weapon-ammo i {
        font-size: 6px !important;
    }

    .weapon-new-badge {
        display: none !important;
    }
    
    .customization-content {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 5px !important;
        overflow: visible !important;
    }
    
    .customization-preview {
        flex: 0 0 auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    #customizeCanvas {
        width: 200px !important;
        height: 200px !important;
    }

    #menuCanvas {
        width: auto !important;
        height: 50vh !important;
        max-height: 180px !important;
        aspect-ratio: 3/4 !important;
    }

    .preview-hint {
        font-size: 10px !important;
    }
    
    .customize-section {
        padding: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .customize-section h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    .customize-group {
        margin-bottom: 10px !important;
    }
    
    .customize-group label {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }
    
    .customize-select, .customize-color {
        font-size: 16px !important; /* 16px предотвращает zoom на iOS */
        padding: 10px !important;
        min-height: 44px; /* Минимальный размер для touch */
        position: relative;
        z-index: 10;
    }

    .customize-select:focus {
        outline: 2px solid rgba(255, 170, 0, 0.8);
    }
    
    /* Статистика - мобильная версия */
    #tab-stats.active {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }

    #tab-stats .stats-content {
        padding: 8px !important;
        width: 100% !important;
        height: 100% !important;
        display: block !important;
        overflow-y: auto !important;
    }

    #statsGrid {
        overflow-y: visible !important;
        max-height: none !important;
        padding: 0 !important;
    }

    #statsGrid > div {
        gap: 12px !important;
        margin-bottom: 15px !important;
    }

    /* Заголовки секций */
    #statsGrid > div > div:first-child {
        margin-bottom: 8px !important;
    }

    #statsGrid > div > div:first-child i {
        font-size: 28px !important;
    }

    #statsGrid > div > div:first-child h3 {
        font-size: 16px !important;
        margin-top: 8px !important;
    }

    /* Сетка карточек - 2 колонки */
    #statsGrid > div > div[style*="grid"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    #statsGrid .stat-card {
        padding: 10px !important;
        min-height: auto !important;
        clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px) !important;
        border-left: 2px solid rgba(255, 170, 0, 0.3) !important;
    }

    #statsGrid .stat-card:hover {
        transform: none !important;
    }

    .stat-icon {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }

    .stat-label {
        font-size: 9px !important;
        margin-bottom: 4px !important;
        letter-spacing: 0.5px !important;
    }

    .stat-value {
        font-size: 18px !important;
    }

    .stat-subtitle {
        font-size: 8px !important;
        margin-top: 4px !important;
    }

    /* Прогресс-бар XP */
    #statsGrid .stat-card div[style*="margin: 15px"] {
        margin: 8px 0 !important;
    }

    #statsGrid .stat-card div[style*="height: 20px"] {
        height: 12px !important;
    }

    /* Значение XP в прогресс-баре */
    #statsGrid .stat-card .stat-value.green[style*="font-size: 24px"] {
        font-size: 14px !important;
    }

    /* Рейтинг - мобильная версия */
    #tab-leaderboard.active {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
    }

    .leaderboard-content {
        padding: 8px !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .leaderboard-filters {
        gap: 6px !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        padding: 4px !important;
        background: rgba(0, 0, 0, 0.4) !important;
        clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px) !important;
        border: 1px solid rgba(255, 170, 0, 0.1) !important;
    }

    .filter-btn {
        padding: 8px 14px !important;
        font-size: 11px !important;
        flex: 1 !important;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
        border: none !important;
        background: transparent !important;
        color: #888 !important;
        transition: all 0.2s ease !important;
    }

    .filter-btn:hover {
        background: rgba(255, 170, 0, 0.1) !important;
        color: #ffaa00 !important;
    }

    .filter-btn.active {
        background: linear-gradient(135deg, rgba(255, 170, 0, 0.9) 0%, rgba(255, 140, 0, 0.9) 100%) !important;
        color: #000 !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 10px rgba(255, 170, 0, 0.3) !important;
    }

    .leaderboard-table-container {
        padding: 8px !important;
        clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px) !important;
        flex: 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255, 170, 0, 0.08) !important;
    }

    .leaderboard-table {
        border-spacing: 0 4px !important;
        width: 100% !important;
    }

    .leaderboard-table thead th {
        padding: 8px 6px !important;
        font-size: 10px !important;
        position: sticky !important;
        top: 0 !important;
        background: rgba(10, 10, 25, 0.95) !important;
        z-index: 1 !important;
    }

    .leaderboard-table tbody td {
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    .leaderboard-table tbody tr {
        font-size: 11px !important;
    }

    .leaderboard-table img {
        width: 22px !important;
        height: 22px !important;
    }

    #leaderboardBody2 tr {
        font-size: 11px !important;
    }

    #leaderboardBody2 td {
        padding: 5px 4px !important;
    }

    /* Дополнительная инфо (Волна, XP) */
    .leaderboard-extra-info.wave-info {
        color: #ffaa00 !important;
        font-size: 9px !important;
    }

    .leaderboard-extra-info.xp-info {
        color: #888 !important;
        font-size: 9px !important;
    }

    /* Исправление sticky header - убираем отступ */
    .leaderboard-table-container {
        padding-top: 0 !important;
    }

    .leaderboard-table {
        border-collapse: separate !important;
        border-spacing: 0 4px !important;
    }

    .leaderboard-table thead th {
        top: -1px !important;
    }

    #leaderboardBody2 img {
        width: 24px !important;
        height: 24px !important;
    }
    
    .btn-primary, .menu-btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
    
    .menu-footer {
        display: none !important;
    }
    
    .menu-tab-content {
        -webkit-overflow-scrolling: touch !important;
    }

    /* Scroll на wrapper, не на content */
    #tab-customization .customization-wrapper {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

@media (pointer: coarse) {
    .menu-footer {
        display: none !important;
    }
}

.menu-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Navigation Bar */

/* =============================================
   TACTICAL USER SECTION - REDESIGN
   ============================================= */

.menu-user-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(15, 15, 25, 0.8) 100%);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-left: 2px solid rgba(255, 170, 0, 0.5);
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.menu-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(255, 170, 0, 0.6);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.menu-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-user-name {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.menu-user-stats {
    font-size: 12px;
    color: #888;
}

/* XP Progress Bar */
.menu-user-level {
    display: flex;
    align-items: center;
    gap: 6px;
}

.level-badge {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: none;
    white-space: nowrap;
}

.xp-progress-container {
    width: 70px;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border: 1px solid rgba(255, 170, 0, 0.2);
    clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}

.xp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffaa00, #ffcc00);
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.xp-text {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

/* =============================================
   TACTICAL COINS DISPLAY - REDESIGN
   ============================================= */

.menu-coins-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.1) 0%, rgba(255, 170, 0, 0.05) 100%);
    border: 1px solid rgba(255, 200, 0, 0.25);
    border-left: 2px solid rgba(255, 200, 0, 0.6);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.menu-coins-display:hover {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.18) 0%, rgba(255, 170, 0, 0.1) 100%);
    border-color: rgba(255, 200, 0, 0.45);
}

.menu-coins-display i {
    font-size: 14px;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.coins-amount {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 0.5px;
    min-width: 35px;
}

/* =============================================
   TACTICAL DAILY REWARD BUTTON - REDESIGN
   ============================================= */

.daily-reward-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15) 0%, rgba(255, 100, 0, 0.1) 100%);
    border: 1px solid rgba(255, 170, 0, 0.3);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 16px;
    color: #ffaa00;
    z-index: 100;
    flex-shrink: 0;
    overflow: visible;
}

.daily-reward-btn:hover {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.25) 0%, rgba(255, 100, 0, 0.18) 100%);
    border-color: rgba(255, 170, 0, 0.5);
    color: #ffcc00;
}

.daily-reward-btn.has-reward {
    animation: dailyRewardPulse 2s ease-in-out infinite;
    border-color: rgba(255, 170, 0, 0.5);
}

.daily-reward-btn.has-reward::after {
    content: '';
    position: absolute;
    top: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.8);
    z-index: 1;
}

@keyframes dailyRewardPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 170, 0, 0); }
    50% { box-shadow: 0 0 12px rgba(255, 170, 0, 0.4); }
}

/* Mobile adaptation for daily reward button */
@media (max-width: 768px) {
    .daily-reward-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 6px;
        border-width: 1px;
    }

    .daily-reward-btn.has-reward::after {
        width: 8px;
        height: 8px;
        top: 0px;
        right: 0px;
    }
}

@media (max-width: 480px) {
    .daily-reward-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 4px;
    }
}

/* Coins Shop Modal */
.coins-shop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50000;
}

.coins-shop-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.coins-shop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: var(--backdrop-blur-medium);
}

.coins-shop-container {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(10, 10, 20, 0.98));
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 25px;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.1);
    scrollbar-gutter: stable;
}

.coins-shop-container::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.coins-shop-container::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.4);
    border-radius: 3px;
}

.coins-shop-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 15px 0;
}

.coins-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.coins-shop-header h2 {
    color: #ffd700;
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.coins-shop-close {
    background: none;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.coins-shop-close:hover {
    color: #fff;
}

.coins-shop-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.coins-shop-balance span:first-child {
    color: #aaa;
    font-size: 14px;
}

.coins-shop-balance-amount {
    color: #ffd700;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coins-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding-top: 10px;
}

.coins-pack {
    position: relative;
    background: linear-gradient(135deg, rgba(40, 40, 50, 0.9), rgba(30, 30, 40, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coins-pack:hover {
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2);
}

.coins-pack:active {
    transform: translateY(-2px);
}

.coins-pack-popular {
    border-color: rgba(0, 200, 255, 0.5);
    background: linear-gradient(135deg, rgba(0, 50, 80, 0.5), rgba(30, 30, 40, 0.9));
}

.coins-pack-best {
    border-color: rgba(255, 100, 0, 0.6);
    background: linear-gradient(135deg, rgba(80, 40, 0, 0.5), rgba(30, 30, 40, 0.9));
}

.coins-pack-label {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00c8ff, #0088cc);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.coins-pack-best .coins-pack-label {
    background: linear-gradient(135deg, #ff6600, #ff4400);
}

.coins-pack-bonus {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 255, 100, 0.2);
    color: #00ff64;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
}

.coins-pack-amount {
    font-size: 28px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.coins-pack-icon {
    font-size: 24px;
    color: #ffd700;
    margin-bottom: 10px;
    opacity: 0.8;
}

.coins-pack-price {
    color: #aaa;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.coins-pack-price i {
    color: #5181b8;
}

.coins-shop-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.coins-shop-footer p {
    color: #666;
    font-size: 12px;
    margin: 0;
}

.coins-shop-footer i {
    margin-right: 5px;
}

/* Coins Shop Mobile */
@media (max-width: 600px) {
    .coins-shop-container {
        padding: 15px;
        border-radius: 15px;
    }

    .coins-shop-header h2 {
        font-size: 18px;
    }

    .coins-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .coins-pack {
        padding: 15px 10px;
    }

    .coins-pack-amount {
        font-size: 22px;
    }

    .coins-pack-icon {
        font-size: 20px;
    }

    .coins-pack-price {
        font-size: 11px;
    }

    .coins-pack-label {
        font-size: 8px;
        padding: 2px 8px;
    }
}

@media (max-height: 500px) {
    .coins-shop-container {
        max-height: 95vh;
        padding: 12px;
    }

    .coins-shop-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .coins-shop-header h2 {
        font-size: 16px;
    }

    .coins-shop-balance {
        padding: 8px 15px;
        margin-bottom: 10px;
    }

    .coins-shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .coins-pack {
        padding: 12px 8px;
    }

    .coins-pack-amount {
        font-size: 18px;
    }

    .coins-pack-icon {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .coins-pack-price {
        font-size: 10px;
    }
}

/* Coins Shop Tabs */
.coins-shop-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.coins-tab {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coins-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.coins-tab.active {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(255, 136, 0, 0.2));
    border-color: rgba(255, 170, 0, 0.5);
    color: #ffaa00;
}

.coins-tab i {
    margin-right: 6px;
}

/* Transaction History */
.coins-history-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.coins-history-list::-webkit-scrollbar {
    width: 4px;
}

.coins-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.3);
    border-radius: 2px;
}

.coins-history-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.coins-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.coins-history-empty i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid transparent;
}

.transaction-item.purchase {
    border-left-color: #4CAF50;
}

.transaction-item.spend {
    border-left-color: #f44336;
}

.transaction-item.bonus {
    border-left-color: #2196F3;
}

.transaction-item.refund {
    border-left-color: #ff9800;
}

.transaction-info {
    flex: 1;
}

.transaction-desc {
    color: #fff;
    font-size: 13px;
    margin-bottom: 3px;
}

.transaction-date {
    color: #666;
    font-size: 11px;
}

.transaction-amount {
    font-weight: 700;
    font-size: 14px;
}

.transaction-amount.positive {
    color: #4CAF50;
}

.transaction-amount.negative {
    color: #f44336;
}

/* =============================================
   TACTICAL COINS SHOP OVERRIDES
   ============================================= */

/* Тактический overlay */
.coins-shop-overlay {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Тактический контейнер */
.coins-shop-container {
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-left: 3px solid #ffaa00;
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    box-shadow: 0 0 50px rgba(255, 170, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Тактический scrollbar */
.coins-shop-container::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.4);
    border-radius: 0;
}

/* Тактический header */
.coins-shop-header {
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
}

.coins-shop-header h2 {
    color: #ffaa00;
    text-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

/* Тактическая кнопка закрытия */
.coins-shop-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 170, 0, 0.15);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    font-size: 20px;
    line-height: 1;
}

.coins-shop-close:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

/* Тактический баланс */
.coins-shop-balance {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.coins-shop-balance-amount {
    color: #ffaa00;
}

/* Тактические табы */
.coins-shop-tabs {
    gap: 6px;
}

.coins-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.coins-tab:hover {
    background: rgba(255, 170, 0, 0.08);
    border-color: rgba(255, 170, 0, 0.25);
}

.coins-tab.active {
    border-left: 2px solid #ffaa00;
}

/* Тактические пакеты монет */
.coins-pack {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(10, 10, 20, 0.95));
    border: 1px solid rgba(255, 170, 0, 0.15);
    border-radius: 0;
}

.coins-pack:hover {
    border-color: rgba(255, 170, 0, 0.5);
    border-left: 2px solid #ffaa00;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 170, 0, 0.15);
}

.coins-pack-popular {
    border-color: rgba(0, 200, 255, 0.3);
    background: linear-gradient(145deg, rgba(0, 40, 60, 0.4), rgba(10, 10, 20, 0.95));
}

.coins-pack-popular:hover {
    border-left-color: #00c8ff;
}

.coins-pack-best {
    border-color: rgba(255, 100, 0, 0.4);
    background: linear-gradient(145deg, rgba(60, 30, 0, 0.4), rgba(10, 10, 20, 0.95));
}

.coins-pack-best:hover {
    border-left-color: #ff6600;
}

/* Тактические лейблы */
.coins-pack-label {
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}

/* Тактический бонус */
.coins-pack-bonus {
    border-radius: 0;
    clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px);
}

/* Тактический amount */
.coins-pack-amount {
    color: #ffaa00;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
}

.coins-pack-icon {
    color: #ffaa00;
}

/* Тактический footer */
.coins-shop-footer {
    border-top: 1px solid rgba(255, 170, 0, 0.1);
}

/* Тактические транзакции */
.transaction-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}

/* Мобильная адаптация тактических стилей */
@media (max-width: 600px) {
    .coins-shop-container {
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    }

    .coins-pack {
        clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    }

    .coins-tab {
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    }
}

/* ===== Mobile Landscape Fixes for Modals ===== */
@media (max-height: 450px) and (orientation: landscape) {
    /* Coins Shop - Landscape */
    .coins-shop-container {
        max-height: 92dvh;
        width: auto;
        max-width: 580px;
        padding: 12px 16px;
        border-radius: 14px;
        overflow: hidden;
        background: linear-gradient(135deg, rgba(18, 18, 28, 0.98), rgba(10, 10, 18, 0.98));
        border: 1px solid rgba(255, 200, 0, 0.25);
    }

    .coins-shop-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .coins-shop-header h2 {
        font-size: 14px;
        gap: 6px;
    }

    .coins-shop-close {
        font-size: 20px;
        color: #666;
    }

    .coins-shop-tabs {
        margin-bottom: 8px;
        gap: 6px;
    }

    .coins-tab {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 8px;
    }

    .coins-shop-balance {
        padding: 6px 12px;
        margin-bottom: 8px;
        border-radius: 8px;
        background: rgba(255, 200, 0, 0.06);
    }

    .coins-shop-balance span:first-child {
        font-size: 10px;
    }

    .coins-shop-balance-amount {
        font-size: 14px;
    }

    .coins-tab-content {
        max-height: calc(92dvh - 130px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
    }

    .coins-shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 8px;
        padding-top: 10px;
    }

    .coins-pack {
        padding: 10px 6px 8px;
        border-radius: 10px;
        background: linear-gradient(145deg, rgba(32, 32, 45, 0.95), rgba(22, 22, 32, 0.95));
        border: 1px solid rgba(255, 200, 0, 0.12);
    }

    .coins-pack:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 200, 0, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .coins-pack-popular {
        border-color: rgba(0, 160, 255, 0.35);
        background: linear-gradient(145deg, rgba(0, 35, 55, 0.6), rgba(22, 22, 32, 0.95));
    }

    .coins-pack-best {
        border-color: rgba(255, 100, 0, 0.4);
        background: linear-gradient(145deg, rgba(55, 28, 0, 0.6), rgba(22, 22, 32, 0.95));
    }

    .coins-pack-amount {
        font-size: 15px;
        margin-bottom: 1px;
    }

    .coins-pack-icon {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .coins-pack-price {
        font-size: 9px;
    }

    .coins-pack-label {
        font-size: 7px;
        padding: 2px 6px;
        top: -8px;
        border-radius: 5px;
    }

    .coins-pack-bonus {
        font-size: 8px;
        padding: 1px 4px;
        top: 4px;
        right: 4px;
        border-radius: 4px;
    }

    .coins-shop-footer {
        padding-top: 8px;
        margin-top: 4px;
    }

    .coins-shop-footer p {
        font-size: 9px;
        opacity: 0.6;
    }

    .coins-history-list {
        max-height: calc(92dvh - 130px);
    }

    .transaction-item {
        padding: 8px 10px;
        margin-bottom: 5px;
        border-radius: 8px;
    }

    .transaction-desc {
        font-size: 10px;
    }

    .transaction-date {
        font-size: 8px;
    }

    .transaction-amount {
        font-size: 11px;
    }

    /* Help Modal - Landscape */
    .help-modal-content {
        max-height: 92dvh;
        width: auto;
        max-width: 700px;
        padding: 12px 15px;
        border-radius: 14px;
        overflow: hidden;
    }

    .help-modal-content > h2 {
        font-size: 14px;
        margin: 0 0 8px 0;
        padding-right: 35px;
    }

    .help-modal-content > h2 i {
        margin-right: 6px;
    }

    .help-modal-close {
        width: 26px;
        height: 26px;
        font-size: 11px;
        top: 10px;
        right: 10px;
    }

    /* Scrollable wrapper for help content */
    .help-modal-content .help-section {
        margin-bottom: 6px;
        padding: 8px 10px;
    }

    .help-modal-content .help-section:first-of-type {
        margin-top: 0;
    }

    .help-modal-content .help-section:last-of-type {
        margin-bottom: 0;
    }

    .help-section h3 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .help-section p {
        font-size: 11px;
        line-height: 1.4;
    }

    .help-keys {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .help-key {
        font-size: 11px;
        gap: 8px;
    }

    .help-key span {
        font-size: 10px;
        padding: 4px 8px;
        min-width: 55px;
    }

    .help-modes {
        gap: 8px;
    }

    .help-mode {
        padding: 8px;
        gap: 10px;
    }

    .help-mode i {
        font-size: 18px;
        min-width: 24px;
    }

    .help-mode strong {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .help-mode p {
        font-size: 10px;
        line-height: 1.3;
    }
}

/* Extra small height - very compact */
@media (max-height: 360px) and (orientation: landscape) {
    .coins-shop-container {
        padding: 8px 12px;
    }

    .coins-shop-header {
        margin-bottom: 6px;
        padding-bottom: 6px;
    }

    .coins-shop-header h2 {
        font-size: 13px;
    }

    .coins-shop-tabs {
        margin-bottom: 6px;
    }

    .coins-tab {
        padding: 5px 8px;
        font-size: 10px;
    }

    .coins-shop-balance {
        padding: 5px 10px;
        margin-bottom: 6px;
    }

    .coins-shop-grid {
        gap: 8px;
        padding-top: 8px;
    }

    .coins-pack {
        padding: 10px 6px 8px;
    }

    .coins-pack-amount {
        font-size: 14px;
    }

    .coins-pack-icon {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .coins-pack-price {
        font-size: 8px;
    }

    .coins-pack-label {
        font-size: 7px;
        padding: 2px 6px;
        top: -8px;
    }

    .help-modal-content {
        padding: 10px 12px;
    }

    .help-modal-content > h2 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .help-keys {
        grid-template-columns: repeat(3, 1fr);
    }

    .help-key span {
        min-width: 50px;
        padding: 3px 6px;
        font-size: 9px;
    }

    .help-key {
        font-size: 10px;
    }

    .help-section {
        margin-bottom: 6px;
        padding: 6px 8px;
    }

    .help-section h3 {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .help-mode {
        padding: 6px;
    }

    .help-mode i {
        font-size: 14px;
    }

    .help-mode strong {
        font-size: 11px;
    }

    .help-mode p {
        font-size: 9px;
    }
}

/* Mobile Tabs */
@media (max-width: 600px) {
    .coins-tab {
        padding: 8px 10px;
        font-size: 12px;
    }

    .coins-history-list {
        max-height: 280px;
    }

    .transaction-item {
        padding: 10px 12px;
    }

    .transaction-desc {
        font-size: 12px;
    }
}

/* =============================================
   TACTICAL MENU NAVIGATION - REDESIGN
   ============================================= */

.menu-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 20, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
    gap: 15px;
    min-height: 56px;
    position: relative;
}

.menu-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 170, 0, 0.4), transparent);
}

.menu-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
    padding: 6px 0;
}

.menu-login-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.menu-login-buttons .btn-primary {
    padding: 10px 18px;
    font-size: 13px;
    white-space: nowrap;
}

.menu-login-buttons .btn-steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border: 1px solid rgba(42, 71, 94, 0.6);
}

.menu-login-buttons .btn-steam:hover {
    background: linear-gradient(135deg, #2a3f55 0%, #3a5a7a 100%);
    border-color: rgba(58, 90, 122, 0.8);
}

.menu-tab {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #777;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 8px) 100%, 0 100%, 0 4px);
}

.menu-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffaa00, #ff8c00);
    transition: width 0.3s ease;
}

.menu-tab:hover {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.08);
    border-color: rgba(255, 170, 0, 0.15);
}

.menu-tab:hover::before {
    width: 100%;
}

.menu-tab.active {
    color: #ffaa00;
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.15) 0%, rgba(255, 140, 0, 0.08) 100%);
    border-color: rgba(255, 170, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.menu-tab.active::before {
    width: 100%;
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

.menu-tab i {
    margin-right: 6px;
    font-size: 14px;
}

.tab-new-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: newBadgePulse 2s ease-in-out infinite;
}

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

.menu-tab.tab-locked {
    opacity: 0.4;
    position: relative;
}

.menu-tab.tab-locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #ffaa00;
    opacity: 0.7;
}


/* Content Area */
.menu-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.menu-tab-content {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeInContent 0.4s ease;
}

.menu-tab-content.active {
    display: flex;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Play Tab - Desktop Layout: Modes (left) | Character (center) | Chat (right) */
.play-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px 40px;
    gap: 20px;
}

@media (max-height: 900px) {
    .play-content {
        padding: 15px 30px;
    }
}

@media (max-height: 768px) {
    .play-content {
        padding: 10px 20px;
    }
}

/* Режимы игры - СЛЕВА */
.play-left {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 320px;
}

/* Превью персонажа - ЦЕНТР */
.play-right {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Чат - СПРАВА */
.play-center {
    order: 3;
    display: flex;
    flex-direction: column;
    flex: 0 0 280px;
    height: 420px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 170, 0, 0.1);
}

/* =============================================
   TACTICAL PLAY MODE CARDS - REDESIGN
   ============================================= */

.play-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.play-mode-card {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(15, 15, 25, 0.9) 100%);
    border: 1px solid rgba(255, 170, 0, 0.12);
    border-left: 3px solid rgba(255, 170, 0, 0.3);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-mode-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 170, 0, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-mode-card:hover {
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.25);
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.95) 0%, rgba(20, 20, 35, 0.95) 100%);
}

.play-mode-card:hover::before,
.play-mode-card:hover::after {
    opacity: 1;
}

.play-mode-card.selected {
    border-left: 3px solid #ffaa00;
    border-color: rgba(255, 170, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.08) 0%, rgba(20, 15, 10, 0.95) 100%);
    box-shadow:
        0 0 20px rgba(255, 170, 0, 0.15),
        inset 0 0 30px rgba(255, 170, 0, 0.03);
}

.play-mode-card.selected::before {
    opacity: 1;
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.1) 0%, transparent 60%);
}

/* Пульсация карточек когда режим не выбран */
.play-mode-card.hint-pulse {
    animation: modeHintPulse 2s ease-in-out infinite;
}

@keyframes modeHintPulse {
    0%, 100% {
        border-left-color: rgba(255, 170, 0, 0.3);
    }
    50% {
        border-left-color: #ffaa00;
        box-shadow: 0 0 15px rgba(255, 170, 0, 0.2);
    }
}

.play-mode-icon {
    font-size: 26px;
    color: #ffaa00;
    text-shadow: 0 0 12px rgba(255, 170, 0, 0.4);
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.play-mode-card:hover .play-mode-icon {
    transform: scale(1.1);
    text-shadow: 0 0 18px rgba(255, 170, 0, 0.6);
}

.play-mode-card.selected .play-mode-icon {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { text-shadow: 0 0 12px rgba(255, 170, 0, 0.4); }
    50% { text-shadow: 0 0 20px rgba(255, 170, 0, 0.7); }
}

.play-mode-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.play-mode-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.2;
}

.play-mode-card.selected .play-mode-title {
    color: #ffcc66;
}

.play-mode-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

.play-mode-card:hover .play-mode-desc {
    color: #888;
}

.map-selector-group {
    width: 100%;
    margin-top: 5px;
}

.map-selector-group label {
    display: block;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-selector-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 170, 0, 0.25);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.map-selector-group select:hover {
    border-color: rgba(255, 170, 0, 0.6);
    background: rgba(0, 0, 0, 0.8);
}

.map-selector-group select:focus {
    outline: none;
    border-color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}

/* =============================================
   TACTICAL BUTTONS - REDESIGN
   ============================================= */

.play-actions {
    display: flex;
    margin-top: 12px;
}

#startButton {
    padding: 12px 28px;
    font-size: 13px;
}

.btn-primary {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, #ffaa00 0%, #ff9500 100%);
    border: none;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffbb33 0%, #ffaa00 100%);
    box-shadow: 0 6px 25px rgba(255, 170, 0, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 170, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary.btn-inactive {
    opacity: 0.5;
    background: linear-gradient(135deg, #555 0%, #666 100%);
    box-shadow: 0 2px 10px rgba(80, 80, 80, 0.3);
    color: #222;
}

.btn-primary.btn-inactive:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(80, 80, 80, 0.3);
}

.btn-primary.btn-inactive:hover::before {
    left: -100%;
}

/* Secondary Button (menu-btn) */
.menu-btn {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    background: linear-gradient(135deg, rgba(40, 40, 50, 0.9) 0%, rgba(30, 30, 40, 0.9) 100%);
    border: 1px solid rgba(255, 170, 0, 0.2);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
}

.menu-btn:hover {
    color: #ffaa00;
    background: linear-gradient(135deg, rgba(50, 50, 60, 0.95) 0%, rgba(40, 40, 50, 0.95) 100%);
    border-color: rgba(255, 170, 0, 0.4);
}

.menu-btn:active {
    transform: translateY(1px);
}

/* Character Preview Container */
.mode-preview {
    background:
        radial-gradient(circle at center, rgba(255, 170, 0, 0.1) 0%, transparent 70%),
        rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 170, 0, 0.1);
}

#menuCanvas {
    width: 280px;
    height: 360px;
    position: relative;
    z-index: 2;
    border-radius: 12px;
    display: block;
}

/* Character Loading Spinner */
.character-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.character-loader.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.character-loader.hidden .character-loader-spinner {
    animation: none;
}

.character-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 170, 0, 0.2);
    border-top-color: #ffaa00;
    border-radius: 50%;
    animation: characterSpin 0.8s linear infinite;
}

@keyframes characterSpin {
    to { transform: rotate(360deg); }
}

.mode-preview-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffaa00;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mode-preview-features {
    list-style: none;
    padding: 0;
    width: 100%;
}

.mode-preview-features li {
    padding: 15px 20px;
    margin: 10px 0;
    background: rgba(255, 170, 0, 0.05);
    border-left: 4px solid #ffaa00;
    border-radius: 8px;
    color: #ddd;
    font-size: 18px;
}

.mode-preview-features li i {
    margin-right: 15px;
    color: #ffaa00;
}

/* =============================================
   TACTICAL SETTINGS ICONS - REDESIGN
   ============================================= */

.menu-settings-icons {
    display: flex;
    gap: 6px;
}

.setting-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 1px solid rgba(255, 170, 0, 0.2);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setting-icon-btn:hover {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15) 0%, rgba(40, 35, 30, 0.9) 100%);
    border-color: rgba(255, 170, 0, 0.4);
    color: #ffaa00;
}

.setting-icon-btn.active {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2) 0%, rgba(40, 35, 30, 0.95) 100%);
    border-color: rgba(255, 170, 0, 0.5);
    color: #ffaa00;
}

/* Help Modal */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--backdrop-blur-light);
}

.help-modal.active {
    display: flex;
}

.help-modal-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #0d0d1a 100%);
    border: 2px solid rgba(255, 170, 0, 0.4);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    position: relative;
    box-shadow: 0 0 60px rgba(255, 170, 0, 0.2);
    /* Fix scrollbar clipping */
    scrollbar-gutter: stable;
}

.help-modal-content::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.help-modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 15px 0;
}

.help-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.4);
    border-radius: 3px;
}

.help-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    color: #ff6666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-close:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.1);
}

.help-modal-content h2 {
    color: #ffaa00;
    font-size: 28px;
    margin: 0 0 25px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.help-modal-content h2 i {
    margin-right: 10px;
}

.help-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid rgba(255, 170, 0, 0.5);
}

.help-section h3 {
    color: #ffaa00;
    font-size: 18px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-section p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.help-keys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.help-key {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aaa;
    font-size: 14px;
}

.help-key span {
    background: linear-gradient(145deg, #2a2a3e, #1a1a2a);
    color: #ffaa00;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    min-width: 70px;
    text-align: center;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.help-modes {
    display: grid;
    gap: 15px;
}

.help-mode {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.help-mode i {
    color: #ffaa00;
    font-size: 24px;
    min-width: 30px;
    margin-top: 3px;
}

.help-mode strong {
    color: #fff;
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.help-mode p {
    color: #999;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .help-modal-content {
        padding: 20px;
        max-height: 90vh;
    }

    .help-modal-content h2 {
        font-size: 22px;
    }

    .help-keys {
        grid-template-columns: 1fr;
    }

    .help-section {
        padding: 15px;
    }
}

/* Arsenal Tab Container */
#tab-arsenal {
    flex-direction: column;
}

#tab-arsenal .arsenal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Arsenal Content Scrollbar */
.arsenal-content::-webkit-scrollbar {
    width: 8px;
}

.arsenal-content::-webkit-scrollbar-track {
    background: rgba(255, 170, 0, 0.05);
    border-radius: 8px;
}

.arsenal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.6), rgba(255, 102, 0, 0.6));
    border-radius: 8px;
}

.arsenal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.9), rgba(255, 102, 0, 0.9));
}

/* Arsenal Tabs */
.arsenal-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 15px;
    background: rgba(20, 25, 35, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.arsenal-tab {
    padding: 10px 20px;
    background: rgba(30, 35, 45, 0.8);
    border: none;
    border-radius: 8px 8px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arsenal-tab:hover {
    background: rgba(40, 45, 55, 0.9);
    color: rgba(255, 255, 255, 0.8);
}

.arsenal-tab.active {
    background: rgba(50, 55, 65, 1);
    color: #ffaa00;
    border-bottom: 2px solid #ffaa00;
    margin-bottom: -1px;
}

.arsenal-tab i {
    font-size: 14px;
}

.arsenal-tab-content {
    display: none;
    padding: 20px 30px;
}

.arsenal-tab-content.active {
    display: block;
}

/* Equipment card quantity badge */
.equipment-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
}

.equipment-quantity i {
    font-size: 10px;
}

.equipment-quantity.empty {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.15);
}

/* Arsenal Grid - адаптивные карточки для разных экранов */
.arsenal-weapons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
    gap: 10px;
    padding: 15px;
    justify-content: center;
}

/* Большие экраны - крупнее карточки и шрифты */
@media (min-width: 1600px) {
    .arsenal-weapons-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 200px));
        gap: 12px;
        padding: 20px;
    }

    .weapon-card {
        padding: 8px;
        gap: 5px;
    }

    .weapon-card-inner {
        gap: 4px;
    }

    .weapon-name {
        font-size: 11px;
    }

    .weapon-ammo {
        font-size: 10px;
        padding: 3px 8px;
    }

    .weapon-status,
    .weapon-buy-btn,
    .weapon-requirement {
        font-size: 9px;
        padding: 5px 10px;
    }

    .weapon-price {
        font-size: 11px;
    }
}

/* Очень большие экраны (4K и выше) */
@media (min-width: 2000px) {
    .arsenal-weapons-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
        gap: 14px;
        padding: 25px;
    }

    .weapon-card {
        padding: 10px;
        gap: 6px;
    }

    .weapon-name {
        font-size: 12px;
    }

    .weapon-ammo {
        font-size: 11px;
    }

    .weapon-status,
    .weapon-buy-btn,
    .weapon-requirement {
        font-size: 10px;
        padding: 6px 12px;
    }

    .weapon-price {
        font-size: 12px;
    }
}

/* Средние экраны */
@media (max-width: 1200px) {
    .arsenal-weapons-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 170px));
        gap: 8px;
    }
}

/* Маленькие экраны */
@media (max-width: 900px) {
    .arsenal-weapons-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 150px));
        gap: 6px;
        padding: 10px;
    }
}

/* Leaderboard Content */
.leaderboard-content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.leaderboard-filters {
    display: flex;
    gap: 20px;
}

.filter-btn {
    padding: 12px 30px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 10px;
    color: #aaa;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.filter-btn:hover {
    color: #ffaa00;
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.filter-btn.active {
    color: #000;
    background: linear-gradient(135deg, #ffaa00, #ffdd00);
    border-color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

.leaderboard-table-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: var(--backdrop-blur-medium);
    overflow-y: auto;
}

.leaderboard-table-container::-webkit-scrollbar {
    width: 10px;
}

.leaderboard-table-container::-webkit-scrollbar-track {
    background: rgba(255, 170, 0, 0.05);
    border-radius: 10px;
}

.leaderboard-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.6), rgba(255, 102, 0, 0.6));
    border-radius: 10px;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.leaderboard-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.9), rgba(255, 102, 0, 0.9));
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.leaderboard-table thead th {
    padding: 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid rgba(255, 170, 0, 0.3);
}

.leaderboard-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 170, 0, 0.1);
    transform: translateX(5px);
}

.leaderboard-table tbody td {
    padding: 20px;
    color: #ddd;
    font-size: 18px;
    border-top: 1px solid rgba(255, 170, 0, 0.1);
    border-bottom: 1px solid rgba(255, 170, 0, 0.1);
}

.leaderboard-table tbody td:first-child {
    border-left: 1px solid rgba(255, 170, 0, 0.1);
    border-radius: 10px 0 0 10px;
}

.leaderboard-table tbody td:last-child {
    border-right: 1px solid rgba(255, 170, 0, 0.1);
    border-radius: 0 10px 10px 0;
}

.rank-medal {
    font-size: 24px;
    margin-right: 10px;
}

/* Footer */
.menu-footer {
    padding: 20px 60px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 170, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-version {
    color: #666;
    font-size: 14px;
}

.menu-links {
    display: flex;
    gap: 30px;
}

.menu-link {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.menu-link:hover {
    color: #ffaa00;
}

/* Stats Content */
.stats-content {
    padding: 60px;
    overflow-y: auto;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow-y: auto;
    padding: 20px;
}

.stats-grid::-webkit-scrollbar {
    width: 8px;
}

.stats-grid::-webkit-scrollbar-track {
    background: rgba(255, 170, 0, 0.05);
    border-radius: 10px;
}

.stats-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.6), rgba(255, 102, 0, 0.6));
    border-radius: 10px;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.stats-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.9), rgba(255, 102, 0, 0.9));
}

.stats-content::-webkit-scrollbar {
    width: 8px;
}

.stats-content::-webkit-scrollbar-track {
    background: rgba(255, 170, 0, 0.05);
    border-radius: 10px;
}

.stats-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.6), rgba(255, 102, 0, 0.6));
    border-radius: 10px;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.stats-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.9), rgba(255, 102, 0, 0.9));
}

.stat-card {
    background: 
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 170, 0, 0.03) 100%),
        rgba(10, 10, 25, 0.8);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: var(--backdrop-blur-heavy);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 170, 0, 0.3);
    border-color: rgba(255, 170, 0, 0.6);
}

.stat-icon {
    font-size: 48px;
    color: #ffaa00;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(255, 170, 0, 0.5));
}

.stat-label {
    font-size: 16px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffaa00, #ffdd00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.4));
}

.stat-value.green {
    background: linear-gradient(135deg, #00ff00, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value.red {
    background: linear-gradient(135deg, #ff0000, #ff5555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* Leaderboard extra info */
.leaderboard-extra-info {
    display: inline;
}

.leaderboard-extra-info.wave-info {
    color: #ffaa00;
    font-size: 14px;
}

.leaderboard-extra-info.xp-info {
    color: #888;
    font-size: 12px;
}

/* Responsive - Play Tab */
@media (max-width: 1400px) {
    .play-content {
        padding: 15px 25px;
    }

    .play-left {
        flex: 0 0 280px;
    }

    .play-center {
        flex: 0 0 250px;
        height: 380px;
    }

    #menuCanvas {
        width: 240px !important;
        height: 310px !important;
    }
}

@media (max-width: 1100px) {
    /* Скрываем чат на средних экранах */
    .play-center {
        display: none;
    }

    .play-content {
        justify-content: space-between;
    }

    .play-left {
        flex: 0 0 300px;
    }

    .play-right {
        flex: 1 1 auto;
    }
}

@media (max-width: 900px) {
    .play-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 15px;
        padding: 15px;
    }

    /* Персонаж слева, режимы справа */
    .play-right {
        order: 1;
        flex: 0 0 auto;
    }

    .play-left {
        order: 2;
        flex: 1;
    }

    .play-center {
        display: none;
    }

}

/* Auth Required Overlay */
.auth-required-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: var(--backdrop-blur-extra);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-required-content {
    text-align: center;
    padding: 60px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 170, 0, 0.03) 100%),
        rgba(10, 10, 25, 0.9);
    border: 2px solid rgba(255, 170, 0, 0.4);
    border-radius: 30px;
    backdrop-filter: var(--backdrop-blur-heavy);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

/* Lobby Chat - Game Style */
#lobbyChat {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    background: transparent;
}

#lobbyChatHeader {
    display: flex;
    align-items: center;
    padding: 0 0 12px 0;
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
    margin-bottom: 8px;
}

#lobbyChatHeader span {
    color: rgba(255, 170, 0, 0.7);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#lobbyChatHeader span i {
    margin-right: 8px;
    opacity: 0.6;
}

#lobbyChatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
    padding: 10px 0;
}

#lobbyChatMessages::-webkit-scrollbar {
    width: 3px;
}

/* ==================== TACTICAL MATCH END OVERLAY ==================== */
#matchEndOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5, 10, 20, 0.97) 0%, rgba(10, 15, 30, 0.98) 100%);
    z-index: 10000;
    font-family: 'Rajdhani', sans-serif;
    justify-content: center;
    align-items: center;
    animation: matchEndFadeIn 0.5s ease;
}

@keyframes matchEndFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.match-end-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.match-end-title {
    font-size: 48px;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(0, 212, 255, 0.3);
    margin-bottom: 5px;
    animation: matchTitlePulse 2s ease infinite;
}

@keyframes matchTitlePulse {
    0%, 100% { text-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(0, 212, 255, 0.3); }
    50% { text-shadow: 0 0 50px rgba(0, 212, 255, 0.8), 0 0 100px rgba(0, 212, 255, 0.5); }
}

.match-end-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

#matchEndPodium {
    width: 100%;
    max-width: 700px;
    height: 280px;
    margin: 0 auto 20px;
}

#matchEndCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#matchEndPlayers {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 15px;
}

.match-end-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(15, 15, 25, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    transition: all 0.3s ease;
    min-width: 130px;
}

.match-end-player.place-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    border-left: 3px solid #ffd700;
    transform: scale(1.05);
    order: 2;
}

.match-end-player.place-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(192, 192, 192, 0.4);
    border-left: 3px solid #c0c0c0;
    order: 1;
}

.match-end-player.place-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(205, 127, 50, 0.4);
    border-left: 3px solid #cd7f32;
    order: 3;
}

.match-end-place {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.place-1 .match-end-place { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.place-2 .match-end-place { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.place-3 .match-end-place { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

.match-end-avatar {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.place-1 .match-end-avatar { border-color: rgba(255, 215, 0, 0.6); }
.place-2 .match-end-avatar { border-color: rgba(192, 192, 192, 0.5); }
.place-3 .match-end-avatar { border-color: rgba(205, 127, 50, 0.5); }

.match-end-nickname {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-end-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #aaa;
}

.match-end-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.match-end-stat i {
    font-size: 10px;
}

.match-end-stat.kills { color: #4ade80; }
.match-end-stat.deaths { color: #f87171; }
.match-end-stat.xp { color: #00ff88; }

.match-end-timer {
    font-size: 16px;
    color: #666;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.2);
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    margin-top: 20px;
}

#matchEndCountdown {
    color: #00d4ff;
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* XP Progress in Match End Screen - Tactical Style */
@keyframes levelUpPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes xpGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
    }
}

@keyframes xpGainedPulse {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    }
}

.match-end-xp-progress {
    animation: xpGlow 2s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(10, 15, 25, 0.8)) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

/* ==================== ZOMBIE ACHIEVEMENTS ==================== */

/* Контейнер вкладки */
#tab-achievements.active {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

#tab-achievements .stats-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Сетка достижений */
#achievementsGrid {
    display: block;
}

/* Загрузка */
.achievements-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #ffaa00;
}

.achievements-loading i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

/* Группа достижений */
.achievements-group {
    margin-bottom: 25px;
}

.achievements-group:last-child {
    margin-bottom: 0;
}

.achievements-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.achievements-group-header i {
    font-size: 18px;
}

.achievements-group-header h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
}

/* Сетка карточек - адаптивная */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Карточка достижения */
.achievement-card {
    background: linear-gradient(180deg, rgba(30,30,45,0.95) 0%, rgba(20,20,30,0.98) 100%);
    border: 1px solid rgba(80,80,100,0.3);
    border-radius: 8px;
    padding: 14px;
    position: relative;
    overflow: hidden;
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-card.claimable {
    border-color: rgba(255,200,0,0.5);
    background: linear-gradient(180deg, rgba(50,45,20,0.95) 0%, rgba(30,25,15,0.98) 100%);
    cursor: pointer;
}

.achievement-card.claimable:hover {
    border-color: rgba(255,200,0,0.8);
    box-shadow: 0 4px 15px rgba(255,200,0,0.2);
}

.achievement-card.claimed {
    border-color: rgba(0,200,100,0.4);
    background: linear-gradient(180deg, rgba(20,40,30,0.95) 0%, rgba(15,30,20,0.98) 100%);
}

/* Шапка карточки */
.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

.achievement-name {
    font-size: 14px;
    font-weight: 600;
    color: #eee;
}

.achievement-rewards {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.4);
    font-size: 10px;
    color: #ccc;
}

.reward-item i.fa-coins { color: #ffc107; }
.reward-item i.fa-bolt { color: #4ade80; }

/* Описание */
.achievement-desc {
    font-size: 11px;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Прогресс */
.achievement-progress-wrap {
    margin-bottom: 8px;
}

.achievement-progress-bar {
    height: 4px;
    background: rgba(0,0,0,0.5);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9500, #ffcc00);
    border-radius: 2px;
}

.achievement-card.locked .achievement-progress-fill {
    background: linear-gradient(90deg, #444, #555);
}

.achievement-card.claimed .achievement-progress-fill {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.achievement-progress-text {
    font-size: 9px;
    color: #666;
    text-align: right;
}

/* Статус */
.achievement-status {
    text-align: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.achievement-status.locked {
    background: rgba(60,60,60,0.4);
    color: #666;
}

.achievement-status.claimable {
    background: linear-gradient(135deg, rgba(255,180,0,0.3), rgba(255,140,0,0.2));
    color: #ffc107;
}

.achievement-status.claimed {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
}

/* Mobile adaptations for match end overlay */
@media (max-width: 768px), (pointer: coarse) {
    .match-end-content {
        padding: 8px;
        gap: 5px;
        justify-content: flex-start;
        height: 100%;
    }

    .match-end-title {
        font-size: 16px;
        letter-spacing: 2px;
        margin-bottom: 5px;
    }

    .match-end-subtitle {
        font-size: 10px;
        letter-spacing: 2px;
    }

    #matchEndPodium {
        width: 100%;
        max-width: none;
        height: 40vh;
        min-height: 140px;
        max-height: 200px;
        margin-bottom: 8px;
    }

    #matchEndPlayers {
        gap: 6px;
        flex-wrap: nowrap;
        padding: 0 5px;
        margin-bottom: 8px;
    }

    .match-end-player {
        padding: 6px;
        min-width: 85px;
        max-width: 95px;
        border-radius: 8px;
    }

    .match-end-player.place-1 {
        transform: scale(1.02);
    }

    .match-end-place {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .match-end-avatar {
        width: 28px;
        height: 28px;
        border-width: 2px;
        margin-bottom: 4px;
    }

    .match-end-nickname {
        font-size: 9px;
        max-width: 70px;
        margin: 2px 0;
    }

    .match-end-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
        font-size: 8px;
    }

    .match-end-stat {
        padding: 1px 3px;
    }

    .match-end-stat i {
        font-size: 8px;
    }

    .match-end-timer {
        font-size: 10px;
        padding: 4px 8px;
        margin-top: auto;
    }

    #matchEndCountdown {
        font-size: 12px;
    }

    /* XP Progress mobile styles */
    .match-end-xp-progress {
        margin: 8px auto;
        padding: 10px 15px;
        max-width: 280px;
    }

    .match-end-xp-progress .xp-level-up {
        font-size: 16px !important;
    }

    .match-end-xp-progress .xp-gained {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .match-end-xp-progress .xp-bar-container {
        height: 8px !important;
    }

    .match-end-xp-progress .xp-text {
        font-size: 11px !important;
    }
}

/* Extra small mobile screens (landscape) */
@media (max-height: 400px) and (pointer: coarse) {
    .match-end-content {
        padding: 5px 10px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
    }

    .match-end-title {
        font-size: 12px;
        width: 100%;
        text-align: center;
        margin-bottom: 3px;
    }

    #matchEndPodium {
        height: 60vh;
        min-height: 100px;
        max-height: 150px;
        width: 48%;
        margin: 0 2% 0 0;
    }

    #matchEndPlayers {
        width: 48%;
        flex-direction: column;
        gap: 3px;
        margin: 0;
        padding: 0;
        align-items: stretch;
    }

    .match-end-player {
        padding: 4px 6px;
        min-width: 0;
        max-width: none;
        width: 100%;
        flex-direction: row;
        gap: 6px;
        align-items: center;
    }

    .match-end-player.place-1 {
        transform: none;
        order: 1;
    }

    .match-end-player.place-2 {
        order: 2;
    }

    .match-end-player.place-3 {
        order: 3;
    }

    .match-end-place {
        font-size: 11px;
        margin: 0;
        min-width: 20px;
    }

    .match-end-avatar {
        width: 22px;
        height: 22px;
        margin: 0;
        flex-shrink: 0;
    }

    .match-end-nickname {
        font-size: 9px;
        max-width: 50px;
        margin: 0;
        flex: 1;
    }

    .match-end-stats {
        gap: 4px;
        font-size: 8px;
        margin-left: auto;
        flex-wrap: nowrap;
    }

    .match-end-timer {
        width: 100%;
        font-size: 9px;
        margin-top: 3px;
        padding: 3px;
    }

    #matchEndCountdown {
        font-size: 11px;
    }

    /* XP Progress extra small styles */
    .match-end-xp-progress {
        margin: 5px auto;
        padding: 6px 10px;
        max-width: 200px;
        width: auto;
    }

    .match-end-xp-progress .xp-level-up {
        font-size: 12px !important;
        margin-bottom: 5px !important;
    }

    .match-end-xp-progress .xp-gained {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }

    .match-end-xp-progress .xp-bar-container {
        height: 6px !important;
        margin-bottom: 4px !important;
    }

    .match-end-xp-progress .xp-text {
        font-size: 9px !important;
    }
}

#lobbyChatMessages::-webkit-scrollbar-track {
    background: transparent;
}

#lobbyChatMessages::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.2);
    border-radius: 2px;
}

.lobby-chat-msg {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 8px;
    padding-right: 36px;
    background: transparent;
    border-radius: 0;
    transition: background 0.2s;
    border-left: 2px solid transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    text-decoration: none !important;
}

.lobby-chat-msg * {
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.lobby-chat-msg:hover {
    background: rgba(255, 170, 0, 0.05);
    border-left-color: rgba(255, 170, 0, 0.3);
}

.lobby-chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    opacity: 0.9;
}

.lobby-chat-content {
    flex: 1;
    min-width: 0;
}

.lobby-chat-author {
    color: #ffaa00;
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 1px;
    opacity: 0.9;
    text-decoration: none !important;
    cursor: default;
    pointer-events: none;
}

.lobby-chat-author.admin {
    color: #dc143c;
}

.admin-badge {
    background: linear-gradient(135deg, #dc143c, #8b0000);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.lobby-chat-level {
    color: #ff8e00;
    font-weight: 500;
    font-size: 9px;
    margin-left: 5px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    text-decoration: none !important;
    pointer-events: none;
}

.lobby-chat-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    word-wrap: break-word;
    line-height: 1.35;
}

.lobby-chat-time {
    color: rgba(255, 255, 255, 0.25);
    font-size: 9px;
    margin-top: 2px;
}

#lobbyChatInputArea {
    display: flex;
    gap: 8px;
    padding: 12px 0 0 0;
    border-top: 1px solid rgba(255, 170, 0, 0.15);
    margin-top: 8px;
}

#lobbyChatInput {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 170, 0, 0.15);
    border-radius: 6px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    outline: none;
    transition: all 0.2s;
}

#lobbyChatInput:focus {
    border-color: rgba(255, 170, 0, 0.4);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.1);
}

#lobbyChatInput::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

#lobbyChatSend {
    background: transparent;
    border: 1px solid rgba(255, 170, 0, 0.4);
    border-radius: 6px;
    padding: 10px 14px;
    color: #ffaa00;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

#lobbyChatSend:hover {
    background: rgba(255, 170, 0, 0.15);
    border-color: rgba(255, 170, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.2);
}

#lobbyChatSend:active {
    transform: scale(0.95);
}

.lobby-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.lobby-chat-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    color: rgba(255, 170, 0, 0.2);
}

/* Level Up Notification - In-Game (Compact Side) */
#levelUpNotification {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateX(-100%) translateY(-50%);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

#levelUpNotification.show {
    opacity: 1;
    transform: translateX(20px) translateY(-50%);
}

.level-up-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 30, 0.95) 100%);
    border: 2px solid rgba(255, 170, 0, 0.6);
    border-left: 4px solid #ffaa00;
    border-radius: 0 12px 12px 0;
    backdrop-filter: var(--backdrop-blur-medium);
    box-shadow:
        0 0 30px rgba(255, 170, 0, 0.25),
        0 4px 20px rgba(0, 0, 0, 0.5);
    animation: levelUpGlow 1.5s ease-in-out infinite alternate;
}

@keyframes levelUpGlow {
    0% {
        box-shadow:
            0 0 30px rgba(255, 170, 0, 0.25),
            0 4px 20px rgba(0, 0, 0, 0.5);
    }
    100% {
        box-shadow:
            0 0 40px rgba(255, 170, 0, 0.4),
            0 4px 25px rgba(0, 0, 0, 0.5);
    }
}

.level-up-icon {
    font-size: 28px;
    color: #ffaa00;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.8);
    animation: levelUpIconPulse 0.5s ease-in-out infinite alternate;
}

@keyframes levelUpIconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.level-up-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.level-up-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
}

.level-up-level {
    font-family: 'Rajdhani', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #ffdd00 0%, #ffaa00 50%, #ff8800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(255, 170, 0, 0.5));
    animation: levelNumber 0.5s ease-out;
}

@keyframes levelNumber {
    0% {
        transform: scale(0.5) translateX(-10px);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) translateX(0);
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

.level-up-subtitle {
    display: none;
}

.level-up-unlock {
    padding: 4px 10px;
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.08) 100%);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    color: #00ff88;
    letter-spacing: 0.5px;
    white-space: nowrap;
    animation: unlockPulse 1s ease-in-out infinite alternate;
}

.level-up-unlock i {
    margin-right: 4px;
}

@keyframes unlockPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* =========================================
   Mobile Chat FAB & Bottom Sheet
   ========================================= */

/* FAB кнопка - левый нижний угол */
.mobile-chat-fab {
    display: none;
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 170, 0, 0.4);
    color: #ffaa00;
    font-size: 18px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-chat-fab:active {
    transform: scale(0.93);
    background: rgba(255, 170, 0, 0.15);
}

.mobile-chat-fab i {
    line-height: 1;
}

/* Бейдж непрочитанных */
.mobile-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e53935;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.mobile-chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: var(--backdrop-blur-light);
    z-index: 1001;
}

.mobile-chat-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Modal - центрированная карточка */
.mobile-chat-sheet {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 340px;
    max-width: 90vw;
    height: auto;
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(18, 18, 28, 0.98), rgba(12, 12, 20, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 14px;
    z-index: 1002;
    flex-direction: column;
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 170, 0, 0.08);
}

.mobile-chat-sheet.active {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Header */
.mobile-chat-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 170, 0, 0.1);
}

.mobile-chat-sheet-title {
    color: rgba(255, 170, 0, 0.7);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mobile-chat-sheet-title i {
    margin-right: 6px;
    opacity: 0.6;
}

.mobile-chat-sheet-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    padding: 6px;
    cursor: pointer;
}

/* Messages */
.mobile-chat-sheet-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    min-height: 200px;
    max-height: 45vh;
    -webkit-overflow-scrolling: touch;
}

.mobile-chat-sheet-messages::-webkit-scrollbar {
    width: 2px;
}

.mobile-chat-sheet-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 170, 0, 0.15);
    border-radius: 1px;
}

/* Input - компактный */
.mobile-chat-sheet-input {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 170, 0, 0.1);
    background: rgba(0, 0, 0, 0.15);
}

.mobile-chat-sheet-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 170, 0, 0.15);
    border-radius: 18px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.mobile-chat-sheet-input input:focus {
    border-color: rgba(255, 170, 0, 0.4);
}

.mobile-chat-sheet-input input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.mobile-chat-sheet-input button {
    width: 38px;
    height: 38px;
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid rgba(255, 170, 0, 0.4);
    border-radius: 50%;
    color: #ffaa00;
    font-size: 14px;
    cursor: pointer;
}

.mobile-chat-sheet-input button:active {
    transform: scale(0.95);
}

/* FAB виден на экранах <1200px */
@media (max-width: 1200px) {
    .mobile-chat-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Ландшафтный режим телефона */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-chat-sheet {
        width: 320px;
        max-height: 92vh;
    }

    .mobile-chat-sheet-header {
        padding: 10px 12px;
    }

    .mobile-chat-sheet-messages {
        min-height: 120px;
        max-height: calc(92vh - 100px);
    }

    .mobile-chat-sheet-input {
        padding: 8px 10px;
    }

    .mobile-chat-sheet-input input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .mobile-chat-sheet-input button {
        width: 34px;
        height: 34px;
    }
}

/* ==================== MULTIPLAYER MODE SELECTOR ==================== */
/* =============================================
   TACTICAL MULTIPLAYER MODE SELECTOR - REDESIGN
   ============================================= */

.mp-mode-selector {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.mp-mode-selector.active {
    display: flex;
    animation: mpModalFadeIn 0.3s ease;
}

@keyframes mpModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mp-mode-content {
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(255, 170, 0, 0.25);
    border-left: 3px solid #ffaa00;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    padding: 30px 35px;
    max-width: 520px;
    width: 92%;
    position: relative;
    box-shadow:
        0 0 60px rgba(255, 170, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: mpContentSlide 0.3s ease;
}

@keyframes mpContentSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mp-mode-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 170, 0, 0.3) 50%);
}

.mp-mode-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 50%, rgba(255, 170, 0, 0.2) 50%);
}

.mp-mode-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffaa00;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
    position: relative;
    padding-bottom: 12px;
}

.mp-mode-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffaa00, transparent);
}

.mp-mode-cards {
    display: flex;
    gap: 16px;
}

.mp-mode-card {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(15, 15, 25, 0.8) 100%);
    border: 1px solid rgba(255, 170, 0, 0.15);
    border-left: 3px solid rgba(255, 170, 0, 0.4);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    padding: 22px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mp-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mp-mode-card:hover {
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 170, 0, 0.15);
}

.mp-mode-card:hover::before {
    opacity: 1;
}

.mp-mode-card.selected {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.12) 0%, rgba(20, 15, 10, 0.95) 100%);
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.5);
    box-shadow:
        0 0 30px rgba(255, 170, 0, 0.2),
        inset 0 0 30px rgba(255, 170, 0, 0.05);
}

.mp-mode-card.selected::before {
    opacity: 1;
}

.mp-mode-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #ffaa00;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.mp-mode-icon {
    font-size: 36px;
    color: #ffaa00;
    margin-bottom: 14px;
    text-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.mp-mode-card:hover .mp-mode-icon {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(255, 170, 0, 0.7);
}

.mp-mode-card.selected .mp-mode-icon {
    animation: mpIconPulse 1.5s ease-in-out infinite;
}

@keyframes mpIconPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 170, 0, 0.5); }
    50% { text-shadow: 0 0 35px rgba(255, 170, 0, 0.8); }
}

.mp-mode-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mp-mode-card.selected .mp-mode-name {
    color: #ffcc66;
}

.mp-mode-card-info {
    flex: 1;
    min-width: 0;
}

.mp-mode-desc {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.4;
}

.mp-mode-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mp-mode-card:hover .mp-mode-desc {
    color: #999;
}

.mp-mode-map {
    font-size: 11px;
    color: rgba(255, 170, 0, 0.8);
    margin-bottom: 0;
    padding: 4px 10px;
    background: rgba(255, 170, 0, 0.08);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
}

.mp-mode-map i {
    font-size: 10px;
    opacity: 0.8;
}

.mp-mode-online {
    font-size: 13px;
    color: #4ade80;
    padding: 6px 14px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.mp-mode-online i {
    font-size: 11px;
}

.mp-mode-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.mp-mode-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.mp-mode-cancel {
    background: linear-gradient(135deg, rgba(60, 60, 70, 0.9) 0%, rgba(40, 40, 50, 0.9) 100%);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.mp-mode-cancel:hover {
    background: linear-gradient(135deg, rgba(80, 80, 90, 0.95) 0%, rgba(60, 60, 70, 0.95) 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.mp-mode-play {
    background: linear-gradient(135deg, #ffaa00 0%, #ff9500 100%);
    color: #000;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    box-shadow: 0 4px 20px rgba(255, 170, 0, 0.35);
}

.mp-mode-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.mp-mode-play:hover::before {
    left: 100%;
}

.mp-mode-play:hover {
    background: linear-gradient(135deg, #ffbb33 0%, #ffaa00 100%);
    box-shadow: 0 6px 30px rgba(255, 170, 0, 0.45);
    transform: translateY(-1px);
}

.mp-mode-play:active {
    transform: translateY(1px);
    box-shadow: 0 2px 15px rgba(255, 170, 0, 0.3);
}

/* =============================================
   MULTIPLAYER MODE SELECTOR - MOBILE ADAPTATION
   ============================================= */

@media (max-width: 768px), (pointer: coarse) {
    .mp-mode-content {
        padding: 20px 18px;
        max-width: 360px;
        width: 94%;
        clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    }

    .mp-mode-content::before {
        width: 14px;
        height: 14px;
    }

    .mp-mode-content::after {
        width: 14px;
        height: 14px;
    }

    .mp-mode-title {
        font-size: 16px;
        margin-bottom: 18px;
        letter-spacing: 2px;
        padding-bottom: 10px;
    }

    .mp-mode-title::after {
        width: 50px;
    }

    .mp-mode-cards {
        flex-direction: column;
        gap: 10px;
    }

    .mp-mode-card {
        padding: 14px 16px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
    }

    .mp-mode-card.selected::after {
        width: 16px;
        height: 16px;
        top: 6px;
        right: 6px;
    }

    .mp-mode-icon {
        font-size: 28px;
        margin-bottom: 0;
        flex-shrink: 0;
        width: 44px;
        text-align: center;
    }

    .mp-mode-card-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mp-mode-name {
        font-size: 14px;
        margin-bottom: 0;
        letter-spacing: 1px;
    }

    .mp-mode-desc {
        font-size: 11px;
        margin-bottom: 4px;
        color: #666;
    }

    .mp-mode-map {
        font-size: 10px;
        margin-bottom: 0;
        padding: 3px 8px;
    }

    .mp-mode-map i {
        font-size: 9px;
    }

    .mp-mode-online {
        font-size: 11px;
        padding: 4px 10px;
        clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
    }

    .mp-mode-online i {
        font-size: 10px;
    }

    .mp-mode-meta {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 4px;
    }

    .mp-mode-actions {
        gap: 10px;
        margin-top: 18px;
    }

    .mp-mode-btn {
        padding: 12px 16px;
        font-size: 13px;
        letter-spacing: 1px;
        clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    }
}

@media (max-width: 400px) {
    .mp-mode-content {
        padding: 16px 14px;
        width: 96%;
    }

    .mp-mode-title {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .mp-mode-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .mp-mode-icon {
        font-size: 24px;
        width: 38px;
    }

    .mp-mode-name {
        font-size: 13px;
    }

    .mp-mode-desc {
        font-size: 10px;
    }

    .mp-mode-btn {
        padding: 11px 14px;
        font-size: 12px;
    }
}

/* ===================== Customization Tabs ===================== */

/* Контейнер кастомизации - как арсенал */
#tab-customization {
    flex-direction: column;
}

#tab-customization .customization-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.customization-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.customization-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 15px;
    background: rgba(20, 25, 35, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.customization-tab {
    padding: 10px 20px;
    background: rgba(30, 35, 45, 0.8);
    border: none;
    border-radius: 8px 8px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customization-tab:hover {
    background: rgba(40, 45, 55, 0.9);
    color: rgba(255, 255, 255, 0.8);
}

.customization-tab.active {
    background: rgba(50, 55, 65, 1);
    color: #ffaa00;
    border-bottom: 2px solid #ffaa00;
    margin-bottom: -1px;
}

.customization-tab i {
    font-size: 14px;
}

.customization-tab-content {
    display: none;
    flex: 1;
    width: 100%;
    min-height: 0;
}

.customization-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Hats Shop - Full Width */
.hats-shop-content {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

.hats-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
    gap: 10px;
    width: 100%;
    justify-content: center;
}

/* Hat card preview canvas - квадратный для правильных пропорций */
.hats-shop-grid .weapon-preview-canvas {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
}

.hats-shop-grid .weapon-preview-container {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hat-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hat-status.equipped {
    color: #4ade80;
}

.hat-status i {
    font-size: 14px;
}

/* Scrollbar для customization wrapper */
#tab-customization .customization-wrapper::-webkit-scrollbar {
    width: 8px;
}

#tab-customization .customization-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 170, 0, 0.05);
    border-radius: 8px;
}

#tab-customization .customization-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.6), rgba(255, 102, 0, 0.6));
    border-radius: 8px;
}

#tab-customization .customization-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.9), rgba(255, 102, 0, 0.9));
}

.weapon-card .equip-btn {
    background: linear-gradient(145deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.3));
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.weapon-card .equip-btn:hover {
    background: linear-gradient(145deg, rgba(74, 222, 128, 0.3), rgba(34, 197, 94, 0.4));
}

/* Mobile responsiveness for customization tabs - дополнительные стили */
@media (max-width: 768px) {
    .customization-tab {
        padding: 6px 12px;
        font-size: 10px;
        gap: 4px;
    }

    .customization-tab i {
        font-size: 11px;
    }

    /* Компактный грид кепок как в арсенале */
    .hats-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 100px)) !important;
        gap: 6px !important;
        padding: 5px !important;
    }

    .hats-shop-content {
        padding: 8px !important;
    }

    .hats-shop-grid .weapon-card {
        padding: 4px !important;
        gap: 2px !important;
    }

    .hats-shop-grid .weapon-card-inner {
        gap: 2px !important;
    }

    .hats-shop-grid .weapon-name {
        font-size: 8px !important;
        padding: 1px 2px !important;
    }

    .hats-shop-grid .weapon-preview-container {
        padding: 2px !important;
    }

    .hats-shop-grid .weapon-price {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }

    .hats-shop-grid .weapon-buy-btn {
        font-size: 8px !important;
        padding: 3px 6px !important;
    }

    .hats-shop-grid .hat-status {
        font-size: 8px !important;
        height: 16px !important;
    }

    .hats-shop-grid .hat-status i {
        font-size: 10px !important;
    }
}

