/* ================= 🌟 基础与排版 ================= */
.lnm-wrapper { padding: 32px 0; }
.lnm-header { text-align: center; margin-bottom: 32px; }
.lnm-title { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.lnm-subtitle { color: var(--text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

/* ================= 🌟 网格布局 ================= */
.lnm-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.lnm-col-left { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.lnm-col-right { display: flex; flex-direction: column; gap: 24px; height: 100%; min-height: 0; min-width: 0; }
@media(max-width: 900px) { .lnm-workspace { grid-template-columns: 1fr; } }

/* ================= 🌟 卡片风格 ================= */
.lnm-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 20px; padding: 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.03); display: flex; flex-direction: column; box-sizing: border-box; }
.lnm-panel-title { font-weight: 700; color: var(--text-main); font-size: 1.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

/* ================= 🌟 表单组件 ================= */
.lnm-form-group { margin-bottom: 16px; display: flex; flex-direction: column; }
.lnm-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

/* 多行数字输入框 */
.lnm-input-textarea { 
    width: 100%; min-height: 120px; box-sizing: border-box; padding: 16px; 
    border: 2px solid var(--border-color); border-radius: 12px; background: var(--bg-body); 
    color: var(--text-main); font-size: 1.1rem; line-height: 1.5; font-family: monospace; 
    resize: vertical; transition: 0.2s; outline: none; word-break: break-all;
}
.lnm-input-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }

.lnm-multiply-icon { text-align: center; font-size: 1.5rem; color: var(--text-muted); margin-bottom: 16px; opacity: 0.5; }

.lnm-btn-primary { width: 100%; padding: 14px; background: var(--primary-color); color: #fff; font-size: 1.1rem; font-weight: bold; border: none; border-radius: 12px; cursor: pointer; transition: 0.2s; margin-top: auto; }
.lnm-btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3); }
.lnm-link-btn { font-size: 0.85rem; color: var(--primary-color); cursor: pointer; font-weight: 600; transition: 0.2s; }
.lnm-link-btn:hover { opacity: 0.7; }

/* ================= 🌟 结果看板 ================= */
.lnm-badge { background: rgba(var(--primary-rgb), 0.1); color: var(--primary-color); padding: 4px 10px; border-radius: 12px; font-size: 0.85rem; font-weight: 700; }

.lnm-result-box { background: rgba(var(--primary-rgb), 0.05); border: 2px dashed rgba(var(--primary-rgb), 0.3); border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 8px; display: flex; flex-direction: column; align-items: center; width: 100%; box-sizing: border-box; flex: 1; }
.lnm-result-label { font-size: 0.95rem; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }

.lnm-result-textarea { 
    width: 100%; flex: 1; min-height: 180px; box-sizing: border-box; padding: 16px; 
    background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; 
    font-size: 1.15rem; font-weight: 700; color: var(--primary-color); 
    font-family: monospace; text-align: left; 
    outline: none; line-height: 1.5; margin-bottom: 16px; transition: 0.3s;
    white-space: pre-wrap; word-break: break-all; resize: none;
}
.lnm-result-textarea::-webkit-scrollbar { width: 6px; }
.lnm-result-textarea::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.lnm-btn-copy { padding: 10px 24px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.lnm-btn-copy:hover { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15); }

/* ================= 🌟 历史列表 ================= */
.history-card { display: flex; flex-direction: column; min-height: 0; }
.lnm-history-list { list-style: none; padding: 0; margin: 0; max-height: 200px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; }
.lnm-history-list::-webkit-scrollbar { width: 6px; }
.lnm-history-list::-webkit-scrollbar-track { background: var(--bg-body); border-radius: 4px; }
.lnm-history-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.lnm-history-list::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

.hist-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--bg-body); border-radius: 10px; border: 1px solid var(--border-color); transition: 0.2s; width: 100%; box-sizing: border-box; }
.hist-item:hover { border-color: var(--primary-color); box-shadow: inset 3px 0 0 var(--primary-color); }

.hist-top { display: flex; justify-content: space-between; align-items: center; }
.hist-formula { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.hist-copy { background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: 0.2s; font-size: 1.1rem; }
.hist-copy:hover { color: var(--primary-color); transform: scale(1.1); }
.hist-ans { font-family: monospace; font-size: 0.95rem; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= 🌟 SEO 文章 ================= */
.lnm-seo-box { margin-top: 32px; background: var(--bg-surface); padding: 32px; border-radius: 20px; border: 1px solid var(--border-color); box-sizing: border-box; width: 100%; }
.lnm-seo-box h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); margin-top: 24px; }
.lnm-seo-box h2:first-child { margin-top: 0; }
.lnm-seo-box p, .lnm-seo-box li { color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }