body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

.game-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.problem {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.operator {
    font-size: 2.5em;
    margin-right: 15px;
    color: #555;
    align-self: flex-end;
    transform: translateY(10px);
}

.number-boxes {
    display: grid;
    grid-template-columns: repeat(2, 50px);
    grid-template-rows: repeat(2, 50px);
    gap: 10px;
}

.box {
    width: 50px;
    height: 50px;
    border: 2px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    border-radius: 5px;
}

.answer-input {
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
    padding: 0;
    box-sizing: border-box;
}

.answer-input.correct {
    border-color: #28a745;
    background-color: #e6ffe6;
}

.answer-input.incorrect {
    border-color: #dc3545;
    background-color: #ffe6e6;
}

.intermediate-results {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intermediate-results .row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.intermediate-results .row.shift-left {
    margin-left: -60px; /* この値は上の桁の配置に依存します。必要に応じて調整してください */
}

.fixed-zero {
    background-color: #f8f8f8;
    color: #888;
}

.final-result {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    margin-left: 0px;
    margin-right: auto;
    max-width: fit-content;
}

hr {
    border: none;
    border-top: 2px solid #333;
    /* 線の幅を調整: 1マス分 (50px) 広くします */
    width: calc(80% + 50px); /* 50pxは1マスの幅 */
    margin: 20px auto; /* auto で中央揃えを維持 */
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    margin: 10px 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#message {
    margin-top: 15px;
    font-size: 1.1em;
    color: #333;
}

#score {
    font-weight: bold;
    color: #007bff;
}