:root {
    --rows: 10;
    --cols: 10;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
}

h1 {
    color: #333;
}

#difficulty-selector {
    margin-bottom: 10px;
}

#difficulty-selector button {
    padding: 5px 10px;
    font-size: 1em;
    cursor: pointer;
    margin: 0 5px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: calc(var(--cols) * 32px);
    margin-bottom: 10px;
    font-size: 1.2em;
}

#restart-btn {
    padding: 5px 10px;
    font-size: 1em;
    cursor: pointer;
}

#minesweeper-board {
    display: grid;
    grid-template-columns: repeat(var(--cols), 32px);
    grid-template-rows: repeat(var(--rows), 32px);
    border: 2px solid #7b7b7b;
}

.cell {
    width: 30px;
    height: 30px;
    border: 1px solid #9c9c9c;
    background-color: #bdbdbd;
    text-align: center;
    line-height: 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
}

.cell.revealed {
    background-color: #e0e0e0;
    border: 1px solid #b0b0b0;
}

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

.cell.flagged::before {
    content: '🚩';
}

.cell.revealed.mine::before {
    content: '💣';
}

.cell[data-mines="1"] { color: #0000ff; }
.cell[data-mines="2"] { color: #008200; }
.cell[data-mines="3"] { color: #ff0000; }
.cell[data-mines="4"] { color: #000084; }
.cell[data-mines="5"] { color: #840000; }
.cell[data-mines="6"] { color: #008284; }
.cell[data-mines="7"] { color: #840084; }
.cell[data-mines="8"] { color: #757575; }