:root{
    --bg-color1: rgb(128, 0, 128, 0.5);
    --bg-color2: rgb(177, 102, 177, 0.5);
    --bg-color3: rgb(255, 165, 0, 0.3);
    --bg-color4: rgb(255, 206, 115, 0.3);
}
body{
    font-family: monospace;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
body.game-body{
    background: linear-gradient(135deg, var(--bg-color3) 10%, var(--bg-color4) 10%, var(--bg-color4) 20%, var(--bg-color3) 20%, var(--bg-color3) 30%, var(--bg-color4) 30%, var(--bg-color4) 40%, var(--bg-color3) 40%, var(--bg-color3) 50%, 
    var(--bg-color4) 50%, var(--bg-color4) 60%, var(--bg-color3) 60%, var(--bg-color3) 70%, var(--bg-color4) 70%, var(--bg-color4) 80%, var(--bg-color3) 80%, var(--bg-color3) 90%, var(--bg-color4) 90%);
    background-attachment: fixed;
}
div#display {
    white-space-collapse: preserve;
    font-family: monospace;
    background: #8e8859;
    display: inline-block;
    border: 3px solid burlywood;
    white-space: pre-wrap;
    /* width: 240px;
    height: 240px; */
}
div#display div{
    width: 40px;
    height: 40px;
}
body.game-body h1{
    font-size: 5rem;
    margin-bottom: -20px;
    color: white;
    text-shadow: 4px 4px darkgray;
    z-index: -1;
    margin-top: 0.5rem;
}
#score{
    font-size: 3rem;
    color: var(--bg-color1);
    font-weight: 600;
}
.flex{
    display: flex;
    gap: 20px;
}
.column{
    display: flex;
    flex-direction: column;
}
.add-margin{
    margin-top: 12px;
    align-items: center;
    align-self: flex-start;
}
section.messages{
    font-size: 18px;
    max-height: 90px;
    overflow-y: scroll;
}
div.snake-cell, div.empty-cell, div.teleporter{
    display:inline-block;/*was inline*/
    font-size: 18px;
    text-align: center;
}
/* div.snake-cell{
    background-color: forestgreen;
    box-shadow: inset 1px 1px yellowgreen, inset -1px -1px yellowgreen;
} */
div#display div.teleporter {
    background: radial-gradient(circle, aquamarine, #6bd0f1, aquamarine, #6bd0f1, aquamarine);
    border-radius: 5px;
    
}
div#display div.apple {
    background-color: red;
    border-radius: 50%;
    position: relative;
}
div#display div.bomb{
    background-color: black;
    border-radius: 50%;
    position: relative;
}
div#display div.bomb::before{
    content: '';
    position: absolute;
    height: 25px;
    width: 25px;
    clip-path: polygon(48% 1%, 43% 34%, 28% 22%, 28% 38%, 0% 45%, 31% 52%, 27% 65%, 40% 60%, 39% 91%, 52% 63%, 61% 71%, 61% 58%, 92% 55%, 61% 46%, 71% 37%, 58% 36%);
    background-color: yellow;
    left: 47%;
    top: -7px;
}
div#display div.apple::before{
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    background-color: forestgreen;
    border-radius: 20px 0;
    top: -13px;
    left: 47%;
}
div#display div.mystery-item{
    background-color: purple;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    position: relative;
}
div#display div.mystery-item::before{
    content: '?';
    position: absolute;
    color: white;
    font-size: 36px;
    left: 11px;
}
.game-info{
    width: 480px;
    justify-content: space-between;
    font-size: 18px;
}
.game-info button{
    display: none;
}
/*Game guide*/
.guide{
    margin-left: 100px;
    margin-top: -75px;
    line-height: 0.7em;
}
.guide p{
    font-size: 18px;
}
#teleport-color{
    background-color: aquamarine;
    width: 20px;/*was 10*/
    height: 20px;
    align-self: center;
}
#apple-color{
    background-color: red;
    width: 20px;
    height: 20px;
    align-self: center;
}
#bomb-color{
    background-color: black;
    width: 20px;
    height: 20px;
    align-self: center;
}
h1{
    font-size: 250%;
}
/*THE MAIN MENU PAGE - LANDING PAGE*/
menu{
    padding-left: 0;
    border: 2px solid gray;
    /* box-shadow: inset 1px 1px 45px white; */
    z-index: 1;
    padding: 0 2%;
    height: 60vh;
}
body.landing{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    background: linear-gradient(to bottom, var(--bg-color1) 10%, var(--bg-color2) 10%, var(--bg-color2) 20%, var(--bg-color1) 20%, var(--bg-color1) 30%, var(--bg-color2) 30%, var(--bg-color2) 40%, var(--bg-color1) 40%, var(--bg-color1) 50%, 
    var(--bg-color2) 50%, var(--bg-color2) 60%, var(--bg-color1) 60%, var(--bg-color1) 70%, var(--bg-color2) 70%, var(--bg-color2) 80%, var(--bg-color1) 80%, var(--bg-color1) 90%, var(--bg-color2) 90%);
}
/*gradient overlay*/
body.landing::before {
    content: ""; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.5));
    pointer-events: none; /* Allow clicks to go through the overlay */
  }
body.landing header h1{
    font-size: 63px;
    margin-bottom: -30px;
    color: white;
    text-shadow: 3px 3px darkgray;
}

body.landing h2{
    font-size: 24px;
}
body.landing p{
    font-size: 20px;
}
button.basic-btn{
    color: white;
    font-size: 20px;
    padding: 15px;
    border-color: white;
    border-width: 2px;
    background-color: var(--bg-color1);
    transition: ease 0.3s;
    cursor: pointer;
    font-family: monospace;
}
/*style the arrow keys table in guide*/
menu table{
    width: 30%;
    height: 30%;
}
menu table td.key{
    background-color: white;
    box-shadow: 4px 4px darkgray;
    padding: 5%;
}
button.basic-btn:hover{
    color: black;
    background-color: white;
    border-color: var(--bg-color1);
}
button.basic-btn:hover a{
    color: black;
}
button.go-back-btn{
    appearance: none;
    border: none;
    font-size: 20px;
    padding: 15px;
    width: 100%;
    border-bottom: 1px solid darkgray;
    cursor: pointer;
    font-family: monospace;
    background-color: transparent;
    /* background: linear-gradient(to right, #ffe28d 0%, #e8d59e 20%, #e8d59e 80%, #ffe28d 100%); */
}
body.landing menu{
    max-width: 700px;/*700px on desktop and 90% of the screen for mobile*/
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff6ab;
    /* border-radius: 20px; */
}
menu section{
    width: 50%;
}
menu section:first-child{
    border-right: 1px solid gray;
}
body.landing menu li{
    list-style-type: none;
    padding: 20px;
}
body.landing .hidden{
    display: none;
}
body.landing a{
    text-decoration: none;
    color: white;
}
.arrow {/*https://www.w3schools.com/howto/howto_css_arrows.asp*/
    border: solid #71869f;
    display: inline-block;
}
.left {
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
}
.big-arrow{
    border-width: 0 4px 4px 0;
    padding: 7px;
}
.small-arrow{
    border-width: 0 3px 3px 0;
    padding: 5px;
}
.color-preview{
    width: 40px;
    height: 40px;
}
form#colorForm{
    display: flex;
    flex-direction: column;
}
menu#settings-screen>.flex{
    width: 100%;
    flex: 1;
}
menu#settings-screen{
    justify-content: flex-start;
}
label{
    font-size: 18px;
    margin-bottom: 10px;
}
/*Go back button for snake game*/
#triangle-topleft {
    width: 0;
    height: 0;
    border-top: 100px solid darkgray;
    border-right: 100px solid transparent;
    position: absolute;
    top: 0;
    left: 0;
}
.absolute{
    position: absolute;
    top: -4.7rem;
    width: max-content;
    left: 1rem;
}
.absolute .arrow{
    border: solid white;
}
.absolute .big-arrow{
    border-width: 0 4px 4px 0;
}
.absolute .small-arrow{
    border-width: 0 3px 3px 0;
}