@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,600;1,700&display=swap');

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: #000000;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    /* мягкий виньет — центр светлее, края чуть темнее */
    background-blend-mode: multiply;
}

#loading-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 42%, transparent 30%, rgba(0,0,0,0.28) 100%);
    pointer-events: none;
    z-index: 0;
}

#loading-cover > * {
    position: relative;
    z-index: 1;
}

#loading-logo {
    margin-top: clamp(-50px, -4vh, -15px);
    max-width: 100%;
    max-height: 40vh;
    width: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.22));
}

#loading-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 clamp(40px, 10vh, 112px);
    box-sizing: border-box;
}

#loading-hint {
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(14px, 4vmin, 34px);
    text-align: center;
    letter-spacing: 0.03em;
    margin: 0 0 clamp(8px, 1.8vh, 24px);
    text-shadow: 0 1px 6px rgba(0,0,0,0.55);
    opacity: 0.92;
    padding: 0 16px;
}

#unity-loading-bar {
    width: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* мобильные */
@media (max-width: 600px) {
    #unity-loading-bar          { width: min(88%, 945px); }
    #loading-logo               { max-height: 32vh; }
    #unity-progress-bar-empty   { padding: 2px; }
    #loading-hint {
        opacity: 1;
        text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    }
}

#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: 100%;
    height: clamp(18px, 4vh, 44px);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 4px;
    margin: 0;
    box-sizing: border-box;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: #FF536B;
    border-radius: 0;
    transition: width 0.4s ease;
}

.spinner,
.spinner:after {
    border-radius: 50%;
    width: 3.5em;
    height: 3.5em;
}

.spinner {
    margin: 0 auto 16px;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top:    0.6em solid rgba(255, 83, 107, 0.2);
    border-right:  0.6em solid rgba(255, 83, 107, 0.2);
    border-bottom: 0.6em solid rgba(255, 83, 107, 0.2);
    border-left:   0.6em solid #FF536B;
    transform: translateZ(0);
    animation: spinner-spin 0.9s infinite linear;
}

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