/*-----setup-----*/

@font-face {
	font-family: '04b03regular';
    src: url('/fonts/04b_03__-webfont.woff2') format('woff2'),
         url('/fonts/04b_03__-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: '04b11regular';
    src: url('/fonts/04b_11__-webfont.woff2') format('woff2'),
         url('/fonts/04b_11__-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: '04b25regular';
    src: url('/fonts/04b_25__-webfont.woff2') format('woff2'),
         url('/fonts/04b_25__-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'kaiu';
    src: url('/fonts/kaiu.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



/*-----general and main body-----*/

body {
	display: flex;
	justify-content: center;
	font-family: "04b03regular", sans-serif; /*default font*/
	font-size: 16px;
	color: #0a0a0d;
	cursor: context-menu;
	background: url('/images/bg.png') left top no-repeat, #122914;
}

h1 {
	font-family: "04b25regular", sans-serif;
	font-size: 24px;
	font-weight: normal;
	color: #331614;
	text-transform: uppercase;
	text-shadow:#ffd541 0px 2px;
}

h1.headingGold {
	color: #ffd541;
	text-shadow:#331614 0px 2px;
}

h2 {
	/*looks the same as h1 but has no shadow*/
	font-family: "04b25regular", sans-serif;
	font-size: 24px;
	font-weight: normal;
	color: #331614;
	text-transform: uppercase;	
}

h2.headingWhite {
	color: white;
}

p {
	text-transform: uppercase;
}

.colourGold {
	color: #ffd541;
}

#mainContainer {
	width: 1024px;
}

.disabledButton {
	color: #a8a6a2;
}

.disabledOverride {
	color: #a8a6a2;
}




/*-----Panels and Regions-----*/

.panel {
	padding: 10px;
}

.panelBasic {
	border-image: url('/images/panelBasic.png') 8 fill repeat;
	border-image-width: 8px;
}

.region {
	
}

.regionPlay {
	/*for the main play area on a game screen - not the sub heading or footer menu*/
	min-height: 312px;
}

.regionBasic {
	border-image: url('/images/regionBasic.png') 8 fill repeat;
	border-image-width: 8px;
}

.regionFrame {
	border-image: url('/images/regionFrame.png') 16 fill repeat;
	border-image-width: 16px;
	padding: 4px;	
}

.regionFooter {
	border-image: url('/images/regionFooter.png') 8 fill repeat;
	border-image-width: 8px;
}

.regionFooterTab {
	border-image: url('/images/regionFooterTab.png') 8 fill repeat;
	border-image-width: 8px;
}

.regionItem {
	border-image: url('/images/regionItem.png') 8 fill repeat;
	border-image-width: 8px;
	padding: 4px;
}

.regionItemBrown {
	border-image: url('/images/regionItemBrown.png') 8 fill repeat;
	border-image-width: 8px;
}

.regionDivider {
	border-image: url('/images/regionDivider.png') 6 fill repeat;
	border-image-width: 6px 6px 0px 6px;
}
.regionDividerLight {
	border-image: url('/images/regionDividerLight.png') 6 fill repeat;
	border-image-width: 6px 6px 0px 6px;
}

.regionDividerIcons {
	height: 6px;
}

.regionDividerIcons img {
	position: relative;
	top: -9px;
	margin-left: 2px;
	margin-right: 2px;
}




/*-----Buttons-----*/

.button { /*button class is used only for registering clicks - do not style, except for completely global attributes*/

}

.buttonGeneric { /*generic style attributes for regular buttons (not all clickable elements)*/
	padding: 5px 10px;
	min-width: 90px;
	color: white;
	margin-left: 5px;
	margin-right: 5px;
	height: 20px;
}

.buttonGeneric p{
	margin: 0px;
}

.buttonBasic {
	border-image: url('/images/buttonBasic.png') 8 fill repeat;
	border-image-width: 8px;
}

.buttonBasic:active {
	/*change to green on click*/
	border-image: url('/images/buttonBasicGreen.png') 8 fill repeat;
	border-image-width: 8px;
}

.buttonBasicGreen {
	border-image: url('/images/buttonBasicGreen.png') 8 fill repeat;
	border-image-width: 8px;
}

.buttonBasicRed {
	border-image: url('/images/buttonBasicRed.png') 8 fill repeat;
	border-image-width: 8px;
}




/*-----header-----*/

#header { /*flex container for treasure box and daily challenge icons */
	display: flex;
	width: 936px;
	padding-bottom: 10px;
	margin: auto;
}

.headerElement {
	height: 104px;
}

#header #headerLeft {
	width: 64px;
	background: url('/images/headerLeft.png') right top no-repeat;
}

#header #headerRight {
	width: 64px;	
	background: url('/images/headerRight.png') right top no-repeat;
}

#header #logo {
	flex-grow: 1;
	background: url('/images/headerBG.png') center top repeat-x;
	text-align: center;
}

#header #logo > img {
	padding-top: 8px;
    padding-left: 2px;
}

#header #coins {
	width: 108px;
	background: url('/images/headerCoinsBG.png');
}

#header #coinIcon {
	text-align: center;
	padding: 16px 4px 2px 4px;
}

#header #coinCount {
	font-family: "04b25regular", sans-serif;
	font-size: 24px;
	text-align: center;
	color: white;
	padding-left: 2px;
	margin-top: -6px; /*need to think of a better solution*/
}

#header .headerButton {
	width: 90px;
	background: url('/images/headerDivider.png') right top no-repeat, url('/images/headerBG.png') center top repeat-x;
}

#header #treasuresCollectedButton {
	width: 80px;
	background: url('/images/headerBG.png') center top repeat-x;
}
	
#header .headerIcon {
	width: 80px;
	padding-top: 16px;
}

#header .headerText {
	width: 82px;
	text-align: center;
	margin-top: 0px;
}




/*-----Game-----*/

#game {
	width: 896px;
	text-align: center;
	margin: auto;
	position: relative;
	min-height: 10px;
}

#game #panelAccentTop {
	position: absolute;
    top: -4px;	
	-webkit- transform: translateX(-50%);
    transform: translateX(-50%);
}

#game #panelAccentBottom {
	position: absolute;
    bottom: -4px;	
	-webkit- transform: translateX(-50%);
    transform: translateX(-50%);	
}

#game #heading {
	display: flex;
	margin-top: 10px;
	margin-bottom: 6px;
}

#game #heading h2 {
	width: 100%;
	text-align: center;
	margin-top: 2px;
	margin-bottom: 1px;
}

#game #heading:before {
	content: url('/images/panelAccentLeft.png');
	position: relative;
    z-index: 999;
    top: 4px;
    left: -14px;
}

#game #heading:after {
	content: url('/images/panelAccentRight.png');
	position: relative;
    z-index: 999;
    top: 4px;
    left: 14px;
}

#game #panelFooter {
	display: flex;
	justify-content: center;	
	height: 56px;
	margin: 0px 2px 2px 2px;
}

#game #options {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 18px; /*50 minus padding */
	padding-left: 16px;
	padding-right: 16px;
	margin: 0px 0px 6px 0px;
	height: 50px;
}

#game #options #page {
	display: flex;
	justify-content: center;
	align-items: center;	
	padding: 0px 10px;
	min-width: 40px;
	font-family: "04b25regular", sans-serif;
	font-size: 24px;	
	color: white;
	margin-left: 5px;
	margin-right: 5px;
	height: 30px;
}
	

#game #options .footerTabDivider {
	margin-left: 10px;
	margin-right: 10px;
}




/*-----Level Select Screen-----*/

#screenLevelSelect .levelGroup {
	display: flex;
	align-content: center;
	flex-wrap: wrap;
	padding: 16px 10px;
}

#screenLevelSelect .levelButton {
	width: 128px;
	height: 136px;
	margin-left: 8px;
	margin-bottom: 4px;
	margin-top: 4px;
	overflow: hidden;
}

#screenLevelSelect .levelButton.locked {
	color: #a8a6a2;
}

#screenLevelSelect .levelGroup > div:first-child {
	margin-left: 10px;
}

#screenLevelSelect .levelGroup > div:nth-child(6n + 1) {
	margin-left: 10px;
}

#screenLevelSelect .level { /*each level item picture, not all items*/
	width: 128px;
	height: 76px;
	margin-top: 8px;
	margin-bottom: 10px;
}

#screenLevelSelect .subject {
	height: 35px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 5px;
}

#screenLevelSelect .subject p {
	margin: 0px;
	line-height: 14px;
}

#screenLevelSelect .levelOptions {
	width: 124px;
	height: 132px;
	display: none;
	border-image: url('/images/buttonBasic.png') 8 fill repeat;
	border-image-width: 8px;
	margin-top: -4px;
	margin-left: -4px;
	padding: 6px;
	color: white;
}

#screenLevelSelect .levelOptions .useMessage {
	height: 48px;
	display: flex;
    justify-content: center;
    align-items: center;	
}

#screenLevelSelect .levelOptions .useMessage p {
	margin: 0px;
}

#screenLevelSelect .levelOptions .buttonGeneric {
	width: 80px;
	margin: 6px auto 0px auto;
}




/*-----Level Screen-----*/

#screenLevel .questionBox {
	padding: 16px 10px;
}

#screenLevel .answers { /*flex container for subject answer buttons */
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-left: 40px;
	margin-right: 40px;	
}

#screenLevel .questionPhrase {
	display: flex;
	height: 126px;
	margin-left: 40px;
	margin-right: 40px;
	margin-bottom: 34px;
	justify-content: center;
	align-items: center;
	border-image: url('/images/regionDivider.png') 6 fill repeat;
	border-image-width: 0px 6px 6px 6px;
	border-image-outset: 18px;
}

#screenLevel .questionPhrase p {
	font-size: 68px;
}
#screenLevel .questionPhrase p.chineseQuestion {
	font-family: kaiu, sans-serif;
}

#screenLevel .answerButton  {
	/*display: flex;*/
	margin-bottom: 8px;
	/*justify-content: center;
	align-items: center;*/
	
	width: 128px;
	height: 136px;
	/*overflow: hidden;*/
}

#screenLevel .answer { /*each answer item picture, not all answers*/
	width: 128px;
	height: 76px;
	margin-top: 8px;
	margin-bottom: 10px;
}

#screenLevel .answerName {
	height: 35px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 5px;
}

#screenLevel .answerName p {
	margin: 0px;
	line-height: 14px;
}

#screenLevel .selectedAnswer {
	background-color: #331614;
	outline: 2px solid #331614;
	outline-offset: -2px;
}




/*-----Score Screen-----*/

#screenScore #results {
	display: flex;
	padding: 16px 10px;
}

#screenScore #score {
	position: relative;
	height: 244px;
	min-width: 240px;
	margin: 10px 40px 0px 40px;
	padding: 16px 32px 16px 32px;
}

#screenScore #frameAccentTop {
	position: absolute;
    top: 0px;	
	-webkit- transform: translateX(-50%);
    transform: translateX(-50%);
}

#screenScore #frameAccentBottom {
	position: absolute;
	bottom: 0px;
	-webkit- transform: translateX(-50%);
	transform: translateX(-50%);
}

#screenScore #scoreHeading {
	margin: 28px 16px 32px 16px;
	border-image: url(/images/regionDividerLight.png) 6 fill repeat;
	border-image-width: 0px 6px 6px 6px;
	border-image-outset: 16px;
}

#screenScore #score h2 {
	margin-bottom: 12px;
}

#screenScore .star {
	margin-left: 8px;
	margin-right: 8px;
}

#screenScore #scoreStars {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

#screenScore #banner {
	display: flex;
	justify-content: center;
	width: 80%;
	height: 52px;
	margin-top: 18px;
	margin-bottom: 24px;
}

#screenScore #banner h1 {
	margin-top: 4px;
}

#screenScore #bannerMiddle {
	width: 70%;
	background: url('/images/bannerRedMiddle.png') top center repeat-x;
}

#screenScore #bannerLeft {
	width: 40px;
	background: url('/images/bannerRedLeft.png') top center no-repeat;
}

#screenScore #bannerRight {
	width: 40px;
	background: url('/images/bannerRedRight.png') top center no-repeat;
}

#screenScore #treasureBoxes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-content: flex-start;
	margin-right: 40px;
}

#screenScore .treasureAndBox {
	display: flex;
	width: 128px;
	height: 192px;
	flex-wrap: wrap;
	align-items: flex-end;	
	margin-left: 10px;
	margin-right: 10px;	
}

#screenScore .treasure {
	height: 96px;
	flex-shrink: 0;
	display:none;
}

#screenScore .treasure p {
	margin-top: 4px;
	margin-bottom: 0px;
}

#screenScore .treasureBox {
	width: 128px;
	height: 96px;
	flex-shrink: 0;
}

#screenScore .treasure.treasureShow {
	display:block;
	position:relative;
	opacity: 0;
}

#screenScore .treasureBox {
	background: url('/images/treasureBox.png') center center no-repeat;
}

#screenScore .treasureBoxOpenFull {
	background: url('/images/treasureBoxOpenFull.png') center center no-repeat;
}

#screenScore .treasureBoxOpenEmpty {
	background: url('/images/treasureBoxOpenEmpty.png') center center no-repeat;
}




/*-----Treasures Collected Screen-----*/

#screenTreasuresCollected .treasureGroup {
	display: flex;
	align-content: center;
	flex-wrap: wrap;
	padding: 16px 10px;
}

#screenTreasuresCollected .treasureButton {
	width: 128px;
	height: 136px;
	margin-left: 8px;
	margin-bottom: 4px;
	margin-top: 4px;
	overflow: hidden;
}

#screenTreasuresCollected .treasureGroup > div:first-child {
	margin-left: 10px;
}

#screenTreasuresCollected .treasureGroup > div:nth-child(6n +1) {
	margin-left: 10px;
}

#screenTreasuresCollected .treasure { /*each treasure item picture, not all items*/
	width: 128px;
	height: 76px;
	margin-top: 8px;
	margin-bottom: 10px;
}

#screenTreasuresCollected .treasureName {
	height: 35px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 5px;
}

#screenTreasuresCollected .treasureName p {
	margin: 0px;
	line-height: 14px;
}

#screenTreasuresCollected .treasureOptions {
	width: 124px;
	height: 132px;
	display: none;
	border-image: url('/images/buttonBasic.png') 8 fill repeat;
	border-image-width: 8px;
	margin-top: -4px;
	margin-left: -4px;
	padding: 6px;
	color: white;
}

#screenTreasuresCollected .treasureOptions .useMessage {
	height: 48px;
	display: flex;
    justify-content: center;
    align-items: center;	
}

#screenTreasuresCollected .treasureOptions .useMessage p {
	margin: 0px;
}

#screenTreasuresCollected .treasureOptions .buttonGeneric {
	width: 80px;
	margin: 6px auto 0px auto;
}
