/* Base Styling */
body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    background-color: #f3effd; 
    margin: 0;
    padding: 0;
    color: #3d2b56; 
    transition: background-color 0.5s ease; 
}

.container {
    margin: 50px auto;
    width: 80%;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(75, 0, 130, 0.2); 
    animation: fadeIn 1.5s ease-in-out; 
}

h1 {
    color: #5e3a87; 
    font-size: 36px;
    animation: slideDown 1s ease-in-out; 
}

.input-section {
    margin: 20px;
}

label {
    margin-right: 10px;
    color: #5e3a87;
}

select, button {
    margin: 10px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #b19cd9; 
    background-color: #e6e0f8; 
    color: #3d2b56;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover, select:hover {
    background-color: #b19cd9; 
    transform: scale(1.05); 
    box-shadow: 0 0 15px rgba(177, 156, 217, 0.7), 0 0 30px rgba(177, 156, 217, 0.5); /* Glow effect */
}

#solveMatrix {
    background-color: #7c6c99;
    color: white;
    border: none;
    cursor: pointer;
    /* animation: pulse 1s infinite; /* Pulsing animation */
}

#solveMatrix:hover {
    background-color: #5e3a87;
    box-shadow: 0 0 15px rgba(177, 156, 217, 0.7), 0 0 30px rgba(177, 156, 217, 0.5); /* Glow effect */
}

#matrix-container {
    margin: 20px 0;
}

.matrix-input {
    width: 50px;
    padding: 5px;
    margin: 5px;
    text-align: center;
    border: 1px solid #b19cd9;
    background-color: #f3effd;
    border-radius: 5px;
    transition: transform 0.2s;
}

.matrix-input:focus {
    transform: scale(1.1); 
}

#solution {
    width: 90%;
    height: 100px;
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #b19cd9;
    background-color: #f3effd;
    border-radius: 5px;
    resize: none;
}

footer {
    color: #b19cd9;
    padding: 10px;
    position: fixed;
    bottom: 0;
    right: 0;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
    transition: color 0.5s ease;
}

footer:hover {
    color: #5e3a87; 
}

.multiplication-section {
    display: none;
}

.matrix-container {
    display: inline-block;
    margin: 20px;
    vertical-align: top;
}

.matrix-label {
    font-weight: bold;
    color: #5e3a87;
    margin-bottom: 10px;
}

/* Ensure new matrix containers inherit the styling of the original */
#matrix1-container, #matrix2-container {
    margin: 20px 0;
}

/* Keyframe Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
