.minesweeper-container {
    background: #c0c0c0;
    padding: 6px;
    border: 2px outset #fff;
    user-select: none;
}

.minesweeper-status {
    background: #c0c0c0;
    border: 2px inset #fff;
    padding: 4px 6px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mine-counter, .timer {
    background: #000;
    color: #f00;
    font-family: 'Digital-7', monospace;
    padding: 2px 4px;
    font-size: 20px;
    min-width: 40px;
    text-align: right;
    border: 1px inset #808080;
}

.restart-button {
    width: 26px;
    height: 26px;
    border: 2px outset #fff;
    background: #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
}

.restart-button:active {
    border: 2px inset #fff;
}

.minesweeper-board {
    border: 2px inset #fff;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    background: #c0c0c0;
}

.cell {
    width: 20px;
    height: 20px;
    border: 1px outset #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    background: #c0c0c0;
}

.cell.revealed {
    border: 1px solid #808080;
    background: #c0c0c0;
}

.cell.flagged::before {
    content: '🚩';
    font-size: 14px;
}

.cell.mine {
    background: #ff0000;
}

.cell.mine::before {
    content: '💣';
    font-size: 14px;
}

/* 数字颜色 */
.mines-1 { color: #0000ff; }
.mines-2 { color: #008000; }
.mines-3 { color: #ff0000; }
.mines-4 { color: #000080; }
.mines-5 { color: #800000; }
.mines-6 { color: #008080; }
.mines-7 { color: #000000; }
.mines-8 { color: #808080; }

/* 窗口大小调整 */
#minesweeper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 240px;
    z-index: 100;
}
