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%;
    background: linear-gradient(270deg, #3fa2ff, #5b16ff, #00d4ff, #0088ff, #6a11cb, #2575fc);
    background-size: 1200% 1200%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* Оверлей загрузки */
#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

/* Логотип */
#unity-logo {
    text-align: center;
    pointer-events: none;
    margin-bottom: 10px; /* ближе к прогресс-бару */
}
#unity-logo img {
    max-width: 220px;   /* увеличенный размер */
    max-height: 220px;
    width: auto;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 0 12px rgba(0,0,0,0.35));
}

/* Контейнер прогресса */
#unity-loading-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px; /* расстояние между логотипом, баром и спиннером */
}


/* Контейнер прогресса */
#unity-loading-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Прогресс-бар */
#unity-progress-bar-empty {
    width: 40%;
    height: 14px;
    margin-top: 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.3) inset;
}
#unity-progress-bar-full {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd325, #3fa2ff);
    border-radius: 14px;
    transition: width 0.5s ease;
}

/* Спиннер */
.spinner,
.spinner:after {
    border-radius: 50%;
    width: 60px;
    height: 60px;
}

.spinner {
    margin-top: 20px;
    font-size: 10px;
    position: relative;
    border-top: 6px solid rgba(255, 255, 255, 0.2);
    border-right: 6px solid rgba(255, 255, 255, 0.2);
    border-bottom: 6px solid rgba(255, 255, 255, 0.2);
    border-left: 6px solid #3fa2ff;
    transform: translateZ(0);
    animation: spinner-spin 1s infinite linear;
    box-shadow: 0 0 15px rgba(63,162,255,0.6);
}

@keyframes spinner-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
