.tool-section {
    padding: 2rem 0 5rem;
    background: #fff;
}

/* ========== 输入卡片 ========== */
.mp-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
}
.mp-search-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
}

/* 公式输入栏 */
.mp-formula-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.mp-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 1.05rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
    width: 140px;
}
.mp-input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,0.1); }
.mp-input-base { border-color: #a78bfa; }
.mp-input-exp { width: 100px; border-color: #f59e0b; }
.mp-input-mod { width: 140px; border-color: #34d399; }

.mp-sup-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
}
.mp-sup-wrap::after {
    content: '';
}
.mp-sup-wrap .mp-input {
    font-size: 0.82rem;
    padding: 0.45rem 0.7rem;
    width: 100px;
}
.mp-op {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}

/* 快速填充 */
.mp-quick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}
.mp-quick-label {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-right: 0.25rem;
}
.mp-tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}
.mp-tag:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #4f46e5;
}

/* ========== 结果卡片 ========== */
.mp-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
}
.mp-result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* 主结果展示 */
.mp-main-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.mp-expression {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}
.mp-equals {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
}
.mp-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    word-break: break-all;
}

/* 信息网格 */
.mp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.mp-info-item {
    background: #fff;
    padding: 0.85rem 1.1rem;
}
.mp-info-item:nth-child(odd) { background: #fafbfc; }
.mp-info-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}
.mp-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}
.mp-info-value.mono {
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    word-break: break-all;
}

/* 计算步骤 */
.mp-steps-wrap {
    margin-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}
.mp-steps-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.35rem 0;
    transition: color 0.2s;
}
.mp-steps-toggle:hover { color: #4f46e5; }
.mp-steps-toggle svg { transition: transform 0.2s; }
.mp-steps-toggle.open svg { transform: rotate(180deg); }

.mp-steps-content {
    margin-top: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.85rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    line-height: 1.8;
    color: #334155;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}
.mp-step-line {
    padding: 0.2rem 0;
}
.mp-step-highlight {
    color: #4f46e5;
    font-weight: 600;
}
.mp-step-result {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #cbd5e1;
    color: #059669;
    font-weight: 700;
}

/* 错误提示 */
.mp-error {
    text-align: center;
    padding: 1.5rem;
    color: #ef4444;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .tool-section { padding: 1.5rem 0 3rem; }
    .mp-formula-bar { flex-direction: column; gap: 0.35rem; }
    .mp-input { width: 100%; }
    .mp-input-exp { width: 100%; }
    .mp-input-mod { width: 100%; }
    .mp-main-result { flex-direction: column; gap: 0.35rem; padding: 1rem; }
    .mp-value { font-size: 1.3rem; }
    .mp-info-grid { grid-template-columns: 1fr; }
}
