/* styles.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f7f7f7;
}

.container {
    text-align: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

#sudoku-grid {
    margin: 20px auto;
    border-collapse: collapse;
    border: 3px solid #333;
    background-color: #fff;
}

#sudoku-grid td {
    border: 1px solid #ccc;
    width: 45px;
    height: 45px;
    text-align: center;
    position: relative;
}

#sudoku-grid input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background-color: transparent;
    outline: none;
    box-sizing: border-box; /* 确保宽度包括边框 */
}

/* 使用伪元素绘制右侧边框 */
#sudoku-grid td::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px; /* 偏移量，确保边框对齐 */
    width: 1px;
    height: 100%;
    background-color: #ccc;
}

/* 3x3宫格的右侧粗边框 */
#sudoku-grid td:nth-child(3n)::after {
    right: -2px; /* 偏移量，确保粗边框对齐 */
    width: 3px;
    background-color: #333;
}

/* 添加粗边框以区分3x3宫格 */
#sudoku-grid tr:nth-child(3n) td {
    border-bottom: 3px solid #333;
}

/* 已求解的格子样式 */
#sudoku-grid input.solved {
    background-color: #f0f0f0;
    color: #555;
    cursor: not-allowed;
}

button {
    margin: 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#reset-button {
    background-color: #dc3545;
}

#reset-button:hover {
    background-color: #a71d2a;
}

/* styles.css */
#steps-container {
    margin-top: 20px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#steps-list {
    list-style-type: none;
    padding: 0;
}

#steps-list li {
    margin: 5px 0;
    padding: 8px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}