@import "reset.css";
/*  */
#loading {
	display:block;
	background:#1a1a1a url(../images/loading.gif) center no-repeat;
	width:100%;
	height:100%;
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	z-index:999999;
}
#loading p {
	width:100%;
	height:50px;
	text-align:center;
	position:absolute;
	top:50%;
	margin-top:-15px;
	left:0;
	font-family: Arial, Helvetica, sans-serif;
	font-size:1.5em;
	color:#999;
	z-index:999999999;
}
/* index */
.p-index {position:relative;height: 100%; width: 100%; min-width:320px;max-width:640px;margin:0 auto;overflow: hidden;display: none; transform-style: preserve-3d;-webkit-transform-origin: 0px 0px 0px;-webkit-perspective: 200px; -webkit-backface-visibility: hidden; }
.portrait .p-index { -webkit-transform: scale(0.4); margin-top: -44%; }
/* m- */
.m-page{position:absolute;left:0;top:0%;height:100%;width:100%;min-width:320px;max-width:640px;-webkit-transform-origin: 50px 0px 0px;display:none;}
.m-page.cur{ display:block;z-index:3;}

.m-img{width:100%;height:100%;}
/* page0 */
.m-img1 { 
	/*background: url(../images/page1.jpg) top center no-repeat;*/
	background-size: 100% 100%;
	position: relative;
}
.homePage {
	width: 100%;
	height: 100%;
	background: url(../images/homePage.jpg) center center no-repeat;
	background-size: 100% 100%;
	/*z-index: 2;*/
	/*display: none;*/
}
.homePage p {
	width: 100%;
	height: 39.2%;
	position: absolute;
}
.homePage p:nth-child(1) {
	top: 21.4%;
	left: 0;
}
.homePage p:nth-child(2) {
	top: 60.6%;
	left: 0;
}
.btn-backHome {
	width: 19%;
	height: 16%;
	background:url(../images/btn_backHome.png) top center no-repeat;
	background-size: auto 100%;
	position:absolute;
	bottom:2%;
	right:2%;
	z-index: 9999;
	display: none;
}
/* stairs */
.stairs {
	width: 100%;
	height: 100%;
	background: url(../images/stairsPage.jpg) center center no-repeat;
	background-size: 100% 100%;
	/*z-index: 2;*/
	display: none;
}
.goUpstairs {
	width: 74%;
	height: 23%;
	background:url(../images/btn_goUpstairs.png) center center no-repeat;
	background-size: auto 100%;
	position:absolute;
	top:8.2%;
	left:10%;
	z-index: 9;
}
.goDownStairs {
	width: 83%;
	height: 23%;
	background:url(../images/btn_goDownStairs.png) center center no-repeat;
	background-size: auto 100%;
	position:absolute;
	top:70%;
	left:9%;
	z-index: 9;
}
.goUpstairs-animate {
	-webkit-animation:pulse 1s .2s ease infinite;
}
.goDownStairs-animate {
	-webkit-animation:pulse 1s .2s ease infinite;
}
@-webkit-keyframes pulse{
0%{-webkit-transform:scale(1)}
50%{-webkit-transform:scale(1.1)}
100%{-webkit-transform:scale(1)}
}

.boyUpFrame {
	width: 33%;
	height: 30%;
	position:absolute;
	top:43.6%;
	left:-8%;
	/*display: none;*/
}
.boyUpFrame p:nth-child(1) {
	width: 100%;
	height: 100%;
	background-image:url(../images/boyUp1.png);
	background-repeat: no-repeat;
	background-position: top center;
	background-size: auto 100%;
}
.boyDownFrame {
	width: 33%;
	height: 31%;
	position:absolute;
	top:22.5%;
	left:65%;
	display: none;
}
.boyDownFrame p:nth-child(1) {
	width: 100%;
	height: 100%;
	background-image:url(../images/boyDown1.png);
	background-repeat: no-repeat;
	background-position: top center;
	background-size: auto 100%;
}
.boyUp-animate {
	-webkit-animation:boyUpImgChange 2.6s 0s ease infinite alternate;
}
@-webkit-keyframes boyUpImgChange{
0%{ background-image:url(../images/boyUp1.png);}
20%{ background-image:url(../images/boyUp2.png);}
40%{ background-image:url(../images/boyUp1.png);}
60%{ background-image:url(../images/boyUp2.png);}
80%{ background-image:url(../images/boyUp1.png);}
100%{ background-image:url(../images/boyUp2.png);}
}
.boyUpFrame-animate {
	-webkit-animation:boyUpStairs 6s .2s ease both;
}
@-webkit-keyframes boyUpStairs{
0%{
-webkit-transform:translate(0)}
100%{
-webkit-transform:translate(260px,-150px)}
}
.boyDown-animate {
	-webkit-animation:boyDownImgChange 2.6s 0s ease infinite alternate;
}
@-webkit-keyframes boyDownImgChange{
0%{ background-image:url(../images/boyDown1.png);}
20%{ background-image:url(../images/boyDown2.png);}
40%{ background-image:url(../images/boyDown1.png);}
60%{ background-image:url(../images/boyDown2.png);}
80%{ background-image:url(../images/boyDown1.png);}
100%{ background-image:url(../images/boyDown2.png);}
}
.boyDownFrame-animate {
	-webkit-animation:boyDownStairs 6s .2s ease both;
}
@-webkit-keyframes boyDownStairs{
0%{
-webkit-transform:translate(0)}
100%{
-webkit-transform:translate(-280px,120px)}
}
/* bedroom */
.bedroom {
	width: 100%;
	height: 100%;
	background: url(../images/bedRoomPage.jpg) center center no-repeat;
	background-size: 100% 100%;
	/*z-index: 2;*/
	display: none;
}
.bedroom p {
	position: absolute;
}
.bedroom p:nth-child(1) {
	font-size: 1.3rem;
	color: #fd454a;
	top: 20%;
	right: 5%;
	font-weight: bold;
}
.bedroom p:nth-child(1).colorChange {
	color: #0f74dc;
}
.bedroom p:nth-child(2) {
	width: 19.8%;
	height: 25%;
	background-image:url(../images/doorOpen.png);
	background-repeat: no-repeat;
	background-position: top left;
	background-size: 100% 100%;
	top: 26%;
	left: 71.3%;
}
.bedroom p:nth-child(3) {
	width: 26%;
	height: 24%;
	background:url(../images/boyStand.png) top left no-repeat;
	background-size: auto 100%;
	top: 52.2%;
	left: 74.4%;
}
.bedroom p:nth-child(4) {
	padding-top: 14%;
	background:url(../images/arrow_goBed.png) top left no-repeat;
	background-size: 100% auto;
	font-size: 1.3rem;
	color: #000;
	font-weight: bold;
	top: 51.3%;
	left: 47.4%;
	z-index: 5;
}
.bedroom p:nth-child(4) span {
	display: inline-block;
	-webkit-transform:rotate(26deg);
}
.bedroom p:nth-child(5) {
	width: 27%;
	height: 19%;
	background:url(../images/boySleep.png) top left no-repeat;
	background-size: auto 100%;
	top: 36.45%;
	left: 27.6%;
	display: none;
}
.bedroom p:nth-child(6) {
	width: 43%;
	height: 20%;
	background:url(../images/quilt.png) top left no-repeat;
	background-size: auto 100%;
	top: 44.5%;
	left: 10.6%;
	display: none;
}
.bedroom p:nth-child(7) {
	width: 33%;
	height: 15%;
	background:url(../images/bedHair.png) top left no-repeat;
	background-size: auto 100%;
	top: 49.7%;
	left: 7%;
	z-index: 5;
}
.bedroom p:nth-child(8) {
	padding-top: 12%;
	background:url(../images/arrow_goQuilt.png) top left no-repeat;
	background-size: 70% auto;
	font-size: 1.3rem;
	color: #000;
	font-weight: bold;
	top: 52.4%;
	left: 39.6%;
	z-index: 5;
	display: none;
}
.bedroom p:nth-child(8) span {
	display: inline-block;
	-webkit-transform:rotate(-46deg);
	line-height: 1.4rem;
}
.text-animate {
	-webkit-animation:pulse 1s .2s ease infinite;
}
.bedroom p:nth-child(9) {
	width: 43%;
	height: 19.5%;
	background:url(../images/quilt2.png) top left no-repeat;
	background-size: auto 100%;
	top: 46.6%;
	left: 8%;
	z-index: 1;
	/*display: none;*/
}