body {
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, #1e1e2f, #2a2a40);
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

#unity-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2; /* Контент поверх частиц */
}

#unity-canvas {
    background: #231F20;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Расстояние между гифкой и слайдером */
    width: 100%; /* Растягиваем контейнер на всю ширину */
    z-index: 3; /* Прогресс-бар и логотип поверх частиц */
}

#unity-logo {
    height: 150px;
    width: 150px;
    background: url('loading-animation.gif') no-repeat center center;
    background-size: contain;
    margin: 0 auto; /* Центрируем гифку по горизонтали */
}

#unity-progress-bar-empty {
    width: 400px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 0 auto; /* Центрируем слайдер по горизонтали */
}

#unity-progress-bar-full {
    height: 100%;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: pulseProgress 1s infinite alternate; /* Анимация прогресс-бара */
}

@keyframes pulseProgress {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

#unity-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: rgba(255, 59, 48, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    display: none;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
}

.unity-mobile #unity-canvas {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.unity-mobile #unity-loading-bar {
    width: 80%;
}

.unity-mobile #unity-progress-bar-empty {
    width: 100%;
}

/* Для портретной ориентации */
@media screen and (orientation: portrait) {
    #unity-logo {
        height: 100px; /* Уменьшаем размер гифки */
        width: 100px;
    }

    #unity-progress-bar-empty {
        width: 80%; /* Уменьшаем ширину слайдера */
        max-width: 300px; /* Ограничиваем максимальную ширину */
    }
}

/* Для ландшафтной ориентации */
@media screen and (orientation: landscape) {
    #unity-logo {
        height: 150px; /* Возвращаем исходный размер гифки */
        width: 150px;
    }

    #unity-progress-bar-empty {
        width: 400px; /* Возвращаем исходную ширину слайдера */
    }
}
