@font-face {
    font-family: 'Shadow';
    src: url(../fonts/Shadow.ttf),
        url(../fonts/Shadow.eot),
        url('../fonts/Shadow.eot#iefix') format('embedded-opentype');
    font-weight: normal;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
}
img {
    width: 100%;
    display: block;
    height: auto;
}
html,
body {
    height: 100%;
}
#layout {
    position: relative;
    z-index: 2;
    min-height: 100%;
    overflow-x: hidden;
    font-size: 10px;
}
body {
    background: #000 url('../images/bg-desk.jpg') 50% 0 no-repeat;
    font-family: 'Shadow', Arial, sans-serif;
}

#header {
    max-width: 123em;
    margin: 0 auto;
    padding-top: 4em;
    display: flex;
    display: -ms-flexbox;
    -ms-flex-wrap: wrap;
    -ms-flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: row;
}

.logo {
    width: 23.1em;
    height: 17.8em;
}
.attempts {
    width: 23.6em;
    padding-right: 1.5em;
    height: 16.9em;
    background: url('../images/attempt-bg.png') 0 0 no-repeat;
    background-size: contain;
    margin-right: 2em;
    box-sizing: border-box;
}
.attempts_txt {
    text-align: center;
    font-family: 'Shadow', Arial, sans-serif;
    color: #fff;
    padding-top: 1em;
    font-size: 2.75em;
}
.attempts_num {
    text-align: center;
    font-family: 'Shadow', Arial, sans-serif;
    color: #fff;
    font-size: 5em;
}
.txt {
    display: inline-block;
    padding-left: 2em;
    padding-top: 3.5em;
}
.txt_1 {
    font-size: 4.6em;
    color: #f0f7ff;
    font-family: 'Shadow', Arial, sans-serif;
    text-align: center;
    padding-bottom: 0.2em;
}
.txt_2 {
    text-align: center;
    font-size: 4.35em;
    color: #baf1cc;
    font-family: 'Shadow', Arial, sans-serif;
}

.safes_wrapper {
    max-width: 80em;
    margin: 0 auto;
    position: relative;
    padding-top: 13.5em;
}
.safes_wrapper:before {
    content: '';
    position: absolute;
    width: 45.6em;
    height: 40.3em;
    background: url('../images/resident.png') 0 0 no-repeat;
    background-size: contain;
    top: -3em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.safe_1 {
    width: 36.2em;
    height: 33.4em;
    position: relative;
    z-index: 3;
    cursor: pointer;
    margin-top: -4.4em;
    margin-left: -7.5em;
    float: left;
}
.safe_1 div {
    background-image: url('../images/safe.png');
    background-size: 36.2em 100.2em;
    background-position: 0 -33.4em;
    background-repeat: no-repeat;
    width: 36.2em;
    height: 33.4em;
    position: relative;
    z-index: 3;
}

.safe_2 {
    width: 36.2em;
    height: 33.4em;
    position: relative;
    z-index: 3;
    cursor: pointer;
    margin-top: -4.4em;
    margin-right: -5.5em;
    float: right;
}
.safe_2 div {
    background-image: url('../images/safe.png');
    background-size: 36.2em 100.2em;
    background-position: 0 -66.8em;
    background-repeat: no-repeat;
    width: 36.2em;
    height: 33.4em;
    position: relative;
    z-index: 3;
    float: right;
}
.safe {
    -webkit-tap-highlight-color: transparent;
}

.safe:before {
    position: absolute;
    content: '';
    width: 25.9em;
    height: 33.4em;
    background-image: url('../images/safe-act.png');
    background-size: contain;
    left: 6.5em;
    top: -3em;
    opacity: 0;
}
.safe:before {
    animation-name: safeBlinking;
    animation-delay: 0s;
    animation-duration: .5s;
    animation-iteration-count: infinite;
}
.safes_wrapper.hovered .safe:before {
    animation: none;
}
.safe:active:before,
.safe.act:before {
    opacity: 1!important;
    animation: none!important;
}
@keyframes safeBlinking {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.safe.opened:before {
    display: none!important;
}
.safe_1.opened div,
.safe_2.opened div {
    background-position: 0 0;
}



#footer {
    margin: 0 auto;
    max-width: 70.5em;
    width: 90%;
    padding-top: 6em;
    clear: both;
    text-align: center;
}
#footer p {
    font-family: Arial, sans-serif;
    font-size: 1.3em;
    color: #715e43;
    padding-top: 1.5em;
}




.popup_overlay {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.6);
    z-index: 100;
    font-size: inherit;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.popup_window {
    display: none;
    width: 73.2em;
    height: 73em;
    background: url('../images/popup-bg.png') 0 0 no-repeat;
    background-size: contain;
    position: relative;
    text-align: center;
    font-size: 80%;
}
.popup_content {
    width: 100%;
    padding-top: 7em;
    font-family: 'Shadow', Arial, sans-serif;
    position: absolute;
    left: 0;
    top: 0;
    display: none;
}
#popup_1 {
    z-index: 3;
    opacity: 1;
}
#popup_2 {
    z-index: 2;
    opacity: 0;
}
.popup_content.showed {
    display: block;
}

.popup_txt_1 {
    font-size: 7.4em;
    color: #edf8fe;
}
.popup_txt_2 {
    font-size: 5.5em;
    color: #edf8fe;
    padding-bottom: 0.85em;
}
.popup_txt_3 {
    font-size: 7em;
    color: #fff47e;
    line-height: 0.9;
}
.popup_txt_4 {
    font-size: 4.6em;
    padding-bottom: 1em;
    color: #1d4865;
}
.popup_txt_5 {
    font-size: 7em;
    color: #fff47e;
    padding-bottom: 0.75em;
}
.popup_btn_close,
.popup_btn_continue {
    background-image: url('../images/btn.png');
    background-size: 57.5em 64.8em;
    width: 57.5em;
    margin: 0 auto 1.8em;
    cursor: pointer;
    height: 10.8em;
    text-align: center;
    display: block;
    text-decoration: none;
}
.popup_btn_close span,
.popup_btn_continue span {
    color: #fff;
    font-size: 4.3em;
    line-height: 2.75;
}
.popup_btn_continue {
    background-position: 0 0;
}
.popup_btn_continue:hover {
    background-position: 0 -10.8em;
}
.popup_btn_continue:active {
    background-position: 0 -43.2em;
}
.popup_btn_close {
    background-position: 0 -21.6em;
}
.popup_btn_close:hover {
    background-position: 0 -32.4em;
}
.popup_btn_close:active {
    background-position: 0 -53.8em;
}
#popup_2 .popup_txt_2 {
    padding-bottom: 1.25em;
}
#popup_2 .popup_txt_4 {
    padding-bottom: 0.75em;
}






@media (max-width: 1080px) {
    .txt {
        padding-left: 0;
    }
    #header {
        font-size: 8px;
        margin-bottom: 6em;
        justify-content: center;
    }
    .logo {
        order: 1;
        margin-right: 4em;
    }
    .attempts {
        order: 2;
    }
    .txt {
        width: 100%;
        order: 3;
        padding-top: 1.5em;
    }
    .safes_wrapper {
        padding-top: 4em;
    }
    .safes_wrapper:before {
        font-size: 7.5px;
    }
}


@media (max-width: 820px) {
    body {
        background: #000 url('../images/bg-mob.jpg') 50% -215px no-repeat;
        background-size: 820px;
    }
    .safes_wrapper:before {
        font-size: inherit;
        top: 1.5em;
    }
    #header {
        padding-top: 2.5em;
        position: relative;
        z-index: 5;
    }
    .txt {
        font-size: 125%;
    }
    .logo {
        margin-right: 15%;
    }
    .safes_wrapper {
        padding: 18em 5em 0;
        font-size: 8.15px;
        max-width: none;
    }
    #footer {
        padding-bottom: 20em;
        padding-top: 4em;
    }
    .safe_1:after,
    .safe_2:after {
        content: '';
        position: absolute;
        left: 4.25em;
        top: -30.5em;
        background: url('../images/lighter.png') 0 0 no-repeat;
        width: 25.6em;
        height: 61.2em;
        z-index: -1;
        background-size: contain;
        font-size: 110%;
    }
}


@media (max-width: 675px) {
    body {
        background-size: 675px;
    }
    .safes_wrapper {
        font-size: 6.5px;
        padding: 11em 5em 0;
    }
    .safes_wrapper:before {
        top: -5.5em;
    }
    #header {
        font-size: 7px;
    }
    .popup_window {
        font-size: 50%;
    }
}

@media (max-width: 500px) {
    #header {
        font-size: 6px;
        padding-top: 7.5em;
    }
    .safes_wrapper {
        font-size: 5.45px;
        padding: 20em 5em 0;
    }
    .safes_wrapper:before {
        top:3.5em;
    }
}

@media (max-width: 440px) {
    .safes_wrapper:before {
        top: 7.25em;
    }
    .safes_wrapper {
        font-size: 5px;
        padding: 24em 2em 0;
    }
}

@media (max-width: 380px) {
    body {
        background-position-y: -275px;
    }
    .txt {
        font-size: 105%;
    }
    .logo,
    .attempts {
        font-size: 90%;
    }
    .safes_wrapper {
        font-size: 4.75px;
        padding: 18.5em 1em 0;
    }
    .safes_wrapper:before {
        top: 2.25em;
    }
    .popup_window {
        font-size: 45%;
    }
}

@media (max-height: 600px) and (min-width: 700px) {
    .popup_window {
        font-size: 50%;
    }
}
@media (max-height: 370px) and (min-width: 360px) {
    .popup_window {
        font-size: 35%;
    }
}