/* 登录注册页面样式 */

.auth-main {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    min-height: 600px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
}

/* 表单区域 */
.auth-form {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--background-white);
}

.auth-form.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 表单样式 */
.form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--background-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group input.error {
    border-color: #e74c3c;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.link:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* 分割线 */
.divider {
    text-align: center;
    margin: 32px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--background-white);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.social-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--background-light);
}

.wechat-btn {
    color: #07c160;
    border-color: #07c160;
}

.wechat-btn:hover {
    background-color: #07c160;
    color: white;
}

.alipay-btn {
    color: #1677ff;
    border-color: #1677ff;
}

.alipay-btn:hover {
    background-color: #1677ff;
    color: white;
}

/* 表单底部 */
.form-footer {
    text-align: center;
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.switch-form {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.switch-form:hover {
    text-decoration: underline;
}

/* 装饰区域 */
.auth-decoration {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.decoration-content {
    padding: 60px 50px;
    z-index: 2;
    position: relative;
}

.decoration-content h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.decoration-content > p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.decoration-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    font-weight: 500;
}

.feature-item svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.decoration-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    opacity: 0.1;
    z-index: 1;
}

.decoration-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    
    .auth-decoration {
        display: none;
    }
    
    .auth-form {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .auth-main {
        padding: 20px 0;
        min-height: calc(100vh - 60px);
    }
    
    .auth-container {
        padding: 0 16px;
    }
    
    .auth-wrapper {
        border-radius: 12px;
        min-height: auto;
    }
    
    .auth-form {
        padding: 30px 24px;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
    
    .form-header p {
        font-size: 14px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 24px 20px;
    }
    
    .form-header {
        margin-bottom: 32px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .btn-full {
        padding: 14px;
    }
    
    .divider {
        margin: 24px 0;
    }
    
    .social-login {
        margin-bottom: 24px;
    }
}

/* 表单验证动画 */
.form-group.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 成功状态 */
.form-group.success input {
    border-color: #27ae60;
}

.form-group.success .error-message {
    color: #27ae60;
}

/* 聚焦状态增强 */
.form-group input:focus {
    transform: translateY(-1px);
}

/* 按钮悬停效果增强 */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}