* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

/* Основной контейнер */
#unity-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available; /* Для Safari */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
}

/* Безопасная зона для мобильных */
.unity-mobile #unity-container {
    top: env(safe-area-inset-top);
    bottom: env(safe-area-inset-bottom);
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); /* dynamic viewport */
}

#unity-canvas {
    background: #000000;
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

#unity-logo {
    width: 200px;
    height: 200px;
    /*background: url('favicon.png') no-repeat center;*/
    background-size: contain;
    margin-bottom: 20px;
}

#unity-progress-bar-container {
    width: 300px;
    text-align: center;
}

#unity-progress-bar-empty {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #FCAF17, #FFD350);
    border-radius: 10px;
    transition: width 0.3s ease;
}

#unity-progress-text {
    color: #ffffff;
    font-size: 16px;
    margin-top: 10px;
    font-weight: 500;
}

#unity-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

#unity-fullscreen-button {
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s;
    position: relative;
}

#unity-fullscreen-button::before {
    content: "⛶";
    color: white;
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#unity-fullscreen-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.unity-mobile #unity-fullscreen-button {
    display: none;
}

.hidden {
    display: none !important;
}

/* Для iOS Safari */
@supports (-webkit-touch-callout: none) {
    #unity-container {
        height: -webkit-fill-available;
    }
}
