/* Interactive Math Visualizer Styles - v1.3 */

.imv-container {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f9;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 30px auto;
    text-align: center;
    overflow: hidden;
}

.imv-input-area {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#imv-target-input {
    padding: 12px 18px;
    border: 2px solid #d3dde4;
    border-radius: 25px;
    font-size: 1.1em;
    width: 55%;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

#imv-target-input:focus {
    border-color: #6c99c8;
    box-shadow: 0 0 8px rgba(108, 153, 200, 0.4), inset 0 2px 4px rgba(0,0,0,0.05);
    outline: none;
}

#imv-generate-button {
    padding: 12px 25px;
    background-color: #6c99c8;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(108, 153, 200, 0.35);
}

#imv-generate-button:hover:not(:disabled) {
    background-color: #5a85b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(108, 153, 200, 0.4);
}

#imv-generate-button:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 3px 8px rgba(108, 153, 200, 0.3);
}

#imv-generate-button:disabled {
    background-color: #b0c4d9;
    color: #f0f4f7;
    cursor: wait;
    transform: translateY(0px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.imv-explanation-area {
    font-size: 1.2em;
    color: #34495e;
    margin-bottom: 20px;
    padding: 12px 15px;
    background-color: #e9f3f9;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #d4e0e9;
    line-height: 1.5;
}

.imv-target-highlight {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.25em;
    padding: 2px 6px;
    background-color: #fbecec;
    border-radius: 5px;
}

.imv-visual-space {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 120px;
    padding: 15px;
    border: 2px dashed #c5d5e2;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.04);
    transition: border-color 0.3s ease;
}

.imv-visual-space.error {
    border-color: #e74c3c;
}

.imv-expression-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 90px;
}

.imv-element {
    font-size: 2.6em;
    font-weight: bold;
    padding: 12px 18px;
    margin: 0 6px;
    border-radius: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    will-change: transform, opacity;
    transform-origin: center center;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    text-align: center;
}

.imv-element.imv-number {
    background-color: #2ecc71;
}

.imv-element.imv-operator {
    background-color: #f39c12;
    font-size: 2.2em;
    min-width: 45px;
}

.imv-element.imv-result {
    background-color: #3498db;
    font-size: 3em;
}

.imv-element-hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.imv-error-message {
    color: #c0392b;
    font-weight: bold;
    margin-top: 20px;
    padding: 12px 18px;
    background-color: #fdecea;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    display: none;
}