#window {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    gap: 0;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    width: 400px;
    height: 400px;
    background-color: #f0f0f0;
}

.grid-cell {
    width: 40px;
    height: 40px;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d3d3d3;
    transition: background-color 0.3s;
    cursor: pointer;
}

.highlighted {
    background-color: rgba(235, 235, 80, 0.655);
}

#coordinates {
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}

#InputMatrix {
    display: none;
    /* 默认隐藏 */
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

#InputMatrix.visible {
    display: flex;
    /* 点击按钮后显示 */
}

.action-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.action-button:hover {
    background-color: #6b8cb7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#undoButton {
    background-color: #6c757d;
}

#undoButton:hover {
    background-color: #5a6268;
}

#nextButton {
    background-color: #28a745;
}

#nextButton:hover {
    background-color: #218838;
}

.grid-cell-input {
    width: 60px;
    /* 扩大输入框宽度 */
    height: 50px;
    /* 扩大输入框高度 */
    border: 2px solid #007bff;
    background-color: white;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    outline: none;
    box-sizing: border-box;
    border-radius: 4px;
    padding: 0 5px;
}

.grid-cell-input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* 动态调整的窗口样式 */
#window.dynamic {
    transition: all 0.3s ease;
}