* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    padding: 20px;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

h2 {
    margin: 20px 0;
    color: #2c3e50;
    font-size: 20px;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
    background-color: #f9f9f9;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-group:hover {
    background-color: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

/* 性别和身份标签例外，它们是内联的 */
label.gender-label,
label.role-label {
    display: inline-block;
    margin-bottom: 0;
    width: 40px;
    vertical-align: middle;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: white;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 通用样式用于性别和身份选项 */
.gender-form-group,
.role-form-group {
    display: flex;
    align-items: center;
}

.gender-options,
.role-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 70%;
}

.gender-label,
.role-label {
    margin-right: 15px;
    width: 40px;
}

.gender-option,
.role-option {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.gender-option:hover,
.role-option:hover {
    background-color: #e8e8e8;
}

.gender-option input[type="radio"],
.role-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    position: relative;
    cursor: pointer;
    accent-color: #3498db;
    vertical-align: -2px;
}

.gender-option span,
.role-option span {
    margin-left: 4px;
    font-size: 14px;
}

small {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

.submit-container {
    margin-top: 5px;
    text-align: center;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

#preview-container {
    margin-top: 15px;
    text-align: center;
    background-color: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed #ddd;
}

#preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

.hidden {
    display: none;
}

#message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-weight: 500;
}

#message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 文件上传按钮样式 */
input[type="file"] {
    width: 100%;
    padding: 10px;
    background-color: white;
    border: 1px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }

    .form-group {
        padding: 12px;
    }

    .gender-form-group,
    .role-form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .gender-label,
    .role-label {
        margin-bottom: 10px;
        width: auto;
    }

    .gender-options,
    .role-options {
        width: 100%;
        justify-content: flex-start;
    }

    .gender-option,
    .role-option {
        margin-right: 30px;
    }

    .btn {
        padding: 12px 20px;
    }
}