*, *:before, *:after {
    margin: 0;
    outline: 0;
    border: none;
    color: black;
    box-sizing: border-box;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent; /* make transparent link selection */
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    scrollbar-width: thin; /* only for Firefox */
}

.dark-mode *, .dark-mode *:before, .dark-mode *:after {
    color: white;
}

::-webkit-scrollbar { /* non-Firefox browsers */
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(105, 112, 125, 0.5);
    border-radius: 4px;
}

.dark-mode ::-webkit-scrollbar-thumb {
    background-color: rgba(190, 190, 190, 0.5);
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background-color: transparent;
}

input { /* iOS hack: turn back input selection */
    -webkit-user-select: initial;
    -khtml-user-select: initial;
    -moz-user-select: initial;
    -ms-user-select: initial;
    user-select: initial;
    -webkit-appearance: none; /* remove original style */
    -moz-appearance: none;
    appearance: none;
}

body {
    font-size: 10pt;
    font-family: Arial;
    background: #dbd7d1;
}

.dark-mode body {
    background: #121212;
}

body:before { /* enable background */
    content: '';
    z-index: -1;
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: transparent;
}

body.global_info:before { /* disable background */
    z-index: 1999; /* golbal_info: 2000 */
    background-color: rgba(0, 0, 0, 0.4);
}

@-webkit-keyframes spinner {
      0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@keyframes spinner {
      0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@-webkit-keyframes profile_loader {
      0% { border-color: transparent; -webkit-filter: drop-shadow(0px 1px 0px #f2f2f2); }
     50% { border-color:         red; -webkit-filter:                             none; }
    100% { border-color: transparent; -webkit-filter: drop-shadow(0px 1px 0px #f2f2f2); }
}

@keyframes profile_loader {
      0% { border-color: transparent; filter: drop-shadow(0px 1px 0px #f2f2f2); }
     50% { border-color:         red; filter:                            none;  }
    100% { border-color: transparent; filter: drop-shadow(0px 1px 0px #f2f2f2); }
}

@-webkit-keyframes accelerated-spinner {
      0% { -webkit-transform: rotate(0); -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); }
     50% { -webkit-transform: rotate(540deg); -webkit-animation-timing-function: cubic-bezier(.36, .76, .45, .92); }
    100% { -webkit-transform: rotate(1080deg); }
}

@keyframes accelerated-spinner {
      0% { transform: rotate(0); animation-timing-function: cubic-bezier(.55, .055, .675, .19); }
     50% { transform: rotate(540deg); animation-timing-function: cubic-bezier(.36, .76, .45, .92); }
    100% { transform: rotate(1080deg); }
}

::-webkit-input-placeholder { /* input text color */
    color: #8a8a8a;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #8a8a8a;
    opacity: 1;
}

::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

a {
    /*color: blue;*/
    cursor: pointer;
    text-decoration: underline;
}

div {
    background-color: transparent;
}

.clear {
    clear: both;
}

.hidden {
    display: none;
}

.csere_babu {
    width: 70px;
    height: 70px;
    cursor: pointer;
    margin-left: 2px;
    border: 1px solid black;
}

.csere_babu:hover {
    background-color: #e1e1e1;
}

/**************************************************************************************************************************************
MAIN, MENU, CONTENT
**************************************************************************************************************************************/

#main {
    width: 100vw;
    height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    max-width: 768px; /* limited because of piece images resolution. full screen: 100vw (don't forget resize.js) */
/*
    Height without bars: since the soft-keyboard can resize the page, this is..
    sometimes cause a bug. So we use jQuery to page resize if the DOM is ready.
*/
/*
    max-height: -webkit-fill-available;
    max-height: -moz-available;
    max-height: fill-available;
*/
}

/*
In the landscape orientation we need to multiply with 0.6667vh all portrait value (3:2)
Android 4.4 don't support calc() multiply and divide, so we calculated all in advance..
If we have a height limit, then we need to limit the childs as well. In this case we
use the original vw value and the limited height to calculation. See next example:
height: calc(8px + 10.63vw); max-height: 74px; Limit for childs: (74 -8) / 0.1063
Now we use this for each params. Eg: old: 3vw; new value: (limit * 0.003) [in px]
*/

@media (orientation: landscape) { /* min aspect ratio -> 3:2 (iPhone 4) */
    #main {
        max-width: 66.67vh;
    }
}

#main #menu {
    width: inherit;
    max-height: 74px; /* limited at ~620px width */
    padding: 4px 0px;
    overflow: hidden;
    font-weight: bold;
    max-width: inherit;
    position: relative;
    height: calc(8px + 10.63vw);
}

@media (orientation: landscape) {
    #main #menu {
        height: calc(8px + 10.63 * 0.6667vh);
    }
}

#menu #menu_left {
    float: left;
    width: 25%;
    height: 100%;
    display: flex;
    position: relative;
    align-items: center;
    flex-direction: row;
}

#menu_left #menu_button {
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    position: relative;
}

#menu_left #menu_button a {
    float: left;
    width: 100%;
    height: 100%;
    font-size: 5.5vw;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0px 1px 0px #f2f2f2;
}

.dark-mode #menu_left #menu_button a {
    text-shadow: none;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #menu_left #menu_button a {
        font-size: 34px;
    }
}

@media (orientation: landscape) {

    #menu_left #menu_button a {
        font-size: calc(5.5 * 0.6667vh);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #menu_left #menu_button a {
            font-size: 34px;
        }
    }
}

#menu_left #menu_button a div {
    top: 50%;
    float: left;
    position: relative;
}

#menu_left #menu_button a div:nth-of-type(2) {
    margin-left: 8%;
    transform: translateY(-48%);
}

#menu_left #menu_arrow {
    left: 10%;
    width: 4.8vw;
    height: 4.8vw;
    max-width: 30px;  /* limited at ~620px width */
    max-height: 30px; /* limited at ~620px width */
    border-style: solid;
    background-color: transparent;
    transform: translateY(-50%) rotate(45deg);
    border-color: transparent transparent black black;
    border-width: 0px 0px calc(2px + 0.7vw) calc(2px + 0.7vw);
    -webkit-filter: drop-shadow(1px 1px 0px #f2f2f2);
    filter: drop-shadow(1px 1px 0px #f2f2f2);
}

.dark-mode #menu_left #menu_arrow {
    border-color: transparent transparent white white;
    -webkit-filter: none;
    filter: none;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #menu_left #menu_arrow {
        border-width: 0px 0px 6.34px 6.34px;
    }
}

@media (orientation: landscape) {

    #menu_left #menu_arrow {
        width: calc(4.8 * 0.6667vh);
        height: calc(4.8 * 0.6667vh);
        border-width: 0px 0px calc(2px + 0.7 * 0.6667vh) calc(2px + 0.7 * 0.6667vh);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #menu_left #menu_arrow {
            border-width: 0px 0px 6.34px 6.34px;
        }
    }
}

#menu #menu_right {
    width: 25%;
    height: 100%;
    display: flex;
    position: relative;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
}

#menu_right > svg {
    width: auto;
    height: 80%;
    margin-right: 10%;
    -webkit-filter: drop-shadow(0px 1px 0px #f2f2f2);
    filter: drop-shadow(0px 1px 0px #f2f2f2);
}

.dark-mode #menu_right > svg {
    fill: #ffffff;
    -webkit-filter: drop-shadow(0px 1px 0px #000000);
    filter: drop-shadow(0px 1px 0px #000000);
}

#menu_right #profile_button {
    width: auto;
    height: 80%;
    text-align: right;
    position: relative;
    padding-right: calc(8% - 3px);
}

#menu_right #profile_button a {
    width: auto;
    height: 100%;
    display: flex;
    position: relative;
    align-items: center;
}

#menu_right #profile_button a #menu_logged_in {
    z-index: 1;
    height: 100%;
    overflow: hidden;
    margin-left: 3px;
    max-width: 52.8px; /* limited at ~620px width */
    position: absolute;
    border-radius: 50%;
    text-align: center;
    box-sizing: content-box;
    background-color: #000000;
    width: calc((8px + 10.63vw) * 0.7914 - 6px); /* 0.7914 ~= 80% */
}

.dark-mode #menu_right #profile_button a #menu_logged_in {
    background-color: #ffffff;
}

#menu_logged_in span {
    width: auto;
    color: #dbd7d1;
    display: inline;
    font-size: 30vw; /* start first animation from big */
    position: relative;
    white-space: nowrap;
    line-height: calc((8px + 10.63vw) * 0.7914 - 6px);
}

.dark-mode #menu_logged_in span {
    color: #121212;
}

#menu_logged_in span:first-of-type { /* animated */
    transition: font-size 0.5s linear;
}

#menu_logged_in span:last-of-type { /* fake against animation overflow */
    visibility: hidden;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #menu_logged_in span {
        line-height: 52.8px;
    }
}

@media (orientation: landscape) {

    #menu_right #profile_button a #menu_logged_in {
        width: calc((8px + 10.63 * 0.6667vh) * 0.7914 - 6px);
    }

    #menu_logged_in span {
        font-size: calc(30 * 0.6667vh);
        line-height: calc((8px + 10.63 * 0.6667vh) * 0.7914 - 6px);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #menu_logged_in span {
            line-height: 52.8px;
        }
    }
}

#menu_right #profile_button a img {
    height: 100%;
    position: relative;
    border-radius: 50%;
    display: inline-block;
    box-sizing: content-box;
    border: 3px solid transparent;
    -webkit-filter: drop-shadow(0px 1px 0px #f2f2f2);
    filter: drop-shadow(0px 1px 0px #f2f2f2);
}

.dark-mode #menu_right #profile_button a img[src="pic/profile.png"] {
    display: none;
}

#menu_right #profile_button a img[src="pic/profile_dark.png"] {
    display: none;
    -webkit-filter: drop-shadow(0px 1px 0px #000000);
    filter: drop-shadow(0px 1px 0px #000000);
}

.dark-mode #menu_right #profile_button a img[src="pic/profile_dark.png"] {
    display: inline-block;
}

#menu_right #profile_button a img.profile_loader {
    -webkit-animation: profile_loader 2s linear infinite;
    animation: profile_loader 2s linear infinite;
}

#menu_right #profile_button a img.profile_connected {
    border-color: #629924;
    -webkit-filter: none;
    filter: none;
}

#menu_right #profile_status {
    z-index: 2;
    top: 5%;
    right: 55%;
    height: 90%;
    color: white;
    display: none;
    font-size: 4.5vw;
    padding: 0px 8px;
    line-height: 9vw;
    margin-right: 2px;
    font-weight: bold;
    position: absolute;
    border-radius: 4px;
    white-space: nowrap;
    border: 2px solid black;
    background-color: #629924;
    box-shadow: 0px 0px 5px black;
    text-shadow: 0px 1px 0px black;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #menu_right #profile_status {
        right: 76px;
        font-size: 28px;
        margin-right: 8%;
        line-height: 56px;
    }
}

@media (orientation: landscape) {

    #menu_right #profile_status {
        right: 55%;
        margin-right: 2px;
        font-size: calc(4.5 * 0.6667vh);
        line-height: calc(8.9 * 0.6667vh);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #menu_right #profile_status {
            right: 76px;
            font-size: 28px;
            margin-right: 8%;
            line-height: 56px;
        }
    }
}

#menu_right #profile_status:before {
    z-index: -1;
    content: '';
    top: 0px;
    right: 0px;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    position: absolute;
    background-color: inherit;
    border-color: transparent;
}

#menu_right #profile_status:after {
    z-index: -2;
    content: '';
    top: 27%;
    width: 4vw;
    height: 4vw;
    right: -2.1vw;
    max-width: 25px;  /* limited at ~620px width */
    max-height: 25px; /* limited at ~620px width */
    position: absolute;
    border-style: solid;
    transform: rotate(225deg);
    background-color: inherit;
    border-width: 0px 0px 2px 2px;
    border-color: transparent transparent black black;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #menu_right #profile_status:after {
        right: -13px;
    }
}

@media (orientation: landscape) {

    #menu_right #profile_status:after {
        width: calc(4 * 0.6667vh);
        height: calc(4 * 0.6667vh);
        right: calc(-2.1 * 0.6667vh);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #menu_right #profile_status:after {
            right: -13px;
        }
    }
}

#menu #logo {
    float: left;
    width: 50%;
    height: 100%;
    overflow: hidden;
    text-align: center;
    position: relative;
}

#menu #logo img {
    height: 100%;
    border: none;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    background-color: transparent;
}

#main #content {
    width: inherit;
    overflow: hidden;
    position: relative;
    max-width: inherit;
    height: calc(100% - 8px - 10.63vw); /* full - menu */
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #main #content {
        height: calc(100% - 74px);
    }
}

@media (orientation: landscape) {

    #main #content {
        height: calc(100% - 8px - 10.63 * 0.6667vh);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #main #content {
            height: calc(100% - 74px);
        }
    }
}

#content #game_menu,
#content #game_page,
#content #game_between {
    float: left;
    height: 100%;
    border: none;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
    position: absolute;
    text-align: center;
    background-color: #dbd7d1;
    transform: translateX(150vw);
    box-shadow: -8px 0px 8px -8px rgba(0, 0, 0, 0.7);
}

.dark-mode #content #game_menu,
.dark-mode #content #game_page,
.dark-mode #content #game_between {
    background-color: #121212;
}

#content #game_menu {
    z-index: 100;
    box-shadow: none;
    overflow-y: auto;
    transform: translateX(0px);
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

#content #game_between {
    z-index: 200;
}

#content #game_page {
    z-index: 300;
}

@media (orientation: landscape) {
    #content #game_between, #content #game_page {
        transform: translateX(100vh);
    }
}

/**************************************************************************************************************************************
ONLINE LISTS
**************************************************************************************************************************************/

#main #online_lists {
    bottom: 0px;
    z-index: 400;
    height: 100%;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
    position: absolute;
    background-color: #ffe4ae;
}

.dark-mode #main #online_lists {
    background-color: #62605d;
}

#online_lists #online_users,
#online_lists #online_rooms {
    width: inherit;
    height: inherit;
    max-width: inherit;
    position: relative;
}

#online_lists #online_users #users_title span,
#online_lists #online_rooms #rooms_title span {
    color: #ffffff;
}

#online_lists #users_content,
#online_lists #rooms_content {
    bottom: 50px;
    height: 100%; /* Hack: start fill at top */
    width: inherit;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    max-width: inherit;
    position: absolute;
    max-height: calc(100% - 50px - 53px); /* full - bottom - header */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

#online_lists #users_content:before,
#online_lists #rooms_content:before {
    content: attr(data-results) '';
    top: 0px;
    left: 0px;
    width: 100%;
    color: black;
    font-size: 18px;
    line-height: 50px;
    position: absolute;
    text-align: center;
}

#online_lists #users_content div,
#online_lists #rooms_content div {
    width: 100%;
    margin: 3px 0px;
    position: relative;
}
/*
#online_lists #users_content div:last-of-type,
#online_lists #rooms_content div:last-of-type {
    border-bottom: none;
}
*/
#online_lists #users_content div a,
#online_lists #rooms_content div a {
    width: 100%;
    color: black;
    display: flex;
    font-size: 18px;
    overflow: hidden;
    line-height: 50px;
    flex-wrap: nowrap;
    font-weight: bold;
    position: relative;
    align-items: center;
    text-decoration: none;
    background-color: #ffcc68;
    background: linear-gradient(to right, #fed075, #fbb52c);
    text-shadow: 0px 1px 0px #f2f2f2;
    border-radius: 15px;
    border: 1px solid #e9ad38;
}

#online_lists #rooms_content div a {
    padding: 0px 6px;
    justify-content: space-around;
}

.dark-mode #online_lists #users_content div a,
.dark-mode #online_lists #rooms_content div a {
    background-color: #444444;
    background: linear-gradient(to right, #444444, #282828);
    text-shadow: 0px 1px 0px #000000;
    border: 1px solid #2a2a2a;
}

#online_lists #users_content div a:hover,
#online_lists #rooms_content div a:hover {
    background: transparent;
    background-color: #ffcc68;
}

.dark-mode #online_lists #users_content div a:hover,
.dark-mode #online_lists #rooms_content div a:hover {
    background: transparent;
    background-color: #444444;
}

#online_lists #rooms_content div a > div {
    width: auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#online_lists #rooms_content div a > div.separator_div {
    padding: 0px 1px;
    overflow: visible;
}

#online_lists #rooms_content div a > div > span { /* elo */
    top: -1px;
    position: relative;
}

#online_lists #rooms_content div a > div > span > span { /* elo number */
    top: 1px;
    position: relative;
}

#online_lists #users_content a .user_status {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
    margin-left: 10px;
    position: relative;
    border-radius: 50%;
    background-color: #72a33a;
    box-shadow: 0px 1px 0px rgba(255,255,255,0.6);
}

.dark-mode #online_lists #users_content a .user_status {
    box-shadow: 0px 1px 0px #000000;
}

#online_lists #users_content a.user_challenge_off .user_status {
    background-color: #ea2424;
}

#online_lists #users_content a.user_ingame .user_status {
    background-color: #0479bf;
}

#online_lists #users_content a .user_username {
    width: auto;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    margin-left: 6px;
    position: relative;
    align-items: center;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#online_lists #users_content a .user_list_elo {
    width: 56px;
    flex-shrink: 0;
    margin-left: 5px;
    position: relative;
    background-color: inherit;
}

#online_lists #users_content a .right_icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-right: 10px;
    position: relative;
}

#online_lists input {
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 50px;
    color: black;
    font-size: 16px;
    overflow: visible;
    position: absolute;
    border-radius: 0px;
    background-color: #fafaf9;
    padding: 0px 50px 0px 15px;
    border-top: 1px solid #8a8a8a;
}

#online_lists .serach_img {
    right: 0px;
    bottom: 0px;
    height: 49px;
    position: absolute;
    padding: 12px 12px 12px 12px;
    -webkit-filter: invert(51%) sepia(25%) saturate(0%) hue-rotate(281deg) brightness(101%) contrast(85%);
    filter: invert(51%) sepia(25%) saturate(0%) hue-rotate(281deg) brightness(101%) contrast(85%);
}

#online_lists .menu_header {
    top: 0px;
    left: 0px;
    width: 100%;
    position: absolute;
}

/**************************************************************************************************************************************
GAME CHAT
**************************************************************************************************************************************/

#main #chat_box {
    bottom: 0px;
    z-index: 500;
    height: 100%;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
    position: absolute;
    background-color: #ffe4ae;
}

.dark-mode #main #chat_box {
    background-color: #62605d;
}

#chat_box #chat_content {
    bottom: 50px;
    width: inherit;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    max-width: inherit;
    position: absolute;
    padding: 5px 10px 0px 10px;
    max-height: calc(100% - 50px - 53px); /* full - bottom - header */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

#chat_box #chat_content div {
    clear: both;
    padding: 10px;
    font-size: 16px;
    text-align: left;
    position: relative;
    margin-bottom: 5px;
    border-radius: 10px;
    word-wrap: break-word;
    max-width: calc(100% - 40px);
}

#chat_box #chat_content div.chat_left {
    float: left;
    color: black;
    background-color: #fafaf9;
}

#chat_box #chat_content div.chat_left * {
    color: black;
}

#chat_box #chat_content div.chat_right {
    float: right;
    color: white;
    background-color: #0084ff;
}

#chat_box input {
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 50px;
    color: black;
    font-size: 16px;
    overflow: visible;
    position: absolute;
    border-radius: 0px;
    background-color: #fafaf9;
    padding: 0px 55px 0px 15px;
    border-top: 1px solid #8a8a8a;
}

#chat_box img {
    right: 0px;
    bottom: 0px;
    height: 49px;
    cursor: pointer;
    position: absolute;
    padding: 12px 15px 12px 15px;
    -webkit-filter: invert(51%) sepia(25%) saturate(0%) hue-rotate(281deg) brightness(101%) contrast(85%);
    filter: invert(51%) sepia(25%) saturate(0%) hue-rotate(281deg) brightness(101%) contrast(85%);
}

#chat_box img.send_active {
    -webkit-filter: none;
    filter: none;
}

#chat_box .menu_header {
    top: 0px;
    left: 0px;
    width: 100%;
    position: absolute;
}

/**************************************************************************************************************************************
LOGIN, SIGNUP, RECOVER, PROFILE, PASSWORD
**************************************************************************************************************************************/

#content #profile {
    z-index: 1000;
    height: 100%;
    display: none;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
    position: absolute;
    background-color: #e7e7e7;
    background: linear-gradient(#e7e7e7, #b7b7b7);
}

.dark-mode #content #profile {
    background-color: #7b7b7b;
    background: linear-gradient(#7b7b7b, #484848);
}

#profile #profile_content {
    padding: 10px;
    font-size: 15px;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    position: relative;
    font-weight: bold;
    max-height: calc(100% - 53px); /* full - header */
    text-shadow: 0px 1px 0px #f2f2f2;
}

.dark-mode #profile #profile_content {
    text-shadow: 0px 1px 0px #000000;
}

#profile_content #profile_infos {
    width: 100%;
    font-size: 16px;
}

#profile_infos #userdetails_wrapper {
    width: 100%;
    display: flex;
    height: inherit;
    flex-wrap: nowrap;
    line-height: normal;
    align-items: center;
    flex-direction: row;
    justify-content: start;
}

#userdetails_wrapper #avatar_wrapper {
    width: 40px;
    height: 48px;
    display: flex;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    margin-right: 3px;
    position: relative;
    align-items: center;
    background-color: transparent;
    border-radius: 6px 6px 0px 0px;
}

#userdetails_wrapper #avatar_wrapper.open {
    background-color: #b7b7b7;
    box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.dark-mode #userdetails_wrapper #avatar_wrapper.open {
    background-color: #484848;
}

#userdetails_wrapper #avatar_wrapper .user_avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-left: -2px;
    position: relative;
}

#userdetails_wrapper #user_ping {
    flex-shrink: 0;
}

#userdetails_wrapper #profile_username {
    width: auto;
    flex-grow: 1;
    min-width: 0;
    display: flex;
    height: inherit;
    cursor: pointer;
    overflow: hidden;
    align-items: center;
    justify-content: start;
}

#userdetails_wrapper #profile_username span:first-of-type { /* name */
    flex-grow: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: underline;
}

#userdetails_wrapper #profile_username span:last-of-type { /* gender */
    flex-shrink: 0;
}

#profile_content .online_users span {
    font-size: 16px;
}

#profile_content .online_users span b {
    font-size: 16px;
}

#profile_content a:not(.menu_content):not(.right_icon) {
    color: #0000d5;
    padding: 5px 0px;
}

.dark-mode #profile_content a:not(.menu_content):not(.right_icon) {
    color: #ffffff;
}

#profile #login_form,
#profile #signup_form,
#profile #recover_form,
#profile #password_form {
    font-weight: bold;
    text-align: center;
}

#profile #login_form .input_div,
#profile #signup_form .input_div,
#profile #recover_form .input_div,
#profile #password_form .input_div {
    text-align: left;
    padding: 5px 8px;
}

.input_div.label {
    color: #535353;
}

.dark-mode .input_div.label {
    color: #d5d5d5;
}

#profile input:not([type=checkbox]):not([type=radio]) {
    width: 100%;
    color: black;
    padding: 10px;
    font-size: 16px;
    overflow: visible;
    position: relative;
    border-radius: 4px;
    background-color: #fafaf9;
    border: 1px solid #8a8a8a;
    text-shadow: none;
}

.dark-mode #profile input:not([type=checkbox]):not([type=radio]) {
    color: white;
    background-color: #303030;
}

#profile select {
    height: 41px;
    color: black;
    font-size: 16px;
    overflow: visible;
    position: relative;
    border-radius: 4px;
    margin-right: 10px;
    background-color: #fafaf9;
    border: 1px solid #8a8a8a;
    text-shadow: none;
}

.dark-mode #profile select {
    color: white;
    background-color: #303030;
}

#profile input[type=radio] {
    display: none;
}

#profile label {
    margin-right: 10px;
    background: transparent;
}

#profile label:before {
    content: '';
    width: 22px;
    height: 22px;
    margin-right: 5px;
    position: relative;
    border-radius: 50%;
    display: inline-block;
    vertical-align: bottom;
    border: 2px solid #000000;
    background-color: #fafaf9;
    box-shadow: none;
}

#profile input[type=radio]:checked + label:before {
    top: -2px;
    left: 2px;
    width: 18px;
    height: 18px;
    margin-right: 9px;
    background: #70ad2b;
    border: 2px solid #fafaf9;
    box-shadow: 0px 0px 0px 2px #000000;
}

#profile button {
    cursor: pointer;
    font-size: 18px;
    margin-top: 10px;
    font-weight: bold;
    position: relative;
    border-radius: 4px;
    background-color: #b7b7b7;
    border: 1px solid #8a8a8a;
    padding: 9px 15px 8px 15px;
    text-shadow: 0px 1px 0px #f2f2f2;
    background: linear-gradient(#e7e7e7, #b7b7b7);
}

.dark-mode #profile button {
    background-color: #282828;
    text-shadow: 0px 1px 0px #000000;
    background: linear-gradient(#444444, #282828);
}

#profile button:hover {
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
}

#captcha {
    height: 38px;
    width: 114px;
    margin: 0px auto;
    border-radius: 4px;
    border: 1px solid black;
    background-color: #f3dca6;
}

#profile #signup_agree {
    font-size: 12px;
    margin-top: 5px;
}

#profile_content #avatar_list {
    left: 0px;
    z-index: 1;
    display: none;
    width: inherit;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    position: relative;
    max-width: inherit;
    text-align: center;
    background: #b7b7b7;
    margin-top: -4px;
    padding: 5px 5px 5px 10px;
    border-radius: 0px 6px 6px 6px;
    height: calc(100% - 53px); /* possible - userdetails_wrapper */
    box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.dark-mode #profile_content #avatar_list {
    background: #484848;
}

#avatar_list .avatars_category {
    margin-top: 5px;
}

#avatar_list .avatars_container {
    display: flex;
    flex-wrap: wrap;
    padding-top: 5px;
    flex-direction: row;
    justify-content: center;
}

.avatars_container a {
    width: 60px;
    height: 60px;
    display: block;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 5px;
    text-align: center;
    background: #929292;
    padding: 2px !important;
    border: 3px solid #929292;
}

.avatars_container a:hover {
    background: #797979;
    border-color: #797979;
}

.dark-mode .avatars_container a {
    background: #929292;
    border: 3px solid #929292;
}

.dark-mode .avatars_container a:hover {
    background: #aaaaaa;
    border-color: #aaaaaa;
}

.avatars_container a.selected {
    background: #f9f9f9 !important;
    border-color: #f74300 !important;
}

.avatars_container a img {
    height: 100%;
    position: relative;
    pointer-events: none;
}

.avatar_info_svg {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.avatar_info_svg svg {
    width: 50px;
    height: 50px;
}

/**************************************************************************************************************************************
GLOBAL INFO ABLAK, HTML-SPINNER, FLOAT-SPINNER
**************************************************************************************************************************************/

#global_info {
    top: 50%;
    left: 50%;
    width: 310px;
    color: black;
    z-index: 2000;
    display: none;
    position: absolute;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0px 0px 7px black;
    transform: translate(-50%, -50%);
}

/* close icon for modal */

#global_info .close_icon {
    top: 4px;
    right: 4px;
    width: 34px;
    height: 34px;
    display: flex;
    cursor: pointer;
    border-radius: 50%;
    position: absolute;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
}

#global_info .close_icon:before,
#global_info .close_icon:after  {
    content: '';
    transform: translate(-50%, -50%) rotate(45deg);
    background: #4f4f4f;
    position: absolute;
    border-radius: 4px;
    width: 20px;
    height: 3px;
    left: 50%;
    top: 50%;
}

#global_info .close_icon:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* end of close modal */

#global_info #info_content {
    font-size: 20px;
    max-height: calc(100vh - 200px); /* 200px ~4 button -> was 330px*/
    font-weight: bold;
    padding: 10px 2px;
    position: relative;
    text-align: center;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    word-wrap: break-word;
}

.dark-mode #global_info #info_content,
.dark-mode #global_info #info_content * {
    color: black;
}

#global_info #info_message {
    font-size: 13px;
    margin-top: 8px;
}

#global_info #info_message,
#global_info #info_message > * {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#info_message #elo_animation {
    color: #828282;
    font-size: 18px;
    margin-top: 8px;
}

#info_message #elo_animation.winning {
    color: green;
}

#info_message #elo_animation.losing {
    color: #ce0000;
}

#info_message #elo_animation span {
    color: black;
}

#global_info a {
    width: 100%;
    height: 51px;
    color: #0040dd;
    display: block;
    font-size: 20px;
    text-align: center;
    position: relative;
    border-color: gray;
    border-style: solid;
    font-weight: normal;
    text-decoration: none;
    padding: 13px 0px 13px 0px;
    border-width: 1px 0px 0px 0px;
    background-color: transparent;
}

#global_info a:last-of-type { /* last button is rounded */
    border-radius: 0px 0px 12px 12px;
}

#global_info a:hover {
    background: #e1e1e1;
}

#global_info .modal_profile_title {
    height: 40px;
    position: relative;
    display: inline-flex;
    justify-content: center;
}

#global_info .modal_profile_title > svg {
    width: 40px;
    height: 40px;
    margin-left: -5px;
    position: relative;
}

#global_info .modal_profile_title > span {
    flex-grow: 0;
    text-align: left;
    align-self: center;
}

#global_info .show_user_button {
    height: 50px;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 5px;
    position: relative;
    border-radius: 5px;
    display: inline-flex;
    background-color: #990000; /*#009299*/
    box-shadow: 0px 1px 2px black;
    justify-content: center;
}

#global_info .challenge_ask + #info_message,
#global_info .modal_profile_title + #info_message { /* margin is not needed */
    margin-top: 0px;
}

#global_info .show_user_button > svg {
    width: 40px;
    height: 40px;
    margin-left: -5px;
    position: relative;
}

#global_info .show_user_button > span {
    color: inherit;
    font-size: 16px;
    overflow: hidden;
    max-width: 250px;
    text-align: left;
    align-self: center;
    text-shadow: 0px 1px 0px black;
}

#global_info .show_user_button > span > span {
    top: -1px;
    color: inherit;
    position: relative;
}

.dark-mode #global_info .show_user_button span {
    color: #ffffff !important;
}

#global_info .separator_top {
    width: 98%;
    margin-top: 10px;
    padding-top: 10px;
    display: inline-block;
    border-top: 1px solid gray;
}

#global_info .separator_bottom {
    width: 98%;
    margin-bottom: 10px;
    padding-bottom: 10px;
    display: inline-block;
    border-bottom: 1px solid gray;
}

#html-spinner-old {
    width: 45px;
    height: 45px;
    display: block;
    margin: 5px auto;
    position: relative;
    border-radius: 50%;
    border: 5px solid #487aad;
    border-top: 5px solid transparent;
    -webkit-animation: spinner 1.0s linear infinite 0.1s;
    animation: spinner 1.0s linear infinite 0.1s;
}

#html-spinner {
    width: 45px;
    height: 45px;
    display: block;
    margin: 5px auto;
    position: relative;
    border-radius: 50%;
    border: 3px solid #cccccc;
}

#html-spinner:before {
    content: '';
    top: -3px;
    left: -3px;
    width: inherit;
    height: inherit;
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid #0059b5;
    -webkit-animation: accelerated-spinner 2.0s linear infinite 0.1s;
    animation: accelerated-spinner 2.0s linear infinite 0.1s;
}

#float-spinner {
    width: 40px;
    height: 40px;
    z-index: 2000;
    display: none;
    margin: 5px auto;
    position: absolute;
    border-radius: 50%;
    border: 5px solid #ffffff;
    background-color: #ffffff;
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.5);
}

#float-spinner:before,
#float-spinner:after {
    content: '';
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    position: absolute;
    border-radius: 50%;
}

#float-spinner:before {
    border: 3px solid #cccccc;
}

#float-spinner:after {
    border: 3px solid transparent;
    border-top: 3px solid #0059b5;
    -webkit-animation: accelerated-spinner 2.0s linear infinite 0.1s;
    animation: accelerated-spinner 2.0s linear infinite 0.1s;
}

/**************************************************************************************************************************************
MENU_ELEMEK
**************************************************************************************************************************************/

.menu_header {
    border: none;
    height: 53px;
    color: white;
    font-size: 26px;
    font-weight: bold;
    line-height: 53px;
    text-align: center;
    background-color: #57463c;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    text-shadow: 0px 1px 0px rgba(0,0,0,0.6);
}

.dark-mode .menu_header {
    background-color: #303030;
    text-shadow: 0px 1px 0px black;
}

.menu_header .close_icon {
    top: 0px;
    right: 0px;
    width: 52px;
    height: 52px;
    cursor: pointer;
    position: absolute;
    display: inline-block;
    -webkit-filter: drop-shadow(0px 2px 1px #000000);
    filter: drop-shadow(0px 2px 1px #000000);
}

.menu_header .close_icon:before,
.menu_header .close_icon:after  {
    content: '';
    transform: rotate(45deg);
    background: #ffffff;
    position: absolute;
    border-radius: 4px;
    margin-left: -12px;
    width: 24px;
    height: 3px;
    left: 50%;
    top: 50%;
}

.menu_header .close_icon:after {
    transform: rotate(-45deg);
}

.menu_item {
    height: 53px;
    width: inherit;
    overflow: hidden;
    padding-top: 0px;
    max-width: inherit;
    position: relative;
    text-align: center;
}

.menu_item .menu_content {
    display: block;
    width: inherit;
    height: inherit;
    font-size: 24px;
    text-align: left;
    font-weight: bold;
    line-height: 53px; /* +1 for top*/
    max-width: inherit;
    position: relative;
    padding-left: 52px;
    text-decoration: none;
    background-color: #ffcc68;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    text-shadow: 0px 1px 0px rgba(255,255,255,0.6);
}

.dark-mode .menu_item .menu_content {
    background-color: #444444;
    text-shadow: 0px 1px 0px #000000;
}

@media (hover: hover) {
    .menu_item a:not(.right_icon):hover {
        background: none;
        background-color: #ffd686;
    }
}

.menu_item a:not(.right_icon).hover {
    background: none;
    background-color: #ffd686;
}

@media (hover: hover) {
    .dark-mode .menu_item a:not(.right_icon):hover {
        background: none;
        background-color: #4F4F4F;
    }
}

.dark-mode .menu_item a:not(.right_icon).hover {
    background: none;
    background-color: #4F4F4F;
}

.menu_item.option a {
    background-color: #fce2af;
}

.dark-mode .menu_item.option a {
    background-color: #62605d;
}

@media (hover: hover) {
    .menu_item.option a:hover {
        background-color: #fbe9c7;
    }
}

.menu_item.option a.hover {
    background-color: #fbe9c7;
}

@media (hover: hover) {
    .dark-mode .menu_item.option a:hover {
        background-color: #8b8987;
    }
}

.dark-mode .menu_item.option a.hover {
    background-color: #8b8987;
}

.menu_item.profile_item:first-of-type {
    margin-top: -10px;
}

.menu_item.profile_item .menu_content {
    width: 100%;
    padding-left: 0px;
    font-size: inherit;
    text-shadow: inherit;
    font-weight: inherit;
    background: transparent;
    background-color: transparent;
}

.menu_item.profile_item a:not(.right_icon):hover {
    background-color: transparent;
}

.menu_item.center_button .menu_content {
    padding-left: 0px;
    text-align: center;
}

.menu_item.without_icon .menu_content {
    padding-left: 16px;
}

.menu_item.color_button .menu_content {
    background: linear-gradient(to right, #fed075, #fbb52c);
}

.dark-mode .menu_item.color_button .menu_content {
    background: linear-gradient(to right, #444444, #282828);
}

.menu_item .menu_icon {
    top: 0px;
    left: 0px;
    position: absolute;
    height: calc(100%);/* + 1px*/
    background-color: inherit;
    padding: 11px 10px 11px 11px;
}

/* arrow used only in accordion or right_icon */
img[src="pic/menu_arrow.svg"].menu_icon {
    background-color: transparent;
}

/* last item on the list */
div > .menu_item:last-of-type .menu_icon {
    height: 100%;
}

.menu_item .right_icon {
    top: 11px;
    right: 11px;
    height: 30px;
    position: absolute;
}

.menu_item.profile_item .right_icon {
    right: 0px;
}

.menu_item .toggle_icon {
    width: 50px;
    height: 30px;
    position: relative;
    border-radius: 50px;
    background-color: #46c55d;
}
/*
.menu_item .toggle_icon.off {
}
*/
.menu_item .toggle_icon:before {
    content: '';
    width: 50px;
    height: 30px;
    transition: none;
    position: absolute;
    border-radius: 50px;
    transform: scale(0);
    background-color: #ff4545;
}

.menu_item .toggle_icon.off:before {
    transition: all 0.30s ease;
    transform: scale(1);
}

.menu_item .toggle_icon:after {
    content: '';
    top: 2px;
    left: 22px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    position: absolute;
    background: #ffffff;
    transition: all 0.1s ease-in-out;
    box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.3);
}

.menu_item .toggle_icon.off:after {
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    transform: translateX(-20px);
}

.menu_item .menu_content .question_symbol {
    top: 12px;
    right: 16px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 26px;
    text-shadow: none;
    position: absolute;
    text-align: center;
    border-radius: 50%;
    background: #ffffff;
    line-height: normal;
    display: inline-block;
    box-shadow: 0px 0px 3px #000000;
}

.dark-mode .menu_item .menu_content .question_symbol {
    color: black;
}

.dark-mode img[src="pic/menu_arrow.svg"] {
    -webkit-filter: invert(100%) sepia(5%) saturate(0%) hue-rotate(143deg) brightness(104%) contrast(100%) drop-shadow(0px 1px 0px #000000);
    filter: invert(100%) sepia(5%) saturate(0%) hue-rotate(143deg) brightness(104%) contrast(100%) drop-shadow(0px 1px 0px #000000);
}

/**************************************************************************************************************************************
GAME MENU
**************************************************************************************************************************************/

#game_menu #game_mode {
    display: none;
    width: inherit;
    max-width: inherit;
}

#game_menu #game_resume {
    display: none;
}

#game_menu #welcome {
    height: 53px;
    display: flex;
    fill: #cccccc;
    color: #cccccc;
    align-items: center;
    justify-content: center;
    background-color: #57463c;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    /*border-radius: 10px 10px 0px 0px;
    border-top: 1px solid rgba(0,0,0,0.3);
    background: linear-gradient(#fbb52c, #ffcc68);*/
}

.dark-mode #game_menu #welcome {
    fill: #cccccc;
    color: #cccccc;
    background: #303030;
}

#game_menu #welcome > svg {
    height: 30px;
}

#game_menu #author {
    border: none;
    font-size: 14px;
    margin-top: 0px;
    padding: 11px 0px;
    font-weight: bold;
    background-color: #ffcc68;
    background: linear-gradient(#ffcc68, #f5ce82);
    text-shadow: 0px 1px 0px #ffe6b6;
    border-radius: 0px 0px 10px 10px;
    box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.7), 0px 3px 2px -2px rgba(0, 0, 0, 0.7);
}

.dark-mode #game_menu #author {
    background-color: #444444;
    background: linear-gradient(#444444, #555555);
    text-shadow: 0px 1px 0px #000000;
}

#game_menu #author a {
    color: black;
}

.dark-mode #game_menu #author a {
    color: white;
}

#game_menu #game_resume a {
    width: 100%;
    color: white;
    border-top: none;
    padding-left: 0px;
    text-align: center;
    background-color: #009edd;
    text-shadow: 0px 1px 1px #424242;
}

@media (hover: hover) {
    #game_menu #game_resume a:hover {
        background-color: #30b4e9;
    }
}

#game_menu #game_resume a.hover {
    background-color: #30b4e9;
}

#game_menu #game_resume a img {
    -webkit-filter: invert(100%) drop-shadow(0px 1px 1px #424242);
    filter: invert(100%) drop-shadow(0px 1px 1px #424242);
}

/**************************************************************************************************************************************
NEW GAME MENU
**************************************************************************************************************************************/

#game_between #new_game_menu {
    width: inherit;
    max-width: inherit;
}

#new_game_menu #new_game_content {
    padding: 0px;
    border: none;
    width: inherit;
    max-width: inherit;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    max-height: calc(100vh - 8px - 10.63vw - 53px); /* (full - menu) - header */
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #new_game_menu #new_game_content {
        max-height: calc(100vh - 74px - 53px);
    }
}

@media (orientation: landscape) {

    #new_game_menu #new_game_content {
        max-height: calc(100vh - 8px - 10.63 * 0.6667vh - 53px);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #new_game_menu #new_game_content {
            max-height: calc(100vh - 74px - 53px);
        }
    }
}

/* ################# ELEMZES KOZTES ################# */

#analysis_game_history {
    width: 100%;
    display: none;
}

#analysis_game_history .menu_item a {
    padding-left: 16px;
    padding-right: 32px; /* arrow icon */
    display: flex;
    width: inherit;
    height: inherit;
    font-weight: bold;
    max-width: inherit;
    line-height: normal;
    text-decoration: none;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.dark-mode #analysis_game_history .menu_item a {
    text-shadow: 0px 1px 0px #000000;
}

#analysis_game_history .menu_item a .players {
    width: 100%;
    display: flex;
    font-size: 17px;
}

#analysis_game_history .menu_item a .infos {
    width: 100%;
    display: flex;
    font-size: 14px;
}

#analysis_game_history .menu_item a .players > div {
    width: auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#analysis_game_history .menu_item a .players > div.separator_div {
    padding: 0px 1px;
    overflow: visible;
}

#analysis_game_history .menu_item a .players > div > span { /* elo */
    top: -1px;
    position: relative;
}

#analysis_game_history .menu_item a .players > div > span > span { /* elo number */
    top: 1px;
    position: relative;
}

#analysis_start_position {
    height: 150px;
    display: none;
}

#analysis_start_position .menu_content {
    height: 100%;
    display: flex;
    padding: 8px 16px;
    align-items: center;
    flex-direction: column;
    background-color: #fce2af;
    justify-content: flex-start;
}

.dark-mode #analysis_start_position .menu_content {
    background-color: #62605d;
}

#analysis_start_position .menu_content > div {
    line-height: normal;
}

#analysis_start_position #start_pos_area {
    color: black;
    width: 100%;
    resize: none;
    flex: 1 1 auto;
    background-color: #f1f1f1;
    border: 1px solid #dad8d6;
    border-radius: 6px 6px 0px 0px;
}

#analysis_start_position #pos_apply_btn {
    width: 100%;
    display: flex;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    position: relative;
    text-align: center;
    align-items: center;
    background: #666666;
    line-height: normal;
    justify-content: center;
    border: 1px solid #666666;
    border-radius: 0px 0px 6px 6px;
    text-shadow: 0px 1px 0px rgba(0,0,0,0.6);
    border-top: none;
}

.dark-mode #analysis_start_position #start_pos_area,
.dark-mode #analysis_start_position #pos_apply_btn {
    border-color: #404040;
    background: #333333;
    color: white;
}

#analysis_start_position #pos_apply_btn:hover {
    background-color: #777777;
}

.dark-mode #analysis_start_position #pos_apply_btn:hover {
    background-color: #404040;
}

#analysis_start_position #pos_apply_btn > * {
    color: white;
}

#analysis_start_position #pos_apply_btn img {
    height: 20px;
    padding-right: 10px;
    -webkit-filter: drop-shadow(0px 1px 0px rgba(0,0,0,0.6));
    filter: drop-shadow(0px 1px 0px rgba(0,0,0,0.6));
}

/* ################# TOVABBI BEALLITASOK ################# */

#new_game_menu .menu_content #side_name_1 {
    left: 16px;
    float: left;
    height: 30px;
    position: absolute;
}

#new_game_menu .menu_content #side_name_2 {
    right: 16px;
    float: right;
    height: 30px;
    position: absolute;
}

#new_game_menu .menu_content #side_name_1.small {
    left: 3vw;
    height: 100%;
    font-size: 5.5vw;
    line-height: 53px;
}

#new_game_menu .menu_content #side_name_2.small {
    right: 3vw;
    height: 100%;
    font-size: 5.5vw;
    line-height: 53px;
}

@media screen and (min-width: 410px) {
    #new_game_menu .menu_content #side_name_1.small {
        left: 16px; font-size: 24px;
    }
    #new_game_menu .menu_content #side_name_2.small {
        right: 16px; font-size: 24px;
    }
}

@media (orientation: landscape) {

    #new_game_menu .menu_content #side_name_1.small {
        left: calc(3 * 0.6667vh); font-size: calc(5.5 * 0.6667vh);
    }
    #new_game_menu .menu_content #side_name_2.small {
        right: calc(3 * 0.6667vh); font-size: calc(5.5 * 0.6667vh);
    }

    @media screen and (min-height: 615px) { /* width: ~410 */
        #new_game_menu .menu_content #side_name_1.small {
            left: 16px; font-size: 24px;
        }
        #new_game_menu .menu_content #side_name_2.small {
            right: 16px; font-size: 24px;
        }
    }
}

#new_game_menu .menu_content #side_switch {
    z-index: 1;
    top: 6px;
    left: 50%;
    float: left;
    height: 40px;
    margin-top: 0px;
    margin-left: -34px;
    position: absolute;
}

#new_game_menu .menu_content #player_1_side {
    z-index: 2;
    top: 0px;
    left: 50%;
    float: left;
    height: 50px;
    position: absolute;
    margin-left: -77px;
}

#new_game_menu .menu_content #player_2_side {
    z-index: 2;
    top: 0px;
    right: 50%;
    float: right;
    height: 50px;
    position: absolute;
    margin-right: -77px;
}

#new_game_menu .menu_content div {
    position: relative;
}

#new_game_menu .menu_content #piece_example {
    top: 6px;
    left: 50%;
    width: 56px;
    height: 40px;
    margin-top: 0px;
    overflow: hidden;
    margin-left: -28px;
    position: absolute;
}

#global_info #info_message #side_example_left,
#global_info #info_message #side_example_right,
#new_game_menu .menu_content #side_example_left,
#new_game_menu .menu_content #side_example_right {
    top: 6px;
    left: 50%;
    width: 25px;
    height: 40px;
    margin-top: 0px;
    overflow: hidden;
    position: absolute;
    margin-left: -25px;
    background-image: url('../pic/babuk_1/wPawn.png');
    background-size: 50px 50px;
    background-repeat: no-repeat;
    background-color: transparent;
    background-attachment: scroll;
    background-position: 0px -8px;
}

#global_info #info_message #side_example_right,
#new_game_menu .menu_content #side_example_right {
    margin-left: 0px;
    background-image: url('../pic/babuk_1/bPawn.png');
    background-size: 50px 50px;
    background-position: -25px -8px;
}

#global_info #info_message #side_example_left.light,
#new_game_menu .menu_content #side_example_left.light {
    width: 50px;
}

#global_info #info_message #side_example_right.light,
#new_game_menu .menu_content #side_example_right.light {
    width: 0px;
}

#global_info #info_message #side_example_left.dark,
#new_game_menu .menu_content #side_example_left.dark {
    width: 0px;
}

#global_info #info_message #side_example_right.dark,
#new_game_menu .menu_content #side_example_right.dark {
    width: 50px;
    margin-left: -25px;
    background-position: 0px -8px;
}

#new_game_menu .menu_content .board_example_dark {
    top: 6px;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: 0px;
    margin-left: -20px;
    position: absolute;
    background-color: #612e0e;
}

#new_game_menu .menu_content .board_example_light {
    top: 6px;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: 0px;
    margin-left: 0px;
    position: absolute;
    background-color: #f9f7f0;
}

#new_game_menu .menu_content .board_example_dark.b_color_0,
#game_options #boards_list .list_element_dark.b_color_0 {
    background-color: #612e0e; /* image */
}

#new_game_menu .menu_content .board_example_dark.b_color_1,
#game_options #boards_list .list_element_dark.b_color_1 {
    background-color: #769656; /* green */
}

#new_game_menu .menu_content .board_example_dark.b_color_2,
#game_options #boards_list .list_element_dark.b_color_2 {
    background-color: #6894c6; /* blue */
}

#new_game_menu .menu_content .board_example_dark.b_color_3,
#game_options #boards_list .list_element_dark.b_color_3 {
    background-color: #3f587a; /* dark_blue */
}

#new_game_menu .menu_content .board_example_dark.b_color_4,
#game_options #boards_list .list_element_dark.b_color_4 {
    background-color: #787878; /* gray */
}

#new_game_menu .menu_content .board_example_dark.b_color_5,
#game_options #boards_list .list_element_dark.b_color_5 {
    background-color: #b58863; /* brown */
}

#new_game_menu .menu_content .left_switch {
    z-index: 1;
    top: 6px;
    left: 50%;
    float: left;
    width: 34px;
    height: 40px;
    overflow: hidden;
    position: absolute;
    margin-left: -70px;

}

#new_game_menu .menu_content .right_switch {
    z-index: 1;
    top: 6px;
    right: 50%;
    float: right;
    width: 34px;
    height: 40px;
    overflow: hidden;
    position: absolute;
    margin-right: -70px;
}

#new_game_menu .menu_content .left_switch a,
#new_game_menu .menu_content .right_switch a {
    width: 34px;
    height: 40px;
    border: none;
    padding-top: 0px;
    padding-left: 0px;
    text-shadow: none;
    position: absolute;
    background-color: transparent;
}

#new_game_menu .menu_content .left_switch img {
    height: 40px;
    margin-left: 0px;
}

#new_game_menu .menu_content .right_switch img {
    height: 40px;
    margin-left: -34px;
}

#new_game_menu #game_strength #game_strengths {
    right: 16px;
    height: 100%;
    position: absolute;
    width: calc(100% - 190px);
}

#new_game_menu #game_strength #current_strength {
    float: left;
    color: #006ab9;
    margin-left: 10px;
}

.dark-mode #new_game_menu #game_strength #current_strength {
    color: white;
}

#new_game_menu #online_list_buttons {
    height: 68px;
}

#new_game_menu #game_time #time_container,
#new_game_menu #online_list_buttons .menu_content { /* -16px */
    width: 100%;
    display: flex;
    padding-right: 16px;
    align-items: center;
    justify-content: space-between;
}

#new_game_menu #game_time #time_container > div,
#new_game_menu #online_list_buttons .menu_content > div {
    height: 32px;
    flex-grow: 1;
    display: flex;
    cursor: pointer;
    padding-top: 1px;
    margin-right: 18px;
    position: relative;
    text-align: center;
    border-radius: 5px;
    background: #ececec;
    line-height: normal;
    text-decoration: none;
    font-size: calc(5px + 2.1vw);
    text-shadow: 0px 1px 0px white;
    box-shadow: 0px 1px 2px 0px black;
    justify-content: center;
    align-items: center;
}

#new_game_menu #game_time #time_container > div:last-of-type,
#new_game_menu #online_list_buttons .menu_content > div:last-of-type {
    margin-right: 0px;
}

#new_game_menu #online_list_buttons .menu_content > div {
    height: 80%;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
    background: #72a33a;
    font-size: calc(9px + 2.1vw);
    text-shadow: 0px 1px 0px rgba(0,0,0,0.6);
}

#new_game_menu #online_list_buttons .menu_content > div > img {
    height: 30px;
    padding-right: 10px;
    -webkit-filter: drop-shadow(0px 1px 0px rgba(0,0,0,0.6));
    filter: drop-shadow(0px 1px 0px rgba(0,0,0,0.6));
}

#new_game_menu #online_list_buttons .menu_content > div > div {
    min-width: 0;
    color: white;
    margin-top: 4px;
}

.dark-mode #new_game_menu #game_time #time_container > div {
    color: black;
}

@media screen and (min-width: 714px) { /* overflow limit */
    #new_game_menu #game_time #time_container > div {
        font-size: 20px;
    }
    #new_game_menu #online_list_buttons .menu_content > div {
        font-size: 24px;
    }
}

@media (orientation: landscape) {

    #new_game_menu #game_time #time_container > div {
        font-size: calc(5px + 2.1 * 0.6667vh);
    }

    #new_game_menu #online_list_buttons .menu_content > div {
        font-size: calc(9px + 2.1 * 0.6667vh);
    }

    @media screen and (min-height: 1070px) { /* width: ~714 */
        #new_game_menu #game_time #time_container > div {
            font-size: 20px;
        }
        #new_game_menu #online_list_buttons .menu_content > div {
            font-size: 24px;
        }
    }
}

#new_game_menu #game_time #time_container > div:hover {
    background-color: #cecece;
}

#new_game_menu #online_list_buttons .menu_content > div:hover {
    background-color: #81b64c;
}

#new_game_menu #game_time #time_container > div.active,
#new_game_menu #game_time #time_container > div.active:hover {
    color: white;
    background-color: #72a33a;
    text-shadow: 0px 1px 0px rgba(0,0,0,0.6);
}

#new_game_menu #game_time #time_container > div:first-of-type {
    margin-left: 0px;
}

#new_game_menu #game_time #time_container > div:first-of-type.active,
#new_game_menu #game_time #time_container > div:first-of-type.active:hover {
    background-color: #ea2424;
}

/**************************************************************************************************************************************
STATISZTIKA MENU
**************************************************************************************************************************************/

#game_between #game_stat {
    display: none;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
}

#game_stat #stat_content {
    border: none;
    width: inherit;
    font-size: 16px;
    font-weight: bold;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    text-align: center;
    max-width: inherit;
    text-decoration: none;
    background-color: #ffcc68;
    text-shadow: 0px 1px 0px rgba(255,255,255,0.6);
    max-height: calc(100vh - 8px - 10.63vw - 53px); /* (full - menu) - header */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

.dark-mode #game_stat #stat_content {
    background-color: #62605d;
    text-shadow: 0px 1px 1px #000000;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #game_stat #stat_content {
        max-height: calc(100vh - 74px - 53px - 53px);
    }
}

@media (orientation: landscape) {

    #game_stat #stat_content {
        max-height: calc(100vh - 8px - 10.63 * 0.6667vh - 53px - 53px);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #game_stat #stat_content {
            max-height: calc(100vh - 74px - 53px - 53px);
        }
    }
}

#stat_content #online_statistics,
#stat_content #offline_statistics,
#stat_content #toplist_statistics {
    display: none;
    width: inherit;
    padding: 0px 5px;
    max-width: inherit;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

#stat_content #online_stat_string {
    text-align: left;
    font-size: 3.8vw;
    padding-top: 10px;
}

@media screen and (min-width: 768px) { /* image limit */
    #stat_content #online_stat_string {
        font-size: 29px;
    }
}

@media (orientation: landscape) {

    #stat_content #online_stat_string {
        font-size: calc(3.8 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #stat_content #online_stat_string {
            font-size: 29px;
        }
    }
}

#stat_content canvas { /* resize with jQuery */
    width: inherit;
    padding: 10px 0px;
    max-width: inherit;
    box-sizing: content-box;
    box-shadow: 0px 1px 0px #ffe4ae;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.dark-mode #stat_content canvas {
    box-shadow: 0px 1px 0px #a0a0a0;
}

#stat_content canvas:last-of-type {
    border-bottom: none;
    box-shadow: none;
}

#stat_content table {
    padding: 5px 0px;
}

#offline_statistics .menu_item {
    margin-left: -5px;
}

#offline_statistics .menu_item a {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.3);
}

#toplist_statistics div {
    width: 100%;
    cursor: pointer;
    padding: 10px 0px;
    box-shadow: 0px 1px 0px #ffe4ae;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

.dark-mode #toplist_statistics div {
    box-shadow: 0px 1px 0px #a0a0a0;
}

#toplist_statistics div:last-of-type {
    border-bottom: none;
    box-shadow: none;
}

/**************************************************************************************************************************************
OPTIONS MENU
**************************************************************************************************************************************/

#game_between #game_options {
    display: none;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
}

#game_options #options_content {
    padding: 0px;
    border: none;
    width: inherit;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    max-width: inherit;
    background-color: #ffcc68;
    max-height: calc(100vh - 8px - 10.63vw - 53px); /* (full - menu) - header */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

.dark-mode #game_options #options_content {
    background-color: #62605d;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #game_options #options_content {
        max-height: calc(100vh - 74px - 53px);
    }
}

@media (orientation: landscape) {

    #game_options #options_content {
        max-height: calc(100vh - 8px - 10.63 * 0.6667vh - 53px);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #game_options #options_content {
            max-height: calc(100vh - 74px - 53px);
        }
    }
}

#game_options #pieces_list,
#game_options #boards_list,
#game_options #game_languages,
#game_options #game_dark_mode {
    display: none;
    width: inherit;
    max-width: inherit;
}

#pieces_list .list_element {
    top: 7px;
    width: 60px;
    height: 40px;
    overflow: hidden;
    position: relative;
}

#pieces_list .list_element img {
    height: 40px;
    position: absolute;
}

#boards_list .list_element_light {
    top: 10px;
    width: 32px;
    height: 32px;
    position: relative;
    border: solid 1px black;
    background-color: #f9f7f0;
}

#boards_list .list_element_dark {
    top: 10px;
    width: 32px;
    height: 32px;
    margin-left: 31px;
    position: absolute;
    border: solid 1px black;
    background-color: #612e0e;
}

/**************************************************************************************************************************************
INFOS MENU: ABOUT + RULES
**************************************************************************************************************************************/

#game_between #game_informations {
    display: none;
    width: inherit;
    overflow: hidden;
    max-width: inherit;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

#game_informations #info_menu_content {
    padding: 5px;
    border: none;
    width: inherit;
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: overlay;
    max-width: inherit;
    text-decoration: none;
    background-color: #ffcc68;
    text-shadow: 0px 1px 0px rgba(255,255,255,0.6);
    max-height: calc(100vh - 8px - 10.63vw - 53px); /* (full - menu) - header */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

.dark-mode #game_informations #info_menu_content {
    background-color: #62605d;
    text-shadow: 0px 1px 0px #000000;
}

@media screen and (min-width: 620px) { /* #menu max-height */
    #game_informations #info_menu_content {
        max-height: calc(100vh - 74px - 53px);
    }
}

@media (orientation: landscape) {

    #game_informations #info_menu_content {
        max-height: calc(100vh - 8px - 10.63 * 0.6667vh - 53px);
    }

    @media screen and (min-height: 930px) { /* width: ~620 */
        #game_informations #info_menu_content {
            max-height: calc(100vh - 74px - 53px);
        }
    }
}

#info_menu_content .about_section { /* About */
    text-align: center;
}

#info_menu_content .about_row {
    padding-top: 5px;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    box-shadow: 0px 1px 0px rgba(255,255,255,0.6);
}

#info_menu_content .about_row:last-of-type {
    box-shadow: none;
    margin-bottom: 0px;
    padding-bottom: 5px;
    border-bottom: none;
}

#info_menu_content .info_menu_slider {
    display: none;
}

#info_menu_content .info_title {
    text-align: center;
}

#info_menu_content .info_title a {
    width: 100%;
    display: block;
    color: #ffffff;
    font-size: 24px;
    padding: 5px 0px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0px 0px 2px #000000;
    text-shadow: 0px 1px 1px #000000;
    background-color: rgba(0, 0, 0, 0.5);
}

@media (hover: hover) {
    #info_menu_content .info_title a:hover {
        background-color: rgba(0, 0, 0, 0.6);
    }
}

#info_menu_content .info_title a.hover {
    background-color: rgba(0, 0, 0, 0.6);
}

#info_menu_content .info_title_2 {
    color: darkred;
    font-size: 18px;
    text-decoration: underline;
}

.dark-mode #info_menu_content .info_title_2 {
    color: #f66;
}

/**************************************************************************************************************************************
SLIDER
**************************************************************************************************************************************/

.input_range > div {
    float: left;
}

.input_range input {
    background-color: transparent;
    -webkit-user-select: none; /* disable select */
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.input_range input[type=range] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
}

.input_range input[type=range]:focus {
    outline: none;
}

.input_range input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 3px;
    border: none;
    cursor: pointer;
    background: #165ebc;
}

.input_range input[type=range]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    cursor: pointer;
    margin-top: -12px;
    border-radius: 15px;
    background: #ffffff;
    -webkit-appearance: none;
    border: 0px solid #ffffff;
    box-shadow: 0px 2px 4px #424242;
}

.input_range input[type=range]:focus::-webkit-slider-runnable-track {
    background: #165ebc;
}

.input_range input[type=range]::-moz-range-track {
    width: 100%;
    height: 3px;
    border: none;
    cursor: pointer;
    background: #165ebc;
}

.input_range input[type=range]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 15px;
    background: #ffffff;
    border: 0px solid #ffffff;
    box-shadow: 0px 2px 4px #424242;
}

.input_range input[type=range]::-ms-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    color: transparent;
    background: transparent;
    border-color: transparent;
}

.input_range input[type=range]::-ms-fill-lower {
    border: none;
    background: #165ebc;
}

.input_range input[type=range]::-ms-fill-upper {
    border: none;
    background: #165ebc;
}

.input_range input[type=range]::-ms-thumb {
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 15px;
    background: #ffffff;
    border: 0px solid #ffffff;
    box-shadow: 0px 2px 4px #424242;
}

.input_range input[type=range]:focus::-ms-fill-lower {
    background: #165ebc;
}

.input_range input[type=range]:focus::-ms-fill-upper {
    background: #165ebc;
}

/**************************************************************************************************************************************
GAME PAGE
**************************************************************************************************************************************/

#game_page #game_buttons {
    width: 100%;
    max-height: 50px; /* limited at ~540px width */
    position: relative;
    border-radius: 10px;
    background-color: #ffcc68;
    height: calc(11px + 7.19vw);
    background: linear-gradient(#ffe4ae, #e0a634);
    box-shadow: 0px -2px 2px -2px rgba(0, 0, 0, 0.7), 0px 3px 2px -2px rgba(0, 0, 0, 0.7), 0px 3px 2px -2px rgba(0, 0, 0, 0.7);
}

.dark-mode #game_page #game_buttons {
    background-color: #444444;
    background: linear-gradient(#62605d, #444444);
}

@media (orientation: landscape) {
    #game_page #game_buttons {
        height: calc(11px + 7.19 * 0.6667vh);
    }
}

#game_page #game_buttons a {
    float: left;
    width: 20%;
    height: 100%;
    position: relative;
    text-align: center;
    box-shadow: -1px 0px 0px 0px black;
}

@media (hover: hover) {
    #game_page #game_buttons a:hover {
        background-color: #ffd686;
        background: linear-gradient(#fff0d1, #e7b147);
    }
}

#game_page #game_buttons a.hover {
    background-color: #ffd686;
    background: linear-gradient(#fff0d1, #e7b147);
}

@media (hover: hover) {
    .dark-mode #game_page #game_buttons a:hover {
        background-color: #555555;
        background: linear-gradient(#73716E, #555555);
    }
}

.dark-mode #game_page #game_buttons a.hover {
    background-color: #555555;
    background: linear-gradient(#73716E, #555555);
}

#game_page #game_buttons a img {
    top: 50%;
    height: 58%;
    position: relative;
    transform: translateY(-45%);
    transition: filter 1ms linear, -webkit-filter 1ms linear; /* iOS 16 hack: working only with animation correctly */
    -webkit-filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%) drop-shadow(0px 1px 0px #ffe4ae);
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%) drop-shadow(0px 1px 0px #ffe4ae);
}

.dark-mode #game_page #game_buttons a img {
    -webkit-filter: invert(100%) sepia(5%) saturate(0%) hue-rotate(143deg) brightness(104%) contrast(100%) drop-shadow(0px 1px 0px #000000);
    filter: invert(100%) sepia(5%) saturate(0%) hue-rotate(143deg) brightness(104%) contrast(100%) drop-shadow(0px 1px 0px #000000);
}

#game_page #game_buttons #game_options {
    border-radius: 10px 0px 0px 10px;
    box-shadow: none;
}

#game_page #game_buttons #game_help img {
    height: 67.5%;
    margin-top: -1%;
}

#game_page #game_buttons #game_chat img {
    height: 66.8%;
    margin-top: -0.4%;
}

#game_page #game_buttons #game_chat.new_msg:after {
    content: '!';
    top: -18%;
    left: 65.5%;
    color: white;
    width: 5.63vw;
    height: 5.63vw;
    background: red;
    max-width: 30px;  /* limited at ~540px width */
    max-height: 30px; /* limited at ~540px width */
    font-size: 4.7vw;
    border-radius: 50%;
    position: absolute;
    display: inline-block;
}

@media screen and (min-width: 540px) { /* #game_buttons max-height */
    #game_page #game_buttons #game_chat.new_msg:after {
        font-size: 25px;
    }
}

@media (orientation: landscape) {

    #game_page #game_buttons #game_chat.new_msg:after {
        width: calc(5.63 * 0.6667vh);
        height: calc(5.63 * 0.6667vh);
        font-size: calc(4.7 * 0.6667vh);
    }

    @media screen and (min-height: 810px) { /* width: ~540 */
        #game_page #game_buttons #game_chat.new_msg:after {
            font-size: 25px;
        }
    }
}

#game_page #game_buttons #take_next {
    border-radius: 0px 10px 10px 0px;
}

#game_page #game_buttons a .take_arrow { /* prev, next */
    top: 50%;
    left: 50%;
    max-width: 19px;  /* limited at ~540px width */
    max-height: 19px; /* limited at ~540px width */
    position: relative;
    border-style: solid;
    width: calc(5px + 2.6vw);
    height: calc(5px + 2.6vw);
    background-color: transparent;
    transform: translate(-40%, -45%) rotate(45deg);
    border-color: transparent transparent black black;
    border-width: 0px 0px calc(2px + 0.55vw) calc(2px + 0.55vw);
    transition: filter 1ms linear, -webkit-filter 1ms linear; /* iOS 16 hack: working only with animation correctly */
    -webkit-filter: drop-shadow(1px 1px 0px #ffe4ae);
    filter: drop-shadow(1px 1px 0px #ffe4ae);
}

.dark-mode #game_page #game_buttons a .take_arrow {
    border-color: transparent transparent white white;
    -webkit-filter: drop-shadow(0px 1px 0px #000000);
    filter: drop-shadow(0px 1px 0px #000000);
}

@media screen and (min-width: 540px) { /* #game_buttons max-height */
    #game_page #game_buttons a .take_arrow {
        border-width: 0px 0px 5px 5px;
    }
}

@media (orientation: landscape) {

    #game_page #game_buttons a .take_arrow {
        width: calc(5px + 2.6 * 0.6667vh);
        height: calc(5px + 2.6 * 0.6667vh);
        border-width: 0px 0px calc(2px + 0.55 * 0.6667vh) calc(2px + 0.55 * 0.6667vh);
    }

    @media screen and (min-height: 810px) { /* width: ~540 */
        #game_page #game_buttons a .take_arrow {
            border-width: 0px 0px 5px 5px;
        }
    }
}

#game_page #game_buttons #take_next .take_arrow { /* next */
    transform: translate(-60%, -45%) rotate(45deg);
    border-color: black black transparent transparent;
    border-width: calc(2px + 0.55vw) calc(2px + 0.55vw) 0px 0px;
}

.dark-mode #game_page #game_buttons #take_next .take_arrow {
    border-color: white white transparent transparent;
    -webkit-filter: drop-shadow(0px 1px 0px #000000);
    filter: drop-shadow(0px 1px 0px #000000);
}

@media screen and (min-width: 540px) { /* #game_buttons max-height */
    #game_page #game_buttons #take_next .take_arrow {
        border-width: 5px 5px 0px 0px;
    }
}

@media (orientation: landscape) {

    #game_page #game_buttons #take_next .take_arrow {
        border-width: calc(2px + 0.55 * 0.6667vh) calc(2px + 0.55 * 0.6667vh) 0px 0px;
    }

    @media screen and (min-height: 810px) { /* width: ~540 */
        #game_page #game_buttons #take_next .take_arrow {
            border-width: 5px 5px 0px 0px;
        }
    }
}

#game_page #game_info,
#game_page #opponent_info {
    width: inherit;
    margin-top: 0px;
    margin-left: 0px;
    text-align: left;
    overflow: hidden;
    font-weight: bold;
    max-width: inherit;
    position: relative;
    white-space: nowrap;
    text-overflow: ellipsis;
    background-color: #ffcc68;
    padding: 9px 10px 7px 10px;
    font-size: calc(3px + 3.5vw);
    margin-bottom: calc(6px + 1.5vw);
    background: linear-gradient(#ffe4ae, #e0a634);
    text-shadow: 0px 1px 0px #ffe4ae;
    border-radius: 0px 0px 10px 10px;
    box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.7), 0px 3px 2px -2px rgba(0, 0, 0, 0.7);
}

.dark-mode #game_page #game_info,
.dark-mode #game_page #opponent_info {
    background-color: #444444;
    background: linear-gradient(#62605d, #444444);
    text-shadow: 0px 1px 0px #000000;
}

#game_page #opponent_info {
    margin-top: 2px;
    margin-bottom: 0px;
    border-radius: 10px 10px 0px 0px;
    box-shadow: 0px -2px 2px -2px rgba(0, 0, 0, 0.7);
}

#game_page #game_info .engine_info {
    color: darkred;
}

.dark-mode #game_page #game_info .engine_info {
    color: #f66;
}

#game_page #game_info .info_container,
#game_page #opponent_info .info_container {
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    padding: inherit;
    position: absolute;
    padding-bottom: 0px;
    flex-direction: row;
    justify-content: space-between;
}

.dark-mode #game_page #game_info .info_container,
.dark-mode #game_page #opponent_info .info_container {
    color: white;
}

/* score + depth + pv line */

.info_container.engine_search_info {
    overflow: hidden;
    align-items: center;
    justify-content: start;
    padding-top: 0px !important;
    padding-left: 0px !important;
}

.engine_search_info .engine_score_and_depth {
    height: 100%;
    width: auto;
    min-width: 0;
    display: flex;
    flex: 0 0 auto;
    margin-right: 8px;
    position: relative;
    align-items: center;
    flex-direction: row;
    padding: 0px 5px 0px 5px;
    border-radius: 10px 10px 10px 0px;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /*background: linear-gradient( 135deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 70% );*/
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-left: none;
}

/*
.dark-mode .engine_search_info .engine_score_and_depth {
    background: rgba(0, 0, 0, 0.2);
}
*/
.engine_score_and_depth .engine_white_score {
    display: flex;
    color: inherit;
    transform: translateY(1px);
}

.engine_score_and_depth .engine_white_score span {
    font-family: monospace;
}

.engine_score_and_depth .engine_search_depth {
    color: inherit;
    min-height: 0;
    font-size: 60%;
    margin-left: 1px;
    align-self: flex-start;
    transform: translateY(3px);
}

.engine_score_and_depth .engine_search_depth span {
    color: inherit;
    position: relative;
    transform: translateY(-1px);
}

.engine_search_info .game_line {
    height: 100%;
    color: inherit;
    display: flex;
    flex: 1 1 auto;
    font-size: 75%;
    padding-top: 1px;
    color: #323232;
    overflow: hidden;
    overflow-x: auto;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

.engine_search_info .game_line ::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.dark-mode .engine_search_info .game_line {
    color: #cccccc;
}

.engine_search_info .game_line > div { /* played */
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.engine_search_info .game_line > div:last-child { /*last -> more space*/
    margin-right: 2px;
}
.engine_search_info .game_line > div:not(.original) { /* alternativ move */
    font-style: italic;
}
.engine_search_info .game_line > div.current { /*last played*/
    color: #e8e8e8;
    padding: 0px 4px;
    border-radius: 3px;
    background: #444444;
    text-decoration: none;
    text-shadow: 0px 1px 0px #000000;
}
.dark-mode .engine_search_info .game_line > div.current { /*last played*/
    color: #323232;
    background: #e1e1e1;
    text-shadow: 0px 1px 0px #ffffff;
}

.engine_search_info .game_line > span { /*searched*/
    color: #6a6a6a;
    cursor: pointer;
    text-decoration: underline;
}
.engine_search_info .game_line > span.original { /*searched*/
    color: inherit;
}

/* avatar + clock + taked */

.info_container .ingame_avatar {
    top: 4%;
    height: 125%;
    flex-shrink: 0;
    cursor: pointer;
    max-width: 41px;
    max-height: 41px;
    margin-left: -8px;
    position: relative;
    align-self: flex-end;
}

.info_container.offline .ingame_avatar { /* side piece correct */
    top: 17%;
    margin-left: -11px;
    margin-right: -4px;
}

.info_container.offline .ingame_avatar:last-of-type { /* right side piece */
    margin-right: -11px;
    margin-left: -4px;
}

.info_container .ingame_time {
    flex-grow: 0;
    padding-left: 10px;
}

.info_container .ingame_user {
    width: auto;
    flex-grow: 1;
    min-width: 0;
    display: flex;
}

.info_container.offline .ingame_user {
    max-width: 50%;
    overflow: hidden;
}

.info_container .ingame_user.show_taked {
    margin-top: -9px;
    flex-direction: column;
}

.info_container.offline .ingame_user {
    flex-direction: column;
}

.info_container.offline .ingame_user .user_datas,
.info_container.offline .ingame_user .taked_pieces {
    width: auto;
    flex: 0 1 auto;
    align-self: flex-start;
}

.info_container.offline .ingame_user:last-of-type .user_datas,
.info_container.offline .ingame_user:last-of-type .taked_pieces {
    align-self: flex-end;
}

/* user */

.ingame_user .user_datas {
    width: 100%;
    flex-grow: 1;
    display: flex;
    text-decoration: none;
}

.ingame_user.show_taked .user_datas {
    height: 50%;
}

.ingame_user .user_datas .username {
    flex-grow: 0;
    overflow: hidden;
    white-space: nowrap;
}

.ingame_user .user_datas .username span {
    position: relative;
    display: inline-block;
    transform: translateY(1px);
}

.ingame_user.show_taked .user_datas .username {
    overflow: visible;
}

.ingame_user .user_datas .ingame_elo {
    top: 1px;
    flex-grow: 0;
    font-size: 3.5vw;
    position: relative;
}

.ingame_user .user_datas .ingame_elo span {
    top: 1px;
    position: relative;
}

@media screen and (min-width: 600px) { /* max-height: 44px */
    #game_page #game_info, #game_page #opponent_info {
        font-size: 24px;
    }
    #game_page #game_info {
        margin-bottom: 15px;
    }
    .ingame_user .user_datas .ingame_elo {
        font-size: 21px;
    }
}

@media (orientation: landscape) {

    #game_page #game_info, #game_page #opponent_info {
        font-size: calc(3px + 3.5 * 0.6667vh);
    }
    #game_page #game_info {
        margin-bottom: calc(6px + 1.5 * 0.6667vh);
    }
    .ingame_user .user_datas .ingame_elo {
        font-size: calc(3.5 * 0.6667vh);
    }

    @media screen and (min-height: 900px) { /* width: ~600 */
        #game_page #game_info, #game_page #opponent_info {
            font-size: 24px;
        }
        #game_page #game_info {
            margin-bottom: 15px;
        }
        .ingame_user .user_datas .ingame_elo {
            font-size: 21px;
        }
    }
}

/* taked pieces */

.ingame_user .taked_pieces {
    width: 100%;
    height: 50%;
    flex-grow: 1;
    display: none;
}

.ingame_user.show_taked .taked_pieces {
    display: flex;
}

.taked_pieces > svg {
    position: relative;
}

.taked_pieces > span { /* score */
    height: 100%;
    position: relative;
}

.taked_pieces > span > span {
    top: 50%;
    display: block;
    position: relative;
    transform-origin: top left;
    transform: scale(0.7) translateY(-42%);
}

.info_container.offline .ingame_user:last-of-type .taked_pieces > span > span { /* right side score */
    transform-origin: top right;
}

/* ingame time + signal */

.ingame_time .ingame_signal {
    height: 21px;
    padding: 0px;
    display: none;
    cursor: pointer;
    overflow: hidden;
    list-style: none;
    margin-top: -1px;
    margin-right: 5px;
    position: relative;
    vertical-align: middle;
}

.ingame_signal li {
    width: 5px;
    height: 100%;
    margin-top: -1px;
    margin-right: 2px;
    display: inline-block;
}

.ingame_signal li:nth-of-type(1) {
    padding-top: 13px;
}

.ingame_signal li:nth-of-type(2) {
    padding-top: 9px;
}

.ingame_signal li:nth-of-type(3) {
    padding-top: 5px;
}

.ingame_signal li:nth-of-type(4) {
    padding-top: 1px;
}

.ingame_signal li div {
    height: 100%;
    border-radius: 5px;
    background: #ce0000;
    box-shadow: 0px 1px 0px #ffe4ae;
}

.dark-mode .ingame_signal li div {
    box-shadow: 0px 1px 0px #000000;
}

.ingame_time.time_danger {
    color: #ce0000 !important;
}

.dark-mode .ingame_time.time_danger {
    color: #f66 !important;
}

.ingame_time .ingame_clock {
    width: 21px;
    height: 21px;
    margin-top: -1px;
    margin-right: 5px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    background: transparent;
    border: 3px solid #ffe4ae;
}

.dark-mode .ingame_time .ingame_clock {
    border: 3px solid #000000;
}

.ingame_time .ingame_clock:after {
    content: '';
    top: -4px;
    left: -3px;
    width: inherit;
    height: inherit;
    border-radius: 50%;
    position: absolute;
    background: transparent;
    border: 3px solid black;
}

.dark-mode .ingame_time .ingame_clock:after {
    border: 3px solid white;
}

.ingame_clock span {
    top: 0px;
    width: 3px;
    height: 8px;
    right: -6px;
    display: block;
    background: black;
    position: relative;
    border-radius: 3px;
    transform-origin: 50% 80%;
}

.dark-mode .ingame_clock span {
    background: white;
}

.ingame_clock span.clock_deg_0 {
    transform: rotate(0deg);
}

.ingame_clock span.clock_deg_1 {
    transform: rotate(270deg);
}

.ingame_clock span.clock_deg_2 {
    transform: rotate(180deg);
}

.ingame_clock span.clock_deg_3 {
    transform: rotate(90deg);
}

#game_page #board_container {
    width: 100%;
    display: flex;
    overflow: visible;
    position: relative;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    background-color: transparent;
    background-repeat: no-repeat;
}

/**************************************************************************************************************************************
KERESES
**************************************************************************************************************************************/

#board_container #search_progress_bar {
    top: -0.8px;
    left: 0px;
    z-index: 1;
    width: 100%;
    height: 3px;
    position: absolute;
    transform: translateY(-100%);
}

#board_container #search_progress_bar.bottom {
    transform: translateY(100%);
    bottom: -0.8px;
    top: auto;
}

#search_progress_bar.computing {
    /*background: #cccccc;*/
}

#search_progress_bar span {
    width: 100%;
    height: 3px;
    display: none;
    background: #629924;
    /*transform: translateX(-100%);
    transition: transform 0ms linear;*/
}

@-webkit-keyframes progress-anim {
    from { background-position: 0 0; }
    to { background-position: 100000px 0; }
}

@keyframes progress-anim {
    from { background-position: 0 0; }
    to { background-position: 100000px 0; }
}

#search_progress_bar.computing span {
    /*transform: translateX(0%);*/
    display: block;
    background-image: url('../pic/progress.png');
    animation: progress-anim 1000s linear infinite;
}

#search_progress_bar.done span { /* end animation */
    /*transform: translateX(100%);
    transition-duration: 0ms !important;*/
}

/**************************************************************************************************************************************
ELEMZES
**************************************************************************************************************************************/

#board_container #board_evaluation_bar {
    top: 0px;
    z-index: 1;
    right: 0px;
    width: 2.5%;
    height: auto;
    display: none;
    max-width: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
}

#board_evaluation_bar:after {
    content: '';
    z-index: 2;
    top: -1vw; /*hack to hide inset shadow top and bottom*/
    left: 0px;
    width: 100%;
    height: calc(100% + 2vw); /*hack to hide inset shadow top and bottom*/
    display: block;
    position: absolute;
    box-shadow: 0 0 1vw rgba(0,0,0,0.7) inset;
}

@media screen and (min-width: 500px) { /* shadow limit */
    #board_evaluation_bar:after {
        box-shadow: 0 0 5px rgba(0,0,0,0.7) inset;
    }
}

@media (orientation: landscape) {

    #board_evaluation_bar:after {
        box-shadow: 0 0 calc(1 * 0.6667vh) rgba(0,0,0,0.7) inset;
    }

    @media screen and (min-height: 750px) { /* width: ~500 */
        #board_evaluation_bar:after {
            box-shadow: 0 0 5px rgba(0,0,0,0.7) inset;
        }
    }
}

#board_evaluation_bar.flipped_bar {
    transform: rotate(180deg);
}

#board_evaluation_bar #evaluation_bar_black,
#board_evaluation_bar #evaluation_bar_white {
    z-index: 0;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: #eeeeee;
}

#board_evaluation_bar #evaluation_bar_black {
    z-index: 1;
    height: 50%;
    background-color: #777777;
    transition: height 1s ease-in;
}

/**************************************************************************************************************************************
TABLA + KOORDINATAK
**************************************************************************************************************************************/

#game_page #board_container #game_table {
    width: 100%;
    overflow: hidden;
    position: relative;
}

#game_table .numbers {
    z-index: 1;
    color: inherit;
    margin-top: 0px;
    margin-left: 1px;
    overflow: hidden;
    font-weight: bold;
    position: absolute;
    font-size: calc(6px + 1.5vw);
}

#game_table .letters {
    z-index: 1;
    bottom: 0px;
    color: inherit;
    margin-left: 1px;
    overflow: hidden;
    font-weight: bold;
    position: absolute;
    font-size: calc(6px + 1.5vw);
}

@media screen and (min-width: 768px) { /* image limit */
    #game_table .numbers,
    #game_table .letters {
        font-size: 17.52px;
    }
}

@media (orientation: landscape) {

    #game_table .numbers,
    #game_table .letters {
        font-size: calc(6px + 1.5 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #game_table .numbers,
        #game_table .letters {
            font-size: 17.52px;
        }
    }
}

/**************************************************************************************************************************************
KOORDINATAK VEGE
**************************************************************************************************************************************/

#game_table .svg_arrow {
    top: 0px;
    left: 0px;
    z-index: 2;
    margin: 0px;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    display: block;
    position: absolute;
    pointer-events: none;
}

#game_table .svg_arrow:not(.red) {
    opacity: 0.8;
}

.svg_arrow path {
    /*stroke: red;*/
    stroke-width: 2%;
    stroke-linecap: round;
    stroke-linejoin: round;
    marker-end: url(#arrow);
}

.svg_arrow #arrow path {
    /*fill: red;
    stroke: red;*/
    stroke-width: 1px;
    stroke-linecap: round;
    stroke-linejoin: round;
    marker-end: none;
}

#game_table .row { /* Hack: same height as width */
    width: 100%;
    height: 0px;
    cursor: pointer;
    padding-bottom: 12.5%;
}

#game_table .row .square {
    float: left;
    width: 12.5%;
    height: inherit;
    position: relative;
    padding-bottom: inherit;
    background-color: #f8ecc9;
}

/* LEPES MINOSEG */

#game_table .row .square.move_quality:after {
    content: '';
    top: 0;
    right: 0;
    z-index: 1;
    width: 50%;
    height: 50%;
    color: white;
    position: absolute;
    border-radius: 50%;
    font-size: calc(6px + 3.0vw);
    transform: translate(25%, -25%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80% 80%;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    pointer-events: none;
}

#game_table .row .square.move_quality.good_move:after {
    background-size: 80% 80%;
    background-color: #81b64c;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" stroke="white" stroke-width="2"><path d="M20.285 6.709l-11.285 11.291-5.285-5.291 1.415-1.418 3.87 3.877 9.87-9.877z"/></svg>');
}

#game_table .row .square.move_quality.wrong_move:after {
    background-size: 66% 66%;
    background-color: #bd0000;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="4" stroke-linecap="round"><line x1="4" y1="4" x2="20" y2="20"/><line x1="20" y1="4" x2="4" y2="20"/></svg>');
}

/* Ha az elso sor, de nem az utolso oszlop → csak X tolas */
#game_table .row:first-child .square.move_quality:not(:last-child):after {
    transform: translate(25%, 1px);
}

/* Ha utolso oszlop, de nem az elso sor → csak Y tolas */
#game_table .row:not(:first-child) .square.move_quality:last-child:after {
    transform: translate(-1px, -25%);
}

/* Ha egyszerre elso sor eS utolso oszlop → semmi eltolas */
#game_table .row:first-child .square.move_quality:last-child:after {
    transform: translate(-1px, 1px);
}

/* LEPES MINOSEG VEGE */

#game_table .row .square div[class^="WHITE"],
#game_table .row .square div[class^="BLACK"],
#game_table .row .square div[class^="EMPTY"] {
    width: 100%;
    height: 100%;
    margin-top: 0px;
    margin-left: 0px;
    position: relative;
    padding-bottom: 100%;
}

#game_table .row .square.piece_drag div[class^="WHITE"],
#game_table .row .square.piece_drag div[class^="BLACK"] { /* elemelt babu */
    top: -12vw;
    z-index: 3;
    height: 46.4vw;
    width: 30.404vw;
    margin-left: -9vw;
    position: relative;
    max-width: 233.5px;  /* limited at ~768px width */
    max-height: 356.3px; /* limited at ~768px width */
    /*background-color: red;*/
    background-size: 23vw 23vw;
    background-position: 4vw -1.5vw;
}

@media screen and (min-width: 768px) { /* image limit */
    #game_table .row .square.piece_drag div[class^="WHITE"],
    #game_table .row .square.piece_drag div[class^="BLACK"] {
        top: -92px;
        margin-left: -69px;
        background-size: 176.5px 176.5px;
        background-position: 30.7px -11.5px;
    }
}

@media (orientation: landscape) {

    #game_table .row .square.piece_drag div[class^="WHITE"],
    #game_table .row .square.piece_drag div[class^="BLACK"] {
        top: calc(-12 * 0.6667vh);
        height: calc(46.4 * 0.6667vh);
        width: calc(30.404 * 0.6667vh);
        margin-left: calc(-9 * 0.6667vh);
        background-size: calc(23 * 0.6667vh) calc(23 * 0.6667vh);
        background-position: calc(4 * 0.6667vh) calc(-1.5 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #game_table .row .square.piece_drag div[class^="WHITE"],
        #game_table .row .square.piece_drag div[class^="BLACK"] {
            top: -92px;
            margin-left: -69px;
            background-size: 176.5px 176.5px;
            background-position: 30.7px -11.5px;
        }
    }
}

#game_table .row .square .drag_and_drop { /* kor */
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 32vw;
    height: 32vw;
    padding: 0px;
    display: none;
    max-width: 245.7px;  /* limited at ~768px width */
    max-height: 245.7px; /* limited at ~768px width */
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 0, 0, 0.0);
    background-color: rgba(0, 0, 0, 0.4);
}

@media (orientation: landscape) {
    #game_table .row .square .drag_and_drop {
        width: calc(32 * 0.6667vh);
        height: calc(32 * 0.6667vh);
    }
}

#game_table .row .square.piece_drop .drag_and_drop { /* kor megjelenitese */
    display: block;
}

#game_table .row .square.dark {
    background-color: #986c51;
}

#game_table .row .square.dark.default_image {
    color: #f8ecc9; /* koordinata szin */
    background: url('../pic/dark.png') 0px 0px repeat scroll transparent;
    background-size: 100% 100%;
}

#game_table .row .square.light.default_image {
    color: #750000; /* koordinata szin */
    background: url('../pic/light.png') 0px 0px repeat scroll transparent;
    background-size: 100% 100%;
}

#game_table .row .square.dark.green {
    color: #f8ecc9;
    background: none;
    background-color: #769656;
}

#game_table .row .square.light.green {
    color: #769656;
    background: none;
    background-color: #f8ecc9;
}

#game_table .row .square.dark.blue {
    color: #dee3e6;
    background: none;
    background-color: #6894c6;
}

#game_table .row .square.light.blue {
    color: #6894c6;
    background: none;
    background-color: #dee3e6;
}

#game_table .row .square.dark.gray {
    color: #ece7d7;
    background: none;
    background-color: #787878;
}

#game_table .row .square.light.gray {
    color: #787878;
    background: none;
    background-color: #ece7d7;
}

#game_table .row .square.dark.brown {
    color: #f0d9b5;
    background: none;
    background-color: #b58863;
}

#game_table .row .square.light.brown {
    color: #b58863;
    background: none;
    background-color: #f0d9b5;
}

#game_table .row .square.dark.dark_blue {
    color: #ece7d7;
    background: none;
    background-color: #3f587a;
}

#game_table .row .square.light.dark_blue {
    color: #3f587a;
    background: none;
    background-color: #ece7d7;
}

#game_table .row .square.dark.in_check {
    background: none;
    background-color: darkred;
}

#game_table .row .square.light.in_check {
    background: none;
    background-color: darkred;
}

#game_table .row .square.light.from_class {
    background: none;
    background-color: #f6b030;
}

#game_table .row .square.dark.from_class {
    background: none;
    background-color: #de9000;
}

#game_table .row .square.light.last_step {
    background: none;
    background-color: #f6b030;
}

#game_table .row .square.dark.last_step {
    background: none;
    background-color: #de9000;
}

#game_table .row .square.light.piece_drop,
#game_table .row .square.light.show-legal.piece_drop { /* vilagos aktiv dobas mezo */
    z-index: auto;
    background: none;
    background-color: #f6b030;
}

#game_table .row .square.dark.piece_drop,
#game_table .row .square.dark.show-legal.piece_drop { /* sotet aktiv dobas mezo */
    z-index: auto;
    background: none;
    background-color: #de9000;
}

#game_table .row .square.light.step-help,
#game_table .row .square.light.show-legal.step-help {
    background: none;
    background-color: olive;
}

#game_table .row .square.dark.step-help,
#game_table .row .square.dark.show-legal.step-help {
    background: none;
    background-color: olive;
}

#game_table .row .square.light.force_move {
    background: none;
    background-color: #ff8b8b;
}

#game_table .row .square.dark.force_move {
    background: none;
    background-color: #cc5554;
}

#game_table .row .square .EMPTY {
    background: none;
}

#game_table .row .square.show-legal { /* OSSZES LEGALIS MEZO */
    z-index: 0; /* HACK: A babu div moge kerul, igy lathatova valik a negativ z-index-es [before/after] elem! */
    position: relative;
}

#game_table .row .square.show-legal.move_quality {
    z-index: 1;
}

#game_table .row .square.show-legal .EMPTY:before { /* URES LEGALIS MEZO */
    content: '';
    top: 50%;
    left: 50%;
    width: 46.3%;
    height: 46.3%;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
}

#game_table .row .square.show-legal .EMPTY:after { /* URES LEGALIS MEZO */
    content: '';
    top: 50%;
    left: 50%;
    width: 35.6%;
    height: 35.6%;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    border: 0.94vw solid rgba(44, 129, 0, 0.8); /* color: #2c8100 */
}

@media screen and (min-width: 768px) { /* image limit */
    #game_table .row .square.show-legal .EMPTY:after {
        border-width: 7.22px;
    }
}

@media (orientation: landscape) {

    #game_table .row .square.show-legal .EMPTY:after {
        border-width: calc(0.94 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #game_table .row .square.show-legal .EMPTY:after {
            border-width: 7.22px;
        }
    }
}

#game_table .row .square.show-legal div[class^="WHITE"],
#game_table .row .square.show-legal div[class^="BLACK"] { /* ELLENFEL LEGALIS HATTERE */
    background-color: transparent;
}

#game_table .row .square.show-legal div[class^="WHITE"]:before,
#game_table .row .square.show-legal div[class^="BLACK"]:before { /* ELLENFEL LEGALIS MEZO */
    z-index: -1;
    content: '';
    display: block;
    width: inherit;
    height: inherit;
    margin-top: 0px;
    margin-left: 0px;
    position: absolute;
    border-style: solid;
    background-color: transparent;
    border-width: 6.25vw 2.5vw 6.25vw 2.5vw;
    border-color: transparent #88b471 transparent #88b471;
}

@media screen and (min-width: 768px) { /* image limit */
    #game_table .row .square.show-legal div[class^="WHITE"]:before,
    #game_table .row .square.show-legal div[class^="BLACK"]:before {
        border-width: 48px 19.2px 48px 19.2px;
    }
}

@media (orientation: landscape) {

    #game_table .row .square.show-legal div[class^="WHITE"]:before,
    #game_table .row .square.show-legal div[class^="BLACK"]:before {
        border-width: calc(6.25 * 0.6667vh) calc(2.5 * 0.6667vh) calc(6.25 * 0.6667vh) calc(2.5 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #game_table .row .square.show-legal div[class^="WHITE"]:before,
        #game_table .row .square.show-legal div[class^="BLACK"]:before {
            border-width: 48px 19.2px 48px 19.2px;
        }
    }
}

#game_table .row .square.show-legal div[class^="WHITE"]:after,
#game_table .row .square.show-legal div[class^="BLACK"]:after { /* ELLENFEL LEGALIS MEZO */
    z-index: -2;
    content: '';
    display: block;
    width: inherit;
    height: inherit;
    margin-top: 0px;
    margin-left: 0px;
    position: absolute;
    border-style: solid;
    background-color: transparent;
    border-width: 6.25vw 3.3vw 6.25vw 3.3vw;
    border-color: transparent black transparent black;
}

@media screen and (min-width: 768px) { /* image limit */
    #game_table .row .square.show-legal div[class^="WHITE"]:after,
    #game_table .row .square.show-legal div[class^="BLACK"]:after {
        border-width: 48px 25.3px 48px 25.3px;
    }
}

@media (orientation: landscape) {

    #game_table .row .square.show-legal div[class^="WHITE"]:after,
    #game_table .row .square.show-legal div[class^="BLACK"]:after {
        border-width: calc(6.25 * 0.6667vh) calc(3.3 * 0.6667vh) calc(6.25 * 0.6667vh) calc(3.3 * 0.6667vh);
    }

    @media screen and (min-height: 1152px) { /* width: ~768 */
        #game_table .row .square.show-legal div[class^="WHITE"]:after,
        #game_table .row .square.show-legal div[class^="BLACK"]:after {
            border-width: 48px 25.3px 48px 25.3px;
        }
    }
}

#game_table .row .square .WHITE_KING {
    background: url('../pic/babuk_1/wKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_QUEEN {
    background: url('../pic/babuk_1/wQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_ROOK {
    background: url('../pic/babuk_1/wRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_BISHOP {
    background: url('../pic/babuk_1/wBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_KNIGHT {
    background: url('../pic/babuk_1/wKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_PAWN {
    background: url('../pic/babuk_1/wPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KING {
    background: url('../pic/babuk_1/bKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_QUEEN {
    background: url('../pic/babuk_1/bQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_ROOK {
    background: url('../pic/babuk_1/bRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_BISHOP {
    background: url('../pic/babuk_1/bBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KNIGHT {
    background: url('../pic/babuk_1/bKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_PAWN {
    background: url('../pic/babuk_1/bPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

/* BABU_2 */

#game_table .row .square .WHITE_KING_BABU_2 {
    background: url('../pic/babuk_2/wKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_QUEEN_BABU_2 {
    background: url('../pic/babuk_2/wQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_ROOK_BABU_2 {
    background: url('../pic/babuk_2/wRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_BISHOP_BABU_2 {
    background: url('../pic/babuk_2/wBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_KNIGHT_BABU_2 {
    background: url('../pic/babuk_2/wKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_PAWN_BABU_2 {
    background: url('../pic/babuk_2/wPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KING_BABU_2 {
    background: url('../pic/babuk_2/bKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_QUEEN_BABU_2 {
    background: url('../pic/babuk_2/bQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_ROOK_BABU_2 {
    background: url('../pic/babuk_2/bRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_BISHOP_BABU_2 {
    background: url('../pic/babuk_2/bBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KNIGHT_BABU_2 {
    background: url('../pic/babuk_2/bKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_PAWN_BABU_2 {
    background: url('../pic/babuk_2/bPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

/* BABU_3 */

#game_table .row .square .WHITE_KING_BABU_3 {
    background: url('../pic/babuk_3/wKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_QUEEN_BABU_3 {
    background: url('../pic/babuk_3/wQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_ROOK_BABU_3 {
    background: url('../pic/babuk_3/wRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_BISHOP_BABU_3 {
    background: url('../pic/babuk_3/wBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_KNIGHT_BABU_3 {
    background: url('../pic/babuk_3/wKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .WHITE_PAWN_BABU_3 {
    background: url('../pic/babuk_3/wPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KING_BABU_3 {
    background: url('../pic/babuk_3/bKing.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_QUEEN_BABU_3 {
    background: url('../pic/babuk_3/bQueen.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_ROOK_BABU_3 {
    background: url('../pic/babuk_3/bRook.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_BISHOP_BABU_3 {
    background: url('../pic/babuk_3/bBishop.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_KNIGHT_BABU_3 {
    background: url('../pic/babuk_3/bKnight.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .BLACK_PAWN_BABU_3 {
    background: url('../pic/babuk_3/bPawn.png') 53% 60% no-repeat scroll transparent;
    background-size: 114% 114%;
}

#game_table .row .square .rotate {
    transform: rotate(180deg);
}
