@font-face {
    font-family: 'Palatino';
    src: local('Palatino'),
        url('../fonts/Palatino/pala.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Palatino';
    src: local('Palatino'),
        url('../fonts/Palatino/palab.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'Palatino';
    src: local('Palatino'),
        url('../fonts/Palatino/palabi.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: 'Palatino';
    src: local('Palatino'),
        url('../fonts/Palatino/palai.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'PT Sans';
    src: local('PT Sans'),
        url('../fonts/PT_Sans/PTSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'PT Sans';
    src: local('PT Sans'),
        url('../fonts/PT_Sans/PTSans-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'PT Sans';
    src: local('PT Sans'),
        url('../fonts/PT_Sans/PTSans-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: 'PT Sans';
    src: local('PT Sans'),
        url('../fonts/PT_Sans/PTSans-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Bebas Neue';
    src: local('Bebas Neue'),
        url('../fonts/BEBASNEUE-REGULAR.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

*, ::after, ::before {
    box-sizing: border-box;
}

html {
    font-family: 'PT Sans', sans-serif;
    background: url("../images/background.jpg") no-repeat;
    background-size: cover;
    overscroll-behavior: none;
}

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%;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

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;*/
    height: 100vh;
}

.displayNone {
    display: none !important;
}

.showAfterLoading {
    display: none;
}


.align-left {
    text-align: left;
}

.btn {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    cursor: pointer;
    width: 145px;
    height: 50px;
    background: url("../images/button_base.png") no-repeat;
    background-size: 100% 100%;
    text-align: center;
    border: 0;
    padding: 3px 20px 0 !important;
    color: #32677a;

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

    transform: scale(1);
    transition: 0.5s transform, 0.5s opacity, 0.5s filter;
}
.btn:hover {
    transform: scale(1.1);
    color: #89271d;
}

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

.btn.disabled {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(1);
}

.btn img {
    height: 20px;
    margin-left: 5px;
}

.btnMini {
    display: none;
    cursor: pointer;
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url("../images/btn_rombo-base.png");
    z-index: 1;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
    justify-content: center;
    align-items: center;

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

.btnMini[style*='display: block'] {
    display: flex !important;
}
.btnMini:after {
    content: '';
    width: 26px;
    height: 26px;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

#menuBtn {
    top: 18px;
    right: 18px;
}
#menuBtn:after {
    background-image: url("../images/ico_settings.png");
}

#controlsBtn {
    top: 72px;
    right: 18px;
}
#controlsBtn:after {
    background-image: url("../images/ico_controls.png");
}

#infoBtn {
    top: 126px;
    right: 18px;
}
#infoBtn:after {
    background-image: url("../images/ico_new-noti.png");
}

#instructionBtn {
    top: 18px;
    left: 18px;
}
#instructionBtn:after {
    background-image: url("../images/ico_tutorial.png");
}

#reloadBtn {
    top: 72px;
    left: 18px;
}
#reloadBtn:after {
    background-image: url("../images/ico_settings.png");
}

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

#container {
    position: relative;
    margin-top: -60px;
}

#unityContainer.reachable canvas {
    cursor: url('../images/cursor_location.png') 16 16, copy !important
}

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

#unityContainer.timelinePlaying canvas {
    cursor: default !important
}

#unityContainer {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    max-height: calc(100vh - 200px);
    max-width: 1366px;
    margin: 0 auto;
    width: 100%;
    z-index: 2;
    aspect-ratio: 16 / 6;

    background: url('../images/background.jpg') no-repeat;
    background-size: cover;
}

#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%;
    transition: 0.5s filter;
}

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

.sceneDependentElement {
    display: none;
}

#questInformation {
    display: none;
    position: absolute;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    top: 0;
    transition: 1s top;
    height: 40px;
}
#questPanel {
    height: 40px;

    color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: url('../images/cornice_obiettivi.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 2;
    transition: 1s bottom;
    font-size: 14px;
    padding-top: 3px;
}
#questInformation.showQuest {
    top: -40px;
}
#questInformation [title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -60px;
    min-width: 200px;
    margin-left: -110px;
    background: white;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    pointer-events: none;
    z-index: 999;
    font-size: 12px;
}

#subQuestPanel{
    /*background: linear-gradient(90deg, rgba(132,212,253,1) 0%, rgba(199,225,252,1) 25%, rgba(199,225,252,1) 75%, rgba(132,212,253,1) 100%);*/
    width: 440px;
    height: auto;
    transform-origin: top center;
    margin: 0;
    text-align: center;
    z-index: 3;
    position: absolute;
    left: 50%;
    margin-left: -220px;
    transition: 1s all;
    color: black;
    font-size: 12px;
    display: none;
}
#subQuestToggler {
    width: 20px;
    height: 20px;
    position: absolute;
    right: -24px;
    top: 0;
    transform: rotate(180deg);
    background: #ffffff;
    border: 1px solid #cccccc;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}
#subQuestToggler img {
    width: 10px;
    height: 5px;
    margin-bottom: 3px;
    transform: rotate(180deg);
    filter: invert(1);
    transition: 1s all;
}
#subQuestPanel.showQuest {
    /*transform: translate(0, 0%);*/
}
#subQuestPanel.showQuest #subQuestToggler img {
    transform: rotate(0deg) !important;
}

#subQuestPanel #subQuestContainer {
    transform: scaleY(0);
    transform-origin: top center;
    transition: 1s all;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    padding: 5px 10px;
    border-radius: 0 0 4px 4px;
}
#subQuestPanel.showQuest #subQuestContainer {
    transform: scaleY(1);
}

#questDescription {
    cursor: help;
    line-height: 1;
    top: 13px;
    position: absolute;
    left: 80px;
    width: 20px;
    height: 20px;
    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 .lowerRightButton, .uiContainer .lowerLeftButton {
    display: none;

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

    width: 200px;
    height: 53px;

    font-size: 16px;
}
.uiContainer .lowerRightButton {
    right: 20px;
}
.uiContainer .lowerLeftButton {
    left: 20px;
}


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


#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;
    white-space: pre-line;
}
#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: 3px 35px;
    position: relative;
}
.subQuest .questCounter {
    position: absolute;
    right: 0;
    top: 0;
}

#portraitBlocker {
    display: none;
}
body.objectInHand, body.objectInHand #webContainer, body.objectInHand #unityContainer.hovering canvas, body.objectInHand .btn {
    cursor: none !important;
}
body.objectInHand .btn {
    pointer-events: 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);
}

#footerLogo {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
}

#footerLogo a {
    display: inline-block;
}
#footerLogo img {
    height: 80px;
}

@media (max-height: 600px) {
    .btnMini {
        transform: scale(0.8);
    }

    #container {
        margin-top: -50px;
    }

    .popupInner {
        transform: scale(0.8);
    }

    #athena_hint {
        transform: scale(0.8);
    }

    #outerNotification {
        transform: scale(0.8);
        transform-origin: left;
    }
    #startGameInfoScreen > img {
        height: 150px;
    }
    #menu {
        margin-top: 0;
        bottom: -90px !important;
    }
    #menu, #questInformation {
        transform: scale(0.8);
        z-index: 5;
    }
    #unityContainer {
        max-height: calc(100vh - 120px);
    }

    #footerLogo {
        position: static;
        margin-top: 20px;
    }

    #footerLogo img {
        height: 50px;
    }
}

@media print {
    #endOfContentDesc, .btnDiv {
        display: none;
    }
    #endGamePopup {
        overflow: hidden;
    }

    #endGamePopup .popupBackground {
        background: white;
    }
}
