/* 注册页面样式 */

/* 返回按钮 */
.back-btn {
    color: white;
    font-size: 20px;
    margin-right: 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 注册容器 */
.register-container {
    padding: 30px 20px;
    max-width: 500px;
    margin: 0 auto;
}

/* 标题样式 */
.register-title {
    font-size: 26px;
    color: #2c8b4a;
    margin-bottom: 10px;
    text-align: center;
}

.register-subtitle {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-size: 14px;
}

/* 角色选择区域 */
.role-selection {
    margin-bottom: 30px;
}

/* 角色卡片 */
.role-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.role-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border-color: #2c8b4a;
}

.role-card:active {
    transform: translateY(-1px);
}

/* 角色图标 */
.role-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 15px;
    flex-shrink: 0;
}

.role-icon.villager {
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    color: white;
}

.role-icon.enterprise {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: white;
}

/* 角色详情 */
.role-details {
    flex: 1;
}

.role-details h3 {
    font-size: 17px;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.role-details p {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.role-requirements {
    margin-top: 8px;
}

.role-requirements small {
    color: #999;
    font-size: 12px;
}

/* 右箭头 */
.role-card > i.fa-chevron-right {
    color: #ccc;
    font-size: 16px;
    margin-left: 10px;
}

.role-card:hover > i.fa-chevron-right {
    color: #2c8b4a;
}

/* 注册提示 */
.register-tips {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.tip-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-item i {
    color: #2c8b4a;
    margin-right: 10px;
    font-size: 16px;
}

/* 登录链接 */
.login-link {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-link a {
    color: #2c8b4a;
    text-decoration: none;
    font-weight: bold;
}

.login-link a:hover {
    text-decoration: underline;
}

/* 版权信息 */
.footer-info {
    margin-top: 40px;
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 0 20px;
}

.footer-info p {
    margin: 5px 0;
}

/* 注册表单样式 */
.register-form {
    width: 100%;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: #2c8b4a;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-label .required {
    color: #ff4d4f;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: #2c8b4a;
    box-shadow: 0 0 0 3px rgba(44, 139, 74, 0.1);
}

.input-wrapper i {
    color: #999;
    margin-right: 10px;
    font-size: 16px;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: #999;
}

.input-wrapper textarea {
    resize: vertical;
    min-height: 60px;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: #2c8b4a;
    background: #f7f9fc;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload i {
    font-size: 32px;
    color: #2c8b4a;
    margin-bottom: 10px;
}

.file-upload p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.file-upload small {
    color: #999;
    font-size: 12px;
}

.file-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview img {
    max-width: 100%;
    max-height: max-content;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 图片预览容器样式 */
.image-preview-container {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    border-radius: 8px;
    /* 移除 overflow: hidden 以显示删除按钮 */
}

.image-preview-container img {
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.image-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #ff4d4f;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.2s;
}

.image-delete-btn:hover {
    background: #ff7875;
    transform: scale(1.1);
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 30px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 139, 74, 0.3);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #cccccc !important;
    color: #999999 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 步骤指示器 */
.steps-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.step {
    display: flex;
    align-items: center;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.step.active .step-number {
    background: #2c8b4a;
    color: white;
}

.step.completed .step-number {
    background: #2c8b4a;
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e8e8e8;
    margin: 0 5px;
}

.step.completed + .step .step-line {
    background: #2c8b4a;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #2c8b4a;
}

.toast.error {
    background: #ff4d4f;
}

.toast.warning {
    background: #faad14;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
}

.loading-spinner i {
    font-size: 40px;
    color: #2c8b4a;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #666;
    font-size: 16px;
    margin: 0;
}


/* 多步骤表单 */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* 表单操作按钮组 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-back {
    flex: 1;
    background: white;
    color: #666;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-back:hover {
    border-color: #2c8b4a;
    color: #2c8b4a;
}

.form-actions .btn-submit {
    flex: 2;
    margin-top: 0;
}

/* 表单提示 */
.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* 选择框样式 */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
}

/* 文本域样式 */
textarea {
    font-family: inherit;
    line-height: 1.5;
}
