/* 认证页面样式 */
:root {
    --auth-bg: #0a0a0a;
    --auth-card-bg: #1a1a1a;
    --auth-border: rgba(255, 255, 255, 0.1);
    --auth-input-bg: rgba(255, 255, 255, 0.05);
    --auth-input-border: rgba(255, 255, 255, 0.15);
    --auth-text: #ffffff;
    --auth-text-secondary: #b0b0b0;
    --auth-primary: #4a90e2;
    --auth-primary-hover: #357abd;
    --auth-error: #e74c3c;
    --auth-success: #27ae60;
    --wechat-green: #07c160;
    --qq-blue: #12b7f5;
}

/* 主体布局 */
.auth-main {
    min-height: calc(100vh - 140px); /* 减去导航栏和页脚高度 */
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.auth-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(74, 144, 226, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* 头部 */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--auth-text);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--auth-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: var(--auth-text);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--auth-primary);
    width: 16px;
}

.form-input {
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-input-border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--auth-text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1),
                0 2px 8px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--auth-text-secondary);
}

/* 密码输入框 */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input .form-input {
    padding-right: 3rem;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 0.875rem;
    background: none;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.1);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--auth-input-border);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: var(--auth-input-bg);
}

.checkbox-label:hover .checkmark {
    border-color: var(--auth-primary);
}

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

.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(--auth-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* 主要按钮 */
.auth-btn-primary {
    background: var(--auth-primary);
    color: white;
    border: 2px solid var(--auth-primary);
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
    margin-top: 0.5rem;
}

.auth-btn-primary:hover {
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

/* 分割线 */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

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

.auth-divider span {
    background: var(--auth-card-bg);
    color: var(--auth-text-secondary);
    padding: 0 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: 8px;
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.wechat:hover {
    border-color: var(--wechat-green);
    color: var(--wechat-green);
}

.social-btn.qq:hover {
    border-color: var(--qq-blue);
    color: var(--qq-blue);
}

/* 页脚链接 */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    color: var(--auth-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* 错误消息 */
.error-message {
    color: var(--auth-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.error-message.show {
    display: flex;
}

.error-message i {
    font-size: 0.8rem;
}

.form-input.error {
    border-color: var(--auth-error);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* 导航栏激活状态 */
.nav-auth .auth-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-main {
        padding: 1rem;
        min-height: calc(100vh - 120px);
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.25rem;
    }
    
    .form-input {
        padding: 0.75rem;
    }
    
    .auth-btn-primary {
        padding: 0.75rem 1rem;
    }
}

/* 注册页面特有样式 */

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-strength.show {
    opacity: 1;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--auth-error);
}

.strength-fill.medium {
    width: 66%;
    background: #f39c12;
}

.strength-fill.strong {
    width: 100%;
    background: var(--auth-success);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--auth-text-secondary);
}

/* 表单字段间距调整 */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

/* 复选框组样式 */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group .checkbox-label {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--auth-text-secondary);
}

.checkbox-group .terms-link {
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-group .terms-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* 错误状态增强 */
.form-input.error {
    border-color: var(--auth-error);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.error-message {
    font-size: 0.75rem;
    color: var(--auth-error);
    margin-top: 0.25rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* 成功状态 */
.form-input.success {
    border-color: var(--auth-success);
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

/* 注册页面响应式调整 */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .checkbox-group .checkbox-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-form .form-group {
        margin-bottom: 1rem;
    }
    
    .checkbox-group {
        margin-bottom: 0.75rem;
    }
    
    .checkbox-group .checkbox-label {
        font-size: 0.75rem;
    }
}