/* ── BMI 表单布局（2列） ── */
.bmi-form {
    grid-template-columns: 1fr 1fr;
}

/* ── BMI 结果卡片 ── */
.bmi-result {
    margin-top: 1.5rem;
}

.bmi-value-card {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    margin-bottom: 1.2rem;
}

.bmi-value-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.bmi-value-num {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: #333;
    line-height: 1.2;
}

.bmi-level {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── BMI 色条 ── */
.bmi-bar-wrap {
    position: relative;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
}

.bmi-bar {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    height: 32px;
}

.bmi-bar-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: white;
}

.seg-thin {
    flex: 18.5;
    background: #60a5fa;
}

.seg-normal {
    flex: 5.4;
    background: #34d399;
}

.seg-over {
    flex: 4;
    background: #fbbf24;
}

.seg-obese {
    flex: 12;
    background: #f87171;
}

.bmi-pointer {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #333;
    transition: left 0.3s;
}

/* ── 健康建议 ── */
.bmi-advice {
    padding: 1rem 1.2rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.7;
}

/* ── BMI标准表格 ── */
.bmi-table-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.bmi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.bmi-table th {
    background: #f5f7fa;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.bmi-table td {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.bmi-table tr:last-child td {
    border-bottom: none;
}

/* ── 等级标签 ── */
.level-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
}

.level-thin {
    background: #dbeafe;
    color: #2563eb;
}

.level-normal {
    background: #d1fae5;
    color: #059669;
}

.level-over {
    background: #fef3c7;
    color: #d97706;
}

.level-obese {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .bmi-form {
        grid-template-columns: 1fr;
    }

    .bmi-value-num {
        font-size: 2.2rem;
    }

    .bmi-bar-seg {
        font-size: 0.7rem;
    }
}