body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f0f8ff;
    margin: 0;
    padding-top: 20px;
}

.container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex-grow: 1;
    margin: 0 auto; /* Center the container horizontally */
}

h1 {
    color: #337ab7;
}

.problem-setup {
    margin: 20px 0;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.problem-setup input[type="number"] {
    width: 60px;
    padding: 8px;
    font-size: 22px;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin: 0 10px;
}

.problem-setup span {
    margin: 0 5px;
    font-weight: bold;
}

#actualResult {
    display: inline-block;
    width: 50px;
    text-align: left;
    font-weight: bold;
    color: green;
}

#calculateBtn {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

#calculateBtn:hover {
    background-color: #4cae4c;
}

#calculateBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


.elsa-container {
    display: flex;
    align-items: flex-start; /* Align Elsa and table to top */
    justify-content: center;
    margin-top: 20px;
}

.elsa-image {
    width: 120px; /* Adjust as needed */
    height: auto;
    margin-right: 20px;
    align-self: center; /* Center Elsa vertically relative to the table */
}

.working-area table {
    border-collapse: collapse;
    font-size: 28px;
    margin: 0 auto; /* Center table if container is wider */
}

.working-area th, .working-area td {
    width: 50px;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    position: relative; /* For absolute positioning of animation elements */
    padding: 5px;
}

.working-area th {
    font-weight: bold;
    color: #555;
}

.working-area .minuend-tens,
.working-area .minuend-ones {
    padding-top: 20px; /* Make space for borrowed numbers above */
}


.working-area td.operator {
    font-weight: bold;
    font-size: 30px;
}

.separator-row td {
    height: 10px; /* Reduce height for the hr line */
    padding: 0;
}
.separator-row hr {
    border: none;
    border-top: 2px solid black;
    margin: 0;
}


/* Animation elements */
.original-digit {
    display: inline-block;
}

.strikethrough {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 110%; /* Slightly wider than the digit */
    height: 3px;
    background-color: red;
    transform: translate(-50%, -50%) rotate(-15deg);
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out;
}

.borrowed-digit {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7em; /* Smaller than original */
    color: #007bff; /* Blue for borrowed */
    font-weight: bold;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out;
}

/* Positioning for specific borrowed digits */
.minuend-tens .borrowed-digit { /* New tens value */
    top: -5px; 
}
.minuend-ones .borrowed-digit { /* New ones value (e.g., 10, 13) */
    top: -5px;
    /* left: 60%; if it needs to be to the side */
}


.explanation-text {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
    min-height: 2em; /* Reserve space */
    font-style: italic;
}

footer {
    margin-top: 20px;
    padding: 10px;
    background-color: #e9ecef;
    text-align: center;
    width: 100%;
}

/* Highlighting for animation */
.highlight-ones {
    background-color: #fffacd; /* LemonChiffon */
    transition: background-color 0.5s ease;
}

.highlight-tens {
    background-color: #add8e6; /* LightBlue */
    transition: background-color 0.5s ease;
}