@import url(https://fonts.bunny.net/css?family=azeret-mono:400,700,900);

:root {
    --col-bg: #FFD59D;
    --col-bg-light: #FFDCAE;
    --col-bg-lighter: #FFEEDB;
    --col-primary: #FF5300;
    --col-primary-dark: #FF2700;
    --col-primary-light: #FF8800;
    --col-shadow: rgba(0, 0, 0, 0.25);
    --col-white: #fff;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    line-height: 1;
}

body {
    background-color: var(--col-bg);
    font-family: 'Azeret Mono', sans-serif;
}

.container {
    max-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-areas:
        "scores game next"
        "text game circle";
    grid-template-columns: 1fr max-content 1fr;
    grid-template-rows: 33vh 67vh;
}

#game-canvas {
    position: relative;
    max-width: 640px;
    height: 100vh;
    grid-area: game;
    display: flex;
    align-items: center;
}

#game-ui {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    font-weight: 700;
    display: none;
    transform-origin: top left;
    transition: background 250ms ease-out;
}

#game-ui.blind {
    background: black;
}

#blind {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 84px;
    font-weight: 900;
    color: var(--col-bg-lighter);
    text-shadow: 3px 3px 0 var(--col-primary), -3px -3px 0 var(--col-primary), -3px 3px 0 var(--col-primary), 3px -3px 0 var(--col-primary);
}

#game-ui.blind>#blind {
    display: flex;
}

#scores {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    grid-area: scores;
}

#next {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    grid-area: next;
}

#next.secret {
    display: none;
}

#circle {
    width: 100%;
    height: 100%;
    grid-area: circle;
    display: flex;
    justify-content: center;
    align-items: center;
}

#circle img {
    width: 20%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, 50%);
    transition: all 250ms ease-in-out;
    position: absolute;
}

#ap-chat {
    grid-area: text;
    display: flex;
    flex-direction: column;
    justify-content: end;
    height: 100%;
    width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
}

#chat {
    margin: 16px;
    width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    height: calc(100% - 32px);
    display: flex;
    flex-direction: column;
}

#chat>form {
    display: flex;
    flex-direction: row;
}

#chat-log {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    grid-area: msg;
    height: 100%;
    max-height: 100%;
    hyphens: auto;
    word-wrap: break-word;
    overflow-y: scroll;
    color: rgb(50, 50, 50);
}

#chat-log>span {
    width: 100%
}

.progression {
    color: rgb(168, 147, 228);
    font-weight: bold;
}

.useful {
    color: rgb(98, 122, 198);
    font-weight: bold;
}

.progression.useful {
    color: rgb(255, 223, 0);
}

.filler {
    color: rgb(6, 217, 217);
    font-weight: bold;
}

.trap {
    color: rgb(211, 113, 102);
    font-weight: bold;
}

.location {
    color: rgb(0, 255, 127);
}

.local-player {
    color: rgb(238, 0, 238);
    font-weight: bold;
}

.other-player {
    color: rgb(150, 150, 110);
    font-weight: bold;
}

/* ValidJSONColorType */
.bold {
    font-weight: bold;
}

.underline {
    text-decoration: underline;
}

.black {
    color: black;
}

.red {
    color: rgb(255, 64, 63);
}

.green {
    color: rgb(0, 255, 127);
    background-color: rgba(0, 0, 0, 0.25);
}

.yellow {
    color: rgb(255, 255, 127);
    background-color: rgba(0, 0, 0, 0.5);
}

.blue {
    color: rgb(63, 64, 255);
}

.magenta {
    color: rgb(255, 127, 255);
}

.cyan {
    color: rgb(127, 255, 255);
    background-color: rgba(0, 0, 0, 0.5);
}

.white {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
}

.black_bg {
    background-color: black;
    color: #ccc;
}

.red_bg {
    background-color: rgb(255, 64, 63);
}

.green_bg {
    background-color: rgb(0, 255, 127);
}

.yellow_bg {
    background-color: rgb(255, 255, 127);
}

.blue_bg {
    background-color: rgb(63, 64, 255);
    color: #ccc;
}

.magenta_bg {
    background-color: rgb(255, 127, 255);
}

.cyan_bg {
    background-color: rgb(127, 255, 255);
}

.white_bg {
    background-color: white;
}

#chat-box {
    width: 100%;
    flex-grow: 1;
}

.error {
    color: red;
}

#ap-chat>* {
    background-color: #ffeace;
    padding: 16px;
    border-radius: 16px;
}

#login {
    margin: auto;
    width: calc(100% - 32px);
    max-width: 320px;
    display: flex;
    flex-direction: column;
    /* background-color: #ffeace;
    padding: 16px;
    border-radius: 16px; */
}

label {
    display: flex;
    flex-direction: column;
}

.circle-container {
    position: relative;
    margin: auto;
    max-width: 320px;
    width: 80%;
    aspect-ratio: 1 / 1;
}

.circle-unavailable {
    opacity: 0.3;
}

.shuffled .circle-unavailable {
    display: none;
}

#circle-0 {
    left: 75%;
    bottom: 93.3%;
}

#circle-1 {
    left: 93.3%;
    bottom: 75%;
}

#circle-2 {
    left: 100%;
    bottom: 50%;
}

#circle-3 {
    left: 93.3%;
    bottom: 25%;
}

#circle-4 {
    left: 75%;
    bottom: 6.7%;
}

#circle-5 {
    left: 50%;
    bottom: 0;
}

#circle-6 {
    left: 25%;
    bottom: 6.7%;
}

#circle-7 {
    left: 6.7%;
    bottom: 25%;
}

#circle-8 {
    left: 0;
    bottom: 50%;
}

#circle-9 {
    left: 6.7%;
    bottom: 75%;
}

#circle-10 {
    left: 25%;
    bottom: 93.3%;
}

#game-score {
    font-size: 84px;
    font-weight: 900;
    color: var(--col-bg-lighter);
    text-shadow: 3px 3px 0 var(--col-primary), -3px -3px 0 var(--col-primary), -3px 3px 0 var(--col-primary), 3px -3px 0 var(--col-primary);
}

#game-ceiling {
    position: absolute;
    width: 100%;
    border-bottom: 2px dotted #333;
    height: calc(var(--lose-height, 84) * 1px);
}

#game-end-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-items: center;
    background-color: var(--col-shadow);
}

#game-end {
    text-align: center;
    padding: 32px 48px;
    background-color: var(--col-bg-lighter);
    border: 5px solid var(--col-primary);
    box-shadow: 0 4px 32px var(--col-shadow);
    border-radius: 32px;
    margin: 0 auto;
    pointer-events: initial;
    user-select: initial;
}

#game-end-title {
    font-weight: 700;
    font-size: 48px;
    color: var(--col-primary-dark);
}

#game-end-link {
    display: inline-block;
    color: var(--col-white);
    font-size: 24px;
    text-decoration: none;
    background-color: var(--col-primary-light);
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 4px 4px 0 var(--col-shadow);
}

#game-end-link:hover {
    background-color: var(--col-primary);
    box-shadow: 6px 6px 0 var(--col-shadow);
}

#game-status {
    height: 48px;
    background-color: var(--col-bg-lighter);
    display: flex;
}

.game-status-item {
    display: flex;
    line-height: 1;
    align-items: center;
    margin-right: 32px;
}

.game-status-label {
    color: #666;
    font-size: 16px;
}

#next-check {
    color: #333;
    font-weight: 700;
    font-size: 24px;
}

#game-next-fruit {
    width: 128px;
    height: 128px;
}