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

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

/* ================= 🌟 卡片风格 ================= */
.aff-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; }
.aff-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: 24px; }

/* ================= 🌟 表单组件 ================= */
.aff-form-group { margin-bottom: 20px; }
.aff-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aff-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

.aff-input-box { display: flex; align-items: center; background: var(--bg-body); border: 2px solid var(--border-color); border-radius: 10px; padding: 0 16px; transition: 0.2s; }
.aff-input-box:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.aff-input { flex: 1; width: 100%; min-width: 0; padding: 12px 0; border: none; background: transparent; color: var(--text-main); font-size: 1.2rem; font-weight: 700; font-family: monospace; outline: none; }
.aff-input::-webkit-outer-spin-button, .aff-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.aff-currency { font-weight: 700; color: var(--text-muted); font-size: 1.1rem; user-select: none; }
.aff-input-box .aff-currency:first-child { margin-right: 8px; }
.aff-input-box .aff-currency:last-child { margin-left: 8px; font-size: 0.9rem; }

/* ================= 🌟 结果看板 ================= */
.aff-primary-box { background: rgba(var(--primary-rgb), 0.05); border: 2px dashed rgba(var(--primary-rgb), 0.3); border-radius: 16px; padding: 32px 24px; text-align: center; margin-bottom: 24px; }
.aff-res-label { font-size: 1rem; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.aff-res-value { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 800; color: var(--text-main); font-family: monospace; word-break: break-all; line-height: 1.2; }
.aff-res-value.highlight { color: var(--primary-color); }
.aff-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

.aff-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.aff-bd-item { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-body); padding: 16px; border-radius: 12px; border: 1px solid var(--border-color); }
.aff-bd-icon { font-size: 1.5rem; margin-top: 2px; flex-shrink: 0; }
.aff-bd-text { display: flex; flex-direction: column; gap: 6px; }
.aff-bd-title { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.aff-bd-val { font-size: 1.3rem; font-weight: 700; color: var(--text-main); font-family: monospace; }

/* ================= 🌟 SEO 文章 ================= */
.aff-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%; }
.aff-seo-box h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); margin-top: 24px; }
.aff-seo-box h2:first-child { margin-top: 0; }
.aff-seo-box p, .aff-seo-box li { color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.aff-seo-box ul { padding-left: 20px; }