body {
    display: flex;
    flex-direction: column; /* Changed to column to stack elements vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height to allow content to push down */
    margin: 0;
    font-family: sans-serif;
    padding: 20px 0; /* Add some padding top/bottom */
}

.game-container {
    position: relative;
    width: 80%;
    max-width: 600px;
    height: 300px;
    border: 2px solid #ccc;
    overflow: hidden;
    background-image: url('backdrop1.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    margin-bottom: 20px; /* Add space below the game box */
}

#sonic {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background-image: url('sonic.gif');
    background-size: contain;
    background-repeat: no-repeat;
    transition: left 0.5s linear;
}

#question-area {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#operation-selection button {
    margin: 5px;
    padding: 8px 15px;
}

#results {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.text-box-container {
    width: 80%; /* Match game container width */
    max-width: 600px; /* Match game container max-width */
    margin-top: 20px; /* Space above the text box */
}

#game-info-box {
    width: 100%;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical; /* Allow vertical resizing by user */
}

@media (max-width: 480px) {
    .game-container, .text-box-container {
        width: 95%;
    }
}
