/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px; /* 增大标题字体大小 */
    font-weight: bold; /* 加粗标题 */
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-size: 18px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* 增加过渡效果 */
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5); /* 输入框获得焦点时添加阴影效果 */
}

/* 按钮样式 */
button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease; /* 增加过渡效果 */
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* 按钮悬停时上移2px */
}

button:active {
    transform: translateY(1px); /* 按钮点击时下沉1px */
}

/* 结果区域样式 */
.alert-info,
.alert-warning,
.alert-success,
.alert-danger {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* BMI 容器样式 */
.bmi-container {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 为BMI容器添加阴影 */
}

.bmi-underweight {
    background-color: #d1ecf1;
}

.bmi-normal {
    background-color: #d4edda;
}

.bmi-overweight {
    background-color: #fff3cd;
}

.bmi-obese {
    background-color: #f8d7da;
}

/* 图标样式 */
.fas {
    margin-right: 10px;
}

/* 自定义下拉箭头样式 */
select {
    appearance: none; /* 去除默认的下拉箭头 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path fill="%23555" d="M0 0l5 5 5-5z"/></svg>'); /* 添加自定义下拉箭头 */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 5px;
}