* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 500px;
    width: 100%;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
}

#reset-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#reset-btn:hover {
    background-color: #45a049;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-gap: 2px;
    margin-bottom: 20px;
}

.cell {
    width: 100%;
    aspect-ratio: 1;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    border: 2px solid #bbb;
    border-style: outset;
}

.cell.revealed {
    background-color: #eee;
    border-style: inset;
}

.cell.flagged::after {
    content: "🚩";
}

.cell.mine {
    background-color: #f44336;
}

.cell.mine::after {
    content: "💣";
}

.game-status {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    height: 24px;
    color: #333;
}

/* 数字颜色 */
.cell[data-number="1"] { color: blue; }
.cell[data-number="2"] { color: green; }
.cell[data-number="3"] { color: red; }
.cell[data-number="4"] { color: purple; }
.cell[data-number="5"] { color: maroon; }
.cell[data-number="6"] { color: turquoise; }
.cell[data-number="7"] { color: black; }
.cell[data-number="8"] { color: gray; } 