:root {
    --black-color: #547980;
    --white-color: #ECFFFB;
    --bg-color: var(--black-color);
}

* {
    box-sizing: border-box;
}

#game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 120px);
    top: 60px;
}

#game #game-body {
    transition: background-color 1s;
    position: relative;
    background-color: var(--bg-color);
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#game #game-body #board {
    position: relative;
    width: 96vmin;
    height: 96vmin;
    background-color: #E5FCC2;
    border: 1vmin #395356 solid;
    display: flex;
    flex-flow: column wrap;
    justify-content: space-between;
}

#game #game-body #players {
    position: relative;
    width: 14vmin;
    height: 96vmin;
    background-color: #E5FCC2;
    border: 1vmin #395356 solid;
    display: flex;
    flex-flow: column wrap;
}

#game #game-body #players .player {
    width: 100%;
    height: 50%;
    position: relative;
}

#game #game-body #players .player .color-control {
    width: 100%;
    height: 10%;
    background-color: var(--white-color);
}

#game #game-body #players .player .drop-area {
    width: 100%;
    height: 90%;
    background-color: #E5FCC2;
}

#game #game-body #players #black .color-control {
    background-color: var(--black-color);
}

#game #game-body #players .current .color-control {
    background-color: #E04848 !important;
}

#game #game-body #debug {
    position: absolute;
    top: 1vmin;
    left: 1vmin;
}

#board .qdr {
    width: 43vmin;
    height: 100vmin;
    display: flex;
    flex-flow: row nowrap;
    padding: 0 0.5vmin;
    position: absolute;
}

#board .qdr .cl {
    position: relative;
    width: 16.6666666667%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-flow: column wrap;
}

#board .qdr .cl::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 3.5vmin solid transparent;
    border-right: 3.5vmin solid transparent;
    border-top: 36vmin solid;
    background: transparent;
}

#board .qdr .cl:nth-child(odd)::after {
    border-color: #0c0c0c;
    border-left-color: transparent;
    border-right-color: transparent;
}

#board .qdr .cl:nth-child(even)::after {
    border-color: #dc3545;
    border-left-color: transparent;
    border-right-color: transparent;
}

#board .qdr .cl .white {
    display: flex;
    content: "";
    min-width: 6vmin;
    min-height: 6vmin;
    border: 0.5vmin #395356 solid;
    border-radius: 3.5vmin;
    background-color: #dc3545;
    z-index: 999;
    margin: 0.05vmin auto;
    position: relative;
}

#board .qdr .cl .white[draggable=true]:hover {
    cursor: pointer;
}

#board .qdr .cl .black {
    display: flex;
    content: "";
    min-width: 6vmin;
    min-height: 6vmin;
    border: 0.5vmin #86460f solid;
    border-radius: 3.5vmin;
    background-color: var(--black-color);
    background: linear-gradient(45deg, #343a40, rgb(0 0 0 / 90%));
    z-index: 999;
    margin: 0.05vmin auto;
    position: relative;
}

#board .qdr .cl .black[draggable=true]:hover {
    cursor: pointer;
}

#board .qdr .cl[moveTarget=true]::after {
    border-color: #29FF56;
    border-left-color: transparent;
    border-right-color: transparent;
}

#board .qdr .cl[onTarget=true]::after {
    border-color: #54d46f;
    border-left-color: transparent;
    border-right-color: transparent;
}

#board .qdr-1 {
    top: 0;
    left: 0;
    /* position: absolute; */
}

#board .qdr-2 {
    top: 0;
    right: 0;
}

#board .qdr-3 {
    bottom: 0;
    right: 0;
    flex-flow: row-reverse nowrap;
}

#board .qdr-3 .cl {
    justify-content: flex-end;
}

#board .qdr-3 .cl::after {
    top: auto;
    bottom: 0;
    border-top: 0;
    border-bottom: 36vmin solid;
}

#board .qdr-4 {
    bottom: 0;
    left: 0;
    flex-flow: row-reverse nowrap;
}

#board .qdr-4 .cl {
    justify-content: flex-end;
}

#board .qdr-4 .cl::after {
    top: auto;
    bottom: 0;
    border-top: 0;
    border-bottom: 36vmin solid;
}

#board-bar {
    display: flex;
    flex-flow: column wrap;
    align-content: center;
    justify-content: space-around;
    width: 8vmin;
    position: absolute;
    height: 96vmin;
    background-color: #395356;
    left: 44vmin;
    width: 6vmin;
}

#board-bar .white {
    display: flex;
    content: "";
    min-width: 7vmin;
    min-height: 7vmin;
    border: 0.5vmin #395356 solid;
    border-radius: 3.5vmin;
    background-color: var(--white-color);
    z-index: 999;
    margin: 0.05vmin auto;
}

#board-bar .white[draggable=true]:hover {
    cursor: pointer;
}

#board-bar .black {
    display: flex;
    content: "";
    min-width: 7vmin;
    min-height: 7vmin;
    border: 0.5vmin #395356 solid;
    border-radius: 3.5vmin;
    background-color: var(--black-color);
    z-index: 999;
    margin: 0.05vmin auto;
}

#board-bar .black[draggable=true]:hover {
    cursor: pointer;
}

#board-bar .item {
    border-color: #FFCA28;
}

#board #dices {
    position: absolute;
    height: 10vmin;
    width: 20vmin;
    top: 90vmin;
    left: 15vmin;
    z-index: 9999999;
}

#board #dices.animate {
    -webkit-animation-duration: 3s;
    animation-duration: 3s;
    -webkit-animation-name: throw;
    animation-name: throw;
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
    -webkit-animation-direction: alternate;
    animation-direction: alternate;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

#board #dices .dice {
    transform-style: preserve-3d;
    position: relative;
    width: 6vmin;
    height: 6vmin;
    margin-bottom: 6vmin;
    transition: transform .1s;
}

#board #dices .dice-1 {
    transform: rotateX(-90deg) rotateY(0deg) rotateZ(0deg);
}

#board #dices .dice-2 {
    transform: rotateX(-90deg) rotateY(0deg) rotateZ(-90deg);
}

#board #dices .dice-3 {
    transform: rotateX(180deg) rotateY(0deg) rotateZ(0deg);
}

#board #dices .dice-4 {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(-90deg);
}

#board #dices .dice-5 {
    transform: rotateX(180deg) rotateY(-90deg) rotateZ(0deg);
}

#board #dices .dice-6 {
    transform: rotateX(90deg) rotateY(0deg) rotateZ(0deg);
}

#board #dices .dice-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 6vmin;
    height: 6vmin;
    background-color: white;
    padding: 0.9vmin;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-content: space-between;
}

#board #dices .dice-side:nth-child(2) {
    left: auto;
    right: 0;
}

#board #dices .dice-side .dot {
    display: flex;
    width: 1.2vmin;
    height: 1.2vmin;
    border-radius: 1vmin;
    /* background-color: #0000ff; */
    /* background-color: #65787a; */
}

#board #dices .dice-side-1 .dot:nth-child(5) {
    background-color: #dc3545;
}

#board #dices .dice-side-2 .dot:nth-child(1),
#board #dices .dice-side-2 .dot:nth-child(9) {
    background-color: #E5FCC2;
}

#board #dices .dice-side-3 .dot:nth-child(1),
#board #dices .dice-side-3 .dot:nth-child(5),
#board #dices .dice-side-3 .dot:nth-child(9) {
    background-color: #004085;
}

#board #dices .dice-side-4 .dot:nth-child(1),
#board #dices .dice-side-4 .dot:nth-child(3),
#board #dices .dice-side-4 .dot:nth-child(7),
#board #dices .dice-side-4 .dot:nth-child(9) {
    background-color: #0000ff;
}

#board #dices .dice-side-5 .dot:nth-child(1),
#board #dices .dice-side-5 .dot:nth-child(3),
#board #dices .dice-side-5 .dot:nth-child(5),
#board #dices .dice-side-5 .dot:nth-child(7),
#board #dices .dice-side-5 .dot:nth-child(9) {
    background-color: #E5FCC2;
}

#board #dices .dice-side-6 .dot:nth-child(1),
#board #dices .dice-side-6 .dot:nth-child(3),
#board #dices .dice-side-6 .dot:nth-child(4),
#board #dices .dice-side-6 .dot:nth-child(6),
#board #dices .dice-side-6 .dot:nth-child(7),
#board #dices .dice-side-6 .dot:nth-child(9) {
    background-color: #E5FCC2;
}

#board #dices .dice-side-1 {
    transform: rotateX(90deg);
    margin-top: -3vmin;
}

#board #dices .dice-side-2 {
    transform: translateX(3vmin) rotateY(90deg);
}

#board #dices .dice-side-3 {
    transform: translateZ(-3vmin) rotateX(180deg);
}

#board #dices .dice-side-4 {
    transform: translateZ(3vmin);
}

#board #dices .dice-side-5 {
    transform: translateX(-3vmin) rotateY(-90deg);
}

#board #dices .dice-side-6 {
    transform: rotateX(-90deg);
    margin-top: 3vmin;
}

#menu {
    position: absolute;
    display: none;
    width: 150px;
    height: auto;
    z-index: 999999;
}

#menu .menu-item {
    width: 100%;
    position: relative;
    float: left;
    height: 40px;
    line-height: 40px;
    background-color: white;
    color: black;
    padding-left: 20px;
}

#menu .menu-item:hover {
    text-decoration: underline;
    cursor: pointer;
}

@-webkit-keyframes throw {
    0% {
        transform: scale(2);
        top: 90vmin;
    }
    100% {
        top: 30vmin;
        transform: scale(1);
    }
}

@keyframes throw {
    0% {
        transform: scale(2);
        top: 90vmin;
    }
    100% {
        top: 30vmin;
        transform: scale(1);
    }
}