:root{
    --cross-pseudo-backgroundcolor: #b8b5b5;
    --minOfHeightWidth: calc(min(calc(0.92*60dvh), 60dvw)* calc((1/3)*3));
    --optionSize: calc(2* min(1dvh,1dvw));
    --xo-color: #757575;
}

body{
    margin: 0;
    padding: 0;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-image: linear-gradient(to right top,#1a1a1a,#757575, rgb(211, 211, 211) );
    position: relative;
    box-sizing: border-box;
}

header{
    position: absolute;
    top: 0;
    height: 8dvh;
    max-height: 8dvh;
    padding-top: 2dvh;
    padding-bottom: 2dvh;
    width: 100dvw;
    text-align: center;
    color: lavender; 
    display: flex;
    align-items: center;
    z-index: 2;
}

.title{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    left: 8dvw;
    background-image: linear-gradient(to right top, rgb(224, 232, 219), rgb(224, 232, 219));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.first-letter{
    flex: 1;
    font-size: 8dvh;
}

.remaining-title{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2dvh;
}

.remaining-name{
    margin:0;
    padding: 0;
}

.xo{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    right: 8dvw;
    color: var(--xo-color);
    font-size: 8dvh;
    text-transform: uppercase;
}

header div::selection {
    background-color: transparent;
}

main{
    position: relative;
    height: 88dvh;
    width: 100dvw;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-direction: column;
    top: 6dvh;
    margin: 0;
    padding: 0;
}

.main{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#playarea{
    width: var(--minOfHeightWidth);
    height: var(--minOfHeightWidth);
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    border-collapse: collapse;
}

.square{
    position: relative;
    width: calc(var(--minOfHeightWidth)/3);
    height: calc(var(--minOfHeightWidth)/3);
    border: 3px solid #181818;
    border-radius: calc(5 * min(1dvh,1dvw));
    animation: borderAnimation 2s ease;
    box-sizing: border-box;
    box-shadow: inset 3px 5px 5px rgb(69, 69, 69),
                6px 10px 5px rgb(69, 69, 69);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(1.1rem);
}

.square:hover{
    cursor: pointer;
}

@keyframes borderAnimation{
    0%{
        border-color: transparent;
    }
    100%{
        border-color: black;
    }
}

.playerOne{
    height: 90%;
    width: 90%;
    border: var(--optionSize) solid black;
    border-radius: 50%;
    box-sizing: border-box;
}

.playerTwo{
    height: 90%;
    width: 90%;
    position: absolute;
}

.playerTwo::before, .playerTwo::after{
    content: "";
    position: absolute;
    background-color: var(--cross-pseudo-backgroundcolor);
    transform: rotate(45deg);
}

.playerTwo::before{
    width: var(--optionSize);
    left: 50%;
    margin-left: calc(-1*var(--optionSize)/2);
    height: 100%;
}

.playerTwo::after {
    width: 100%;
    top: 50%;
    margin-top: calc(-1*var(--optionSize)/2);
    height: var(--optionSize);
}

.playerOne.onPlayerOneWin{
    animation: changePlayerOneColor 2s ease-in-out 2.5;
}

@keyframes changePlayerOneColor {
    0% {
        border-color: rgb(35, 35, 35);
    }

    50% {
        border-color: green;
    }

    100% {
        border-color: rgb(35, 35, 35);
    }
}

.onPlayerTwoWin::before,
.onPlayerTwoWin::after {
    animation: changePlayerTwoColor 2s ease-in-out 2.5;
    transition: background-color 2s linear;
    background-color: green;
}

@keyframes changePlayerTwoColor {
    0% {
        background-color: var(--cross-pseudo-backgroundcolor);
    }

    50% {
        background-color: green;
    }

    100% {
        background-color: var(--cross-pseudo-backgroundcolor);
    }
}

#info{
    color: black;
    /* font-size: 1rem; */
    font-size: calc(4 * min(1dvh,1dvw));
    z-index: 2;
}

#info::selection{
    background-color: transparent;
    color: white;
}

.reload{
    padding: 0;
    margin: 0;
    border-radius: calc(1* min(1dvh, 1dvw));
    width:calc(6 * max(1dvh, 1dvw));
    height: calc(4 * max(1dvh, 1dvw));
    background-image: linear-gradient(to bottom,rgb(113, 113, 113),black,rgb(113, 113, 113));
    color: white;
    font-size: calc(4 * min(1dvh, 1dvw));
    z-index: 2;
}