body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #1e3c72;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background-color: #1e3c72;
    padding: 3px;
    margin: 20px auto;
    width: 450px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cell {
    width: 100%;
    height: 50px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
}

.cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #e63946;
    background: transparent;
    outline: none;
}

.cell input:focus {
    background-color: #e8f0fe;
    box-shadow: inset 0 0 0 2px #4a90e2;
}

.cell.given {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #1e3c72;
}

/* 3x3格子的边框 */
.cell:nth-child(3n) {
    border-right: 2px solid #1e3c72;
}

.cell:nth-child(9n) {
    border-right: none;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #1e3c72;
}

.controls {
    margin: 30px 0;
}

button {
    padding: 12px 25px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    background: #1e3c72;
    color: white;
    border: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 输入限制提示 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 添加动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 添加提示数字的闪烁动画 */
@keyframes highlight {
    0% { background-color: transparent; }
    30% { background-color: #ffecee; }
    100% { background-color: transparent; }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* 添加响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    #board {
        width: 100%;
        max-width: 450px;
    }

    .cell {
        height: 40px;
        font-size: 18px;
    }

    .cell input {
        font-size: 18px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }
} 