@font-face{
    font-family:"Pixelated MS Sans Serif";
    font-style:normal;
    font-weight:400;
    src:url(fonts/ms_sans_serif.woff) format("woff");
    src:url(fonts/ms_sans_serif.woff2) format("woff2")
}
@font-face{
    font-family:"Pixelated MS Sans Serif";
    font-style:normal;
    font-weight:700;
    src:url(fonts/ms_sans_serif_bold.woff) format("woff");
    src:url(fonts/ms_sans_serif_bold.woff2) format("woff2")
}
@font-face{
    font-family:"Futura";
    font-style:normal;
    font-weight:400;
    src:url(fonts/futura-Medium.woff) format("woff");
}

body {
    background-color: #222;
    overflow: hidden;
    image-rendering: pixelated;
}

p {
    font-family: "Pixelated MS Sans Serif", Arial;
    color: #ddd;
    font-size: 18px;
}

h1 {
    font-family: "Pixelated MS Sans Serif", Arial;
    color: #ddd;
    font-size: 33px;
    text-shadow: 3px 3px #333;
}


button {
    display: block;
    margin-top: 12px;
    min-width: 300px;
    min-height: 40px;
    background-color: #222;
    border: 4px solid #888;
    color: #aaa;
    box-sizing: border-box;
    font-family: "Futura", Arial;
    font-size: 32px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 8px;
    padding-right: 8px;
    line-height: 40px;
    cursor: pointer;
    box-shadow: 4px 4px #444;
}

#backgroundCanvas {
	position: fixed;
	top: 0;
	left: 0;
	display: block;
	z-index: 1;
}

#backgroundCover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-image: linear-gradient(to right, black, rgba(0,0,0,0), rgba(0,0,0,0), black)
}

#game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

#XPBar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(0,0,0,0.3);
}

#XPBarBack {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-image: linear-gradient(#28e6c2, #169d8f);
    transition: width 500ms ease-out;   
}

#XPText {
    font-size: 33px;
    text-align: center;
    margin: 18px;
    position: relative;
    z-index: 2;
    color: white;
}

#levelBar {
    position: absolute;
    top: 70px;
    left: 35%;
    width: 30%;
    height: 100px;
    background-color: rgba(0,0,0,0.3);
}

#levelText {
    font-size: 33px;
    text-align: center;
    margin-top: 18px;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    color: white;
}

#rankText {
    font-size: 22px;
    text-align: center;
    margin-top: 5px;
    position: relative;
    z-index: 2;
    color: white;
}

#XPButtonContainer {
    position: absolute;
    top: 80px;
    left: 0;
    max-width: 50%;
    min-width: 340px;
    height: calc(100vh - 80px);
    overflow-Y: auto;
}

#potionContainer {
    position: absolute;
    top: 80px;
    right: 0;
    width: 50%;
    height: calc(100vh - 170px);
    overflow-Y: auto;
}

.chestImage {
    width: 32px;
    margin: 4px;
    vertical-align: top;
}

#potionGainImage {
    width: 96px;
    height: 96px;
    background-image: url('img/potions.png');
    background-size: 1152px;
    margin-top: 0px;
    float: right;
    display: none;
}

#potionListDiv {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 550px;
    min-height: 300px;
    background-color: #666;
    border: 4px solid #aaa;
    display: none;
    z-index: 3;
}

#potionListCloseButton {
    position: absolute;
    top: 8px;
    right: 120px;
    margin: 0;
    min-width: 0;
    width: 40px;
    background-color: #555;
}

#potionListLeftButton {
    position: absolute;
    top: 8px;
    right: 64px;
    margin: 0;
    min-width: 0;
    width: 48px;
    background-color: #555;
}

#potionListRightButton {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
    min-width: 0;
    width: 48px;
    background-color: #555;
}

#potionListTitle {
    margin-left: 12px;
    margin-top: 12px;
    margin-bottom: 8px;
}

#potionList {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.potionListItem {
    background-color: #555;
    width: 96px;
    height: 96px;
    background-image: url('img/potions.png');
    background-size: 1152px;
    margin: 4px;
    cursor: pointer;
    border: 4px outset;
}

.potionMedal {
    display: inline-block;
    margin-bottom: 4px;
    margin-left: 4px;
    width: 20px;
    height: 30px;
    background-image: url('img/medals.png');
    background-size: 80px;
    background-position: 0px 0px;
}

#optionsMenuButton {
    position: absolute;
    bottom: 38px;
    right: 8px;
    margin: 0;
    font-size: 16px;
    min-width: 0;
    min-height: 0;
    height: 36px;
    line-height: 28px;
}

#optionsMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #666;
    border: 4px solid #aaa;
    padding: 12px;
    display: none;
}

@media only screen and (max-width: 700px) {
    button {
        font-size: 5vw;
        max-width: 45vw;
        min-width: 0;
    }
    #XPText {
        font-size: 5vw;
    }
    #levelBar {
        left: 0;
        width: 100%;
    }
    #XPButtonContainer {
        min-width: 0;
        width: 50%;
        top: 180px;
        height: calc(100vh - 220px);
    }
    #potionContainer {
        width: 50%;
        top: 180px;
        height: calc(100vh - 270px);
    }
    #potionMedals {
        display: none;
    }
    #potionListDiv {
        min-width: 0;
        min-height: 300px;
        background-color: #666;
        border: 4px solid #aaa;
        display: none;
        z-index: 3;
    }
    #potionListTitle {
        margin-top: 60px;
    }
    #potionList {
        grid-template-columns: 1fr 1fr 1fr;
    }
}