body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #96c2e2;
    color: #333;
    overflow: hidden;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

#rollDice {
    padding: 10px 20px;
    font-size: 1rem;
    color: white;
    background-color: #3a86bd;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#rollDice:hover {
    background-color: #96c2e2;
}

#diceAnimation {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    animation: diceFade 1s ease-in-out;
}

@keyframes diceFade {
    0% {
        opacity: 0;
        transform: scale(0.5) translate(-50%, -50%);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: scale(1) translate(-50%, -50%);
    }
}

.board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(8, 1fr); /* 调整为10行的布局 */
    gap: 10px;
    max-width: 90vw; /* 设置棋盘的最大宽度为屏幕的90% */
    height: auto;
    margin: 20px auto; /* 上下有间距，左右自动居中 */
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid #ddd;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.cell {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #ccc;
    border-radius: 5px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.cell.revealed {
    color: #000;
    background-color: #d1e7f5;
}

.cell.hidden {
    background-color: rgba(200, 200, 200, 0.5);
}

.cell.active {
    background-color: #d1e7f5;
    border-color: #fff;;
    box-shadow: 0px 0px 10px rgba(173, 216, 230, 0.8);
}

.player {
    position: absolute;
    width: 30px;
    height: 30px;
    /* background-color: #ff5722; */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: left 0.5s ease, top 0.5s ease;
}

/* 样式化返回按钮 */
.back-button {
    position: fixed; /* 固定定位 */
    top: 20px; /* 距离页面顶部20px */
    left: 20px; /* 距离页面左侧20px */
    padding: 10px 20px; /* 按钮的内边距 */
    font-size: 16px; /* 按钮文字大小 */
    background-color: #3a86bd; /* 按钮背景颜色 */
    color: white; /* 按钮文字颜色 */
    border: none; /* 无边框 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标指针变为手形 */
}

.back-button:hover {
    background-color: #6fa3d0; /* 鼠标悬停时改变背景颜色 */
}

