:root{
    --color1: #f7ead9;
    --color2: #e1d2a9;
    --color3: #88b499;
    --color4: #619885;
    --color5: #67594e;
    --color6: #70c5a7;
    --blackSquares: #000000;
    --whiteSquares: #ffffff;
}

*{
    margin: 0;
    padding: 0;
    max-width: 100%;
}

#top-header{
    max-width: 100%;
    display: flex;
    width: 100vw;
    height: 12.5vh;
    background-color: var(--color3);
    justify-content: space-between;
}

#icon-holder{
    box-sizing: margin-box;
    width: 20vh;
    height: 100%;

}

#icon-holder:hover{
    cursor: pointer;
    transform: translateX(20px);
    transition: all 300ms ease-in-out;
}

#icon{
    border-radius: 30px;
}

.header-links{
    display: flex;
    justify-self: end;
    align-self: flex-end;
    gap: 4vw;
    margin-right: 2vw;
}

.header-links a{
    color: var(--color5);
    font-family: sans-serif;
    font-size: 1.5vw;
    text-decoration: none;
}

.header-links a:hover{
    transform: translateY(-4px);
    transition: all 300ms ease-in-out;
}

.header-links a:active{
    transform: translateY(5px);
    color: black;
}

#main-game{
    max-width: 100%;
    display: flex;
    width: 100vw;
    height: 87.5vh;
    background-color: var(--color4);
}

#board-content{
    width: 60vw;
    height: 100vh;
    display: flex;
}

#board{
    display: grid;
    max-width: 50vw;
    max-height: 50vw;
    width: 80vh;
    height: 80vh;
    grid-template-columns: repeat(8, 12.5%);
    grid-template-rows: repeat(8, 12.5%);
    margin: 5vh;
    box-shadow: 10px 10px 15px 8px;
}

#board .even-row:nth-child(2n), #board .odd-row:nth-child(2n+1){
    background-color: var(--blackSquares);
}

#board .even-row:nth-child(2n+1), #board .odd-row:nth-child(2n){
    background-color: var(--whiteSquares);
}

#board div{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: calc(2vw + 2vh);
}

#ui-content{
    width: 40vw;
    height: 100vw;
    display: flex;
    margin: 5vh;
    align-items: start;
    justify-content: center;
}

#ui{
    display: flex;
    flex-direction: column;
    max-width: 80vw;
    max-height: 50vw;
    width: 90%;
    height: 80vh;
    background-color: var(--color6);
    border-radius: 20px;
    box-shadow: 10px 10px 15px 8px;
}

#color-picker{
    max-width: calc(100% - 4vh);
    display: flex;
    width: 100%;
    height: 20%;
    margin: 2vh;
    justify-content: space-evenly;
    align-items: center;
    color: var(--color5);
}

#select-colors{
    display: flex;
    background-color: var(--color1);
    height: 5vh;
    align-items: center;
    border-radius: 20px;
    font-size: 1.2rem;
    padding: 1vh;
}

#ui-text {
    justify-self: center;
    align-self: center;
    margin-top: 20vh;
    color: var(--color5);
    font-family: sans-serif;
    font-size: calc(0.6vh + 0.6vw);
}

#game-input{
    max-width: calc(100% - 4vh);
    display: flex;
    width: 100%;
    height: 20%;
    margin: 2vh;
    justify-content: center;
}

#control-game{
    display: flex;
    justify-self: center;
    align-self: center;
    justify-content: space-evenly;
}

.UI-buttons{
    margin-left: 1vw;
    background-color: gray;
    height: auto;
    width: auto;
    font-size: 1rem;
    border-radius: 6px;
    box-shadow: 2px 2px 3px 3px;
    padding: 2vh;
    cursor: pointer;
    transition: all 300ms ease-in-out;
}

.UI-buttons:hover{
    background-color: rgb(39, 37, 37);
}

.UI-buttons:active{
    background-color: rgb(16, 20, 34);
    transform: translateY(1vh)
}

#description{
    display: flex;
    width: 100vw;
    height: 87.5vh;
    align-items: center;
    justify-content: center;
}

#text{
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 5vw;
    justify-content: center;
    width: 60vw;
    height: 70vh;
    background-color: var(--color4);
    border-radius: 30px;
    font-size: calc(1.2vh + 1.2vw);
    font-family: sans-serif;
    color: black;
    opacity: 0.7;
}

#main-background{
    width: 100%;
    height: 100%;
    position: fixed;
    bottom: 0;
    z-index: -1;
    opacity: 0.25;
}

.responsive {
    width: 100%;
    height: 100%;
}

footer{
    display: flex;
    max-width: 100%;
    width: 100vw;
    height: 10vh;
    background-color: var(--color3);
    bottom: 0;
    margin-top: 50vh;
    justify-content: space-evenly;
}

footer p{
    width: auto;
    height: auto;
    font-size: calc(2vw + 2vh);
    font-family: sans-serif;
    color: var(--color5);
}

#footer-links a img{
    border-radius: 10px;
}

@media screen and (orientation:portrait) {
    #main-game{
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    #board-content{
        width: 60vw;
        height: 100vh;
        display: flex;
    }
    #board{
        max-width: 60vw;
        max-height: 60vw;
        width: 60vw;
        height: 60vh;
    }
    #ui-content{
        height: 80vh;
        width: 100vw;
    }
    #ui-text {
        margin-top: 2vh;
    }
}
