html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    overscroll-behavior: none;
}

*, *:before, *:after {
    box-sizing: inherit;
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: 100vw;
    max-height: 100vh;
}

#unity-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    overflow: hidden;
    /* Обеспечиваем, что canvas не выходит за пределы */
    flex-direction: column;
}

#unity-canvas {
    width: 100%;
    height: auto;
    max-height: 100vh;
    max-width: 100vw;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle, rgba(255, 110, 238, 1) 0%, rgba(91, 22, 255, 1) 100%);
    object-fit: contain;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5); /* полу-прозрачный фон */
}

#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#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: 24px;
    margin: 10px 20px 20px 10px;
    text-align: left;
    border: 1px solid white;
    padding: 2px;
    background-color: transparent;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: white;
    transition: width 0.5s 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);
    }
}
