body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: #f6f8fa;
    margin: 0;
    padding: 20px;
}
h1 {
    color: #333;
}
.board {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 2px;
    justify-content: center;
    margin: 20px auto;
    border: 2px solid #333;
}
.cell {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 18px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Thêm đường viền đậm cho các khối 3x3 */
.cell:nth-child(3n) {
    border-right: 2px solid #999;
}
.cell:nth-child(9n) {
    border-right: 2px solid #333;
}
.board > .cell:nth-child(n+19):nth-child(-n+27),
.board > .cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #999;
}


.cell.prefilled {
    font-weight: bold;
    background-color: #e9ecef;
    color: #495057;
    cursor: default;
}
.cell.selected {
    background-color: #cdefff;
}
.number-pad {
    margin-top: 20px;
}
.number-pad button {
    margin: 2px;
    padding: 10px;
    width: 42px;
    height: 42px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
}
.controls {
    margin-bottom: 10px;
}

/* --- STYLE MỚI ĐƯỢC THÊM VÀO --- */
.cell.correct {
    color: #155724; /* Xanh đậm */
    background-color: #d4edda; /* Xanh nhạt */
}

.cell.incorrect {
    color: #721c24; /* Đỏ đậm */
    background-color: #f8d7da; /* Đỏ nhạt */
}


footer {
    margin-top: 30px;
    font-size: 14px;
}
footer a {
    text-decoration: none;
    color: #007acc;
}
