/* Базовая настройка box-sizing */
html {
    box-sizing: border-box;
}

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

/* Высота и сброс отступов */
html, body {
    height: 100%;
    margin: 0;
}

/* Canvas */
canvas {
    display: block;
}

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

/* Canvas Unity */
#unity-canvas {
    width: 100%;
    height: 100%;
    background: BACKGROUND_COLOR; /* замените BACKGROUND_COLOR на нужный цвет */
}

/* Загрузка - оверлей */
#loading-cover {
    position: fixed; /* fixed, чтобы перекрывать весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Контейнер для загрузки (если нужен) */
#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Логотип */
#unity-logo {
    display: flex;
    justify-content: center; /* центр по горизонтали */
    align-items: center;     /* центр по вертикали, если контейнер выше */
    pointer-events: none;
    position: relative;
    z-index: 2;
    margin-bottom: 40px;     /* отступ снизу */
    width: 100%;             /* занимает всю ширину родителя */
    max-width: 800px;        /* максимальная ширина */
    margin-left: auto;
    margin-right: auto;
}

#unity-logo img {
    width: 220px;
    height: 220px;
    pointer-events: none;
    display: block;
    border-radius: 20px;
    
    filter:
        /* верхняя подсветка */
        drop-shadow(0 -0.4em 16px rgba(111, 54, 196, 0.3))
        /* нижняя подсветка */
        drop-shadow(0 0.4em 16px rgba(111, 54, 196, 0.3))
        /* правая подсветка */
        drop-shadow(0.4em 0 16px rgba(2, 144, 220, 0.3))
        /* левая подсветка */
        drop-shadow(-0.4em 0 16px rgba(176, 0, 181, 0.3))
        /* центральная более мягкая подсветка */
        drop-shadow(0 0 16px rgba(2, 144, 220, 0.3))
        drop-shadow(0 0 30px rgba(176, 0, 181, 0.3));
}

/* Пустой прогресс-бар */
#unity-progress-bar-empty {
    width: 440px;
    height: 24px;
    margin: 0 auto;
    text-align: left;
    border: 1px solid white;
    padding: 2px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

/* Заполненный прогресс-бар */
#unity-progress-bar-full {
    width: 0%; /* ширина меняется динамически */
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #c3c3c3);
    transition: width 0.5s ease;
    border-radius: 12px;
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(212, 212, 212, 0.3);
}

/* Стили для светлой темы (если используете переключение тем) */
.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);
    }
}
