/* 注册表单样式 */

/* 注册步骤 */
.register-step {
    display: none; /* 默认隐藏所有步骤 */
    padding: 0; /* 移除内边距，因为.auth-content已经有30px的padding */
}

.register-step:first-child {
    margin-top: 30px; /* 与登录表单的login-tabs边距保持一致 */
}

/* 确保注册表单的输入框宽度与登录表单一致 */
.register-step .form-group input {
    width: 100%;
    box-sizing: border-box;
}

.register-step.active {
    display: block; /* 激活当前步骤 */
}

/* 角色选择 */
.role-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.role-option {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    border: 2px solid #4a5568;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    position: relative;
    overflow: hidden;
}

.role-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.1), transparent);
    transition: left 0.6s ease;
}

.role-option:hover {
    border-color: #14b8a6;
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.3);
    transform: translateY(-5px);
}

.role-option:hover::before {
    left: 100%;
}

.role-option.active {
    border-color: #14b8a6;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.4);
    transform: translateY(-3px);
}

.role-option.active .role-icon {
    color: white;
    transform: scale(1.1);
}

.role-option.active .role-content h4 {
    color: white;
}

.role-option.active .role-content p {
    color: rgba(255, 255, 255, 0.9);
}

.role-option.active .role-check {
    color: white;
    opacity: 1;
}

.role-icon {
    font-size: 36px;
    color: #14b8a6;
    margin-right: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.role-content {
    flex: 1;
}

.role-content h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    transition: color 0.3s ease;
}

.role-content p {
    margin: 0;
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.role-check {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    color: #14b8a6;
    opacity: 0;
    transition: all 0.3s ease;
}

.role-specific-fields {
    margin-top: 20px;
}

/* 步骤头部 */
.step-header {
    text-align: center;
    margin-bottom: 20px;
}

.step-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #e2e8f0;
}

.step-header p {
    margin: 0;
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.4;
}

/* 待办事项通知 */
.todo-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #2d3748;
    border-radius: 8px;
    border: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 14px;
}

.todo-notice i {
    color: #14b8a6;
}

/* 姓名行 - 姓和名在同一行显示 */
.form-group.name-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.name-field-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.name-field-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e2e8f0;
    font-size: 14px;
}

.name-field-wrapper input {
    width: 100%;
    box-sizing: border-box;
}

/* 响应式：小屏幕时姓名字段垂直排列 */
@media (max-width: 768px) {
    .form-group.name-row {
        flex-direction: column;
        gap: 0;
    }
    
    .name-field-wrapper {
        margin-bottom: 15px;
    }
}

/* 年薪范围 */
.salary-range {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: flex-end;
}

.salary-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.salary-input-wrapper {
    position: relative;
    display: inline-block;
}

.salary-inputs input {
    width: 120px;
    padding: 12px 35px 12px 15px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #2d3748;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.3s ease;
    /* 优化数字输入框的上下选择按钮样式 */
    appearance: textfield;
    -moz-appearance: textfield;
}

/* 隐藏Chrome/Safari的数字输入框默认上下按钮 */
.salary-inputs input::-webkit-outer-spin-button,
.salary-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 自定义数字输入框的上下按钮样式 */
.salary-inputs input[type="number"]:hover {
    border-color: #14b8a6;
}

/* 自定义数字输入框的上下按钮容器 */
.salary-input-wrapper .number-controls {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    height: calc(100% - 4px);
    width: 30px;
    pointer-events: none;
}

.salary-input-wrapper .number-controls button {
    flex: 1;
    background: #4a5568;
    border: none;
    color: #a0aec0;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    line-height: 1;
}

.salary-input-wrapper .number-controls button:first-child {
    border-radius: 0 6px 0 0;
    border-bottom: 1px solid #2d3748;
}

.salary-input-wrapper .number-controls button:last-child {
    border-radius: 0 0 6px 0;
}

.salary-input-wrapper .number-controls button:hover {
    background: #14b8a6;
    color: white;
}

.salary-input-wrapper .number-controls button:active {
    background: #0d9488;
    transform: scale(0.95);
}

.salary-inputs input::placeholder {
    color: #718096;
}

.salary-inputs input:focus {
    outline: none;
    border-color: #14b8a6;
    background: #1a202c;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.salary-separator {
    font-size: 18px;
    color: #a0aec0;
    font-weight: 500;
    margin: 0 4px;
}

.salary-unit {
    font-size: 14px;
    color: #a0aec0;
    font-weight: 500;
    margin-left: 4px;
    align-self: center;
}

/* 薪资单位选择框样式优化 */
.salary-range .form-group:last-child {
    flex: 1;
}

.salary-range .form-group:last-child select {
    min-width: 160px;
    font-size: 14px;
}

/* 工作偏好 */
.work-preferences {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

/* 工作偏好选择框样式 */
.work-preferences .form-group {
    flex: 1;
}

.work-preferences .form-group select {
    width: 100%;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed #4a5568;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #2d3748;
    color: #a0aec0;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px; /* 确保有足够的点击区域 */
}

.file-upload:hover {
    border-color: #14b8a6;
    color: #14b8a6;
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none; /* 确保文本不会阻止点击事件 */
}

.file-upload-text i {
    font-size: 24px;
    color: #14b8a6;
}

.file-upload-text span {
    font-weight: 500;
}

/* 文件上传输入框隐藏 */
.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1; /* 确保在最上层 */
}

/* 文件上传文本样式 */
.file-upload-text small {
    display: block;
    margin-top: 0;
    color: #718096;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .role-selection {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 15px;
    }
    
    .role-option {
        padding: 15px;
    }
    
    .role-icon {
        font-size: 32px;
        margin-right: 12px;
    }
    
    .role-content h4 {
        font-size: 16px;
    }
    
    .role-content p {
        font-size: 12px;
    }
    
    .salary-range,
    .work-preferences {
        flex-direction: column;
        gap: 10px;
    }
    
    .salary-inputs {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .salary-input-wrapper {
        width: 100%;
    }
    
    .salary-inputs input {
        width: 100%;
    }
    
    .salary-separator {
        text-align: center;
        margin: 5px 0;
    }
    
    /* 响应式下拉框样式 */
    .country-code-select {
        min-width: 70px;
        font-size: 12px;
    }
    
    .salary-range .form-group:last-child select {
        min-width: 140px;
        font-size: 12px;
    }
    
    .work-preferences .form-group select {
        font-size: 14px;
    }
}

/* 多选复选框组样式 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-item label {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background-color: #2d3748;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    user-select: none;
    min-height: 38px;
}

.checkbox-item label:hover {
    border-color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.checkbox-item input[type="checkbox"]:checked + label {
    border-color: #14b8a6;
    background-color: #14b8a6;
    color: #fff;
    font-weight: 500;
}

.checkbox-item input[type="checkbox"]:focus + label {
    outline: 2px solid rgba(20, 184, 166, 0.25);
    outline-offset: 2px;
}

.checkbox-item label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 4px;
    margin-right: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + label::before {
    background-color: #fff;
    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='none' stroke='%2314b8a6' stroke-width='2' d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
    border-color: #fff;
}
