#game
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    background: url('./media/gamebg.webp');
    background-size: cover;
    background-position: 50% 50%;
    overflow: hidden;
}

#game .fieldcontainer
{
    user-select: none;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

#game > div:not(.menu) > div
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#game > div
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
}

#field
{
    width: calc(100% - 2rem);
    height: 100%;
    position: relative;
    margin: 1rem;
}

#field > div
{
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 9 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    padding: 0;
}




#field > div h1
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    align-content: center;
    font-variant: normal;
    white-space: nowrap;
    font-size: 2rem;
    color: white;
    margin: 0;
    flex: 1;
}








#field #area canvas
{
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    aspect-ratio: 1;
    cursor: pointer;
}

@keyframes finishedeffect
{
    0%
    {
        scale: 1;
        box-shadow: 0 0 1rem transparent;
    }
    50%
    {
        scale: 1.1;
        box-shadow: 0 0 2rem #ffffff;
    }
    100%
    {
        scale: 1;
        box-shadow: 0 0 1rem transparent;
    }
}








#field #area
{
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    box-sizing: border-box;
    padding: 2rem;
    background: #ffffff50;
    backdrop-filter: blur(8px);
    border: 2px solid #ffffff90;
    border-radius: 2rem;
    box-shadow: 0 0 1rem #00000090;
}

#field #area > div
{
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    /* transform: scale(1.02); */
    filter: saturate(30%);
    transition: rotate 1s ease, filter .5s ease;
}

#field #area > div.partofpath
{
    filter: saturate(100%) hue-rotate(70deg);
}

#field #area > div:not(.partofpath):hover
{
    filter: saturate(80%);
}

#winscreen
{
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #00000040;
    backdrop-filter: blur(4px);
}

#winscreen h1
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    font-size: min(3rem, min(7svw, 7svh));
    font-variant: normal;
    font-weight: 700;
    text-shadow: .075em .075em 0 black;
}





.menu
{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000060;
    backdrop-filter: blur(8px);
}

.menu > div
{
    background: #c0ac98;
    border: 6px solid #efe0d0;
    outline: 6px solid #796e63;
    box-shadow: -6px 18px 0 #796e63, 6px 18px 0 #796e63;
    border-radius: 1rem;
    max-width: calc(100svw - 6rem);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.menu > div h1
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-variant: normal;
    font-weight: 800;
    font-size: 2.5rem;
    color: white;
    margin: 0 0 1rem 0;
}

.menu .menu-button-row
{
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 0 0;
}

.menu .menu-button-row button
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    display: flex;
    justify-content: center;
    text-shadow: none !important;
    align-items: center;
    font-size: 1.35rem !important;
    padding: .25rem 1rem;
    border-radius: 100svw;
    gap: .4em;
    transition: filter .5s ease, scale .5s ease !important;
    cursor: pointer;
    width: 9rem;
}

.menu .menu-button-row button.menu_continue
{
    background: #7ebd9f;
    border: 3px solid #83f3bd;
    outline: 3px solid #457a61;
}

.menu .menu-button-row button.menu_back
{
    background: #cf7993;
    border: 3px solid #f5779d;
    outline: 3px solid #7a455b;
}

.menu .menu-button-row button:hover
{
    filter: saturate(120%) brightness(120%);
    scale: 1.1;
}

.menu button > span
{
    transform: translateY(-1px);
}

.menu button svg
{
    width: 1rem;
    transform: translateY(1px);
}

.menu .menu-input-box
{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    background: #978471;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 0 .5rem #00000080 inset;
    border-radius: 1rem;
    min-height: 12rem;
    justify-content: center;
}

.menu > div > div label, .menu > div > div h2
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    margin: 0 0 1rem 0;
}

.menu > div > div input[type=text]
{
    background: transparent;
    outline: none;
    border: none;
    height: 2rem;
    font-size: 1.5rem;
    color: #ffea8c;
    border-bottom: 2px solid #c0ac98;
    text-align: center;
    min-width: 60%;
}
.menu > div > div input[type=text]::placeholder
{
  color: #ffffff90;
  opacity: 1;
}

.menu > div > div
{
    width: 100%;
    box-sizing: border-box;
}

.menu > div > div .diffselect, .menu > div > div .sizeselect
{
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
}

.menu > div > div .sizeselect
{
    flex-wrap: wrap;
}

.menu > div > div .diffselect > div, .menu > div > div .sizeselect > div
{
    padding: .4rem .8rem;
    border-radius: .5rem;
    font-size: 1.5rem;
    font-family: 'nihonium', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: black;
    background: #efe0d0;
    border: 3px solid #c0ac98;
    box-sizing: border-box;
    cursor: pointer;
    transition: scale .5s ease;
}

.menu > div > div .diffselect > div.selected, .menu > div > div .sizeselect > div.selected
{
    outline: 3px solid #ffea8c;
    pointer-events: none;
}

.menu > div > div .diffselect > div:hover, .menu > div > div .sizeselect > div:hover
{
    scale: 1.1;
}

#gameover
{
    position: absolute;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: opacity 2s ease;
}

#gameover > div
{
    width: min(50rem, 90svw);
    max-width: min(50rem, 90svw);
    background: transparent;
    border: 2px solid #ffffff;
    box-shadow: 0 0 1rem #ffffff7f, 0 0 1rem #ffffff7f inset;
    border-radius: 1rem;
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #00000050;
}

#gameover > div h1
{
    font-size: min(3rem, min(6svw, 6svh));
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-variant: normal;
    font-weight: 300;
    color: #ffffff;
    margin: 0 0 2rem 0;
}

#gameover .points_row
{
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    width: 80%;
    gap: 1rem;
}

#gameover .points_row > div
{
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 100svw;
    font-weight: 600;
    color: white;
    box-shadow: .25rem .25rem 0 #00000040;
}

#gameover .points_row > div > span
{
    padding: .5rem 1rem;
    background: #ffffff49;
}

#gameover .points_row > div > span:nth-child(2)
{
    padding: .5rem 1rem;
    background: #ffffff10;
}

#game #homebutton
{
    position: absolute;
    top: min(1rem, min(2.5svw, 2.5svw));
    left: min(1rem, min(2.5svw, 2.5svw));
    width: min(3rem, min(7.5svw, 7.5svh));
    height: min(3rem, min(7.5svw, 7.5svh));
    min-width: min(3rem, min(7.5svw, 7.5svh));
    min-height: min(3rem, min(7.5svw, 7.5svh));
    cursor: pointer;
    opacity: .51;
    transition: opacity .5s ease;
    z-index: 2;
}

#game #homebutton:hover
{
    opacity: 1;
}





@keyframes slidein
{
    from { transform: translateX(100svw); }
    to { transform: translateX(0); }    
}

@keyframes slideout
{
    from { transform: translateX(0); }    
    to { transform: translateX(-100svw); }
}

@media (pointer: fine)
{
    #mobilecontrol { display: none !important; }
}
