* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    width: 100vw;
}
body {
    background-image: linear-gradient(to right bottom, rgb(227 231 162 / 75%), rgb(26 90 135 / 87%));
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h2 {
    text-align: center;
}

header p {
    font-size: 25px;
    margin: 10px 0;
    text-align: center;
}

.player-info {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}
.player-info > div {
    font-size: 20px;
    margin: 10px 1em;
}

.who-next {
    margin-top: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.who-next .chess {
    margin: 0 20px;
}

.container {
    padding: 40px;
    background-color: rgb(225, 225, 130);
    position: relative;
}

.chess-number-left {
    list-style: none;
    width: 30px;
    height: 400px;
    font-size: 25px;
    color: #333;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: space-around;

    position: absolute;
    left: 7px;
    top: 40px;
}
.chess-number-left li {
    padding: .54rem;
}

.chess-alpha-top {
    list-style: none;
    width: 400px;
    height: 30px;
    font-size: 25px;
    color: #333;
    display: flex;
    text-align: center;
    justify-content: space-around;

    position: absolute;
    left: 40px;
    top: 8px;
}
.chess-alpha-top li {
    padding: 0 1.04rem;
}
.chess-alpha-top, .chess-number-left {
    user-select: none;
    cursor: not-allowed;
}

.chessboard {
    background-color: antiquewhite;
    width: 400px;
    height: 400px;
    display: grid;
    grid-template-columns: repeat(8, 1fr); /*创建8列等宽列*/
}

.cell {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
    text-align: center;
    border: 1px solid rgb(139, 33, 233);
    user-select: none; /*不可选中*/

    display: flex;
    justify-content: center;
    align-items: center;
}

.chess {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 2px 2px 4px rgb(157, 157, 157);
}

.chess-white {
    background-color: white;
    background-image: radial-gradient(20px 20px at 10px 10px, #fff, #e1e2e3);
  /* radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )  */
}
.chess-black {
    background-color: black; /*不支持下面属性时显示黑色*/
    background-image: radial-gradient(20px 20px at 10px 10px, #fff, #333);
}

/* 椭圆形高光 */
.chess-white1 {
    background-color: #e1e2e3;
    position: relative;
}
.chess-white1::after {
    content: '';
    display: block;
    width: 20px;
    height: 10px;
    border-radius: 50%;
    background-color: white;

    position: absolute;
    top: 5px;
    left: 2px;
    transform: rotate(-45deg);
    filter: blur(3px)
}

.chess-black1 {
    background-color: #333;
    position: relative;
}
.chess-black1::after {
    content: '';
    display: block;
    background-color: white;
    width: 20px;
    height: 10px;
    border-radius: 50%;

    position: absolute;
    top: 5px;
    left: 2px;
    transform: rotate(-45deg);
    filter: blur(3px);
}

footer {
    margin: 10px 0;
}
footer button {
    border: none;
    border-radius: 5px;
    background-color: rgb(99, 99, 249);
    font-size: 15px;
    color: white;
    padding: .2rem .5rem;
    margin: 0 10px;
}

.hint-color {
    background-color: rgb(74, 220, 11);
}
.reverse {
    background-color: violet;
}

.addition-info {
    font-size: 12px;
    color: #e1e2e3;
}

@media only screen and (max-width: 600px) {
    /* 响应式布局，使用百分比确定尺寸 */
    /* 通过设置padding为50%来使宽高相等 */
    /* 参考：https://blog.csdn.net/weixin_39418338/article/details/115673562 */
    .container {
        width: 100%;
        height: 0;
        padding: 50%;
        position: relative;
    }
    .chessboard {
        width: calc(100% - 80px);
        height: 0;
        padding-bottom: calc(100% - 80px);
        position: absolute;
        top: 40px;
        left: 40px;
        padding-top: 0;
    }
    .cell {
        /* max-width: 40px; */
        /* 这里难以解释，根据效果写出来的 */
        width: 100%;
        height: 0;
        padding-bottom: calc(100% - 2px);
        display: block;
        position: relative;
    }
    .cell .chess {
        width: 90%;
        height: 90%;
        position: absolute;
        left: 5%;
        top: 5%;
    }
    /* 调整高光大小位置 */
    .chess-white1::after, .chess-black1::after {
        width: 50%;
        height: 25%;
        top: 12.5%;
        left: 5%;
        filter: blur(7.5%);
    }

    .who-next .chess {
        width: 2em;
        height: 2em;
    }

    .chess-number-left {
        height: calc(100% - 80px);
        font-size: 1em;
    }
    .chess-alpha-top {
        width: calc(100% - 80px);
        font-size: 1em;
    }
    
}
/* @media only screen and (max-width: 600px) {
    .container {
        scale: 0.8;
        margin: -2rem 0;
    }
}
@media screen and (max-width: 400px) {
    body {
        scale: 0.75;
    }
} */
