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

/* 认证容器 */
.auth-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

/* 认证卡片 */
.auth-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.auth-form {
    margin-bottom: 1.5rem;
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

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

.form-input::placeholder {
    color: #a0aec0;
}

/* 表单行（两列布局） */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* 表单提示信息 */
.form-hint {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.form-hint.success {
    color: #10b981;
}

.form-hint.error {
    color: #ef4444;
}

.form-hint.info {
    color: #3b82f6;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid #cbd5e0;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.forgot-link {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* 按钮 */
.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* 分隔线 */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.auth-divider span {
    padding: 0 1rem;
    color: #718096;
    font-size: 0.9rem;
}

/* 社交登录 */
.social-login {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .social-login {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background-color: #ffffff;
    border-color: #cbd5e0;
}

.social-icon {
    font-size: 1.2rem;
}

/* 认证页脚 */
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-link {
    color: #667eea;
    font-weight: 500;
}

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

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

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background-color: #e5e7eb;
    margin-bottom: 0.25rem;
    transition: width 0.3s, background-color 0.3s;
}

.strength-bar.strength-weak {
    background-color: #ef4444;
    width: 20%;
}

.strength-bar.strength-medium {
    background-color: #f59e0b;
    width: 60%;
}

.strength-bar.strength-strong {
    background-color: #10b981;
    width: 80%;
}

.strength-bar.strength-very-strong {
    background-color: #10b981;
    width: 100%;
}

.strength-text {
    font-size: 0.8rem;
    color: #6b7280;
}

/* 验证码样式 */
.captcha-container {
    margin-bottom: 1.25rem;
}

.captcha-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    height: 46px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
}

.btn-refresh {
    padding: 0 1rem;
    height: 46px;
    background-color: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.btn-refresh:hover {
    background-color: #e2e8f0;
}

/* 密码显示/隐藏按钮 */
.password-toggle {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 4px;
}

.toggle-password:hover {
    background-color: #f3f4f6;
}

/* 提示和通知样式 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* 认证好处 */
.auth-benefits {
    margin-top: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.benefit-item p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

/* 注册须知 */
.register-notice {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.register-notice h3 {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.notice-list {
    list-style: none;
    padding: 0;
}

.notice-list li {
    padding: 0.5rem 0;
    color: #4a5568;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.notice-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* 忘记密码帮助 */
.password-reset-help {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .auth-container {
        padding: 0 0.75rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .auth-card,
    .benefit-item,
    .register-notice {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .auth-title {
        color: #f7fafc;
    }
    
    .auth-subtitle {
        color: #e2e8f0;
    }
    
    .form-label {
        color: #e2e8f0;
    }
    
    .form-input {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-input::placeholder {
        color: #a0aec0;
    }
    
    .checkbox-label {
        color: #e2e8f0;
    }
    
    .forgot-link {
        color: #7c9bf5;
    }
    
    .btn-social {
        background-color: #4a5568;
        border-color: #718096;
    }
    
    .btn-social:hover {
        background-color: #2d3748;
    }
    
    .notice-list li {
        color: #e2e8f0;
    }
    
    .password-reset-help {
        background-color: #4a5568;
        border-color: #718096;
    }
    
    .alert-error {
        background-color: #7f1d1d;
        color: #fecaca;
        border-color: #991b1b;
    }
    
    .alert-success {
        background-color: #064e3b;
        color: #a7f3d0;
        border-color: #065f46;
    }
}