/* BMI计算器样式 */

/* ===== 基础样式 ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    box-sizing: border-box;
}

.tool-content {
    width: 100%;
    max-width: 100%;
}

/* ===== 工具头部 ===== */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.tool-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tool-description {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* ===== 免责声明样式 ===== */
.disclaimer-notice {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #FFD700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.disclaimer-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.disclaimer-text {
    font-weight: 500;
}

/* ===== BMI计算器主体 ===== */
.bmi-calculator {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

/* ===== 计算表单 ===== */
.calculator-form {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-title {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 25px 0;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* ===== 性别选择 ===== */
.gender-group .form-label {
    margin-bottom: 12px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background: #667eea;
}

.radio-item input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* ===== 输入框样式 ===== */
.input-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== 下拉选择框 ===== */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== 计算按钮 ===== */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
}

/* ===== BMI标准表格 ===== */
.bmi-standards {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

.standards-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
}

.standards-table {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-weight: 600;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #e1e5e9;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
}

/* ===== BMI分类颜色 ===== */
.table-row.underweight {
    background: rgba(135, 206, 235, 0.1);
    color: #4682B4;
}

.table-row.normal {
    background: rgba(144, 238, 144, 0.1);
    color: #228B22;
}

.table-row.overweight {
    background: rgba(255, 215, 0, 0.1);
    color: #DAA520;
}

.table-row.obese {
    background: rgba(255, 99, 71, 0.1);
    color: #DC143C;
}

/* ===== 计算结果 ===== */
.bmi-result {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-title {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.result-content {
    text-align: center;
}

.bmi-score {
    margin-bottom: 25px;
}

.score-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.score-value {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.bmi-category {
    margin-bottom: 30px;
}

.category-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.category-range {
    color: #666;
    font-size: 14px;
}

/* ===== 健康建议 ===== */
.bmi-advice {
    text-align: left;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.advice-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.advice-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.advice-suggestions {
    margin: 0;
    padding-left: 20px;
}

.advice-suggestions li {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ===== 结果免责声明 ===== */
.result-disclaimer {
    margin-bottom: 25px;
}

.disclaimer-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #f39c12;
}

.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.disclaimer-title {
    font-size: 16px;
    font-weight: 600;
    color: #d68910;
}

.disclaimer-list {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.disclaimer-list li {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
}

/* ===== 操作按钮 ===== */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.action-btn.secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

/* ===== 知识科普 ===== */
.bmi-knowledge {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.knowledge-title {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 25px 0;
    text-align: center;
}

.knowledge-content {
    display: grid;
    gap: 25px;
}

.knowledge-item h3 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.knowledge-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.formula-example {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-family: 'Courier New', monospace;
}

/* ===== 重要提示样式 ===== */
.knowledge-item.important-notice {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.knowledge-item.important-notice h3 {
    color: #c53030;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.knowledge-item.important-notice p {
    color: #742a2a;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.knowledge-item.important-notice p:last-child {
    margin-bottom: 0;
}

.knowledge-item.important-notice strong {
    color: #c53030;
    font-weight: 600;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tool-title {
        font-size: 22px;
    }
    
    .tool-description {
        font-size: 14px;
    }
    
    .bmi-calculator {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calculator-form,
    .bmi-standards {
        padding: 20px;
    }
    
    .radio-group {
        gap: 15px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .score-value {
        font-size: 36px;
    }
    
    .knowledge-content {
        gap: 20px;
    }

    /* 移动端免责声明优化 */
    .disclaimer-notice {
        padding: 8px 12px;
        font-size: 12px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .disclaimer-box {
        padding: 15px;
    }

    .disclaimer-header {
        justify-content: center;
    }

    .disclaimer-list li {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .knowledge-item.important-notice {
        padding: 15px;
    }

    .knowledge-item.important-notice h3 {
        font-size: 14px;
        justify-content: center;
        text-align: center;
    }

    .knowledge-item.important-notice p {
        font-size: 13px;
        text-align: center;
    }
}
