@font-face {
    font-family: "OpenSans";
    src: url(fonts/OpenSans-Medium.ttf);
    font-weight: bold;
}

@font-face {
    font-family: "OpenSans";
    src: url(fonts/OpenSans-Regular.ttf);
    font-weight: normal;
}


body {
    margin: 0px;
    font-family: 'OpenSans', sans-serif;
    background-color: #fff;
    overscroll-behavior-y: none;
    transform-origin: center top;
    height: 100vh;
    user-select: none;
}

#gamefield {
    width: 100vw;
    height: 100vh;
    margin: auto;
    position: relative;
    transition: opacity 0.5s;
}

#bg1 {
    width: 100%;
    height: 100%;
    position: fixed;
    background-image: url(img/bg-mob.png);
    background-size: cover;
    background-position: center;
}

#bg-grid {
    width: 100%;
    height: 100%;
    position: fixed;
    background-repeat: repeat;
    background-size: 30px;
    background-image: url(img/bg-grid.png);
    background-position: center;
    opacity: 0;
    transition: opacity 1s;
    background-color: #ffffffaa;
}

.wrapper-justifier {
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
}

#mainlogo {
    margin-top: 38vw;
    width: 110vw;
    height: 100vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(img/logo.png);
    background-position: center;
}

.btn-wrapper {
    position: fixed;
    bottom: 10vw;
    width: 100vw;
    display: flex;
    justify-content: center;
}

.btn {
    position: relative;
    width: 88vw;
    height: 12vw;
    background-color: #3382C4;
    border-radius: 2.5vw;
    color: #fff;
    font-size: 5vw;
    font-weight: bold;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    transition: opacity 0.5s;
    flex-grow: 0;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0vw 0vw 10vw 10vw #ffffff;
}

.green-wrapper {
    width: 82vw;
    background-color: #65BD5E;
    padding: 4vw;
    border-radius: 2.5vw;
    border-radius: 4vw;
    margin-top: -16vw;
}

.text-wrapper {
    width: 73vw;
    padding: 4vw;
    background-color: #fff;
    border-radius: 2.5vw;
    border-width: 0.5vw;
    border-style: solid;
    border-color: #00000099;
    display: flex;
    flex-wrap: wrap;
}

.leader-line {
    position: relative;
    width: 76vw;
    background-color: #fff;
    padding: 2vw 2vw;
    margin: 1.5vw 0;
    border-radius: 2.5vw;
    border-width: 0.5vw;
    display: flex;
    flex-flow: wrap;
}

.leader-spacer {
    height: 12vw;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 10vw;
    margin-top: -8vw;
}

.leader-line.leader {
    background-color: #FDC328;
}

.leader-line>.num {
    background-color: #424648;
    height: 6vw;
    width: 6vw;
    border-radius: 1.5vw;
    line-height: 6vw;
    text-align: center;
    font-weight: bold;
    font-size: 4vw;
    color: #fff;
}

.leader-line>.name,
.leader-line>.score {
    line-height: 6vw;
    font-size: 4vw;
    font-weight: bold;
    padding: 0 3vw;
    width: 50vw;
}

.leader-line>.score {
    width: 7vw;
}

.leader-line > .santa-hat {
    width: 12vw;
    height: 12vw;
    left: -2.8vw;
    top: -1.6vw;
    opacity: 1;
}

h1 {
    text-align: center;
    color: #fff;
    font-size: 6vw;
    font-weight: bold;
    line-height: 6vw;
    margin: 1vw 0 4vw;
    text-transform: uppercase;
}

h2 {
    font-size: 4.4vw;
    color: #000;
    width: 100%;
}

p {
    font-size: 3.2vw;
    color: #000;
    margin-block-start: 1vw;
    margin-block-end: 1vw;
}

input {
    width: 71.2vw;
    background-color: #fff;
    padding: 4vw;
    border-radius: 2.5vw;
    border-width: 0.5vw;
    border-style: solid;
    text-indent: 1vw;
    height: 4vw;
    font-size: 4vw;
    caret-color: #000;
    flex-grow: 0;
    flex-shrink: 0;
}

#rules-wrapper {
    display: block;
    height: unset;
    position: relative;
}

.checkbox-wrapper>label {
    font-family: "rubik";
    font-size: 2.8vw;
    font-weight: 400;
    color: #1A1A1A;
    margin-left: -6vw;
    position: relative;
    left: 6vw;
    top: 0vw;
    line-height: 4vw;
}

#disclaimer {
    font-family: "rubik";
    font-size: 2.8vw;
    font-weight: 400;
    color: #1A1A1A;
    line-height: 4vw;
    margin-top: 10vw;
}

#disclaimer a {
    color: #888888;
}

#rules {
    width: 80vw;
    height: 180vw;
    margin-left: 10vw;
    margin-top: 10vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(img/rules.png);
    background-position: top;
}

#play-btn.rules-btn {
    position: fixed;
    left: 15.5vw;
    bottom: 10vw;
}

#play-btn.notactive {
    opacity: 0.2;
    pointer-events: none;
}

#reg-wrapper {
    width: 75vw;
    height: 100vh;
    margin: auto;
    display: flex;
    flex-flow: column;
    justify-content: center;
}

#title,
#q-title {
    text-align: center;
    text-transform: uppercase;
    width: 75vw;
    height: 17vw;
    margin-bottom: 8vw;
    background-image: url(img/title.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    flex-grow: 0;
    flex-shrink: 0;
}

.lose2 #q-title {
    background-image: url(img/title-red.png);
}

#title>span,
#q-title>span {
    top: 2.3vw;
    position: relative;
}

.form-input {
    text-indent: 1vw;
    width: 66vw;
    padding: 0 4vw;
    height: 13vw;
    border-width: 0.6vw;
    border-color: #000;
    border-style: solid;
    border-radius: 2.2vw;
    font-size: 4vw;
    margin: 1vw 0;
    text-transform: uppercase;
    caret-color: #000;
    flex-grow: 0;
    flex-shrink: 0;
}

.form-input:placeholder-shown {
    text-shadow: none !important;
    ;
}


.form-input::placeholder,
.form-input:-webkit-autofill {
    text-shadow: unset !important;
    color: #E0DFDF;
}

#chooser-wrapper {
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
    justify-content: center;
}

#chooser-wrapper>#title {
    position: absolute;
    top: 5vw;
    left: 12.5vw
}

#chooser-wrapper>#play-btn {
    position: fixed;
    bottom: 5vw;
    width: 30vw;
    left: 30vw;
    z-index: 2;
}

.player {
    width: 35vw;
    height: 50vw;
    position: relative;
    margin: 2vw;
    background: #fff;
    border-radius: 6vw;
    transition: 0.5s;
    cursor: pointer;
}

.player:hover {
    transform: scale(1.03);
}

.player>.frame {
    position: absolute;
    top: 2vw;
    left: 2vw;
    width: 31vw;
    height: 31vw;
    background-color: #A719AA;
    border-radius: 4vw;
}

.player>.avatar {
    width: 26vw;
    height: 26vw;
    position: absolute;
    left: 4.5vw;
    top: 4.5vw;
    border-radius: 2vw;
    background-image: url(img/elon.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.player.taken {
    opacity: 0.5;
}

.player.selected {
    box-shadow: 0vw 1vw 10vw 5vw #00000050;
    transform: scale(1.1);
    font-weight: bold;
}

.santa-hat {
    width: 10vw;
    height: 10vw;
    position: absolute;
    left: 5vw;
    top: -2vw;
    background-image: url(img/santa-hat.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0;
    transition: 0.5s;
}

.player.selected>.santa-hat {
    width: 20vw;
    height: 20vw;
    opacity: 1;
    left: 2vw;
    top: 0;
}

.player.taken>.avatar {
    -webkit-filter: grayscale(100%);
    /* Safari 6.0 - 9.0 */
    filter: grayscale(100%);
}

.player>.avatar.avatar-0 {
    background-image: url(img/avatars/choose-hero-0.png);
}

.player>.avatar.avatar-1 {
    background-image: url(img/avatars/choose-hero-1.png);
}

.player>.avatar.avatar-2 {
    background-image: url(img/avatars/choose-hero-2.png);
}

.player>.avatar.avatar-3 {
    background-image: url(img/avatars/choose-hero-3.png);
}

.player>.avatar.avatar-4 {
    background-image: url(img/avatars/choose-hero-4.png);
}

.player>.avatar.avatar-5 {
    background-image: url(img/avatars/choose-hero-5.png);
}

.avatarname,
.user-select,
.user-name {
    position: absolute;
    left: 2vw;
    width: 31vw;
    height: 13vw;
    z-index: 1;
    font-size: 3.5vw;
    color: #FFF;
    background-color: #A719AA;
    border-radius: 4vw;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
}

.avatarname {
    top: 30vw;
}

.user-select,
.user-name {
    top: 35vw;
}

.selected .user-select {
    opacity: 0;
}

.selected .user-name {
    opacity: 1;
}

.user-name {
    opacity: 0;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

#avatar-outer {
    position: fixed;
    top: 3vw;
    left: 3vw;
    width: 20vw;
    height: 20vw;
    border-radius: 4vw;
}

#avatar-inner {
    position: fixed;
    top: 5vw;
    left: 5vw;
    width: 16vw;
    height: 16vw;
    border-radius: 2vw;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#avatar-inner.av-0 {
    background-image: url(img/avatars/choose-hero-0.png);
}

#avatar-inner.av-1 {
    background-image: url(img/avatars/choose-hero-1.png);
}

#avatar-inner.av-2 {
    background-image: url(img/avatars/choose-hero-2.png);
}

#avatar-inner.av-3 {
    background-image: url(img/avatars/choose-hero-3.png);
}

#avatar-inner.av-4 {
    background-image: url(img/avatars/choose-hero-4.png);
}

#avatar-inner.av-5 {
    background-image: url(img/avatars/choose-hero-5.png);
}

#hero-info {
    position: fixed;
    top: 6vw;
    left: 19vw;
    width: 36vw;
    height: 14vw;
    background-color: #00000085;
    border-radius: 4vw;
}

#hero-score {
    position: absolute;
    top: 2vw;
    left: 6vw;
    width: 28vw;
    height: 7vw;
    font-size: 5vw;
    line-height: 7vw;
    background-color: #fff;
    color: #000;
    border-radius: 2vw;
    text-align: center;
    font-weight: bold;
    background-image: url(img/score-icon.png);
    background-repeat: no-repeat;
    background-size: 5vw;
    background-position-y: 1vw;
    background-position-x: 1vw;
}

#hero-name {
    position: absolute;
    top: 9vw;
    left: 4vw;
    width: 32vw;
    font-size: 3.5vw;
    line-height: 5vw;
    text-align: center;
    color: #fff;
    font-weight: 700;
}

#timer {
    user-select: none;
    position: fixed;
    top: 8vw;
    right: 11vw;
    width: 24vw;
    height: 7vw;
    font-size: 5vw;
    text-indent: 8vw;
    line-height: 7vw;
    background-image: url(img/timer-bg.png);
    background-repeat: no-repeat;
    background-size: 5vw;
    background-position-y: 1vw;
    background-position-x: 1vw;
    text-transform: uppercase;
    color: #000;
    background-color: #fff;
    font-weight: bold;
    border-radius: 2vw;
}

#close-btn {
    position: fixed;
    top: 8vw;
    right: 2vw;
    width: 7vw;
    height: 7vw;
    background-image: url(img/close-btn.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#battlefield {
    position: absolute;
    top: calc(50vh - 85vw);
    left: 0;
}

#battlefield>div {
    position: absolute;
    width: 20vw;
    height: 16vw;
    background-image: url(img/cell.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#battlefield>div.col-0 {
    left: 6.5vw
}

#battlefield>div.col-1 {
    left: 23.5vw
}

#battlefield>div.col-2 {
    left: 40.5vw
}

#battlefield>div.col-3 {
    left: 57.5vw
}

#battlefield>div.col-4 {
    left: 74.5vw
}

#battlefield>div.row-0 {
    top: 28vw
}

#battlefield>div.row-1 {
    top: 37vw
}

#battlefield>div.row-2 {
    top: 46vw
}

#battlefield>div.row-3 {
    top: 55vw
}

#battlefield>div.row-4 {
    top: 64vw
}

#battlefield>div.row-5 {
    top: 73vw
}

#battlefield>div.row-6 {
    top: 82vw
}

#battlefield>div.row-7 {
    top: 91vw
}

#battlefield>div.row-8 {
    top: 100vw
}

#battlefield>div.row-9 {
    top: 109vw
}

#battlefield>div.row-10 {
    top: 118vw
}

#battlefield>div.owner-0 {
    background-image: url(img/avatars/owner-0.png)
}

#battlefield>div.owner-1 {
    background-image: url(img/avatars/owner-1.png)
}

#battlefield>div.owner-2 {
    background-image: url(img/avatars/owner-2.png)
}

#battlefield>div.owner-3 {
    background-image: url(img/avatars/owner-3.png)
}

#battlefield>div.owner-4 {
    background-image: url(img/avatars/owner-4.png)
}

#battlefield>div.owner-5 {
    background-image: url(img/avatars/owner-5.png)
}


#battlefield>div.hero-0 {
    background-image: url(img/avatars/hero-0.png)
}

#battlefield>div.hero-1 {
    background-image: url(img/avatars/hero-1.png)
}

#battlefield>div.hero-2 {
    background-image: url(img/avatars/hero-2.png)
}

#battlefield>div.hero-3 {
    background-image: url(img/avatars/hero-3.png)
}

#battlefield>div.hero-4 {
    background-image: url(img/avatars/hero-4.png)
}

#battlefield>div.hero-5 {
    background-image: url(img/avatars/hero-5.png)
}

.plus-el {
    width: 100%;
    height: 100%;
    background-image: url(img/plus.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 5vw;
    opacity: 0;
    transform: opacity 1s;
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #000000cc;
    bottom: 0;
    right: 0;
    opacity: 0;
    transition: opacity 1s;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
    overflow: scroll;
}

#question-wrapper,
#battle-result-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-image: url(img/card.png);
    background-repeat: repeat-y;
    background-size: 100%;
    position: relative;
    width: 90vw;
}

#battle-result-wrapper.win2 {
    background-image: url(img/card-green.png);
}

#battle-result-wrapper.lose2 {
    background-image: url(img/card-red.png);
}

#battle-result-wrapper {
    width: 75vw;
    height: 50vw;
}

.green-wrapper.attack,
.blue {
    background-color: #3382C4;
}

.dark-blue {
    background-color: #256ca6;
}

.green-wrapper.defence,
.red {
    background-color: #F26651;
}

.dialog-inner {
    position: relative;
    height: 40vw;
    border-radius: 2vw;
}

#q-close-btn {
    position: absolute;
    top: -16vw;
    right: 0vw;
    width: 9vw;
    height: 9vw;
    background-image: url(img/close-btn.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.dialog-inner #q-close-btn {
    top: -26vw;
    right: -4vw;
}

#q-question {
    width: 80%;
    margin: 13vw 7.5vw 5vw;
}

#q-title {
    position: absolute;
    top: -6vw;
}

.q-wrapper {
    font-size: 4vw;
    padding: 4vw 1vw;
    width: 100%;
    font-weight: bold;
}

.q-answer {
    display: flex;
    width: 100%;
    margin: 1vw;
    text-align: center;
    background-color: #939598;
    color: #fff;
    border-radius: 2vw;
    padding: 2vw 2vw 3vw;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
    font-size: 3.2vw;
    cursor: pointer;
}

.q-answer.correct {
    background-color: #259e29;
}

#q-top {
    position: absolute;
    width: 100%;
    height: 4.5%;
    top: -2%;
    background-image: url(img/card-top.png);
    background-repeat: no-repeat;
    background-size: 100%;
}

.win2 #q-top {
    background-image: url(img/card-top-green.png);
}

.lose2 #q-top {
    background-image: url(img/card-top-red.png);
}

#q-bottom {
    position: absolute;
    width: 100%;
    height: 8%;
    bottom: -8%;
    background-image: url(img/card-bottom.png);
    background-repeat: no-repeat;
    background-size: 100%;
}

.win2 #q-bottom {
    background-image: url(img/card-bottom-green-20.png);
    height: 35%;
    bottom: -30%;
}

.lose2 #q-bottom {
    background-image: url(img/card-bottom-red.png);
    height: 35%;
    bottom: -30%;
}

#battlefield>div.plus>.plus-el {
    opacity: 1;
}

#battlefield>div.plus {
    cursor: pointer;
}

.win1,
.lose1 {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-repeat: no-repeat;
    background-size: 40vw auto;
    background-position: center;
}

.win1 {
    background-image: url(img/win1.png);
}

.lose1 {
    background-image: url(img/lose1.png);
}

.highlited {
    opacity: 0.3;
}

#own-hero,
#contr-hero {
    position: absolute;
    top: 5vw;
    width: 22vw;
    height: 22vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#own-hero {
    left: 10vw;
}

#contr-hero {
    right: 10vw;
}

#q-sword {
    position: absolute;
    width: 20%;
    height: 20%;
    top: 12vw;
    left: 40%;
    background-image: url(img/sword.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#own-result,
#contr-result {
    position: absolute;
    width: 8vw;
    height: 8vw;
    top: 28vw;
    left: 17vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#contr-result {
    left: 57vw;
}

#own-result.ok-result,
#contr-result.ok-result {
    background-image: url(img/ok-result.png);
}

#own-result.nope-result,
#contr-result.nope-result {
    background-image: url(img/nope-result.png);
}



@-webkit-keyframes rotating

/* Safari and Chrome */
    {
    from {
        -webkit-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes rotating {
    from {
        -ms-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    to {
        -ms-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.waiting {
    -webkit-animation: rotating 2s linear infinite;
    -moz-animation: rotating 2s linear infinite;
    -ms-animation: rotating 2s linear infinite;
    -o-animation: rotating 2s linear infinite;
    animation: rotating 2s linear infinite;
    background-image: url(img/waiting.png);
}


.hero-0 {
    background-image: url(img/avatars/hero-0.png);
}

.hero-1 {
    background-image: url(img/avatars/hero-1.png);
}

.hero-2 {
    background-image: url(img/avatars/hero-2.png);
}

.hero-3 {
    background-image: url(img/avatars/hero-3.png);
}

.hero-4 {
    background-image: url(img/avatars/hero-4.png);
}

.hero-5 {
    background-image: url(img/avatars/hero-5.png);
}

hd {
    text-shadow: 0 0.5vw 0.5vw rgba(0, 0, 0, 0.8), 0.2vw 0.2vw 0.2vw rgba(0, 0, 0, 0.8), -0.2vw -0.2vw 0.2vw rgba(0, 0, 0, 0.8), 0.2vw -0.2vw 0.2vw rgba(0, 0, 0, 0.8), -0.2vw 0.2vw 0.2vw rgba(0, 0, 0, 0.8);
}

#final-wrapper {
    position: relative;
    width: 90%;
}

#final-wrapper #title {
    top: -6vw;
    left: 5vw;
    width: 80vw;
    height: 20vw;
    position: absolute;
}

#final-wrapper #q-top {
    position: relative;
    height: 3vw;
    top: 0;
}

#final-wrapper #q-text {
    position: relative;
    width: 100%;
    background-image: url(img/card.png);
    background-repeat: repeat-y;
    background-size: 100%;
    padding-top: 10vw;
    padding-bottom: 4vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#final-wrapper #q-text p {
    margin: 1vw;
    text-shadow: 0 0.5vw 0.5vw rgba(0, 0, 0, 0.5), 0.2vw 0.2vw 0.2vw rgba(0, 0, 0, 0.5), -0.2vw -0.2vw 0.2vw rgba(0, 0, 0, 0.5), 0.2vw -0.2vw 0.2vw rgba(0, 0, 0, 0.5), -0.2vw 0.2vw 0.2vw rgba(0, 0, 0, 0.5);
}

#final-wrapper #q-text #final-score {
    background-image: url(img/score-bg.png);
    background-repeat: repeat-y;
    background-size: 100%;
    padding: 0;
    width: 30vw;
    text-align: center;
    margin: 4vw 0;
    font-size: 12vw;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0.6vw 1vw rgba(0, 0, 0, 0.2), 0.4vw 0.4vw 0.3vw rgba(0, 0, 0, 0.2), -0.4vw -0.4vw 0.3vw rgba(0, 0, 0, 0.2), 0.4vw -0.4vw 0.3vw rgba(0, 0, 0, 0.2), -0.4vw 0.4vw 0.3vw rgba(0, 0, 0, 0.2);
}

#final-wrapper #q-bottom {
    position: relative;
    width: 100%;
    height: 8vw;
    margin-top: 0;
    bottom: 0;
}

#final-wrapper #play-btn {
    margin-top: 6vw;
}

.text-wrapper>img {
    top: 4vw;
}

cd {
    font-family: 'Courier New', Courier, monospace;
    color: #adff2f;
    display: block;
    background-color: #00000022;
    padding: 3vw;
    margin: 2vw -3vw;
}

#hint {
    height: 0;
    overflow: hidden;
    font-size: 3vw;
    margin: 3vw 3vw 0;
    transition: 0.5s;
}

#hint.show {
    height: 4vw;
}
