/* 认证页面专用样式 */

/* 认证页面整体布局 */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: var(--font-family-base);
}

.auth-page {
    padding-top: 0;
    min-height: 100vh;
}

/* 左侧装饰区域 */
.auth-left {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,218.7C672,235,768,245,864,234.7C960,224,1056,192,1152,181.3C1248,171,1344,181,1392,186.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.auth-left-content {
    position: relative;
    z-index: 1;
}

.auth-logo h1 {
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-logo .lead {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
}

/* 功能特性 */
.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition-base);
}

.feature-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.feature-item h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 统计数据 */
.auth-stats h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.auth-stats p {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* 右侧登录注册区域 */
.auth-right {
    background-color: #fff;
    position: relative;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    opacity: 0.5;
}

.auth-form-container {
    position: relative;
    z-index: 1;
}

.auth-form-wrapper {
    background-color: #fff;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* 认证表单样式 */
.auth-form {
    animation: fadeInUp 0.8s ease-out;
}

.auth-form h2 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-form p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 标签页样式 */
.auth-form .nav-pills {
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.auth-form .nav-pills .nav-link {
    border-radius: var(--border-radius-sm);
    color: #6c757d;
    font-weight: 500;
    transition: var(--transition-base);
}

.auth-form .nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.auth-form .nav-pills .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.auth-form .nav-pills .nav-link.active:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

/* 表单控件样式 */
.auth-form .form-control,
.auth-form .form-select {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
    background-color: #fff;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fff;
}

.auth-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.auth-form .input-group .btn {
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: var(--transition-base);
}

.auth-form .input-group .btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

/* 复选框和链接 */
.auth-form .form-check {
    margin-bottom: 1rem;
}

.auth-form .form-check-input {
    border: 1px solid #dee2e6;
    transition: var(--transition-base);
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form .form-check-label {
    font-size: 0.9rem;
    color: #495057;
}

.auth-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.auth-form a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 按钮样式 */
.auth-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.auth-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-form .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

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

/* 第三方登录 */
.auth-form .divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.auth-form .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #dee2e6;
}

.auth-form .divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background-color: #fff;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.social-login .btn {
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #6c757d;
    padding: 0.75rem;
    transition: var(--transition-base);
    border-radius: var(--border-radius-md);
}

.social-login .btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-login .btn.fa-weixin:hover {
    background-color: #07c160;
    color: #fff;
    border-color: #07c160;
}

.social-login .btn.fa-qq:hover {
    background-color: #12b7f5;
    color: #fff;
    border-color: #12b7f5;
}

.social-login .btn.fa-weibo:hover {
    background-color: #e6162d;
    color: #fff;
    border-color: #e6162d;
}

/* 表单文本 */
.auth-form .form-text {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 错误状态 */
.auth-form .is-invalid {
    border-color: var(--danger-color);
}

.auth-form .is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.auth-form .invalid-feedback {
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 0.25rem;
}

/* 成功状态 */
.auth-form .is-valid {
    border-color: var(--success-color);
}

.auth-form .is-valid:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.auth-form .valid-feedback {
    font-size: 0.875rem;
    color: var(--success-color);
    margin-top: 0.25rem;
}

/* 加载状态 */
.auth-form .btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-form .btn.loading .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
    margin-right: 0.5rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.auth-form.shake {
    animation: shake 0.5s ease-in-out;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .auth-left {
        display: none !important;
    }

    .auth-right {
        min-height: 100vh;
    }

    .auth-form-wrapper {
        max-width: 100% !important;
        margin: 1rem;
        padding: 1.5rem;
    }

    .auth-body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .auth-right::before {
        opacity: 0.3;
    }
}

@media (max-width: 767.98px) {
    .auth-form-wrapper {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .auth-form .nav-pills .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .auth-form .form-control,
    .auth-form .form-select {
        font-size: 16px; /* 防止 iOS Safari 缩放 */
    }

    .social-login .btn {
        padding: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form {
        margin-bottom: 2rem;
    }

    .auth-form h2 {
        font-size: 1.25rem;
    }

    .auth-form p {
        font-size: 0.85rem;
    }

    .auth-form .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .auth-form .form-control,
    .auth-form .form-select {
        border-width: 2px;
    }

    .auth-form .btn-primary {
        border: 2px solid var(--primary-dark);
    }

    .auth-left {
        background: var(--primary-color);
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .auth-form {
        animation: none;
    }

    .auth-form .btn-primary::before {
        display: none;
    }

    .auth-form.shake {
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .auth-form-wrapper {
        background-color: #2d3748;
        color: #e2e8f0;
    }

    .auth-form h2 {
        color: #e2e8f0;
    }

    .auth-form .form-control,
    .auth-form .form-select {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .auth-form .form-control:focus,
    .auth-form .form-select:focus {
        background-color: #4a5568;
        border-color: var(--primary-color);
        color: #e2e8f0;
    }

    .auth-form .form-label {
        color: #e2e8f0;
    }

    .auth-form .nav-pills {
        background-color: #4a5568;
    }

    .auth-form .nav-pills .nav-link {
        color: #cbd5e0;
    }

    .social-login .btn {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #cbd5e0;
    }

    .social-login .btn:hover {
        background-color: #718096;
        border-color: #718096;
    }

    .auth-form .divider::before {
        background-color: #4a5568;
    }

    .auth-form .divider-text {
        background-color: #2d3748;
        color: #cbd5e0;
    }
}

/* 打印样式 */
@media print {
    .auth-body {
        background: #fff;
    }

    .auth-left {
        display: none !important;
    }

    .auth-right::before {
        display: none;
    }

    .auth-form-wrapper {
        box-shadow: none;
        background: #fff;
    }

    .auth-form .btn,
    .auth-form .nav-pills,
    .auth-form .social-login {
        display: none;
    }
}