.map-select {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.map-select select {
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.35);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.version-tag {
    margin-left: 0.75rem;
    opacity: 0.9;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* pop-in анимация для меню */
@keyframes popIn {
    0% { opacity: 0; transform: translateY(6px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

#ui-container.pop-in { animation: popIn 280ms ease; }
#menuButton.menu-button { pointer-events: auto; }
body:hover #menuButton.menu-button { opacity: 0.25; }
body:hover #menuButton.menu-button:hover { opacity: 1; }
#menuButton.menu-button {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
    opacity: 0; /* скрыта по умолчанию */
}

/* Левая кнопка игрового меню */
#gameMenuButton.menu-button.left {
    left: 16px;
    right: auto;
}

#menuButton.menu-button:hover {
    transform: translateY(-1px) scale(1.06);
    opacity: 1; /* появляется при наведении */
    box-shadow: 0 10px 28px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.35);
}

#menuButton.menu-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(64,196,255,0.45), 0 10px 28px rgba(0,0,0,0.45);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    background: transparent;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: static;
}

/* Интерактивный фон */
.interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
    pointer-events: none; /* чтобы клики проходили сквозь фон */
}

/* Стекломорфизм для подложки */
.glass {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 250ms ease, transform 250ms ease;
}

#ui-container.hidden-ui {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
}

/* Шкала стамины */
.stamina-wrap {
    position: fixed;
    left: 50%;
    bottom: -40px;
    transform: translateX(-50%);
    width: 280px;
    height: 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    z-index: 1001;
    transition: bottom 300ms ease;
}

.stamina-wrap.visible { bottom: 16px; }

.stamina-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #40c4ff, #69f0ae);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
    transition: width 120ms linear;
}

/* Удален фон: canvas не используется */

/* Анимация для частиц */
@keyframes particleFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

/* Анимация для фоновых элементов */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) scale(1.05);
        opacity: 0.7;
    }
}

/* Анимация для волн */
@keyframes waveExpand {
    0% {
        opacity: 0.9;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.0);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}


.container {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    background: transparent;
}

.title-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 1.5rem;
}

h1 {
    color: #ffffff;
    font-size: 3rem;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.big-button {
    width: 350px;
    height: 100px;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.big-button::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;
}

.big-button:hover::before {
    left: 100%;
}

.big-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.big-button:active {
    transform: translateY(-2px);
}

.button-proxmox {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.button-proxmox:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
}

.button-nextcloud {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.button-nextcloud:hover {
    background: linear-gradient(45deg, #2980b9, #1f618d);
}

.button-vm {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
}

.button-vm:hover {
    background: linear-gradient(45deg, #229954, #1e8449);
}

.button-icon {
    font-size: 2rem;
}

.button-text {
    font-size: 1.3rem;
    font-weight: bold;
}

.button-description {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: normal;
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .big-button {
        width: 300px;
        height: 90px;
        font-size: 1.2rem;
        /* Улучшаем тачскрин */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .button-icon {
        font-size: 1.5rem;
    }
    
    .button-text {
        font-size: 1.1rem;
    }
    
    /* Оптимизация фона для мобильных */
    #fluid-canvas {
        /* Уменьшаем нагрузку на GPU */
        will-change: transform;
        transform: translateZ(0);
    }
}

@media (max-width: 480px) {
    .big-button {
        width: 250px;
        height: 80px;
        font-size: 1rem;
        /* Улучшаем отзывчивость на маленьких экранах */
        min-height: 44px; /* Минимальный размер для тачскрина */
    }
    
    .button-icon {
        font-size: 1.2rem;
    }
    
    .button-text {
        font-size: 0.9rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* Оптимизация производительности */
@media (max-width: 768px) {
    /* Уменьшаем количество анимированных элементов на мобильных */
    .bg-element {
        animation-duration: 8s; /* Медленнее для экономии батареи */
    }
    
    /* Отключаем некоторые эффекты на слабых устройствах */
    @media (max-width: 480px) and (max-height: 600px) {
        .bg-element {
            display: none; /* Скрываем фоновые элементы на очень маленьких экранах */
        }
    }
}

/* Улучшения для тачскрина */
.big-button {
    /* Убираем выделение при касании */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Улучшаем отзывчивость */
    touch-action: manipulation;
}

/* Предотвращаем зум при двойном тапе */
* {
    touch-action: manipulation;
}

/* Оптимизация для слабых устройств */
@media (prefers-reduced-motion: reduce) {
    .bg-element {
        animation: none;
    }
    
    .big-button {
        transition: none;
    }
}
