body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

/* Container to hold everything (Treating the body as the container here) */
body > * {
    max-width: 400px;
}

/* Layout and Spacing */
body {
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

/* Styling Inputs and Select Boxes */
input[type="text"], 
select {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box; /* Ensures padding doesn't break width */
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #4a90e2;
    outline: none;
}

label {
    font-weight: bold;
    display: block;
    text-align: left;
    margin-bottom: -5px;
}

/* Button Styling */
button {
    width: 100%;
    padding: 14px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-bottom: 10px;
}

button:hover {
    background-color: #357abd;
}

button:active {
    transform: scale(0.98);
}

/* Submit Button specific color */
button[onclick="submitAnswer()"] {
    background-color: #2ecc71;
}

button[onclick="submitAnswer()"]:hover {
    background-color: #27ae60;
}

/* The Math Problem Display */
#Problem {
    font-size: 48px;
    font-weight: bold;
    margin: 30px 0;
    color: #2c3e50;
    min-height: 60px; /* Prevents layout jump when text appears */
}

/* Results Section */
#Results {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-style: italic;
    line-height: 1.5;
}

/* Reset Button styling */
#Reset {
    background-color: #e74c3c;
    margin-top: 20px;
}

#Reset:hover {
    background-color: #c0392b;
}

/* Hide elements when they shouldn't be seen */
[hidden] {
    display: none !important;
}