/********************
 *	 Start Default 	*
 ********************/
 
*{margin:0;padding:0;}

body{
	font-family:"Lucida Console", Monaco, monospace;
    font-size: 0.85rem;
    line-height: 1.25;
    min-width: 100%;
    min-height: 100dvh;
	background-color: #f9f9f9;
	color:#585858;

    display: grid;
    grid-template-columns: 15rem 1fr;
    grid-template-rows: 96px 1fr auto;
    grid-template-areas: 
        "header header"
        "menu content"
        "footer footer";
    /* grid-template-areas: 
        "header header"
        "menu content"
        "footer content"; */
}
	h1, h2, h3, h4, h5{
		color:#252555;
	}
	h3{ margin:20px 10px 10px 10px; }
	
	a{
		text-decoration:none;
		color:#eb6900;
		color:#161a2f;
	}
		a.menu{
			font-size: 1.1rem;
            line-height: 1;
		}
	
	a:hover{
		color:#505a7f;
	}

    ul{
        list-style: none;
    }
	
	/* a:visited{
		
	} */
    
    button { font-family:"Lucida Console", Monaco, monospace; }

/* #container{ width:100%; min-width: 344px; } */
        
.orange{ color: #eb6900; }
.hover-blue { color: #505a7f; }
.link-dark-blue{ color: #161a2f;}
.clear{ clear: both; }
.hidden{ display: hidden; }
.active{ display: block !important;}
.grid{ display: grid !important; }
.flex{ display: flex !important; }
.none{ display: none !important; }


/********************
 *	 End Default 	*
 ********************/

#top{
    grid-area: header;
    width: 100%;
    height: 96px;
    position: fixed;
    top: 0;
    /* margin: 0 auto; */
    /* background-image: linear-gradient(to top, #d9e2e9, #a0b6c8, #7291ad, #505a7f); */
    background-image: linear-gradient(to top, #fcfcfcc0, #a0b6c8e0, #7291ad, #505a7f);
    /* border-bottom: 1px solid #35353520; */
    z-index: 1000;
}
    #top h1{
        padding: 26px;
        color: #161a2f;
    }

#menu{
    grid-area: menu;
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    top: 130px;
    width: 14rem;
    margin: 0 auto;
    padding-left: 10px;
}
#menu-small, #menu-button, #mobile-menu{
    display: none;
}
    
#content{
    grid-area: content;
    width: 95%;
    min-height: 400px;
    margin: 10px auto;
    background-color: #f9f9f9;
}

    #content p{
        padding: 10px 15px 0 20px;
        text-align: justify;
    }

    #content .coming-soon{
        font-size: 0.8rem;
        color: #505a7f;
        background-color: rgba(235, 105, 0, 0.2);
        width: 110px;
        padding: 15px 50px;
        margin: 15px 0 15px 20px;
        border: 2px solid #161a2f;
    }
        #content .error-message{ color: red; padding: 15px 0 0 35px; }
        #content .error-message ul{ list-style: none; margin-left: 45px; }
	
#login-menu{
	margin: 26px 0;
	color: #252525;
}
	/* #login-menu a:hover{ } */
#login-modal{ display: none; }
#login-form input, #login-form button, 
#login-form-mobile input, #login-form-mobile button{
	padding: 2px 8px;
	margin: 2px 0;
}
#close-modal-button{
    margin-bottom: 26px;
    /* text-decoration: underline; */
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: thin solid black;
}
    .login-link{ cursor: pointer; }
	.logout-btn{
		padding-left: 10px;
	}

	#create-form{
		width: 420px;
		margin: 20px 0 0 35px;
	}
		#create-form table{ width: 100%; }
		#create-form table td{ padding: 2px 0; }
		#create-form table td input{ padding: 2px 8px; }
		#create-form table td button{ padding: 2px 8px; margin-top: 5px; }

#games-container{
    display: grid;
    grid-template-columns: repeat(2, calc(50% - 5px));
    grid-auto-rows: fit-content(auto);
    margin-left: 20px;
    row-gap: 12px;
    column-gap: 20px;
}

    .game{
        position: relative;
        min-height: 120px;
        height: auto;
        background-color: #fdfdff;
        border-radius: 4px;
        padding-bottom: 6px;
    }
        .game h3{
            margin: 5px 0;
        }
        .game p{
            text-align: left !important;
            padding: 10px 0 0 30px !important;
            margin-bottom: 36px;
        }

        .game button{
            display: block;
            position: absolute;
            bottom: 5px;
            left: 20px;
            padding: 5px 10px;
            font-size: 0.7rem;
            font-weight: bold;
            color: #303549;
            background-color: #a0b6c8;
            border-radius: 2px;
            border: none;
            cursor: pointer;
        }
        .game button:hover{
            background-color: #7291ad;
        }
        .game button:active{
            background-color: #161a2f;
        }
        .game button:focus{
            outline: none;
        }
        .game button:disabled{
            background-color: #f9f9f9;
            color: #161a2f;
            border: 1px solid #161a2f;
        }
        
#tutorials-container{
    padding: 10px 0 0 20px;
}
#tutorial-categories{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
}
    .category{
        padding: 5px;
        margin-right: 5px;
        background-color: white;
        border: thin solid #00000040;
        border-radius: 1px;
        cursor: pointer;
        font-size: 1rem;
    }
    .category:hover{
        background-color: #00000006;
    }

#tutorial-links{
    width: 100%;
    margin-top: 10px;
    /* border: thin solid #00000060; */
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    line-height: 16px;
    padding-left: 10px;
}

    #tutorial-content{
        display: grid;
        grid-template-columns: 1fr;
        overflow: hidden;
    }
        .code{
            min-width: 90%;
            margin: 5px auto;
            padding: 10px 0 0 20px;
            border-radius: 10px;
            background-color: rgba(48, 53, 73, 0.05);
            border: thin solid #505a7f;
        }

        .code h4{
            color:#303549;
        }

        .code pre{
            width: 95%;
            margin: 5px auto;
            color: #505a7f;
            white-space: pre-wrap;
            /* overflow-x: auto; */
        }

#links{
    width: 90%;
    margin: 0 auto;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
    #links a{
        padding-left: 38px;
    }

    #links .links-group{
        min-width: 260px;
    }

#m-footer{ display: none; }
#footer{
    grid-area: footer;
    padding-top: 8px;
    padding-left: 14px;
    width: auto;
    min-height: 150px;
    font-size: 0.75rem;
}

    #footer a{
        color: #eb6900;
        color: #505a7f;
    }
    #footer a:hover{
        color:#161a2f;
    }

#copy{
    font-size: 0.65rem;
    padding-top: 30px;
}


/* tablets */
@media screen and (max-width: 960px) {
    body{
        grid-template-columns: 1fr;
        grid-template-rows: 96px 1fr auto;
        grid-template-areas: 
            "header"
            "content"
            "footer";
    }

    #top{
        background-image: linear-gradient(to top, #f9f9f900, #a0b6c8, #7291ad, #505a7f);
    }
        #top h1{
            padding: 18px;
            text-align: center;
        }

    #menu, #menu-button, #mobile-menu{
        display: none;
    }
    #menu-small{
        grid-area: menu;
        display: block;
        position: fixed;
        /* bottom: 0; */
        top: 38px;
        left: 0;
        width: 100%;
        height: 56px;
        /* background-image: linear-gradient(to bottom, #f9f9f94c, #f9f9f9ea, #efefefec, #efefef); */
        font-size: 1.4rem;
        line-height: 3.5rem;
        text-align: center;
        z-index: 1001;
    }

    #login-modal{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background-color: #00000068;
        justify-content: center;
        align-items: center;
        z-index: 1005;
    }
        #login-mobile{
            width: 280px;
            height: 180px;
            padding: 32px 18px;
            background-color: #f9f9f9;
            border-radius: 6px;
        }

    .game{
        font-size: 0.75rem;
    }

    #m-footer{ display: none; }
    #footer{
        border-top: 2px solid #3535353a;
    }
    
}

/* mobile */
@media screen and (max-width: 660px){
    body{
        font-size: 0.7rem;
        grid-template-columns: 1fr;
        grid-template-rows: 80px 1fr;
        grid-template-areas: 
            "header"
            "content";
    }

    #footer{ display: none; }

    #top{
        height: 80px;
    }

    #top h1{
        padding-top: 26px;
        padding-left: 12px;
        text-align: left;
    }

    #menu, #menu-small{ display: none; }
    #menu-button{
        display: block;
        position: fixed;
        width: 40px;
        height: 36px;
        font-size: 1.2rem;
        font-weight: bold;
        top: 22px;
        right: 20px;
        padding: 2px 4px;
        border: none;
        color: #d35f00;
        background: #fcfcff2f;
        cursor: pointer;
        z-index: 1003;
    }

    #m-home{ grid-area: home; }
    #m-games{ grid-area: games; }
    #m-tutorials{ grid-area: tutorials; }
    #m-links{ grid-area: links; }
    #m-login{ grid-area: login; }
    #m-footer{
        grid-area: footer;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding-left: 20px;
    }

    #m-container{ grid-area: m-top; }

    #login-modal{
        background-color: #f7f7f7;
    }
        #login-mobile{
            padding: 32px 18px;
            background-color: #f9f9f9;
            border: thin solid black;
            border-radius: 6px;
        }

    #mobile-menu{
        display: grid;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background-color: #ffffff;
        grid-template-columns: 1fr;
        grid-template-rows: 100px repeat(5, 1fr) 40%;
        grid-template-areas: 
            "m-top"
            "home"
            "games"
            "tutorials"
            "links"
            "login"
            "footer";
        z-index: 999;
    }

        .mobile-menu{
            display: flex;
            flex-direction: row;
            align-items: center;
            padding-left: 20px;
            font-size: 1.85rem;
            /* box-shadow: inset 10px 0 5px rgba(0, 0, 0, 0.2); */
            cursor: pointer;
        }
        .mobile-menu:not(:last-child){
            border-bottom: thin solid #505a7f35;
        }
        .mobile-menu-hover{
            background-color: #a0b6c85d;
        }

        .mobile-menu > *{
            margin: 5px;
        }

    #games-container{
        grid-template-columns: 1fr !important;
    }
        .game{
            min-height: auto;
        }

    #links{
        grid-template-columns: 1fr;
        font-size: 0.75rem;
    }
        #links h3{
            grid-area: category;
        }
        #links a{
            padding-left: 38px;
            grid-area: inherit;
        }
        #links br{ display: none; }
    
        #links .links-group{
            width: 100%;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: 50px auto;
            grid-template-areas: 
                "category category"
                ". .";
        }

}