/* ==========================================
   青龙论坛 - 认证页面样式
   版本: 1.0.0
   更新日期: 2026-05-07
   ========================================== */

/* 认证页面基础样式 */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    min-height: 600px;
}

/* 认证卡片 */
.auth-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth-logo i {
    font-size: 2rem;
}

.auth-logo:hover {
    color: var(--primary-dark);
}

.auth-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 表单样式 */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-form .form-floating {
    position: relative;
}

.auth-form .form-floating > .form-control {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    height: 56px;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form .form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.auth-form .form-floating > label {
    padding: 1rem 0.75rem;
    color: var(--text-secondary);
}

.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    font-weight: 600;
}

/* 密码显示切换 */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    padding: 0.25rem;
    font-size: 1.125rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger-color);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 表单验证样式 */
.auth-form .was-validated .form-control:invalid,
.auth-form .form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: none;
}

.auth-form .was-validated .form-control:valid,
.auth-form .form-control.is-valid {
    border-color: var(--success-color);
    background-image: none;
}

.auth-form .invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

/* 复选框样式 */
.auth-form .form-check {
    padding-left: 1.75rem;
}

.auth-form .form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-left: -1.75rem;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form .form-check-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-form .form-check-label a {
    color: var(--primary-color);
    font-weight: 600;
}

/* 提交按钮 */
.auth-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.875rem;
    transition: var(--transition);
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

/* 按钮加载状态 */
.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 分隔线 */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    white-space: nowrap;
}

/* 社交登录 */
.social-login {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
    transform: translateY(-2px);
}

.social-btn i {
    font-size: 1.25rem;
}

/* 认证页脚 */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* 认证图片区域 */
.auth-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.auth-image-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
    max-width: 400px;
}

.auth-image-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-image-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1rem;
    opacity: 0.95;
}

.auth-feature i {
    font-size: 1.25rem;
    color: #ffd700;
    flex-shrink: 0;
}

/* 忘记密码页面 */
.forgot-password-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.forgot-password-form .form-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.forgot-password-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.forgot-password-form p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .auth-image {
        display: none;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .auth-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .social-btn span {
        display: inline;
    }
}

/* 成功提示 */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message .success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease;
}

.success-message h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 错误提示 */
.error-message {
    text-align: center;
    padding: 2rem;
}

.error-message .error-icon {
    width: 80px;
    height: 80px;
    background: var(--danger-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
