table {
    border-collapse: collapse;
    width: 100%; /* Ensure the table takes full width to ensure alignment */
    max-width: 400px; /* Set a maximum width to ensure it fits on the page */
}

td, th {
    border: none;
    padding: 5px; /* Reduce padding to make cells smaller */
    text-align: center;
    width: 20px; /* Ensure each cell is wide enough for one digit */
}

/* Add a border at the bottom of the fifth row (primary carry) */
tr:nth-child(4) td {
    border-bottom: 1px solid black;
}

/* Remove the border from the previous last child */
tr:nth-child(5) td {
    border-bottom: none;
}

/* Adjust the bottom border for the new last row (result row) */
tr:last-child td {
    border-bottom: 1px solid black;
}

button {
    margin-top: 10px;
}

#result {
    margin-top: 10px;
    font-size: 18px;
}

.input-field {
    width: 20px; /* Ensure input fields are wide enough for one digit */
    font-size: 32px;
    text-align: center;
    padding: 0; /* Remove padding inside input fields */
    margin: 0; /* Remove margin around input fields */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}
