/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


form,fieldset{
    display:flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin:10px;
}
#logo{
    width: 100px;
    height: auto;
}

h1{
    text-align: center;
    font-size: 30px;
}
h2{
    text-align: center;
    font-size: 25px;
    margin:5px;
}
nav{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 50px;

}
nav>a{
    text-decoration: none;
    color: black;
    font-size: 25px;
}
nav >*:hover{
    transform: scale(1.2);
}
body{
    background-color: #fffef0;
    box-shadow: 0 0 60px #8a4d0f inset;
    background: radial-gradient(circle at center, #fffef0, #c6ba9e);
    height: 100vh;
}
#fog{
    position: absolute;
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    background-color: green;
    width: 3520px;
    top: 5px;
    left:5px;
}
.grid-item{
    margin:0;
    background-color: rgb(222, 221, 221);
    width:88px;
    height: 88px;
    transition:background-color;
    transition-duration: 10s;
    display:flex;
    justify-content: center;
    align-items: center;
}
.city{
    background-color: blue;
    height: 77px;
    width:77px;
}
.nofog{
    transition-duration:.5s;
    background-color: rgba(222, 221, 221, 0);
    margin:0;
    width:88px;
    height: 88px;
    display:flex;
    justify-content: center;
    align-items: center;
}
#playerviewmap::-webkit-scrollbar{
    display: none;
}   
#playerviewmap{
    height:500px;
    width:1000px;
    position:relative;
    overflow:scroll;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    border:5px rgb(141, 138, 120) solid;
    background-color: rgb(213, 249, 242);
}

#movmentbuttons{
    position:absolute;
    top:40%;
    display: grid;
    justify-items: center;
    grid-template-areas: 
    "moveup moveup moveup"
    "moveleft blank moveright"
    "movedown movedown movedown"
    "settlebutton settlebutton settlebutton";
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    gap:5px;
    width:10%;
    margin-left:2.5%;
}
#moveup{
    grid-area: moveup;
}
#movedown{
    grid-area: movedown;
}
#moveright{
    grid-area: moveright;
}
#moveleft{
    grid-area: moveleft;
}
#settlebutton{
    grid-area: settlebutton;
}
#blank{
    grid-area: blank;
}

#gameui{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
}
#unitbuttons{
    display: flex;
    justify-content: center;
    align-items: center;
    margin:5px;
    flex-wrap: wrap;
}

footer{
    text-align: center;
}

.activemove{
    pointer-events: all;
    background-color: white;
}
.inactivemove{
    pointer-events: none;
    background-color: gray;
}
#roundended{
    position:fixed;
    height: 500px;
    width:500px;
    top:20vh;
    right:40vw;
    background-color: red;
}

.basicunit{
    background-color: red;
    height: 77px;
    width:77px;
}
.settlerunit{
    background-color: rgb(203, 23, 206);
    height: 77px;
    width:77px;
}
.boatunit{
    background-color: rgb(85, 210, 18);
    height: 77px;
    width:77px;
}

#gridtree{
    display: grid;
    grid-template-areas: 
    "Alphabet Bronze_Working Horseback_Riding Pottery"
    "Ceremonial_Burial Iron_working Masonry Writing"
    "Code_of_Laws Construction Irrigation Literacy Mathematics"
    "Currency Democracy Engineering Monarchy Navigation"
    "feudalism Religion Banking University Invention"
    "Gunpowder Metallurgy Printing_press Steam_Power"
    "combustion Electricity Industrialization Railroad"
    "Communism Flight Mass_Production Corporation Atomic_theory Steel"
    "Electronics Mass_Media Advanced_Flight Nuclear_Power"
    "Networking Space_Flight"
    "globalization Superconductor Future Technology";
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}

input:required::placeholder{
    color: red;
}
#tosmall,#tosmalls{
    display: none;
}

@media screen and (max-width:640px){
    #gameui,#playerviewmap,#fog,#movmentbuttons,#unitstitle,#cityuis,#techtrees{
        display: none;
    }
    #tosmall,#tosmalls{
        display: flex;
        text-align: center;
    }

}