@font-face {
    font-family: 'TemplateCustomFont';
    /* Place your font file next to index.html and update the filename below */
    src: url('../TemplateCustomFont.woff2') format('woff2'),
         url('../TemplateCustomFont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

*, *:before, *:after {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    font-size: 0;
    box-sizing: inherit;
}

html, body {
    height: 100%;
    background-color: #19191a;
    /* REMOVE SCROLL BAR */
    overflow: hidden;
    /* REMOVE IOS LONG TAP */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* BACKGROUND BEHIND UNITY CONTAINER */
    background-position: center center;
    background-size: cover;
    font-family: 'TemplateCustomFont', Arial, sans-serif;
}

img {
    /* PREVENT IMAGE DRAG AND DROP */
    pointer-events: none;
}

#unity-container {
    display: flex;
    position: fixed;
    width: 100%;
    height: 100%;
}

#loading-background {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: #ffffff;
    text-align: center;
    /* enable fade-out */
    opacity: 1;
    transition: opacity 0.4s ease;
}

#loading-background .loading-message {
    font-size: 20px; /* override global 0 */
    line-height: 1.4;
    opacity: 0.85;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#unity-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 0;
}

#diagnostics-icon {
    position: fixed;
    bottom: 10px;
    right: 0px;
}

#diagnostics-icon, #diagnostics-overlay * {
    font-size: 16px;
    pointer-events: all;
}

#diagnostics-btn {
    min-width: 40px;
    min-height: 40px;
}

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    /* enable fade-out */
    opacity: 1;
    transition: opacity 0.4s ease;
    z-index: 2;
}

#unity-logo {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    width: 256px;
    height: 256px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-image: url('../logo.gif');
    border-radius: 5px;
}

/* generic loading message under logo, above progress bar */
.loading-message {
    width: 256px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    margin-bottom: 0;
    text-align: center;
    color: #ffffff;
    font-size: 15px; /* override global 0 */
    line-height: 1.35;
    opacity: 0.9;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#unity-progress-bar-empty {
    margin-left: auto;
    margin-right: auto;
    width: 256px;
    height: 18px;
    margin-top: 10px;
    background: url('progress_empty_256.png') no-repeat center;
}

#unity-progress-bar-full {
    width: 0%;
    height: 18px;
    margin-top: 10px;
    background: url('progress_full_256.png') no-repeat center;
}

/* loading text under progress bar */
#unity-loading-text {
    margin-left: auto;
    margin-right: auto;
    width: 256px;
    margin-top: 10px;
    text-align: center;
    color: #ffffff;
    font-size: 16px; /* override global 0 */
    line-height: 1.3;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* fade-out helper */
#unity-loading-bar.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loading-background.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ADAPTATION FOR TOO SMALL DISPLAYS */
@media (max-width: 500px), (max-height: 500px) {

    #unity-logo {
        width: 128px;
        height: 128px;
    }

    #unity-progress-bar-empty {
        width: 128px;
        background: url('progress_empty_128.png') no-repeat center;
    }

    #unity-progress-bar-full {
        height: 18px;
        background: url('progress_full_128.png') no-repeat center;
    }

    #unity-loading-text {
        width: 128px;
        font-size: 14px;
    }

    .loading-message {
        width: 128px;
        font-size: 13px;
    }

}
