/* 认证页面样式 - 修复版本 */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    display: none;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

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

.auth-form.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-subtitle {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #333;
}

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

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

.form-group input.success {
    border-color: #2ecc71;
    background: #f0fff4;
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    line-height: 1.4;
}

/* 密码包装器 */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    font-size: 16px;
}

.toggle-password:hover {
    color: #667eea;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.captcha-input-wrapper {
    flex: 1;
}

.captcha-image-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.captchaCanvas {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
}

.refresh-captcha {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.refresh-captcha:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 15px;
}

.strength-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.strength-progress {
    height: 100%;
    width: 0%;
    background: #e74c3c;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.strength-label {
    flex: 1;
    text-align: center;
}

/* 密码要求列表 */
.password-requirements {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
}

.requirements-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #666;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item i {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: #e74c3c;
}

.requirement-item.valid i {
    color: #2ecc71;
}

.requirement-item.valid span {
    color: #2ecc71;
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    cursor: pointer;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* 按钮样式 */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* 切换链接 */
.auth-switch-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-switch-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-switch-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.link-divider {
    color: #ccc;
    margin: 0 15px;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .auth-form {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-image-wrapper {
        justify-content: center;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 25px 15px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .auth-switch-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .link-divider {
        display: none;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* 注册成功跳转样式 */
.register-success {
    text-align: center;
    padding: 40px 20px;
}

.register-success i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.register-success h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.register-success p {
    color: var(--gray-color);
    margin-bottom: 25px;
    line-height: 1.6;
}

.register-success .success-countdown {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-top: 15px;
    font-weight: 600;
}