/* Общие стили */
body {
    padding: 0;
    margin: 0;
    overflow: hidden; /* Убираем прокрутку */
}

/* Контейнер Unity */
#unity-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

    /* Для ПК: центрирование контейнера */
    #unity-container.unity-desktop {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* Для мобильных: растягиваем на весь экран */
    #unity-container.unity-mobile {
        position: fixed;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
    }

/* Канвас Unity */
#unity-canvas {
    width: 100%;
    height: 100%;
    background: #231F20;
}

/* Загрузочный экран */
#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    width: 80%; /* Адаптивная ширина */
    max-width: 800px; /* Максимальная ширина для ПК */
    text-align: center;
    padding: 20px; /* Отступы для мобильных */
    box-sizing: border-box;
}

/* Логотип */
#unity-logo {
    width: 100%; /* Адаптивная ширина */
    max-width: 800px; /* Максимальная ширина логотипа */
    height: auto; /* Сохраняем пропорции */
    margin-bottom: 20px;
}

    #unity-logo img {
        width: 100%;
        height: auto;
        object-fit: contain; /* Сохраняем пропорции изображения */
    }

/* Прогресс-бар (пустой) */
#unity-progress-bar-empty {
    background-color: #555;
    width: 100%;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto; /* Центрируем */
}

/* Прогресс-бар (заполненный) */
#unity-progress-bar-full {
    background-color: #4CAF50;
    width: 0%;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

/* Медиа-запросы для мобильных устройств */
@media only screen and (max-width: 768px) {
    #unity-loading-bar {
        width: 90%; /* Увеличиваем ширину на мобильных */
        padding: 10px;
    }

    #unity-logo {
        max-width: 100%; /* Убираем ограничение ширины */
        margin-bottom: 10px; /* Уменьшаем отступ */
    }

    #unity-progress-bar-empty {
        height: 15px; /* Уменьшаем высоту прогресс-бара */
    }
}

/* Футер */
#unity-footer {
    position: relative;
}

.unity-mobile #unity-footer {
    display: none;
}

#unity-webgl-logo {
    float: left;
    width: 204px;
    height: 38px;
    background: url('webgl-logo.png') no-repeat center;
}

#unity-build-title {
    float: right;
    margin-right: 10px;
    line-height: 38px;
    font-family: arial;
    font-size: 18px;
}

#unity-fullscreen-button {
    float: right;
    width: 38px;
    height: 38px;
    background: url('fullscreen-button.png') no-repeat center;
}

/* Предупреждения */
#unity-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}
