* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html, body {
    height: 100%;
}

html {
    font-size: 16px;
}


body {
	background-color: #c10810;
	position: relative;
	margin: 0;
	padding: 0;
    height: 100%;
}

#admin {
    background: #fafafa;
    color: #222222;
}

body img.mainimage {
	width: 100%;
	border: 10px solid #222222;
}

h1, p, ul {
	color: #ffffff;
	font-family: Arial, sans-serif;
	font-weight: normal;
}

.header {
	width: 100%;
	padding: 10px 20px;
	margin: 0;
	background-color: #555555;
}

#error {
    display: none;
    position: absolute;
    top: 50%;
    left:50%;
    padding: 20px;
    width: 300px;
    border: 1px solid red;
    transform: translate(-50%,-50%);
    background: white;
}

.header p {
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    vertical-align: top;
    margin: 25px 0px;
}

h1 span {
	color: #f6868b;
}

img.logo {
    width: 100px;
    display: inline-block;
}

.maincontent {
    margin: 10px auto;
    max-width: 800px;
}


.maincontent a {
	color: yellow;
}



.hiddendiv {
	display: none;
	background-color: #ffffff;
	color: red;
	width: 200px;
	padding: 20px;
	border: 2px solid #000000;
	position: absolute;
	top: 220px;
	right: 598px;
}

.hiddendiv p {
	color: red;
	text-align: center;
}

.mainimage:hover + .hiddendiv {
	display: block;
}

.pshop {
	width: 100%;
	border: 0;
}


div#leftside {
    width: 50%;
    display: inline-block;
    margin-right: 40px;
    vertical-align: top;
}

div#rightside {
    width: calc(50% - 61px);
    display: inline-block;
}

#rightside table {
    width: 100%;
}

td.column1, td.column2 {
    width: 50%;
    padding: 20px;
    vertical-align: top;
}

.story {
    width: 450px;
    line-height: 26px;
}

h2 {
    color: #ffffff;
}

ul#topmenu {
    width: 100%;
    list-style: none;
    display: inline-block;
    background-color: #333333;
    margin: 0;
    z-index:100;
}

#topmenu li {
    display: inline-block;
    padding: 20px 15px;
}

#topmenu li a {
    text-decoration: none;
    color: #ffffff;
}

#topmenu li:hover {
    background-color: red;
}

#topmenu ul.submenu {
    display: none;
}

#topmenu li.withsubmenu:hover > .submenu {
    display: block;
}

#topmenu li.withsubmenu {
    position: relative;
}

#topmenu ul.submenu {
    list-style-type: none;
    top: 58px;
    left: 0;
    margin: 0;
    position: absolute;
    background: #333;
    width: 200px;
    border: 1px solid red;
    padding: 0;
    z-index: 100;
}

#topmenu ul.submenu li {
    display: block;
    margin: 0;
    padding: 15px 15px;
}



/* Photos Page */

div#photoalbum {
    padding: 40px 20px;
    width: 100%;
    display: flex;
}

.photo {
    width: 30%;
}

#photoalbum .photo img {
    width: 100%;
    border: 2px solid #222;
}

#photoalbum .photo p.caption {
    width: 100%;
    text-align: center;
}


/* Books and Photos Page */

div#bookscontainer {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.bookcover {
    width: calc(33% - 40px);
    margin: 20px;
    position: relative;
}

.bookcover img {
    width: 100%;
}

p.booktitle {
    display: none;
}

.bookcover:hover > .booktitle {
    display: block;
    position: absolute;
    top: 50%;
    width: 100%;
    background: #688ef9;
    color: #000;
    padding: 15px;
    text-align: center;
}

p.booktitle span {
    display: block;
    font-size: 24px;
}



/* Matt - Addition Game */

div#mathproblem {
    text-align: right;
    display: inline-block;
    max-width: 250px;
    padding: 20px;
    background: #222;
    border-radius: 5px;
    margin: 10px;
    color: #ffffff;
}

div#pointsdiv {
    display: inline-block;
    vertical-align: top;
    font-size: 72px;
    text-align: center;
    margin: 10px;
    color: #fff;
    text-transform: uppercase;
    max-width: 250px;
    flex-basis: 250px;
    background: #222;
    border-radius: 5px;
    box-sizing: border-box;
}

div#pointsdiv span {
    font-weight: bold;
    -webkit-text-stroke: 3px black;
    color: #fff;
    line-height: 100px;
    font-size: 100px;
    text-shadow: 5px 5px 0 #da3535, -1px -1px 0 #da3535, 1px -1px 0 #da3535, -1px 1px 0 #da3535, 1px 1px 0 #da3535;
}

div#pointtotal p {
    margin: 0 0 20px 0;
    font-size: 48px;
}

input#answer {
    padding: 10px 20px;
    text-align: right;
    background: #444;
    width: 100%;
    font-size: 48px;
    border: 0;
    color: #ffffff;
}

table#highscorescontainer {
    color: #fff;
}

div#reset {
    margin: 20px 0;
}

form#mathquiz {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: unset;
}

div#highscores {
    padding: 20px;
    background: #222;
    margin: 10px;
    border-radius: 5px;
    color: #fff;
}

.mathgame .maincontent {
    max-width: 1000px;
}

.number {
    font-size: 48px;
}

div#number2display {
    border-bottom: 1px solid #777;
}

#mathproblem button {
    background: #206cf7;
    font-size: 16px;
    border: 0;
    padding: 10px 20px;
    text-transform: uppercase;
    color: #ffffff;
}

div#levelcontainer {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 20px 0;
    height: 140px;
    box-sizing: border-box;
}

#levelcontainer .level {
    background: #cc1d1d;
}

#levelcontainer .levelwrapper {
    width: 20%;
    box-sizing: border-box;
    max-width: 30px;
    margin: 0 5px;
}

#levelcontainer .level.complete {
    border: 1px solid #fff;
}

#levelcontainer #level1.complete {
    background: #ece613;
}

#levelcontainer #level2.complete {
    background: #5dec13;
}

#levelcontainer #level3.complete {
    background: #05a4d4;
}

#levelcontainer #level4.complete {
    background: #8e05d4;
}

#levelcontainer #level5.complete {
    background: #fb06a5;
}

div#pointsdiv .level span {
    font-size: 20px;
    display: none;
    position: absolute;
    top: 50%;
    width: 100%;
    color: #fff;
    left: 0;
    -webkit-text-stroke: 0;
    text-shadow: none;
}

div#pointsdiv .level {
    position: relative;
    width: 100%;
    height: 50px;
}

div#pointsdiv .levelwrapper {
    visibility: hidden;
}
div#pointsdiv .levelwrapper.active, div#pointsdiv .levelwrapper.complete {
    visibility: visible;
}

div#pointsdiv .levelwrapper p {
    margin: 0;
    font-size: 10px;
    font-weight: 100;
    margin-bottom: 6px;
}

div#reset {
    flex-basis: 100%;
}

a.resetbutton {
    color: #fff;
    background: #555;
    border: 1px solid #888;
    margin: 20px 10px;
    padding: 10px;
}

input#username {
    padding: 10px;
    color: #222222;
    font-size: 16px;
    min-width: 250px;
}

button#usernamego {
    padding: 10px;
    background: #1055af;
    color: #fff;
    margin-left: 5px;
    border: 2px solid #fff;
    border-radius: 5px;
    font-size: 16px;
}

button#hiddenbutton {
    display: none;
}

a.resetbutton:hover {
    cursor: pointer;
}

.mathgame .maincontent h1 {
    text-align: center;
    display: block;
}

.newname {
    display: block;
    margin: 40px auto;
    width: 100%;
    text-align: center;
}

.newname p.label {
    font-size: 24px;
    line-height: 36px;
}

.newname input {
    padding: 10px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    font-size: 24px;
    border-radius: 5px;
    border: 2px solid #222;
    color: #222;
}

button#namego {
    padding: 10px;
    font-size: 24px;
    background: #1f78c5;
    border-radius: 5px;
    margin-left: 5px;
    border: 0;
}

div#highscores h3 {
    margin: 0 0 20px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 100;
}

table#highscorescontainer .place, table#highscorescontainer .date {
    font-size: 10px;
    text-align: center;
}

table#highscorescontainer .score {
    text-align: center;
    font-size: 14px;
}

table#highscorescontainer .name {
    text-align: left;
    padding: 2px 5px;
    font-size: 14px;
}


/* MadLibs Styles */

img#madlibslogo {
    width: 100%;
}

div#wrapper {padding: 40px;}

.maincontent.madlibs.test {width: 100%;}

.maincontent h1 {width: 100%;}

.madlibs form {padding: 20px;}

.madlibs form div.input {padding: 10px;}

.madlibfield {padding: 10px;width: 250px;border-radius: 5px;border: 2px solid #222;font-size: 16px;color: #222;}

.madlibs form div.input label {margin-left: 5px;}

.madlibtext {
    display: none;
    font-size: 16px;
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    line-height: 22px;
}
.madlibtext span {
    font-weight: bold;
    color: #f8f478;
}

button#submitmadlib {background: #2ba4e8;padding: 10px 20px;font-size: 16px;box-shadow: none;margin-left: 10px;margin-top: 10px;}

.madlibs h2 {text-align: center;}

.madlibtext p {font-size: 20px;line-height: 34px;margin-top: 40px;}


/* Forms */

#admin {
    background: #fafafa;
    color: #222222;
}

#admin h1 {
    text-transform: none;
}

#admin .wrapper {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px;
    height: 100%;
    align-items: stretch;
}

#admin #updatepassword {
    display: none;
    max-width: 400px;
    background: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    border: 1px solid #222;
    box-shadow: 4px 2px 8px #222;
    padding: 20px;
    max-height: 90%;
    overflow-y: auto;
    overflow-x: hidden;
}

#admin a {
    color: #199be4;
}

#admin .lefthandnav {
    padding: 20px 40px 20px 10px;
    background: #222;
    color: #fff;
}

#admin .lefthandnav p,
#admin .lefthandnav ul {
    color: #fff;
}

#admin .lefthandnav a {
    color: #afdbfa;
}

#admin .lefthandnav li {
    margin: 10px 0;
}

.admin input {
    color: #222222;
}

#admin .lefthandnav {
    flex-basis: 250px;
    flex-shrink: 0;
}

.maincontent form {
    max-width: 600px;
    margin: 20px auto;
}

.inputswrap {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.verticalinputswrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.inputwrap,
.postinputwrap {
    display: flex;
    flex-direction: column;
}

.inputswrap input,
.verticalinputswrap input
{
    padding: 10px;
    font-size: 16px;
    width: 300px;
    border: 1px solid #222;
    border-radius: 5px;
}

.verticalinputswrap .postinputwrap input,
.verticalinputswrap .postinputwrap textarea {
    width: 100%;
    border: 1px solid #222;
    border-radius: 5px;
    padding: 10px;
    max-width: 650px;
    font-size: 16px;
}

textarea#posttext {
    min-height: 400px;
}

.inputswrap label,
.verticalinputswrap label
{
    color: #ffffff;
}

#admin .maincontent {
    flex-basis: 100%;
}

#admin .inputswrap label,
#admin .verticalinputswrap label
{
    color: #222222;
}

button.primarybutton,
#admin a.primarybutton {
    padding: 10px 20px;
    background: #058ded;
    border: 1px solid white;
    color: #fff;
    font-size: 18px;
    border-radius: 10px;
    text-decoration: none;
}

#admin h1,
#admin p,
#admin ul
{
    color: #222222;
}


.primarybutton:hover {
    cursor: pointer;
}

#posts td, #posts th {
    padding: 10px;
    text-align: left;
}

#posts tbody:nth-child(odd) {
    background: #f1f1f1;
}

#posts tr.header {
    background: #fafafa;
}

#hiddenelements {
    display: none;
}

tr.postinfo:hover {
    cursor: pointer;
}

.postbuttons {
    display: flex;
    gap: 20px;
}

.postbuttons button:hover {
    cursor: pointer;
}

#deletepost {
    display: none;
    padding: 10px 20px;
    background: #c42020;
    border: 1px solid white;
    color: #fff;
    font-size: 18px;
    border-radius: 10px;
}

li.postcontainer {
    list-style-type: none;
    margin: 60px 20px;
}

ul#postlist, #postcontent {
    margin: 0 auto;
    padding: 0;
    max-width: 700px;
}

.postcontainer .title {
    padding-bottom: 10px;
}

.maincontent #postlist a {
    text-decoration: none;
    color: #fff;
}

.postcontainer .meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    align-items: flex-end;
}

.postcontainer .dates {
    display: flex;
    gap: 20px;
}

.postcontainer .author {
    font-size: 1rem;
    font-weight: bold;
}


@media only screen and (min-width: 768px) {
    .postcontainer .excerpt {
        font-size: 1.2rem;
    }
    .maincontent {
        padding: 40px;
    }
    .postcontainer .title {
        font-size: 2rem;
    }
    ul#topmenu {
        height: 58px;
    }
}

@media only screen and (max-width: 768px) {
    .postcontainer .excerpt {
        font-size: 1.4rem;
    }
    .postcontainer .title {
        font-size: 2.2rem;
    }
    .maincontent {
        padding: 20px 10px;
    }
    ul#topmenu {
        height: auto;
    }
}

.postcontainer .excerpt {
    margin: 20px 0;
}

#postspage h1,
#viewpost h1,
#loginpage h1
 {
    text-align: center;
    text-transform: none;
    width: 100%;
}

.maincontent #postlist a:hover {
    text-decoration: underline;
    cursor: pointer;
}

#viewpost .author {
    margin: 0 auto;
    max-width: 600px;
    text-align: center;
    font-size: 1.3rem;
    color: #ffffff;
}

#viewpost .dates {
    max-width: 600px;
    margin: 10px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 40px;
    color: #fff;
    font-style: italic;
}

#viewpost div#postcontent {
    font-size: 1.3rem;
    margin: 40px auto;
    color: #fff;
}

#viewpost .posttext {
    margin: 40px 0 60px;
}