@charset "UTF-8";
/*设置全局样式*/
* {
    margin: 0;
    padding: 0;
    user-select: none;
    color: #fff;
    font-family: "Segoe UI", sans-serif;
}

/*铺满父元素*/
html, body, #gameInt, #gameBody, #gameRank {
    width: 100%;
    height: 100%;
}

/*body flex布局*/
body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../images/background-1.jpg") 0 repeat;
    animation: backgroundAnimation 80s linear infinite;
}

/*所有按钮统一样式*/
.btn {
    width: 100px;
    height: 40px;
    background: #ccc;
    border-radius: 30px;
    text-align: center;
    line-height: 40px;
    color: #000;
    cursor: pointer;
    position: relative;
    top: -6px;
    box-shadow: 0 6px 0 rgba(255, 255, 255, 0.5);
}

.btn:hover {
    background: #f19e0d;
    transition: background-color .3s;
}

.btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: inherit;
    border-radius: 30px;
    transform: translateX(-50%);
}

.btn:active {
    top: -2px;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}

.btn:active:before {
    width: 40px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all .3s;
}

/*游戏窗口*/
#gameWindow {
    width: 960px;
    height: 600px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

/*游戏介绍页面*/
#gameInt {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

/*两个界面logo*/
#gameInt > h1, #gameRank > h1 {
    background: url("../images/logo/logo-02.png");
    height: 54px;
    width: 80px;
}

#help, #rank {
    width: 700px;
    height: 400px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 30px;
    animation: helpScaleAnimation 800ms ease;
}

#hideBlock {
    opacity: 0;
    overflow: hidden;
    animation: hideToShow 1s ease forwards;
    animation-delay: 600ms;
}

#help h3 {
    text-align: center;
    line-height: 30px;
}

#help p {
    font-size: 15px;
    line-height: 25px;
}

/*游戏界面*/
#gameBody {
    position: relative;
}

/*玩家控制区*/
#controlArea {
    width: 500px;
    height: 500px;
    position: absolute;
    left: calc(50% - 250px);
    top: calc(50% - 250px);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transform: rotate(45deg);
    z-index: 998;
}

#controlArea > * {
    width: 250px;
    height: 250px;
    float: left;
}

/*感应区悬浮效果*/
#controlArea > *:hover {
    background: rgba(255, 255, 255, 0.08);
}

#up {
    cursor: url("../images/icon/up.png") 20 10, move;
}

#down {
    cursor: url("../images/icon/down.png") 20 10, move;
}

#left {
    cursor: url("../images/icon/left.png") 20 10, move;
}

#right {
    cursor: url("../images/icon/right.png") 20 10, move;
}

/*logo*/
#gameBody > h1 {
    background: url("../images/logo/logo-mini.png");
    width: 40px;
    height: 26px;
    position: absolute;
    bottom: 10px;
    left: calc(50% - 20px);
}

/*左下角游戏数据区*/
#dataArea {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    z-index: 999;
}

#dataArea > * {
    width: 80px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    text-indent: 42px;
    line-height: 40px;
}

#timer {
    background-image: url("../images/icon/timer.png");
}

#score {
    background-image: url("../images/icon/score.png");
}

#fuel {
    background-image: url("../images/icon/fuel.png");
}

/*右下角游戏设置区*/
#options {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    z-index: 999;
}

#options > * {
    margin: 0 5px;
    width: 40px;
    height: 40px;
    background-size: contain;
    cursor: pointer;
    font-size: 16px;
}

#fontZoom {
    background-image: url("../images/icon/fontZoom.png");
}

#fontZoomOut {
    background-image: url("../images/icon/fontZoomOut.png");
}

#pauseBtn {
    background-image: url("../images/icon/pauseOff.png");
}

#soundBtn {
    background-image: url("../images/icon/soundOn.png");
}

/*游戏结束，玩家输入昵称块*/
#playerInfoBlock {
    width: 400px;
    height: 200px;
    border-radius: 30px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(3px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    position: absolute;
    top: calc(50% - 100px);
    left: calc(50% - 200px);
    z-index: 999;
}

#playerName {
    width: 200px;
    height: 40px;
    border-radius: 30px;
    line-height: 40px;
    text-align: center;
    color: #000;
    outline: none;
}

#continue {
    opacity: 0.5;
}

/*游戏结束/排行页面*/
#gameRank {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

#rankList {
    list-style: inside none none;
    height: 100%;
    overflow: hidden;
    overflow-y: scroll;
    opacity: 0;
    animation: hideToShow 1s ease forwards;
    animation-delay: 600ms;
}

#rankList > li {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

#rankList > li:first-of-type {
    font-size: 18px;
    font-weight: bolder;
}

#rankList > li > span {
    text-align: center;
    width: 25%;
}

/*默认隐藏游戏界面和排行榜界面*/
#gameBody, #gameRank {
    display: none;
}