:root {
    --width: 3rem;
    --height: 3.6rem;
    --mapWidth: 7;
    --mapHeight: 9;
    --ms: 0.1ms;
    --initEndMs: 600ms;

    --radius: 4px;
    --radius: calc(var(--width) * 0.1);
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    visibility: hidden;
    position: relative;
    background: url(./img/fruits/1.png) no-repeat center; 
    background-size: 100% 100%;
}

.game-main {
    transform: scaleX(1.2) scaleY(1.1);
    width: calc(var(--width) * var(--mapWidth) + 22px);
    margin: 10px auto;
}
.container {
    width: calc(var(--width) * var(--mapWidth));
    padding: 10px;
    /* border: 1px solid #ccc; */
    margin-bottom: 10px;
}
.game-map-container {
    height: calc(var(--height) * var(--mapHeight));
    position: relative;
    z-index: 2;
}
.game-map {
    display: none;
    transform: scale(1.2);
    margin: 20px 0;
    margin-left: 15px;
    width: 100%;
    height: 100%;
    background:url(img/fruits/2.png) no-repeat center center;
    background-size: 100% 100%;
    position: relative;
}

.item {
    width: var(--width);
    height: var(--height);
    border-radius: var(--radius);
    /* background: #fff; */
    position: absolute;
    overflow: hidden;
}
.item::after {
    display: block;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99;
    position: absolute;
    /* background: rgba(0, 0, 0,0.5); */
    transition: background var(--ms);
    pointer-events: none;
}
/* 卡片被覆盖的状态*/
.item.covered {
    /* background: #999; */
}
.item.covered::after {
    display: block;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99;
    position: absolute;
    background: url(./img/fruits/bg.png) no-repeat center;
    /* background-size: 100% 100%;; */

    /* background: rgba(227, 220, 220, 0.3); */
}
.item.move {
    z-index: 999 !important;
}

.item .item-img {
    width: 100%;
    height: 100%;
    background: center no-repeat;
    background-size: 90%;
    /* border: 1px solid #ccc; */
    box-sizing: border-box;
    border-radius: var(--radius);
}

.game-candidate-container {
    width: calc(var(--width) * var(--mapWidth));
    min-height: var(--height);
    padding: 10px;
}
.game-candidate {
    background:url(./img/fruits/3.png) no-repeat center;
    background-size: 100% 100%;
    width: 100%;
    height: 100%;
    min-height: var(--height);
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px;
    transform: scale(1.4);
    margin-top: 50px;
    display: none;

}

.game-candidate .item {
    position: relative;
    flex: 0 0 auto;
    transform: scale(.75);
}
.game-operate.game-operate-main img {
    width: 50%;
    position: absolute;
    top:200px;
    left: 32%;
    z-index: 999;
    /* transform: translateY(-100px); */
    /* padding: 10px 0; */
    /* background: #0dd068; */
    /* color: #fff; */
    /* display: none; */
}
.game-operate {
    /* margin-top: 10px; */

    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.game-operate button {
    margin-top: 10px;
    margin-right: 10px;
    border: 1px solid #999;
    border-radius: 5px;
    font-size: 18px;

    padding: 3px 10px;
}
.game-operate button:last-child {
    margin-right: 0;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.about {
    font-size: 14px;

    line-height: 16px;
    color: #666;
    text-align: center;
}
.about a {
    text-decoration: none;
    color: #4e6ef2;
}
.setting {
    cursor: pointer;
}
svg {
    fill: #666;
    user-select: none;
}

/******************
        设置
*******************/
.game-setting-container {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    /* background: rgba(0, 0, 0, 0.4); */
    z-index: 1000;
    justify-content: center;
    align-items: center;

}
.game-setting-container.on {
    display: flex;
}
.game-setting {
    height: 80vh;
    background: #fff;
    border-radius: 6px;
    color: #444;
    overflow-y: auto;
}

h1 {
    font-size: 1.5rem;
}
h3 {
    font-size: 1rem;
}
label {
    font-size: 14px;
    user-select: none;
}
label + input[type="text"] {
    display: block;
    flex: 0 0 100%;
}

.statistics {
}
.statistics table {
    border-collapse: collapse;
    width: 100%;
}

.statistics table td,
.statistics table th {
    border: 1px solid #ccc;
    padding: 3px 6px;
    text-align: center;
    font-size: 16px;
}
.statistics img {
    max-width:calc( var(--width) * 0.8);
    /* height: var(--height); */
}

.game-setting .row {
    /* display: flex;
    align-items: center;
    flex-wrap: wrap; */
    line-height: 20px;
    margin-bottom: 10px;
}
/* 专门的动画过渡*/
.item,
.container,
.game-main {
    /* transition: 600ms; */
    transition: var(--ms);
    transition-property: top, left, width, height;
}
