html, body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    color: #eef2f7;
    background: #1f2429;
}

:not(:root):fullscreen::backdrop {
    background: #1f2429;
}

#game-canvas-container {
    position: relative;
}

#play {
    position: absolute;
    z-index: 1;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#play::before,
#play::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    transition: .1s;
}

#play::before {
    width: 5em;
    height: 5em;
    background-color: #1f2429;
}

#play::after {
    width: 3em;
    height: 3.75em;
    background-color: #eef2f7;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

#play:hover::before,
#play:hover::after {
    scale: 1.25;
}

#play:hover::before {
    background-color: #e53;
}

#progress {
    position: absolute;
    z-index: 1;
    width: 13.5em;
    height: max-content;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    display: flex;
    flex-direction: column;
    user-select: none;
    pointer-events: none;
}

#progresstext {
    flex: 1;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5em 0;
}

#progressbar {
    flex: 0 0 1em;
    width: 100%;
    background-color: #6f7984;
    border: .175em solid #1f2429;
    box-sizing: border-box;
}

#progressbarvalue {
    width: 0;
    height: 100%;
    background-color: #e53;
}

#fullscreen-button {
    position: absolute;
    z-index: 1;
    background: url(fullscreen.svg) #1f2429 no-repeat;
    background-size: 2rem;
    background-position: -.125em .375rem;
    border: none;
    width: 2.5rem;
    height: 2.75rem;
    cursor: pointer;
    bottom: 0;
    right: 0;
}

#fullscreen-button::before {
    content: '';
    width: 2.75rem;
    height: 2.75rem;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    background-color: #1f2429;
    position: absolute;
    top: 0;
    left: -2.73rem;
}

#game-canvas-container:has(#game-canvas:hover) #fullscreen-button,
#game-canvas-container:has(#game-canvas:hover) #fullscreen-button::before,
#fullscreen-button:hover,
#fullscreen-button:hover::before {
    background-color: #e53;
}

#fullscreen-button:hover,
#fullscreen-button:hover::before {
    background-color: #e53;
}

:fullscreen #fullscreen-button {
    display: none;
}

#game-canvas {
    display: block;
    transform-origin: 0% 0%;
    background-color: #3d4752;
    box-shadow: 0 1em 6em -3em black;
    cursor: pointer;
}
    
:fullscreen #game-canvas {
    position: fixed;
    margin: 0;
    cursor: default;
}
