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

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

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

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

label {
    font-weight: bold;
}

select, button, input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.game-area {
    margin-top: 20px;
}

.info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

#question-container {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    min-height: 50px; /* Ensure space for question */
    display: flex;
    justify-content: center;
    align-items: center;
}

#question {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}

input[type="number"] {
    width: calc(100% - 22px); /* Account for padding and border */
    margin-bottom: 10px;
    text-align: center;
}

#feedback {
    margin-top: 15px;
    font-weight: bold;
    min-height: 1.2em; /* Reserve space for feedback */
}

.correct {
    color: green;
}

.incorrect {
    color: red;
}

#explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: left;
}

#explanation h3 {
    margin-top: 0;
    color: #495057;
}

#explanation-text {
    color: #6c757d;
    /* white-space: pre-wrap; Removed as JS now handles steps in <p> tags */
}

/* Scribble Pad Styles */
#scribble-canvas {
    border: 1px solid #ccc;
    cursor: crosshair;
    touch-action: none; /* Prevent scrolling on touch devices */
}

.scribble-area h4 {
    margin-bottom: 5px;
    color: #555;
}
