html {
    -ms-touch-action: none;
}

body,
canvas,
div {
    display: block;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0;
    /* <-- Apparently some margin are still there even though it's hidden */
}

body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    margin: 0;
    cursor: default;
    color: #2c3e2c;
    background-color: #f5f3ef;
    text-align: center;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
    display: flex;
    flex-direction: column;
    /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
    /* overflow cannot be applied in Cocos2dGameContainer, 
  otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
    overflow: hidden;
}

#Cocos2dGameContainer {
    position: absolute;
    margin: 0;
    left: 0px;
    top: 0px;
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
}

canvas {
    background-color: rgba(0, 0, 0, 0);
}

a:link,
a:visited {
    color: #666;
}

a:active,
a:hover {
    color: #666;
}

p.header {
    font-size: small;
}

p.footer {
    font-size: x-small;
}

#splash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f3ef;
}

.progress-bar {
    background-color: #1a1a1a;
    position: absolute;
    left: 25%;
    top: 80%;
    height: 15px;
    padding: 5px;
    width: 50%;
    /*margin: 0 -175px;         */
    border-radius: 5px;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
    transition: width .4s ease-in-out;
    background-color: #34c2e3;
}

.stripes span {
    background-size: 30px 30px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
    animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 0;
    }
}

/* ========== 首页 ========== */
#homePage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: #f5f3ef;
    z-index: 10000;
    box-sizing: border-box;
    padding: 64px 24px 48px;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
    color: #2c3e2c;
}

.home-title {
    text-align: center;
    font-size: 35px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #2c3e2c;
    position: relative;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-title::before,
.home-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #b8cdb8;
    max-width: 96px;
}

.home-title::before { margin-right: 16px; }
.home-title::after  { margin-left:  16px; }

.home-subtitle {
    text-align: center;
    font-size: 12px;
    color: #6b866b;
    letter-spacing: 2px;
    margin: 0 0 45px;
}

/* 作者的话 */
.author-words {
    max-width: 512px;
    margin: 0 auto 35px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.author-words-bar {
    flex: 0 0 4px;
    width: 4px;
    background: #2c3e2c;
    align-self: stretch;
    height: auto;
}

.author-words-body {
    flex: 1;
    max-width: 512px;
    background: #faf9f6;
    border: 1.5px dashed #b8cdb8;
    border-left: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.author-words-content {
    width: 100%;
    padding: 14px 16px;
    font-size: 12px;
    line-height: 1.75;
    color: #2c3e2c;
    text-align: center;
    white-space: normal;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
}

/* 入口卡片区 */
.entry-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 560px;
    margin: 0 auto;
}

.entry-card {
    width: 152px;
    height: 64px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #b8cdb8;
    border-radius: 0;
    padding: 10px 12px 8px;
    position: relative;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    overflow: hidden;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
}

.entry-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2c3e2c;
}

.entry-card:hover {
    background: #f2f8f2;
    border-color: #6b866b;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(44, 62, 44, 0.12);
}

.entry-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e2c;
    letter-spacing: 2px;
    margin: 4px 0 3px;
}

.entry-card-sub {
    font-size: 10px;
    color: #6b866b;
    letter-spacing: 1px;
}

.footer-quote {
    margin: 30px auto 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
    color: #6b866b;
    opacity: 0.7;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
}

/* 游戏页初始隐藏 */
#gamePage {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}