/* Main Container */
.mad-maths-3-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mad-maths-3-container h3 {
    color: #2c3e50;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Problem Styling */
.problem {
    text-align: center;
    margin-bottom: 20px;
}

.problem p {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Input and Button Styling */
#maths-answer {
    padding: 10px 15px;
    font-size: 1.2em;
    width: 150px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
    transition: border-color 0.3s;
}

#maths-answer:focus {
    outline: none;
    border-color: #3498db;
}

#check-answer {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#check-answer:hover {
    background-color: #2980b9;
}

#check-answer:active {
    transform: translateY(1px);
}

/* Result Message Styling */
#result-message {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}

#result-message.visible {
    opacity: 1;
}

#result-message.correct {
    background-color: #d4edda;
    color: #155724;
}

#result-message.incorrect {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 600px) {
    .mad-maths-3-container {
        margin: 10px;
        padding: 15px;
    }
    
    .problem p {
        font-size: 1.2em;
    }
    
    #maths-answer, #check-answer {
        width: 100%;
        margin: 5px 0;
    }
    
    #check-answer {
        padding: 12px;
    }
}
