@font-face {
    font-family: "rubik";
    src: url(fonts/rubik.ttf);
}    

body {
    margin: 0px;
    font-family: 'inter', sans-serif;
    font-weight: 400;
    background-color: #E7ECDA;
    overscroll-behavior-y: none;
    transform-origin: center top;
    height: 100vh;
}

#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-map.png);
    background-size: cover;
    background-position: center;
}

#bg2 {
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 0.12;
    background: linear-gradient(rgba(71,143,244,1) 0%, rgba(255,255,255,1) 50%, rgba(25,170,30,1) 100%);
}

#bg3 {
    width: 100%;
    height: 100%;
    position: fixed;
    background-repeat: repeat;
    background-size: 15px;
    background-image: url(img/bg-grid.png);
    background-position: center;
    opacity: 0.24;
}

#logo-wrapper, #rules-wrapper {
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
}

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

#mainlogo {
    width: 71vw;
    height: 56vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(img/logo.svg);
    background-position: center;
}

.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;
}

.btn {
    height: 16vw;
    background: linear-gradient(0deg, #FEC90E 26%, #FCD113 36%, #FCD113 64%, #F6BA06 97%);
    border-radius: 2vw;
    border: solid;
    border-color: #1A1A1A;
    border-width: 0.6vw;
    margin: 13vw auto 0;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    text-transform: uppercase;
}

#play-btn { 
    padding: 0 5vw;
    transition: opacity 0.5s;
    flex-grow: 0;
    flex-shrink: 0;
}

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

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

.font-r66 {
    font-family: "rubik";
    font-size: 6.3vw;
    font-weight: 800;
    color: #fff;
    text-shadow:    0 0.6vw 1vw rgba(0, 0, 0, 0.8),
                    0.4vw 0.4vw  0.3vw rgba(0, 0, 0, 0.8),
                    -0.4vw -0.4vw  0.3vw rgba(0, 0, 0, 0.8),
                    0.4vw -0.4vw  0.3vw rgba(0, 0, 0, 0.8),
                    -0.4vw 0.4vw  0.3vw rgba(0, 0, 0, 0.8);
}

.font-r40 {
    font-family: "rubik";
    font-size: 4vw;
    font-weight: 800;
    color: #fff;
    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);
}

.font-r35 {
    font-family: "rubik";
    font-size: 3.5vw;
    font-weight: 800;
    color: #fff;
    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);
}

.font-r35-no-shadow {
    font-family: "rubik";
    font-size: 3.5vw;
    font-weight: 600;
    color: #fff;
}

.font-r28 {
    font-family: "rubik";
    font-size: 2.8vw;
    font-weight: 800;
    color: #fff;
    text-shadow:    0 0.3vw 0.3vw rgba(0, 0, 0, 0.8),
                0.12vw 0.12vw  0.12vw rgba(0, 0, 0, 0.8),
                -0.12vw -0.12vw  0.12vw rgba(0, 0, 0, 0.8),
                0.12vw -0.12vw  0.12vw rgba(0, 0, 0, 0.8),
                -0.12vw 0.12vw  0.12vw rgba(0, 0, 0, 0.8);
}


#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 {
    width: 100vw;
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 25vw;
}

#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;
}

.player > .frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(img/hero-card.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.player.taken > .frame {
    background-image: url(img/hero-taken.png);
}

.player.selected > .frame {
    background-image: url(img/hero-active.png);
}

.player > .avatar {
    width: 22vw;
    height: 22vw;
    position: absolute;
    left: 6.5vw;
    top: 14.5vw;
    background-image: url(img/elon.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.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 {
    z-index: 1;
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 3.5vw;
    text-transform: uppercase;
    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);
}

.avatarname {
    top: 4vw;
}

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

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

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

.user-name {
    opacity: 0;
}

.hidden {
    opacity: 0;
}

#avatar-outer {
    position: fixed;
    top: 3.6vw;
    left: 3.6vw;
    width: 18vw;
    height: 18vw;
    border: solid;
    border-color: #000;
    border-width: 0.5vw;
    border-radius: 3.8vw;
    background-color: #19AA1E;
}

#avatar-inner {
    position: fixed;
    top: 5.1vw;
    left: 5.1vw;
    width: 15vw;
    height: 15vw;
    border: solid;
    border-color: #000;
    border-width: 0.5vw;
    border-radius: 2.8vw;
    background-image: url(img/elon.png);
    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: 5.7vw;
    left: 16vw;
    width: 42vw;
    height: 14.6vw;
    background-image: url(img/hero-info.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#hero-score {
    position: absolute;
    top: 0.25vw;
    left: 19vw;
    width: 15vw;
    font-size: 7.5vw;
    text-transform: uppercase;
    color: #fff;
    font-family: 'rubik';
    font-weight: 700;
    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);
}

#hero-name {
    position: absolute;
    top: 10vw;
    left: 10vw;
    width: 26vw;
    font-size: 3.3vw;
    text-transform: uppercase;
    color: #fff;
    font-family: 'rubik';
    font-weight: 700;
    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);
}

#timer {
    position: fixed;
    top: 5vw;
    left: 67vw;
    width: 21vw;
    height: 8vw;
    font-size: 4vw;
    text-indent: 8.5vw;
    line-height: 8vw;
    background-image: url(img/timer-bg.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    text-transform: uppercase;
    color: #fff;
    font-family: 'rubik';
    font-weight: 700;
    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);
}

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

#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;
}

#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;
}

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

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

.q-answer {
    display: flex;
    width: 37vw;
    margin: 1vw;
    text-align: center;
    background-color: #3E7CD3;
    border-radius: 2vw;
    padding: 2vw 2vw 3vw;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;    
    box-shadow: 0 -1vw 0 0px #ffffff50 inset, 0 0.5vw 0 0px #00000033 inset, 0 0 10vw 2vw #00000033 inset;
}

.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;
}

.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: 14vw;
    width: 22vw;
    height: 22vw;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#q-sword {
    position: absolute;
    width: 20%;
    height: 20%;
    top: 20vw;
    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: 15%;
    height: 15%;
    top: 38vw;
    left: 20%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#contr-result {
    left: 65%;
}

#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); 
}


#own-hero { left: 10vw; }
#contr-hero { right: 10vw; }

.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;
}

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

@media (min-width: 600px) {
    #gamefield {
        display: none;
    }

    #bg4-pc {
        display: flex;
        width: 100vw;
        height: 100vh;
        position: fixed;
        background-image: url(img/bg-pc.png);
        background-repeat: no-repeat;
        background-size: auto 80vh;
        background-position: center;
    }
}



