body {
    font-family: sans-serif;
    background: #FFFAF2;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.main-container {
    display: flex;
    gap: 40px;
}

#sudoku {
    display: grid;
    grid-template-columns: repeat(9, 50px);
    grid-template-rows: repeat(9, 50px);
    border: 3px solid #333;
    background: white;
}

.cell {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #ccc;
    background: white;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    caret-color: transparent;
}

.cell.block-bottom {
    border-bottom: 3px solid #333;
}

.cell.block-right {
    border-right: 3px solid #333;
}

.highlight {
    background: #ffeeba !important;
}

.selected {
    background: #ffd36b !important;
}

.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #D8891E;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #BF791A;
}

.erase-btn {
    background: #B86E15;
}

.erase-btn:hover {
    background: #9E5F12;
}

.numpad {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 50px);
    gap: 10px;
}

.np-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-radius: 8px;
    border: none;
    background: #D4A017;
    color: white;
    cursor: pointer;
}

.np-btn:disabled {
    background: #857143;
    cursor: not-allowed;
}

.np-btn:hover:not(:disabled) {
    background: #B78A13;
}

.fixed {
    color: gray !important;
    font-weight: bold;
    pointer-events: none;
}

.same-number {
    background: #FFB599 !important;
}

/* responsive */
@media (max-width: 700px) {
    body {
        margin-top: 10px;
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    #sudoku {
        grid-template-columns: repeat(9, 35px);
        grid-template-rows: repeat(9, 35px);
    }

    .cell {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .right-panel {
        width: 100%;
        align-items: center;
    }

    .btns {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    button {
        width: 45%;
        padding: 8px 12px;
        font-size: 14px;
    }

    .numpad {
        grid-template-columns: repeat(3, 45px);
        gap: 8px;
    }

    .np-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}