@font-face {
    font-family: 'Ink Free';
    src: local('Ink Free'),
        url('../fonts/Ink-Free.ttf') format('truetype')
}
@font-face {
    font-family: 'Hidayatullah';
    src: local('Hidayatullah'),
        url('../fonts/Hidayatullah.ttf') format('truetype')
}

@font-face {
    font-family: 'Philosoper';
    src: local('Philosoper'),
        url('../fonts/PHILOSOPHER-BOLD.TTF') format('truetype')
}
@font-face {
    font-family: 'Segoe UI';
    src: local('Segoe UI'),
        url('../fonts/segoeui.ttf.html') format('truetype')
}

*, ::after, ::before {
    box-sizing: border-box;
}
.text-left {
    text-align: left !important;
}
.text-center {
    text-align: center !important;
}
.text-right {
    text-align: right !important;
}
html {
    font-family: 'Segoe UI', sans-serif;
    background: url("../images/background.jpg") no-repeat;
    background-size: cover;
}

body {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    max-width: 100%;
    max-height: 100%;
}

video::-webkit-media-controls-panel {
    background-image: none !important;
    filter: brightness(0.4);
}

p {
    margin: 0;
}

html, body {
    border: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overflow-y: visible;
}

.displayNone {
    display: none !important;
}

.showAfterLoading {
    display: none;
}


.btn {
    font-family: 'Philosoper', sans-serif;
    cursor: pointer;
    width: 150px;
    height: 40px;
    line-height: 15px;
    background: url("../images/button_base_sfondo.png") no-repeat;
    background-size: 100% 100%;
    text-align: center;
    border: 0;
    padding: 0 20px !important;
    color: #754715;

    display: inline-flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;

    transform: scale(1);
    transition: 0.5s transform;
}
.btn:hover {
    transform: scale(1.1);
}

.btn[style*='display: block'] {
    display: flex !important;
}
.btn[style*='display: inline-block'] {
    display: inline-flex !important;
}


#container {
    max-width: 1406px;
    margin: 0 auto;
    height: 100vh;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



#unityContainer.hovering canvas {
    cursor: pointer !important;
}

#unityContainer {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    min-height: calc(100vh - 250px);
    max-width: 1366px;
    margin: 0 auto;
    width: 100%;
}

@media (min-height: 800px) {
    #unityContainer {
        min-height: calc(100vh - 400px);
    }
}

#webContainer, #insetFrame {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border: 0;
    margin: 0;
    padding: 0;
}

#webContainer {
    height: 100%;
    max-height: 100%;
    width: 100%;
    max-width: 100%;
}

#insetFrame {
    max-width: 1366px;
    border: 19px solid transparent;
    border-image: url("../images/cornice_pattern.png") 38 round;
    pointer-events: none;
}

.sceneDependentElement {
    display: none;
}

#questInformation {
    position: absolute;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    bottom: -35px;
    transition: 1s bottom;
    height: 35px;
}
#questPanel {
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 600px;
    height: 35px;
    padding: 3px 80px 0;
    margin-left: -300px;
    line-height: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: url("../images/cornice_obiettivi.png");
    background-size: 100%;
    background-repeat: no-repeat;
    z-index: 2;
    transition: 1s bottom;
    font-size: 14px;
}
#questInformation.showQuest {
    bottom: 0;
}
#subQuestPanel{
    width: 420px;
    height: auto;
    background: #796151;
    display: inline;
    border: 2px solid #b7a18c;
    margin: 0;
    text-align: center;
    z-index: 1;
    position: absolute;
    bottom: 31px;
    left: 50%;
    margin-left: -210px;
    padding: 10px;
    transition: 1s all;
    color: white;
    font-size: 14px;
    transform: translate(0, 100%);
    display: none;
    border-radius: 5px 0 0 0;
}
#subQuestToggler {
    width: 20px;
    height: 20px;
    position: absolute;
    right: -2px;
    top: -20px;
    background: #79604f;
    border: 2px solid #b6a391;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
}
#subQuestToggler img {
    width: 10px;
    height: 5px;
    margin-bottom: 5px;
    transform: rotate(180deg);
    transition: 1s all;
}
#subQuestPanel.showQuest {
    transform: translate(0, 0%);
}
#subQuestPanel.showQuest #subQuestToggler img {
    transform: rotate(0deg) !important;
}
#questDescription {
    cursor: help;
    line-height: 1;

    position: absolute;
    left: 80px;
    width: 40px;
    text-align: left;
}

#questName {
    position: absolute;
    left: 120px;
    right: 120px;
    text-align: center;
}
#interactionCounter {
    position: absolute;
    right: 80px;
    width: 40px;
    text-align: right;
}

#questDescription img {
    width: 20px;
}

.uiContainer .centeredButton {
    display: none;

    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -75px !important;
    margin-top: -20px;
    z-index: 3;
}

.uiContainer .lowerLeftButton {
    display: none;

    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 2;

    width: 200px;
    height: 53px;
}

#introTimelineButtons {
    display: none;
    z-index: 1;
    width: 100%;
    text-align: center;
    container-type: size;
    margin-top: -20px;
    margin-bottom: 20px;
    font-size: 12px;
}
#introTimelineButtons .btn {
    margin: 0 10px;
}

#controlsBtn {
    display: none;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 12px;
    z-index: 10;
    width: 100px;
}

#startGameInfoScreen {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#startGameInfoScreen[style*='display: block'] {
    display: flex !important;
}
#startGameInfoScreen > img {
    width: 600px;
    margin-bottom: 20px;
}
#startGameInfoScreen p {
    margin: 10px 0;
}
#startGameInfoScreen #startBattuta {
    margin-top: 20px;
}

#settingsBtn, #infoBtn, #instructionBtn, #reloadBtn {
    display: none;
    cursor: pointer;
    position: absolute;
    width: 40px;
    height: 40px;
    top: 18px;
    right: 18px;
    background: url("../images/button_settings.png");
    z-index: 1;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

#infoBtn {
    right: 18px;
    background-image: url("../images/button_info.png");
    top: 58px;
}

#instructionBtn {
    background-image: url("../images/button_instruction.png");
    right: auto;
    left: 18px;
}
#reloadBtn {
    background-image: url("../images/button_reload.png.html");
    right: auto;
    top: 58px;
    left: 18px;
}


#subtitle-container {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}
#subtitle-container[style*='display: block'] {
    display: flex !important;
}

#subtitle-container #subtitle {
    line-height: 25px;
    display: none;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 2px #000;
    color: white;
    letter-spacing: 1px;
    font-weight: bold;
    text-align: center;
}
.subQuest {
    padding: 0 35px;
    position: relative;
}
.subQuest .questCounter {
    position: absolute;
    right: 0;
    top: 0;
}

#portraitBlocker {
    display: none;
}
@media screen and (orientation:portrait) {
    #portraitBlocker {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background: url(../images/background.jpg) no-repeat;
        background-size: cover;
        z-index: 1000;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 50px;
        font-size: 20px;
        text-align: center;
    }
}


#joystickContainer {
    position: absolute;
    left: 60px;
    bottom: 30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #333;
    background: rgba(255,255,255,0.3);
    z-index: 10;
}
#joystickAnalog {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-bottom: -25px;
    border-radius: 50%;
    border: 1px solid black;
    background: rgba(0,0,0,0.7);
    transform-origin: center center;
    transform: translate(0, 0);
}
@media (max-height: 800px) {
    #controlsBtn {
        right: 100px;
        top: 5px;
    }
}

@media (max-height: 400px) {
    .btn {
        transform: scale(0.8) !important;
    }
    .uiContainer .lowerLeftButton {
        right: -15px !important;
        bottom: 0 !important;
    }
    #unityContainer {
        min-height: calc(100vh - 150px) !important;
    }

    #menu {
        height: 100px !important;
    }

    #package, #inventory, #badges {
        height: auto !important;
    }

    #package {
        width: 125px !important;
    }

    #inventory {
        margin: 0 20px !important;
        padding: 10px;
    }

    #inventory:before {
        width: 20px !important;
        left: -20px !important;
    }
    #inventory:after {
        width: 20px !important;
        right: -20px !important;
    }

    .smallItems .name {
        display: none !important;
    }

    .smallItems > [data-inventory] {
        flex-basis: 10% !important;
        transform: scale(0.7);
    }

    #badges {
        width: 60px !important;
    }
    #badges > div {
        height: 28px !important;
    }

    #questPanel {
        transform-origin: bottom !important;
        scale: 0.6 !important;
    }

    #subQuestPanel {
        transform-origin: 50% 135% !important;
        scale: 0.6 !important;
    }
}
