* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0;
}

h1 {
    color: #333;
    margin-bottom: 10px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#resetBtn {
    padding: 8px 16px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#resetBtn:hover {
    background: #45a049;
}

.instruction {
    color: #555;
    font-size: 14px;
    background: #e8e8e8;
    padding: 6px 12px;
    border-radius: 20px;
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 50px);
    grid-template-rows: repeat(7, 50px);
    gap: 2px;
    background: #bbb;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    background: #ddd;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.cell.unknown {
    background: #b0bec5;
    color: #37474f;
}

.cell.number {
    background: #fff9c4;
    color: #000;
}

.cell.mine {
    background: #ef5350;
    color: white;
}

.cell.safe {
    background: #a5d6a7;
    color: #1b5e20;
}

.cell:hover {
    filter: brightness(0.95);
}

.info {
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.warning {
    color: #d32f2f;
    font-weight: bold;
    min-height: 24px;
    margin-bottom: 10px;
}

.prob-list h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

#probListItems {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fafafa;
}

#probListItems li {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

#probListItems li:last-child {
    border-bottom: none;
}

#probListItems li.highlight {
    background: #fff3e0;
    font-weight: bold;
}