* {
    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: 'Play', Arial, sans-serif;
}

#header {
    max-width: 92em;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 3em;
}
.logo {
    width: 18.1em;
    height: 15.4em;
    background: url('../images/logo.png') 0 0 no-repeat;
    background-size: contain;
    margin-left: 2em;
    margin-top: -1em;
}
.attempts {
    overflow: hidden;
    text-transform: uppercase;
    color: #efc36a;
    font-family: 'Play', Arial, sans-serif;
    padding-top: 3.75em;
}
.attempts_txt {
    font-size: 3.2em;
    line-height: 1;
    float: left;
}
.attempts_num {
    float: right;
    font-weight: 700;
    font-size: 7.75em;
    padding-left: 0.15em;
    line-height: 0.8;
}
.main_txt {
    margin: -6em auto 0;
    background:  url('../images/main-txt.png') 0 0 no-repeat;
    width: 50.5em;
    height: 20.1em;
    background-size: contain;
    position: relative;
    z-index: 3;
}
.thimbles_wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 11.5em;
    width: 60.6em;
    margin: 0 auto -1em;
}
.thimble {
    width: 21.2em;
    height: 22.7em;
    background-image: url('../images/thimbles.png');
    background-size: 21.2em 45.4em;
    background-position: 0 -22.7em;
    background-repeat: no-repeat;
    cursor: pointer;
    position: relative;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
    margin: 0 -0.5em -3em;
}
.thimble:nth-child(2) {
    z-index: 4;
}
.thimble:nth-child(1) {
    z-index: 5;
}
.thimble.act {
    top: -1em;
}
.thimble_inner {
    width: 21.2em;
    height: 22.7em;
    background-image: url('../images/thimbles.png');
    background-size: 21.2em 45.4em;
    background-position: 0 0;
    background-repeat: no-repeat;
    animation-name: thimbleBlinking;
    animation-delay: 0s;
    animation-duration: .5s;
    animation-iteration-count: infinite;
    opacity: 0;
    position: absolute;
    left: 0.1em;
    top: -0.1em;
}
@keyframes thimbleBlinking {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
.thimbles_wrapper.hovered .thimble.act .thimble_inner {
    animation: none!important;
    opacity: 1;
}
.thimbles_wrapper.hovered .thimble .thimble_inner {
    opacity: 0;
    animation: none!important;
}
.thimble.opened {
    top: -12em;
}
.thimble.opened .thimble_inner {
    opacity: 1 !important;
    animation: none!important;
}
.thimble.opened:before {
    position: absolute;
    left: 2em;
    bottom: -10em;
    content: '';
    background: url('../images/gold.png') 0 0 no-repeat;
    width: 17.7em;
    height: 20.8em;
    background-size: contain;
}


.bottom_txt {
    padding-top: 10em;
    text-align: center;
    position: relative;
    z-index: 5;
}
.bottom_txt_inner {
    font-weight: 700;
    font-size: 6.5em;
    text-transform: uppercase;
    font-family: 'Play', Arial, sans-serif;
    background: -webkit-linear-gradient(top, #e2e2a6 0%, #e7d550 50%, #ff940e 100%);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    opacity: 0.95;
    white-space: nowrap;
}
.bottom_txt_inner:before {
    content: 'выбери и выиграй';
    position: absolute;
    text-transform: uppercase;
    left: 0;
    top: 0;
    font-size: inherit;
    z-index: -1;
    width: 100%;
    white-space: nowrap;
    text-shadow: 0.03em -0.06em 0 #4b340a;
}
.bottom_txt_inner.act:before {
    content: 'забрать выигрышь';
}


#footer {
    max-width: 75.3em;
    width: 95%;
    padding-top: 4.5em;
    text-align: center;
    margin: 0 auto;
}
#footer img {
    opacity: 0.6;
}
#footer p {
    font-family: Arial, sans-serif;
    font-size: 1.3em;
    color: #604114;
    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: 56.1em;
    height: 52.1em;
    background: url('../images/popup-bg.png') 0 0 no-repeat;
    background-size: contain;
    position: relative;
    text-align: center;
}
.popup_content {
    width: 100%;
    padding-top: 2.75em;
    font-family: 'Play', Arial, sans-serif;
    position: absolute;
    left: 0;
    top: 0;
    text-transform: uppercase;
    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: 4.6em;
    color: #efc36a;
    line-height: 1;
    font-weight: 700;
}
.popup_txt_2 {
    font-size: 3.7em;
    font-weight: 700;
    color: #efc36a;
}
.popup_bonus_1 {
    margin: 0 auto;
    width: 48.1em;
    height: 8.5em;
    background: url('../images/bonus-1.png') 0 0 no-repeat;
    background-size: contain;
}
#popup_1 .popup_bonus_1 {
    margin: 3.75em auto -1.5em;
}
.popup_bonus_2 {
    margin: 0 auto;
    width: 49em;
    height: 6em;
    background: url('../images/bonus-2.png') 0 0 no-repeat;
    background-size: contain;
}
.popup_btn_continue {
    cursor: pointer;
    margin: 0 auto;
    border-radius: 1em;
    width: 42em;
    height: 7.5em;
    box-sizing: border-box;
    border-bottom: 0.3em solid #0b4b01;
    border-right: 0.2em solid #0b4b01;
    border-top: 0.1em solid #357e0a;
    background: linear-gradient(to bottom, #19ad00 0%, #0e6000 100%);
    text-align: center;
}
.popup_btn_continue:hover {
    background: linear-gradient(to bottom, #0e6000 0%, #19ad00 100%);
}
.popup_btn_close span,
.popup_btn_continue span {
    text-transform: uppercase;
    color: #fff;
    font-family: 'Play', Arial, sans-serif;
    font-size: 3.5em;
    font-weight: 700;
    line-height: 2;
}
#popup_1 .popup_btn_continue {
    margin: 4.5em auto 1.5em;
}
.popup_btn_close {
    display: block;
    text-decoration: none;
    margin: 0 auto;
    border-radius: 1em;
    width: 42em;
    height: 7.5em;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(to bottom, #d70202 0%, #830101 100%);
    border-bottom: 0.3em solid #690000;
    border-right: 0.2em solid #690000;
    border-top: 0.1em solid #46180c;
}
.popup_btn_close:hover {
    background: linear-gradient(to bottom, #830101 0%, #d70202 100%);
}
#popup_2 .popup_bonus_1 {
    margin: 3em auto -1em;
}
#popup_2 .popup_bonus_2 {
    margin: 3em auto 4.5em;
}



@media (max-width: 1200px) and (min-width: 931px) and (orientation: landscape) {
    body {
        background-size: 1500px;
    }
    #layout {
        font-size: 8px;
    }
}
@media (max-width: 930px) and (orientation: landscape){
    body {
        background-size: 850px;
    }
    #layout {
        font-size: 4.5px;
    }
    #footer {
        padding: 4.5em 0;
    }
}
@media (max-width: 790px) and (orientation: landscape) {
    body {
        background-size: 670px;
    }
    #layout {
        font-size: 3.5px;
    }
}
@media (max-width: 580px) and (orientation: landscape) {
    body {
        background-size: 580px;
    }
    #layout {
        font-size: 3px;
    }
}








@media (width: 768px) and (orientation: portrait) {
    body {
        background-size: 845px;
    }
    .thimbles_wrapper {
        padding-top: 40em;
    }
}
@media (max-width: 768px) and (orientation: portrait) {
    body {
        background: #0b0603 url('../images/bg-mob.jpg') 30% 0 no-repeat;
    }
    #header {
        justify-content: center;
    }
    .logo {
        margin-left: 0;
        margin-right: 5em;
        font-size: 120%;
    }
    .attempts {
        margin-left: 5em;
    }
    .main_txt {
        font-size: 70%;
        margin: -5em auto 0;
    }
    .thimbles_wrapper {
        width: 100%;
        font-size: 80%;
        position: relative;
    }
    .thimbles_wrapper:before,
    .thimbles_wrapper:after {
        content: '';
        position: absolute;
        background-size: contain;
        bottom: 9.5em;
        width: 41.6em;
        background-repeat: no-repeat;
    }
    .thimbles_wrapper:before {
        left: 0;
        background-image: url('../images/man.png');
        height: 59em;
    }
    .thimbles_wrapper:after {
        right: 0;
        background-image: url('../images/lady.png');
        height: 55em;
    }
    .thimble {
        margin: 0 1.5em;
    }
    .bottom_txt {
        font-size: 70%;
        padding-top: 8em;
    }
    #footer {
        width: 75%;
        padding: 4.5em 0;
    }
}
@media (max-width: 767px) and (orientation: portrait) {
    body {
        background-size: 768px;
    }
    .thimbles_wrapper {
        padding-top: 32.5em;
    }
}
@media (max-width: 620px) and (orientation: portrait) {
    body {
        background-size: 620px;
    }
    #layout {
        font-size: 8px;
    }
    .thimbles_wrapper:before,
    .thimbles_wrapper:after {
        bottom: 10.5em;
        font-size: 85%;
    }
}
@media (max-width: 485px) and (orientation: portrait) {
    body {
        background: #0b0603 url('../images/bg-mob.jpg') 40% 0 no-repeat;
        background-size: 540px;
    }
    #layout {
        font-size: 7px;
    }
}
@media (max-width: 410px) and (orientation: portrait) {
    body {
        background-size: 425px;
    }
    #layout {
        font-size: 5.5px;
    }
}