html {
    height: 100%;
    width: 100%;
    background-color: #100;
    touch-action: none;
}

body {
    margin: 0;
    max-height: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #100;
    font-family: Fredoka, Helvetica, arial, sans-serif;
    position: relative;
    width: 100%;
    touch-action: none;
    color: white;

    -webkit-tap-highlight-color: transparent;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#application-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#application-canvas.fill-mode-NONE {
    margin: auto;
}

#application-canvas.fill-mode-KEEP_ASPECT {
    width: 100%;
    height: auto;
    margin: 0;
}

#application-canvas.fill-mode-FILL_WINDOW {
    width: 100%;
    height: 100%;
    margin: 0;
}

canvas:focus {
    outline: none;
}

.vignette {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 100vw rgba(0, 0, 0, 0.5) inset;
}

.counters {
    transition: opacity 0.5s ease;
    opacity: 0;
}

.counter {
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    box-shadow: inset 0vw 0vw 2vw rgba(0, 0, 0, 0.2);
}

.counter > div {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

.counter-pit {
    width: 3.5vw;
    height: 3.5vw;
}

.counter-pit > div {
    font-size: 1.5vw;
}

.counter-store {
    width: 4.75vw;
    height: 4.75vw;
}

.counter-store > div {
    font-size: 3vw;
}

.button {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5vw;
    width: 5vw;
    height: 5vw;
    border-radius: 50%;
    transition: opacity 0.5s ease;
}

.button:hover {
    background: #fff2;
}

.button:active {
    background: #fff4;
}

.invite-button {
    opacity: 0;
    right: 6vw;
    top: 0.75vw;
}

.invite-button > * {
    margin-left: 0.5vw;
    margin-bottom: 0.25vw;
}

.invite-text {
    position: fixed;
    top: 2vw;
    right: 12vw;
    font-size: 1.75vw;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
}

.menu-button {
    opacity: 0;
    right: 0.75vw;
    top: 0.75vw;
}

.tutorial-button {
    top: 0.75vw;
    left: 50vw;
    font-size: 2vw;
    width: 4vw;
    height: 4vw;
    transform: translateX(-50%);
}

.menu-overlay {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: hsl(5 50% 5% / 50%);
    transition: opacity 0.3s ease;
    pointer-events: all;
    opacity: 1;
}

.menu-overlay-hide {
    pointer-events: none;
    opacity: 0;
}

.menu {
    position: fixed;
    right: 0;
    height: 100%;
    width: 20vw;
    background: hsl(5 50% 20% / 95%);
    transition: transform 0.25s ease;
    box-shadow: -1vw 0vw 1vw #0001;
    padding-top: 0.75vw;
}

.menu-hide {
    pointer-events: none;
    transform: translateX(110%);
}

.menu-item {
    display: flex;
    justify-content: left;
    align-items: center;
    font-size: 1.5vw;
}

.menu-item:hover {
    background: #fff2;
}

.menu-item:active {
    background: #fff4;
}

.menu-item :nth-child(1) {
    width: 5vw;
    height: 4vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-item-off :last-child {
    position: absolute;
    width: 2.5vw;
    height: 0.15vw;
    left: 1.25vw;
    background-color: white;
    box-shadow: 0vw 0.15vw rgb(80, 40, 30);
    transform: rotate(45deg);
}

.menu-space {
    height: 2.5vw;
}

.dialog {
    position: fixed;
    left: 50vw;
    top: 50vh;
    background: hsl(5 50% 20% / 95%);
    box-shadow: 0vw 0.5vw 1vw #0008;
    transform: translate(-50%, -50%);
    padding: 2vw 3vw;
    font-size: 1.5vw;
    border-radius: 0.25vw;
    transition: opacity 0.25s ease;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.dialog > i {
    font-size: 5vw;
}

.dialog-body {
	padding-top: 1vw;
	padding-bottom: 1vw;
}

.dialog-button-container {
    display: flex;
    flex-direction: row;
}

.dialog-button {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 1.5vw;
    width: 10vw;
    height: 3vw;
    border-radius: 2vw;
}

.dialog-button:hover {
    background: #fff2;
}

.dialog-button:active {
    background: #fff4;
}

.players {
    position: fixed;
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.player {
    position: fixed;
    display: flex;
    width: 22vw;
    height: 5vw;
    gap: 1vw;
}

.player-bottom {
    right: 2vw;
    bottom: 2vw;
    flex-direction: row-reverse;
    align-items: flex-end;
}

.player-top {
    left: 2vw;
    top: 2vw;
    flex-direction: row;
    align-items: flex-start;
}

.player-icon-human {
    flex: none;
    height: 2.75vw;
    width: 1.57vw;
    background-image: url("./assets/ui/Human.svg");
    background-size: cover;
}

.player-icon-tutorial {
    flex: none;
    height: 2.75vw;
    width: 1.82vw;
    background-image: url("./assets/ui/Tutorial.svg");
    background-size: cover;
}

.player-icon-computer {
    flex: none;
    height: 2.75vw;
    width: 2.52vw;
    background-image: url("./assets/ui/Computer.svg");
    background-size: cover;
}

.player-name {
    font-size: 1.75vw;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1.75vw;
}

.message {
    position: fixed;
    text-align: center;
    top: 2vw;
    left: 50vw;
    transform: translateX(-50%);
    font-size: 1.75vw;
    transition: opacity 0.3s ease;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
}

.message :nth-child(2) {
    display: none;
}

.message-tutorial {
    top: 1vw;
    box-shadow: inset 0vw 0vw 8vw rgba(0, 0, 0, 0.5);
    border-radius: 6vw / 6vw;
    width: 50vw;
    height: 6.25vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0.25vw;
}

.message-tutorial :nth-child(2) {
    display: block;
    position: absolute;
    bottom: -1.75vw;
    font-size: 3vw;
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.1; }
    100% { opacity: 0.9; }
}

.skip-tutorial {
    bottom: 1vh;
    left: 50vw;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 1.75vw;
    width: 20vw;
    height: 5vw;
    transform: translateX(-50%);
    border-radius: 2.5vw;

    display: none;
}

.start-button-container {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: calc(50vh - 12vw);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.start-button {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 1.75vw;
    width: 18vw;
    height: 4vw;
    border-radius: 2vw;
}

.start-button:hover {
    background: #fff2;
}

.start-button:active {
    background: #fff4;
}

.tap-to-start {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: calc(50vh - 11vw);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    font-size: 2vw;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.game-over {
    position: fixed;
    width: 100%;
    height: 15vw;
    top: 50%;
    transform: translate(0, -50%);
    background: rgba(0, 0, 0, 0.75);
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.game-over > div {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    font-size: 6vw;
    font-family: Fredoka;
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.mancala-pit {
    position: fixed;
    width: 10vw;
    height: 10vw;
    transform: translate(-50%, -44%);
    border-radius: 50%;
}

.hidden {
    display: none !important;
}

.version {
    position: absolute;
    right: 1vw;
    bottom: 2.25vw;
    font-size: 1.25vw;
}