@font-face {
    font-family: 'amor_sans_proregular';
    src: url('../fonts/amorsanspro-webfont.eot');
    src: url('../fonts/amorsanspro-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/amorsanspro-webfont.woff') format('woff'),
    url('../fonts/amorsanspro-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body, html {
    height: 100%;
}

body {
    background: url('../img/background.png');
    font-family: "amor_sans_proregular", Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: bold;
    /* prevent text selection on ui */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* prevent scrolling in windows phone */
    -ms-touch-action: none;
    /* prevent selection highlight */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

#game {
    width: 90%;
    height: 90%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
}

#game .points.points-success {
    position: fixed;
    right: 30px;
    top: 30px;
    width: 60px;
    height: 60px;
    background: lightgreen;
    color: #000;
    font-family: "amor_sans_proregular", "Helvetica", "Arial", sans-serif;
    font-size: 40px;
    line-height: 60px;
    text-align: center;
    display: none;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 3px solid darkgreen;
}

#game > .instruction {
    position: absolute;
    top: -25px;
    left: 30%;
    right: 30%;
    font-size: 22px;
    text-align: center;
    background: #fff;
    padding: 10px 20px;
    border-radius: 15px;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
}

#game .elements {
    text-align: center;
    padding: 10px;
    margin: 10px;
    display: none;
}

#game .elements .element {
    cursor: pointer;
    display: inline-block;
    margin-right: 1%;
    margin-bottom: 4%;
    width: 9%;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
}

#game .elements .element.is-clicked.is-correct {
    border: 2px solid greenyellow;
}

#game .elements .element.is-clicked.is-incorrect {
    border: 2px solid #ff0000;
}

#game .elements .element .name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 18px;
    padding: 5px;
    border: 1px solid black;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background: #fff;
    display: none;
    margin: 0 0 -5px -5px;
}

#game .elements .element.is-clicked .name {
    display: block;
}

#game .elements .element img {
    max-width: 100%;
    max-height: 100%;
}

#game .popup-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    opacity: 0.85;
    display: none;
}

#game .popup {
    width: 800px;
    height: 500px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    display: none;
}

#game .popup.popup-result img {
    max-width: 200px;
    max-height: 200px;
}

#game .popup .content {
    padding: 20px;
    background: #fff;
    border-radius: 30px;
    -moz-border-radius: 30px;
    -webkit-border-radius: 30px;
    border: 5px solid darkgreen;
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
}

#game .popup h1 {
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 35px;
    color: #cbeb80;
}

#game .popup h2 {
    margin-bottom: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 28px;
    color: #cbeb80;
}

#game .popup p {
    font-size: 20px;
}

#game .popup p a {
    color: black;
    text-decoration: none;
}

#game .popup.popup-photo .content {
    border: 1px solid black;
    text-align: center;
}

#game .popup.popup-photo .content .counter {
    margin-top: 15px;
}

#game .popup.popup-photo .content .instruction {
    margin-bottom: 30px;
}

#game .popup.popup-photo .content img {
    max-width: 80%;
    max-height: 80%;
}

#game .popup.popup-only-photo .content img {
    max-width: 100%;
    max-height: 100%;
}

#game .popup.popup-result-2 h1 {
    color: #000;
}

#game .popup.popup-result-2 p {
    margin-bottom: 30px;
}

#game .popup.popup-result-2 .see-again {
    font-size: 20px;
    text-decoration: none;
    color: #000;
    padding: 10px 20px;
    border: 1px solid black;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
}

#refresh {
    position: fixed;
    background: #DF0056 url("../img/refresh.png") center center no-repeat;
    width: 128px;
    height: 128px;
    left: 0;
    bottom: 0;
    margin-top: -50px;
    cursor: pointer;
    z-index: 1000;
}

@media only screen and (max-width: 1100px) {
    #game .elements .element {
        width: 13%;
        margin-bottom: 1%;
        margin-right: 2%;
    }

    #game .elements .element img {
        width: 55%;
    }

    #game .elements .element .name {
        font-size: 15px;
    }

    #refresh {
        width: 90px;
        height: 90px;
        background-size: contain;
    }
}
