/* MathMaster AI Styles - Blade Research Branding */

.mm-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 30px;
    border-top: 5px solid #ff6600; /* Brand Orange */
    box-sizing: border-box;
}

.mm-header h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.mm-badge {
    background: #ff6600;
    color: white;
    font-size: 0.6em;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mm-header p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* Input Area */
#mm-problem-text {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    resize: vertical;
    box-sizing: border-box;
    font-family: monospace; /* Better for math code */
}

#mm-problem-text:focus {
    border-color: #ff6600;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
}

/* Dropzone */
.mm-dropzone {
    border: 2px dashed #ccc;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    margin-bottom: 15px;
}

.mm-dropzone:hover {
    border-color: #ff6600;
    background: #fff5eb;
}

.mm-dropzone button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#mm-preview-list {
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}

/* Buttons */
.mm-btn-primary {
    background: #ff6600;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mm-btn-primary:hover {
    background: #e65c00;
}

.mm-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mm-btn-outline {
    background: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mm-btn-outline:hover {
    background: #333;
    color: white;
}

/* Results Section */
.mm-result-section {
    margin-top: 30px;
    border-top: 2px solid #eee;
    padding-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

.mm-latex-content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    overflow-x: auto; /* Handle long equations on mobile */
}

.mm-export-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .mm-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .mm-export-actions {
        flex-direction: column;
    }
    
    .mm-btn-outline {
        width: 100%;
    }
}