* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.header p {
    color: #7f8c8d;
    font-size: 16px;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
}

.form-note {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:active {
    background-color: #2980b9;
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.divider {
    height: 1px;
    background-color: #ecf0f1;
    margin: 20px 0;
}

.age-display {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 16px;
    color: #2c3e50;
}

.required::after {
    content: " *";
    color: #e74c3c;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.radio-option.selected {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.radio-option input {
    margin-right: 8px;
}
/* 主食偏好样式 */
.preference-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preference-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.preference-input-group {
    display: flex;
    align-items: center;
    width: 100px;
}

.preference-input {
    text-align: right;
    padding-right: 8px;
}

.preference-percent {
    margin-left: 4px;
    color: #666;
    min-width: 20px;
}

.preference-total {
    margin-top: 8px;
    text-align: right;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
/* 登录弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .btn {
    width: 100%;
    margin-top: 10px;
}