/* ==================== 现代化表单样式 ==================== */

/* 表单页面容器 */
.form-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 表单卡片 */
.form-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 50px;
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.form-card-lg {
    max-width: 700px;
}

/* 表单头部 */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.form-header p {
    color: #999;
    font-size: 15px;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label .required {
    color: #e17055;
    margin-left: 3px;
}

/* 输入框样式 */
.form-control {
    width: 100%;
    height: 50px;
    padding: 12px 20px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #bbb;
}

/* 带图标的输入框 */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 50px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    transition: all 0.3s ease;
}

.input-icon-wrapper .form-control:focus + .input-icon,
.input-icon-wrapper .form-control:not(:placeholder-shown) + .input-icon {
    color: #667eea;
}

/* 下拉选择框 */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
    cursor: pointer;
}

/* 文本域 */
textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

/* 表单行 - 用于多列布局 */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 复选框和单选框 */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-check label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
    color: #666;
}

/* 文件上传 */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    color: #999;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-label i {
    font-size: 40px;
    margin-bottom: 10px;
}

.file-upload-label span {
    font-size: 14px;
}

/* 提交按钮 */
.form-submit {
    width: 100%;
    height: 55px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-submit:hover::after {
    width: 400px;
    height: 400px;
}

/* 表单链接 */
.form-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-links a:hover {
    color: #764ba2;
}

.form-links span {
    color: #ccc;
    margin: 0 10px;
}

/* 错误提示 */
.form-error {
    color: #e17055;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.has-error .form-control {
    border-color: #e17055;
    background: rgba(225, 112, 85, 0.05);
}

.has-error .form-control:focus {
    box-shadow: 0 0 0 4px rgba(225, 112, 85, 0.1);
}

/* 成功提示 */
.form-success {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid #00b894;
    border-radius: 12px;
    padding: 15px 20px;
    color: #00b894;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-success::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 20px;
}

/* 登录注册切换 */
.form-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.form-switch a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

/* 社交登录 */
.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-login p {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 1px;
    background: #eee;
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.wechat {
    background: #07c160;
}

.social-btn.qq {
    background: #12b7f5;
}

.social-btn.weibo {
    background: #e6162d;
}

/* 表单说明 */
.form-help {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #555;
    font-size: 14px;
}

.form-help h4 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 16px;
}

.form-help ul {
    margin: 0;
    padding-left: 20px;
}

.form-help li {
    margin-bottom: 5px;
}

/* 分步表单 */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #eee;
}

.form-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.form-step-number {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #999;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.form-step.active .form-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.form-step.completed .form-step-number {
    background: #00b894;
    border-color: transparent;
    color: #fff;
}

.form-step-label {
    font-size: 13px;
    color: #999;
}

.form-step.active .form-step-label {
    color: #667eea;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .form-card {
        padding: 30px 25px;
    }
    
    .form-header h1 {
        font-size: 24px;
    }
    
    .form-control {
        height: 45px;
    }
    
    .form-submit {
        height: 50px;
    }
}

/* 职位发布表单特殊样式 */
.job-form .form-group {
    margin-bottom: 30px;
}

.job-form .form-control[name="name"] {
    font-size: 18px;
    font-weight: 500;
}

.job-form textarea.form-control {
    min-height: 150px;
}

/* 薪资输入框并排 */
.salary-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
}

.salary-group .separator {
    color: #999;
    font-weight: 500;
}

/* 标签输入 */
.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    min-height: 50px;
}

.tag-input:focus-within {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.tag-input .tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-input .tag .remove {
    cursor: pointer;
    opacity: 0.8;
}

.tag-input .tag .remove:hover {
    opacity: 1;
}

.tag-input input {
    border: none;
    background: transparent;
    flex: 1;
    min-width: 100px;
    outline: none;
    font-size: 14px;
}
