html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    height: 100%;
}

canvas {
    display: block;
}

body {
    margin: 0;
}

#unity-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    background: #231F20;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Центрирование по горизонтали */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Десктоп (базовый стиль) */
#loading-cover2 {
    width: min(calc(100vh * (1107 / 2000)), 100vw);
    height: 100%;
    background-size: 100% auto;
    background-position: center;
}

/* Мобильные устройства (ширина меньше 768px) */sw-
@media (max-aspect-ratio: 91/200) {
    #loading-cover2 {
        width: 100vw !important;         /* На всю ширину */
        height: 100vh !important;        /* На всю высоту */
        background-size: cover !important; /* Растянуть без искажений */
    }

    #shadow-left, #shadow-right {
        display: none;
    }
}

@media (max-aspect-ratio: 2.2/1) and (orientation: portrait) {
    #shadow-left, #shadow-right {
        display: none;
    }
}

#unity-loading-bar {
    width: min(calc(95vh * (17 / 32)), 100vw);
    height: auto;
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100vw;
    box-sizing: border-box;
}

#unity-logo {
    text-align: center;
    pointer-events: none;
}

    #unity-logo img {
        max-width: 80%;
        max-height: 80%;
        pointer-events: none;
    }

#unity-progress-bar-empty {
    width: 30%;
    height: 30px;
    margin: 0px 20px 0px 20px;
    text-align: left;
    border: 1px solid white;
    padding: 2px;
}

#unity-progress-bar-full {
    width: 100%;
    height: 100%;
    background-image: url("your-image.png");
    background-size: 100% 100%; /* Растягиваем на весь блок */
    background-repeat: no-repeat;

    /* Обрезаем картинку по горизонтали */
    clip-path: inset(0 0 0 0); /* Начальное значение (0% - видно всё слева) */

    /* Для плавной анимации */
    transition: clip-path 0.3s ease;
}

.light #unity-progress-bar-empty {
    /*border-color: black;*/
}

.light #unity-progress-bar-full {
    background: black;
}

.spinner,
.spinner:after {
    border-radius: 50%;
    width: 5em;
    height: 5em;
}

.spinner {
    margin: 10px;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top: 1.1em solid rgba(255, 255, 255, 0.2);
    border-right: 1.1em solid rgba(255, 255, 255, 0.2);
    border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
    border-left: 1.1em solid #ffffff;
    transform: translateZ(0);
    animation: spinner-spin 1.1s infinite linear;
}

@keyframes spinner-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-percentage {
    /*font-family: 'Lilita One', cursive;*/
    font-family: 'Lilita One', sans-serif;
    font-size: 18px;
    color: #ffffff;
    /*text-shadow:*/
    /*        2px 2px 0 #000000,*/
    /*        -1px -1px 0 #000000,*/
    /*        1px -1px 0 #000000,*/
    /*        -1px 1px 0 #000000,*/
    /*        1px 1px 0 #000000; !* Контур для лучшей читаемости *!*/
    margin-top: 0px;
    letter-spacing: 1px;
}

#shadow-left, #shadow-right {
    position: fixed;
    top: 0;
    width: 100px; /* Фиксированная ширина */
    height: 100vh; /* Фиксированная полная высота экрана */
    background: url('Images/frame.png') no-repeat;
    background-size: auto 100%; /* Сохраняем пропорции, растягиваем по высоте */
    pointer-events: none;
    z-index: 10; /* Убеждаемся, что они поверх других элементов */
}

#shadow-left {
    left: 0;
    transform: scaleX(-1);
}

#shadow-right {
    right: 0;
    transform: scaleX(1);
}



body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

#unity-container {
  position: fixed;
  display: flex;
  opacity: 0;
  aspect-ratio: 1107/2000;
  width: min(calc(100vh*(1107/2000)), 100vw);
  height: 100vh;
}

#unity-container.unity-mobile {}


.spinner {
    border-top: 1.1em solid rgba(91, 85, 89, 0.2);
    border-right: 1.1em solid rgba(91, 85, 89, 0.2);
    border-bottom: 1.1em solid rgba(91, 85, 89, 0.2);
    border-left: 1.1em solid rgba(255, 186, 70, 1);
}

#unity-progress-bar-empty {
    border: none; /* Убираем границу, так как теперь у нас текстура */
    width: 80%;
    background-image: url('Images/progress_empty.png');
    background-size: 100% 100%; /* Растягиваем текстуру на весь элемент */
    background-repeat: no-repeat;
}

#unity-progress-bar-full {
    background-image: url('Images/progress_full.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.light #unity-progress-bar-empty {
    border: none;
    background-image: url('progress_empty_light.png'); /* Если нужна другая текстура для светлой темы */
}

.light #unity-progress-bar-full {
    background-image: url('progress_full_light.png');
}



/*#unity-progress-bar-empty {*/
/*    height: 24px;*/
/*}*/


#unity-progress-bar-empty {
    border-radius: 12px;
}

#unity-progress-bar-full {
    border-radius: 10px;
    transition: width 0.5s ease;
}
