/* Мобильные стили */
@media (max-width: 768px) {
    /* Скрываем десктопные элементы (кроме главного меню) */
    .desktop-only {
        display: none !important;
    }

    /* Показываем мобильные элементы */
    .mobile-only {
        display: block !important;
    }

    /* Главное меню теперь видно на всех устройствах */
    #startScreen {
        display: block !important;
    }

    /* Мобильное управление */
    #mobileControls {
        position: fixed;
        bottom: 20px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        padding: 0 20px;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.3);
        border-top: 2px solid gold;
    }

    .control-btn {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.3);
        border: 3px solid gold;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 32px;
        font-weight: bold;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .control-btn:active {
        background: rgba(255, 255, 255, 0.5);
        transform: scale(0.9);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    /* Мобильное меню */
    #mobileMenu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 2000;
    }

    /* Адаптивные стили для кнопок главного меню на мобильных */
    #main-menu .menu-btn {
        width: 90%;
        max-width: 400px;
        padding: 20px;
        margin: 15px;
        background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
        border: 2px solid gold;
        border-radius: 15px;
        color: white;
        font-size: 20px;
        font-weight: bold;
        text-align: center;
        transition: all 0.3s;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #main-menu .menu-btn:active,
    #main-menu .menu-btn:focus {
        background: linear-gradient(to bottom, #5a5a5a, #3a3a3a);
        transform: scale(0.95);
        outline: none;
    }

    #main-menu .menu-btn:hover {
        background: linear-gradient(to bottom, #5a5a5a, #3a3a3a);
        transform: scale(1.02);
    }

    /* Специальные стили для кнопки "Назад в игру" */
    #back-to-game-btn {
        background: linear-gradient(to bottom, #666, #444) !important;
        border-color: #888 !important;
    }

    #back-to-game-btn:hover {
        background: linear-gradient(to bottom, #777, #555) !important;
    }

    #back-to-game-btn:active {
        background: linear-gradient(to bottom, #555, #333) !important;
    }

    /* Кнопка меню */
    #menuBtn {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.3);
        border: 3px solid gold;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 28px;
        font-weight: bold;
        z-index: 1000;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: all 0.3s;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    #menuBtn:active {
        background: rgba(255, 255, 255, 0.5);
        transform: scale(0.9);
    }

    /* Адаптация UI */
    #gameCanvas {
        width: 100vw;
        height: 100vh;
    }

    /* Скрываем мини-карту на мобильных */
    #minimap {
        display: none;
    }

    /* Адаптируем UI элементы */
    .ui-element {
        font-size: 16px;
        padding: 8px;
    }

    /* Предотвращаем масштабирование и выделение */
    * {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Специальные стили для кнопок */
    button, .menu-btn, #menuBtn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
} 