body {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#full-screen-container.unity-mobile {
    position: relative;
    width: 100vw;
    height: 100vw;
}

#background-container {
    position: absolute;
    left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

#background {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    /*background-image: url('bg.webp');*/
	background-color: black;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#unity-container.unity-desktop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;  /* По умолчанию контейнер занимает всю ширину */
    height: 100vh; /* По умолчанию контейнер занимает всю высоту */
    
    /* Рассчитываем размер контейнера так, чтобы он не выходил за границы экрана */
    max-width: calc(100vh * (16 / 9)); /* Максимальная ширина по соотношению 16:9 */
    max-height: calc(100vw * (9 / 16)); /* Максимальная высота по соотношению 16:9 */
	aspect-ratio: 16 / 9;
}

#unity-container.unity-mobile {
    position: fixed;
    width: 100%;
    max-width: 100%;
    height: 100vh;
}

#unity-canvas {
    background-image: url('load.gif');
    background-position: center;
    background-color: black;
    background-repeat: no-repeat;
}

    #unity-canvas.unity-desktop {
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }

    #unity-canvas.unity-mobile {
        width: 100%;
        height: 100%
    }

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none
}

#logo {
    width: 154px;
    height: 154px;
    background: url('icon.png') no-repeat center
}

#unity-progress-bar-empty {
    width: 141px;
    height: 18px;
    margin-top: 10px;
    margin-left: 6.5px;
    background: url('progress-bar-empty-dark.png') no-repeat center
}

#unity-progress-bar-full {
    width: 0%;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-full-dark.png') no-repeat center
}

#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 {
    cursor: pointer;
    float: right;
    width: 38px;
    height: 38px;
    background: url('fullscreen-button.png') no-repeat center
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: white;
    padding: 10px;
    display: none
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}
