*{
	margin: 0;
	padding: 0;
}

#wrapper{
    overflow: hidden;
	position: relative;
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
}

/* index */

/* added */
#mainwrapper{
    display: flex;
    height: 100vh;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid gray;
    border-right: 1px solid gray;
}

/* added */
#backcanv{
    position: absolute;
    z-index: -1;
    background-color: white;
}

#logo{
    margin-top: 15px;
}

#logo img{
    display: block;
    margin: 0 auto;
    width: 90%;
    max-width: 450px;
	height: auto;
}

#logo h3{
    font-family: verdana;
    font-size: 28px;
    font-size: 5vmin;
    text-align: center;
    color: brown;
}

/* added */
#mainm{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*====== added =======*/
#startbtn{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#startbtn a{
    display: block;
    font-family: sans-serif;
    font-size: 29px;
    border: 4px solid brown;
    border-radius: 20px;
    background-color: whitesmoke;
    padding: 18px 56px;
    font-weight: bold;
    text-decoration: none;
    color: black;
}

/* added */
#footer{
    width: 100vw;
    max-width: 500px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-around;
}

/* added */
#footer a{
    padding: 8px;
    background-color: brown;
    border-radius: 5px;
}

/* removed
#mainbtns{
	width: 95%;
	margin: 1% auto 0 auto;
	text-align: center;
}
*/

/* removed
.mainbtn{
	display: block;
	margin-top: 10px;
	margin-top: 7vh;
	padding: 5px;
	text-decoration: none;
	font-size: 8vmin;
	font-weight: bold;
	color: black;
	border: 1px solid gray;
	border-radius: 4px;
}
*/

#inst{
	margin-left: 20px;
	padding: 1%;
}

#inst li{
    margin-top: 12px;
    font-family: sans-serif;
    font-size: 6vw;
    color: black;
}

.instsubli{
    list-style-type: none;
}

#about{
    margin-left: 20px;
    padding: 1%;
}

#about li{
    margin-top: 12px;
    font-family: sans-serif;
    font-size: 6vw;
    color: black;
}

#about li a{
	color: rgb(207, 72, 72);
}

/* game */

#pauseboxwrapper{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 100%;
    height: 100vh;
    background-color: rgba(255,255,255,0);
    z-index: 100;
}

#pausebox{
    width: 95%;
    box-sizing: border-box;
    padding: 10px;
    background-color: brown;
    border: 1px solid gray;
    border-radius: 3px;
}

#pausehscore{
    float: left;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 5.5vw;
}

#pauseyourscore{
    float: right;
    margin-bottom: 10px;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 5.5vw;
}

#pauselist{
	clear: both;
	text-align: center;
}

#pauselist div, #pausemp{
    width: 90%;
    margin: 20px auto 0 auto;
    font-family: tahoma;
    font-size: 9vmin;
    padding: 5px;
    border: 1px solid black;
    border-radius: 3px;
    cursor: pointer;
}

#pausemp{
    display: block;
	text-decoration: none;
	color: black;
}

#canvcont{
	width: 100%;
	border-right: 1px solid gray;
	border-left: 1px solid gray;
    box-sizing: border-box;
}

#talecanv{
	position: absolute;
	z-index: -1;
}

#pause{
    position: absolute;
    width: 8vw;
    max-width: 40px;
    margin-top: 10px;
    margin-left: 10px;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none; 
}

#pause img{
	width: 100%;
	height: auto;
}

/*============ options ===========*/

#opt{
    width: 100%;
}

.opt-setting{
    padding: 18px 18px;
    font-family: sans-serif;
    font-size: 25px;
    border-bottom: 1px solid gray;
}

.toggle-btn{
    float: right;
    position: relative;
    width: 59px;
    height: 30px;
    display: inline-block;
    border: 1px solid gray;
    border-radius: 14px;
    background-color: #ccc;
    box-sizing: border-box;
    cursor: pointer;
}

.toggle-btn:after{
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    -webkit-transition: all .2s ease;
    transition: all .2s ease;
}

.toggle-btn-checked:after{
    left: 50%;
}

.toggle-btn-checked{
    background-color: #009688;
}

/*================ top bar ================*/

#topbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    border-bottom: 1px solid black;
    background-color: brown;
    padding: 10px;
}

#topbar img{
    width: 100%;
    height: auto;
    vertical-align: middle;
}

#bartitle{
    display: inline-block;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 7vmin;
    color: black;
}

#topbarside{
    cursor: pointer;
    width: 7vmin;
    max-width: 40px;
    height: auto;
}

#topbarsidenone{
    visibility: hidden;
    width: 7vmin;
    max-width: 40px;
    height: auto;
}

/*--------------- media queries ------------*/

@media screen and (min-width: 500px) {
    #logo h3{
        font-size: 20px;
    }

    #bartitle{
        font-size: 30px;
    }

    #inst li, #about li{
        font-size: 20px;
    }

    #pausehscore, #pauseyourscore{
        font-size: 25px;
    }
}
