@import url('https://fonts.googleapis.com/css2?family=Dangrek&display=swap');

*
{
    margin: 0px;
    padding: 0px;

    box-sizing: border-box;
    overflow: hidden;

    font-family: "Dangrek", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 30px;
}

body
{
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100vw;
    height: 100vh;
}

.chess-area
{
    display: none;

    overflow: visible;
}

.chess-area-visible
{
    display: block;
}

.chess-area-blurred
{
    filter: blur(5px);
}

.match-result
{
    display: none;

    justify-content: center;
    align-items: center;
    z-index: 4;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.match-result-visible
{
    display: flex;
}

.match-result-title
{
    background-color: #0c76ac;
    color: white;
}

.match-result-subtitle-draw
{
    background-color: #434343;
}

.match-result-subtitle-victory
{
    background-color: #2e8500;
}

.match-result-subtitle-defeat
{
    background-color: #6b0000;
}

.match-result-highlight
{
    text-decoration: underline #2e8500;
}

.match-result-name
{
    padding: 20px;
}

.match-result-subtitle
{
    color: white;
}

.match-result-modal
{
    width: 600px;
    border: 4px solid #0c76ac;
    background-color: white;
    border-radius: 25px;
    text-align: center;
}

.match-result-players
{
    margin: 30px 0;
}

.chess-board
{
    overflow: visible;
    position: relative;
}

.chess-board-background
{
    display: grid;
    grid-template-rows: repeat(8, 1fr);
    grid-template-columns: repeat(8, 1fr);
}

.chess-square
{
    display: flex;
    justify-content: center;
    align-items: center;
}

.chess-square-hint
{
    width: 25px;
    height: 25px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    z-index: 1;
}

.chess-square-light
{
    background-color: #e6eef2;
}

.chess-square-dark
{
    background-color: #85b4cc;
}

.chess-square-marked
{
    background-color: #25a4e4;
}

.chess-square-highlighted
{
    box-shadow: 0 0 20px 10px inset #0b5c84;
}

.chess-piece-static
{
    transition: 50ms ease;
}

.chess-piece-grabbable
{
    cursor: grab;
}

.chess-piece-ungrabbable
{
    cursor: not-allowed;
}

.chess-piece-dragged
{
    cursor: grabbing;
    z-index: 2;
}

.chess-piece
{
    position: absolute;
}

.chess-promote-button
{
    transition: 50ms linear;
    cursor: pointer;
}

.chess-promote-button:hover
{
    background-color: #d8eaf3;
}

.chess-overlay-container
{
}

.chess-promotion-container
{
    z-index: 3;
    visibility: hidden;
    position: absolute;
    background-color: white;
    border: 2px solid #044362;
    border-radius: 15px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.button
{
    width: 100%;

    border: none;
    outline: none;

    background-color: #0c76ac;
    color: white;
    border-radius: 15px;

    box-shadow: 0 4px 0 0px #044362, 0 8px 0 0px #d8eaf3;
    transition: 50ms ease;

    padding: 2px 2px 0 0;

    margin-bottom: 4px;

    cursor: pointer;
}

.button:hover
{
    margin-bottom: 0px;
    padding-bottom: 4px;
    box-shadow: 0 4px 0 0px #044362;
}

.on-button
{
    background-color: #1c8713;
}

.off-button
{
    background-color: #8c1b19;
}

.disabled-button
{
    background-color: #3f5b69;
    box-shadow: 0 4px 0 0px #3f5b69;

    cursor: not-allowed;
}

.disabled-button:hover
{
    margin-bottom: 4px;
    padding-bottom: 0px;
    box-shadow: 0 4px 0 0px #3f5b69;
}

.info-area
{
    position: absolute;
    top: 0px;
    left: -300px;

    width: 250px;
    height: 100%;

    padding: 5px;
    text-align: center;

    border-radius: 15px;
}

.match-selector
{
    display: none;
    flex-direction: column;
    width: 600px;
    height: 800px;
    overflow: visible;
    padding: 10px;
    border-radius: 15px;
    background-color: #e6eef2;
}

.match-selector-visible
{
    display: flex;
}

.match-list
{
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
}

.match-list-item
{
    width: 100%;
    overflow: visible;
    border-radius: 15px;

    padding: 0 0 0 10px;

    cursor: pointer;
    margin-bottom: 4px;

    color: white;
}

.match-list-item:hover
{
    margin-bottom: 0px;
    padding-bottom: 4px;

    transition: 50ms linear;
}

.match-list-item-active
{
    background-color: #2e8500;
    box-shadow: 0 4px 0 0px #1c4805, 0 8px 0 0px #b9f49a;
}

.match-list-item-active:hover
{
    box-shadow: 0 4px 0 0px #1c4805;
}

.match-list-item-pending
{
    background-color: #434343;
    box-shadow: 0 4px 0 0px #272727, 0 8px 0 0px #c7c7c7;
}

.match-list-item-pending:hover
{
    box-shadow: 0 4px 0 0px #272727;
}

.match-selector-toolbar
{
    overflow: visible;
}

.name-prompt
{
    display: none;

    flex-direction: column;
    justify-content: space-around;
    align-items: center;

    gap: 10px;

    width: 600px;

    overflow: visible;
}

.name-prompt-visible
{
    display: flex;
}

.input
{
    border-radius: 15px;
    outline: none;
    border: 2px solid #0c76ac;
    width: 100%;
    color: black;
    padding: 5px;
}