/* 体重测试工具专用样式 */

/* 计算器容器 */
.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .calculator-container {
        flex-direction: row;
    }

    .calculator-form {
        flex: 1;
    }

    .calculator-result {
        flex: 1;
    }
}

/* 计算表单 */
.calculator-form {
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.calculator-form h3 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 性别选项 */
.gender-options {
    display: flex;
    gap: 20px;
}

.gender-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
}

.gender-option input {
    margin-right: 8px;
    cursor: pointer;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #e9e9e9;
}

/* 计算结果 */
.calculator-result {
    padding: 25px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border-radius: 12px;
    border: 1px solid #d0e3ff;
}

.result-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d0e3ff;
}

.result-header h3 {
    margin: 0;
    color: #4a90e2;
    font-size: 1.25rem;
}

.result-body {
    margin-bottom: 25px;
}

.result-item {
    margin-bottom: 20px;
}

.result-item h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #4a90e2;
    margin-right: 8px;
}

.result-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
    color: white;
    font-weight: 500;
}

.category-underweight {
    background-color: #3498db;
}

.category-normal {
    background-color: #2ecc71;
}

.category-overweight {
    background-color: #f39c12;
}

.category-obese {
    background-color: #e74c3c;
}

/* BMI 图表 */
.bmi-chart {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #d0e3ff;
}

.bmi-chart h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.bmi-scale {
    height: 30px;
    background: linear-gradient(to right, #3498db 0%, #2ecc71 35%, #f39c12 65%, #e74c3c 100%);
    border-radius: 15px;
    position: relative;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bmi-marker {
    position: absolute;
    top: -10px;
    width: 3px;
    height: 50px;
    background-color: #333;
    transform: translateX(-50%);
    z-index: 10;
}

.bmi-marker::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -5px;
    width: 13px;
    height: 13px;
    background-color: #333;
    border-radius: 50%;
    border: 2px solid white;
}

.bmi-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.bmi-label {
    font-size: 12px;
    color: #666;
}

/* 健康建议 */
.recommendations {
    margin-top: 25px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recommendations h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.recommendations li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 理想体重表格 */
.ideal-weight-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.ideal-weight-table th,
.ideal-weight-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.ideal-weight-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ideal-weight-table td {
    font-size: 14px;
    color: #555;
}

.ideal-weight-table tr:nth-child(even) {
    background-color: #fafafa;
}

.ideal-weight-table tr:hover {
    background-color: #f0f7ff;
}

/* 表格容器 */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-form,
    .calculator-result {
        padding: 20px;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 10px;
    }

    .btn-secondary {
        margin-top: 10px;
    }

    .gender-options {
        flex-direction: column;
        gap: 10px;
    }

    .bmi-labels {
        font-size: 10px;
    }

    .ideal-weight-table {
        font-size: 12px;
    }

    .ideal-weight-table th,
    .ideal-weight-table td {
        padding: 8px 4px;
    }
}
