
@font-face {
  font-family: KmHrFont;
  src: url(../fonts/advanced_pixel_lcd-7.ttf);
}

.mothergameholder * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.mothergameholder img{vertical-align:top;}
.mothergameholder .clearfix:before, .mothergameholder .clearfix:after
{
    content: " ";
    display: table;
}
.mothergameholder .clearfix:after
{
    clear: both;
}


.iframeoverlay,.iframe_fs_back{z-index:9999999;}
.thumbsupdown,.gti_ico b{z-index: 99;}
.mothergameholder{
  font-family: "Microsoft JhengHei", Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 150%;
  padding: 0px;
  margin: 0;
  overflow: hidden;
  background-color: #000;
}
.cursor-hide
{
    cursor: none;
}

.carmainbtns{position:absolute;left:0;bottom:170px;width:100%;z-index:4;display:none;}
.carbtn_cmn{position:absolute;opacity:0.7;padding:10px;cursor:pointer;border-radius:30px;}
.carbtn_lft{left:40px;top:50px;}
.carbtn_rgt{left:120px;transform: rotate(180deg);top:50px;}
.carbtn_spd{right:40px;}
.carbtn_brk{right:140px;top:28px;}
.carbtn_pbr{right:40px;top:-150px}
.carbtn_nto{right:40px;top:-80px}
.carbtn_viw{left:40px;top:-150px}
.carbtn_hib{left:40px;top:-80px}
.carbtn_ngr,.carbtn_pgr,.carbtn_rst{font-family: arial;color: white;font-size: 12px;border: solid 1px white;border-radius: 5px;padding: 0px 10px;top: 0px;}
.carbtn_pgr{left:110px;}
.carbtn_ngr{left:30px;}
.carbtn_rst{top: -51px;left: 90px;}
.activeBG{background:rgba(255, 255, 255, 0.3);}
.greenBG{animation: blink 1s infinite alternate;}
@keyframes blink{
    0% {background-color:black;}
    50% {background-color: green;}
    100% {background-color:black;}
}


.unselectable {
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  /*
    Introduced in IE 10.
    See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
  */
  -ms-user-select: none;
  user-select: none;
}

#canvas-div {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#garage-canvas-div
{
    position: absolute;
    z-index: 50;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mothergameholder a
{
	color: inherit;
	text-decoration: none;
}

.mothergameholder h1
{
    font-size: 50px;
    line-height: 160%;
    margin-top: 20px;
    margin-bottom: 20px;
}
.mothergameholder h2
{
    font-size: 45px;
    line-height: 160%;
    margin-top: 10px;
    margin-bottom: 10px;
}
.mothergameholder h3
{
    font-size: 35px;
    line-height: 160%;
    margin-top: 10px;
    margin-bottom: 10px;
}
.mothergameholder h4
{
    font-size: 30px;
    line-height: 160%;
    margin-top: 10px;
    margin-bottom: 10px;
}
.mothergameholder h5
{
    font-size: 25px;
    line-height: 160%;
    margin-top: 10px;
    margin-bottom: 10px;
}

.dialog
{
    display: none;
	position: absolute;
	z-index: 100;
	top: 50%;
	left: 50%;
	padding: 20px;
	background-color: rgba(0,0,0,0.85);
    border: 5px solid #FFF;
    color: #FFF;
    text-align: center;
    font-size: 21px;
    line-height: 150%;
	transform:translateX(-50%) translateY(-50%);
}
.dialog .func
{
    position: relative;
}
.dialog.has-cancel .func div
{
    display: inline-block;
}
.dialog .button
{
	display: inline-block;
    border: 2px solid #FFF;
    padding: 5px 20px;
    cursor: pointer;
}
.dialog .button:hover
{
    background: #FFF;
    color: #000;
}
.dialog .cancel
{
	display: inline-block;
    border: 2px solid #FFF;
    padding: 5px 20px;
    cursor: pointer;
}
.dialog .cancel:hover
{
    background: #FFF;
    color: #000;
}

@keyframes countdown
{
    0% { transform:translateX(-4%); opacity: 0; }
    20% { transform:translateX(-2%); opacity: 1; }
    100% { transform:translateX(5%); opacity: 0; }
}

.countdown
{
    display: none;
    position: absolute;
    z-index: 99;
    top: 45%;
    left: 0;
    width: 100%;
    transform:translateY(-50%);
    color: #FFF;
    font-size: 21px;
    text-align: center;
    pointer-events: none;
}

.countdown .text
{
    width: 100%;
    transition: all .3s;
}
.countdown .number
{
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform:translateX(-5%);
    font-size: 50px;
}

.countdown .text-1
{
    opacity: 1;
    position: relative;
    top: -50px;
}
.countdown.animate
{
    display: block;
}
.countdown.animate .text-2
{
    animation: countdown 1s linear;
}
.countdown.animate .text-3
{
    animation: countdown 1s linear 0.7s;
}
.countdown.animate .text-4
{
    animation: countdown 1s linear 1.4s;
}
.countdown.animate .text-5
{
    animation: countdown 1s linear 2.1s;
}

#env-setting-button
{
    position: absolute;
    z-index: 999998;
    top: 0;
    left: 0;
    padding: 10px;
    background-color: rgba(255,255,255,0.1);
    cursor: pointer;
}
#env-setting-button svg
{
    display: block;
    width: 20px;
}
#env-setting-button svg path
{
    fill: white;
}
#env-setting-button:hover
{
    background-color: #FFF;
}
#env-setting-button:hover svg path
{
    fill: #000;
}

#keyboard-setting-button
{
    position: absolute;
    z-index: 999998;
    top: 0;
    left: 40px;
    padding: 5px;
    background-color: rgba(255,255,255,0.1);
    cursor: pointer;
}
#keyboard-setting-button svg
{
    display: block;
    width: 30px;
}
#keyboard-setting-button svg path
{
    fill: white;
}
#keyboard-setting-button:hover
{
    background-color: #FFF;
}
#keyboard-setting-button:hover svg path
{
    fill: #000;
}

#goto-garage-button
{
    position: absolute;
    z-index: 999998;
    top: 0;
    left: 80px;
    padding: 9px 10px 11px 10px;
    background-color: rgba(255,255,255,0.1);
    cursor: pointer;
}
#goto-garage-button svg
{
    display: block;
    width: 20px;
}
#goto-garage-button svg path
{
    fill: white;
}
#goto-garage-button:hover
{
    background-color: #FFF;
}
#goto-garage-button:hover svg path
{
    fill: #000;
}

.env-setting-dialog .row
{
    width: 600px;
    margin-bottom: 10px;
}
.env-setting-dialog .left
{
    float: left;
    width: 200px;
}
.env-setting-dialog .right
{
    float: left;
    width: 400px;
    text-align: left;
}
.env-setting-dialog .right .item
{
    display: inline-block;
    border: 1px solid #FFF;
    padding: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}
.env-setting-dialog .right .item.selected
{
    background-color: rgba(255,255,255,0.85);
    color: #000;
} 

.keyboard-setting-dialog
{
    width: 600px;
    height: 60%;
    padding-bottom: 70px;
}
.keyboard-setting-dialog .scroll
{
    height: 100%;
    margin-bottom: 10px;
    overflow: scroll;
    overflow-x: hidden;
}
.keyboard-setting-dialog .row
{
    margin-bottom: 10px;
}
.keyboard-setting-dialog .left
{
    float: left;
    width: 45%;
}
.keyboard-setting-dialog .right
{
    float: left;
    width: 55%;
}

#loading-div
{
    position: absolute;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #FFF;
}
#loading-div .info
{
    position: absolute;
    z-index: 1;
    top: 50%;
    width: 100%;
}
#loading-div .info .box
{
    width: 300px;
    margin: 0 auto;
}
#loading-div .info .text
{
    font-size: 15px;
    text-align: center;
}
#loading-div .info .bar
{
    position: relative;
    width: 100%;
    height: 5px;
    border: 1px solid rgba(255,255,255,0.7);
}
#loading-div .info .bar .s
{
    position: absolute;
    z-index: 1;
    width: 0%;
    height: 100%;
    background: #FFF;
    /*transition: width 0.1s;*/
}
#loading-div .alert
{
    position: absolute;
    z-index: 1;
    bottom: 10px;
    left: 0;
    width: 100%;
    font-size: 12px;
    line-height: 130%;
    text-align: center;
}

#debug-object-state-div
{
    font-size: 9px;
    line-height: 120%;
}

#hud-canvas-div
{
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width:100%;
    height:100%;
}

#garage-select-car-div
{
    position: absolute;
    z-index: 51;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #FFF;
    padding: 20px 0;
    backdrop-filter: blur(5px);
}
#garage-select-car-div .button
{
    display: block;
    border: 2px solid #FFF;
    padding: 5px 20px;
    cursor: pointer;
    text-align: center;
}
#garage-select-car-div .racing-button
{
    margin-top: 50px;
}
#garage-select-car-div .container
{
    position: relative;
    max-width: 900px;
    width: 80%;
    margin: 0 auto;
}
#garage-select-car-div .container .next-car-button
{
    position: absolute;
    z-index: 1;
    top: 0;
    left: -50px;
    width: 50px;
    height: 100%;
    cursor: pointer;
}
#garage-select-car-div .container .next-car-button:after
{
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 5px;
    width: 30px;
    height: 5px;
    background: #FFF;
    transform: rotate(-45deg);
    margin-top: -11px;
}
#garage-select-car-div .container .next-car-button:before
{
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 5px;
    width: 30px;
    height: 5px;
    background: #FFF;
    transform: rotate(45deg);
    margin-top: 8px;
}
#garage-select-car-div .container .next-car-button:hover
{
    background-color: #FFF;
}
#garage-select-car-div .container .next-car-button:hover:after
{
    background-color: #000;
}
#garage-select-car-div .container .next-car-button:hover:before
{
    background-color: #000;
}
#garage-select-car-div .container .perv-car-button
{
    position: absolute;
    z-index: 1;
    top: 0;
    right: -50px;
    width: 50px;
    height: 100%;
    cursor: pointer;
}
#garage-select-car-div .container .perv-car-button:after
{
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 5px;
    width: 30px;
    height: 5px;
    background: #FFF;
    transform: rotate(45deg);
    margin-top: -11px;
}
#garage-select-car-div .container .perv-car-button:before
{
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 5px;
    width: 30px;
    height: 5px;
    background: #FFF;
    transform: rotate(-45deg);
    margin-top: 8px;
}
#garage-select-car-div .container .perv-car-button:hover
{
    background-color: #FFF;
}
#garage-select-car-div .container .perv-car-button:hover:after
{
    background-color: #000;
}
#garage-select-car-div .container .perv-car-button:hover:before
{
    background-color: #000;
}
#garage-select-car-div .container .block
{
    position: relative;
    float: left;
    width: 50%;
    padding: 20px;
}
#garage-select-car-div .container .block .row
{
    margin-bottom: 5px;
}
#garage-select-car-div .container .block .bar
{
    position: relative;
    width: 100%;
    height: 5px;
    border: 1px solid rgba(255,255,255,0.5);
}
#garage-select-car-div .container .block .bar .s
{
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #FFF;
    transition: width .5s;
}

#score-check
{
    display: none;
    position: absolute;
    z-index: 99;
    top: 50%;
    left: 15%;
    width: 70%;
    background-color: rgba(0,0,0,0.85);
    border: 5px solid #FFF;
    color: #FFF;
    text-align: center;
    font-size: 21px;
    line-height: 150%;
    transform:translateY(-50%);
    height:92%;
    overflow:auto;
}

#score-check .score-type
{
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
#score-check .score-type .item
{
    display: inline-block;
    flex-basis: 20%;
}
#score-check .score-type .item h5
{
	font-size: 20px;
}
#score-check .camera-score
{
    display: flex;
    justify-content: center;
	margin-bottom: 30px;
}
#score-check .camera-score .item
{
	display: inline-block;
    flex-basis: 15%;
}
#score-check .camera-score .item h5
{
	font-size: 20px;
}

#score-check .score-total
{
    margin-bottom: 30px;
}
#score-check .score-total .score
{
    font-size: 45px;
}
#score-check .button-div
{
    margin-bottom: 30px;
}
#score-check .button-div .button
{
    display: inline-block;
    border: 2px solid #FFF;
    padding: 10px 20px;
    cursor: pointer;
}
#score-check .button-div .button:hover
{
    background: #FFF;
    color: #000;
}

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

#hud .wrong-orientation
{
    display: none;
    position: absolute;
    z-index: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid #FFF;
    background: #F00;
    top: 350px;
    left: 50%;
    margin-left: -25px;
    opacity: 0.7;
}
#hud .wrong-orientation:after
{
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 5px;
    background: #FFF;
    border-radius: 2.5px;
    margin-top: -2.5px;
    margin-left: -15px;
}
#hud .keyboard-remind
{
    position: absolute;
    top: 50%;
    left: 50%;
    color:#FFF;
    font-size: 19px;
    opacity: 0;
    transition: opacity .2s;
}
#hud .keyboard-remind span.key
{
    position: relative;
    padding: 0 25px;
}
#hud .keyboard-remind span.key:after
{
    content: '';
    position: absolute;
    top: -3px;
    left: 15px;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    border: 2px solid #FFF;
}
#hud .keyboard-remind span.key:before
{
    content: '';
    position: absolute;
    top: -7px;
    z-index: -1;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    border: 2px solid #FFF;
    background-color: rgba(0,0,0,0.5);
}


/*#hud .keyboard-remind.reset
{
    top: auto;
    bottom: 10%;
    left: 40%;
}*/
#hud .keyboard-remind.reset, #hud .keyboard-remind.next-gear, #hud .keyboard-remind.perv-gear
{
    top: auto;
    bottom: 25%;
    left: 50%;
    border: solid 1px #ffffff99;
    padding: 13px 13px 17px 0px;
    border-radius: 5px;
    background: #000000;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
}

#hud .keyboard-remind.show
{
    opacity: 0.8;
    display: block;
}
/*#hud .keyboard-remind.perv-gear
{
    top: auto;
    bottom: 10%;
    left: 55%;
}*/

#hud .game-state
{
    position: absolute;
    z-index: 1;
    top: 0;
    left: 50%;
    transform:translateX(-50%);
    width: 50%;
    height: 50px;
}
#hud .game-state .drive-percent
{
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.5);
}
#hud .game-state .drive-percent .bar
{
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #FFF;
}
#hud .game-state .drive-percent .bar .text
{
    position: absolute;
    z-index: 1;
    bottom: 10px;
    right: -20px;
    color: #FFF;
    font-size: 10px;
    font-family: KmHrFont;
}
#hud .game-state .camera-position
{
    position: absolute;
    z-index: 1;
    bottom: -5px;
    left: 0;
    width: 100%;
}
#hud .game-state .camera-position .item
{
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    margin-left: -10px;
    width: 20px;
    height: 20px;
    background-image: url(../textures/SafetyCameraLogo.png);
    background-size: contain;
    opacity: 1;
}

#hud .game-state .camera-position .item.item-1 { left: 20%; }
#hud .game-state .camera-position .item.item-2 { left: 40%; }
#hud .game-state .camera-position .item.item-3 { left: 60%; }
#hud .game-state .camera-position .item.item-4 { left: 80%; }
#hud .game-state .camera-position .item.item-5 { left: 100%; }

#hud .score-state
{
    position: absolute;
    z-index: 1;
    top: 70px;
    left: 50%;
    margin-left: -50%;
    width: 100%;
    color: #FFF;
    text-align: center;
    font-size: 20px;
    line-height: 120%;
}

#hud .score-state .total
{
    font-size: 50px;
    line-height: 100%;
    margin-bottom: 20px;
}

#hud .score-state .type
{
    position: absolute;
    z-index: 1;
    top: 70px;
    left: 0;
    width: 100%;
}
#hud .score-state .type .item
{
    display: none;
    padding: 0 20px;
}
#hud .score-state .SpeedBonus
{
    position: absolute;
    z-index: 1;
    top: 135px;
    left: 0;
    width: 100%;
}
#hud .score-state .SafetyCamera
{
    position: absolute;
    z-index: 1;
    top: 200px;
    left: 0;
    width: 100%;
}
#hud .score-state .SafetyCamera .item
{
    display: none;
    padding: 0 20px;
}

#hud .engine
{
    position: absolute;
    z-index: 1;
    top: 100px;
    right: 30px;
    width: 150px;
    height: 200px;
}
#hud .engine .text
{
    position: absolute;
    z-index: 2;
    font-size: 9px;
    line-height:100%;
    font-family: KmHrFont;
    color: #FFF;
    opacity: 0.5;
    transform: scale(0.7,0.7);
}
#hud .engine .text.rpm {top: -11px; right: -20px; }
#hud .engine .text.n2o {top: 14px; right: -20px; }
#hud .engine .text.gear {top: 33px; right: -20px; }
#hud .engine .text.speed {top:115px; right: -23px; }

#hud .engine svg
{
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
}
#hud .engine svg
{
    transform: scale(-1.33,1.33);
}

#hud #speed
{
    position: absolute;
    z-index: 1;
    top:180px;
    right: 10px;
    color: #FFF;
    font-size: 21px;
    line-height: 100%;
    opacity: 0.8;
}
#hud #speed .km
{
    font-size:20px;
    font-family: KmHrFont;
}

#SafetyCameraFlash
{
    display: none;
    position: absolute;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,ffffff+100&0+0,0.9+100 */
    background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#e6ffffff',GradientType=1 ); /* IE6-9 */
}



/*@media (max-width: 540px){
    .carmainbtns{bottom:150px;}
    .carbtn_lft{left: 20px;}
    .carbtn_rgt{left: 100px;}
    .carbtn_spd{right:20px;}
    .carbtn_brk{right: 110px;}
    .carbtn_viw{left:20px;top:-150px}
    .carbtn_hib{left:20px;top:-80px}
    #garage-select-car-div{backdrop-filter: blur(0px);background: none;}
}*/

@media (max-height: 540px) or (max-width: 540px){

    .carmainbtns{bottom:150px;}
    .carbtn_lft{left: 20px;}
    .carbtn_rgt{left: 100px;}
    .carbtn_spd{right:20px;}
    .carbtn_brk{right: 110px;}
    .carbtn_viw{left:20px;top:-150px}
    .carbtn_hib{left:20px;top:-80px}
    #garage-select-car-div{backdrop-filter: blur(0px);background: none;}

    #rpm-svg,#O2N2-svg,#Gear-svg{width:50px;height:50px;}
    #hud .engine{top:25px;width:80px;height:60px;}
    #hud .engine .text.n2o{top:4px;}
    #hud .engine .text.gear{top:20px;}
    #hud .engine .text.speed{top: 45px;}
    #hud #speed{top: 90px;}
    #hud #speed .km{font-size:17px;}
}


@media (hover: none) and (pointer: coarse) {
  .carmainbtns {display: block;}
  .reset,.next-gear,.perv-gear{display:none !important;}
}