/* BMI计算器样式 */
.bmi-calculator-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 60px 20px;
}

.bmi-calculator-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.calculator-title i {
    font-size: 32px;
}

.calculator-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}

/* 计算主体 */
.calculator-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* 输入区域 */
.calculator-inputs {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #4facfe;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.input-group label .unit {
    margin-left: auto;
    font-weight: 400;
    color: #888;
}

.input-group label i {
    color: #4facfe;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.radio-label:hover {
    border-color: #4facfe;
}

.radio-label.active {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

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

.radio-icon {
    font-size: 18px;
    color: #4facfe;
}

.radio-text {
    font-size: 14px;
    font-weight: 500;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 结果展示 */
.calculator-results {
    padding: 30px;
}

.result-header {
    margin-bottom: 20px;
}

/* 结果卡片 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-card.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.result-card:not(.primary) .result-icon {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.result-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.8;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
}

.result-value.highlight {
    font-size: 32px;
}

.result-status {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.result-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

/* BMI等级条 */
.bmi-scale-section {
    margin-bottom: 30px;
}

.details-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-title i {
    color: #4facfe;
}

.bmi-scale {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.scale-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.scale-segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s ease;
}

.scale-segment.underweight {
    background: #3498db;
}

.scale-segment.normal {
    background: #27ae60;
}

.scale-segment.overweight {
    background: #f39c12;
}

.scale-segment.obese {
    background: #e74c3c;
}

.scale-segment.active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scale-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.scale-value {
    font-size: 11px;
    opacity: 0.9;
}

.scale-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 4px;
    height: 80px;
    background: #333;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.scale-indicator::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #333;
}

/* 健康建议 */
.health-advice {
    margin-bottom: 30px;
}

.advice-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.advice-box {
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.advice-box.underweight {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.advice-box.normal {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

.advice-box.overweight {
    background: rgba(243, 156, 18, 0.1);
    border-color: #f39c12;
}

.advice-box.obese {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

.advice-box h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.advice-box.underweight h4 {
    color: #3498db;
}

.advice-box.normal h4 {
    color: #27ae60;
}

.advice-box.overweight h4 {
    color: #f39c12;
}

.advice-box.obese h4 {
    color: #e74c3c;
}

.advice-box p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 14px;
}

.advice-box ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* 图表区域 */
.chart-section {
    margin-bottom: 30px;
}

.chart-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

/* BMI信息 */
.bmi-info {
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    gap: 16px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(79, 172, 254, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4facfe;
    flex-shrink: 0;
}

.info-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.info-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .bmi-calculator-section {
        padding: 30px 15px;
    }

    .calculator-title {
        font-size: 28px;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-value.highlight {
        font-size: 26px;
    }

    .scale-bar {
        height: 80px;
    }

    .scale-segment {
        font-size: 10px;
    }

    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}