/**
 * 认证页面统一样式
 * 包含登录、注册、找回密码等页面的统一样式
 * 使用系统主题配色，支持亮色/暗色主题切换
 */

/* ===== 认证页面基础样式 ===== */
.auth-page {
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-sans-serif);
    color: var(--text-primary);
    transition: all 0.3s ease;
    padding: 20px 0;
}

/* ===== 认证容器样式 ===== */
.auth-container {
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.auth-container:hover {
    box-shadow: var(--shadow-hover);
}

/* ===== 认证头部样式 ===== */
.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px;
    text-align: center;
    position: relative;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.auth-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.auth-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.auth-header i {
    margin-right: 8px;
    font-size: 20px;
}

/* ===== 认证主体样式 ===== */
.auth-body {
    padding: 32px;
    background: var(--surface-color);
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-label i {
    margin-right: 8px;
    color: #667eea;
    width: 16px;
    text-align: center;
}

/* 表单控件样式已迁移到main.css统一管理 */
/* 认证页面特殊的表单控件样式（如需要） */
.auth-form .form-control {
    /* 认证页面继承main.css中的统一样式 */
    /* 这里可以添加认证页面特有的样式覆盖 */
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-invalid {
    border-color: var(--error-color);
}

/* ===== 按钮样式 ===== */
.btn-auth {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.btn-auth:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
    color: white;
}

.btn-auth:disabled {
    background: var(--text-disabled);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auth-secondary {
    background: var(--button-secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-auth-secondary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-outline-primary {
    border: 1px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

/* ===== 复选框样式 ===== */
.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    color: var(--text-primary);
    font-size: 14px;
}

/* ===== 链接样式 ===== */
.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-links p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

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

.auth-links a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* ===== 加载状态样式 ===== */
.loading {
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.strength-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    overflow: hidden;
    margin-bottom: 4px;
}

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

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

.strength-medium { 
    background: var(--warning-color); 
    width: 66%;
}

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

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 验证反馈样式 ===== */
.valid-feedback {
    color: var(--success-color);
    font-size: 12px;
    margin-top: 4px;
}

.invalid-feedback {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
}

/* ===== 输入组样式 ===== */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 14px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
        margin: 10px;
        border-radius: 8px;
    }
    
    .auth-header {
        padding: 24px 20px;
    }
    
    .auth-header h2 {
        font-size: 20px;
    }
    
    .auth-body {
        padding: 24px 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 10px 0;
    }
    
    .auth-container {
        margin: 5px;
    }
    
    .auth-header {
        padding: 20px 16px;
    }
    
    .auth-body {
        padding: 20px 16px;
    }
}

/* ===== 无障碍支持 ===== */
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-auth:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== 昵称生成器样式 ===== */
.nickname-generator-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nickname-generator h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.nickname-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.nickname-item {
    padding: 0.75rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.nickname-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.nickname-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.3);
}

.nickname-text {
    color: inherit;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.quality-bar {
    width: 100%;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.quality-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error-color) 0%, var(--warning-color) 50%, var(--success-color) 100%);
    transition: width 0.3s ease;
}

.nickname-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* ===== 头像选择样式 ===== */
.avatar-selection {
    text-align: center;
}

.avatar-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.current-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.current-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
}

/* ===== 头像选择弹窗样式 ===== */
.avatar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.avatar-modal.show {
    opacity: 1;
    visibility: visible;
}

.avatar-modal-content {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.avatar-modal.show .avatar-modal-content {
    transform: scale(1);
}

.avatar-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.avatar-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.avatar-modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    justify-items: center;
    min-height: 320px; /* 固定高度防止抖动，4行需要更高 */
}

.avatar-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
}

.avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.avatar-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.3);
    transform: scale(1.05);
}

.avatar-option img,
.avatar-option svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.avatar-refresh-btn {
    background: var(--button-secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.avatar-refresh-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.avatar-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.avatar-confirm-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.avatar-confirm-btn:hover {
    background: var(--primary-hover);
}

.avatar-confirm-btn:disabled {
    background: var(--text-disabled);
    cursor: not-allowed;
}

/* ===== OAuth登录样式 ===== */
.oauth-section {
    margin-top: 24px;
    padding-top: 24px;
}

.divider {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

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

.divider span {
    background: var(--surface-color);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.oauth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* OAuth按钮基础样式 */
.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

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

.btn-oauth i {
    font-size: 16px;
}

/* LINUX DO样式 - 现代化多彩渐变设计 */
.btn-linux_do {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3), 0 1px 2px rgba(118, 75, 162, 0.3);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    animation: linuxdoGradient 10s ease infinite;
}

@keyframes linuxdoGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.btn-linux_do:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 25%, #ec4899 50%, #ef4444 75%, #3b82f6 100%);
    background-size: 400% 400%;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4), 0 1px 4px rgba(118, 75, 162, 0.4);
    transform: translateY(-1px);
    animation: linuxdoGradientHover 8s ease infinite;
}

@keyframes linuxdoGradientHover {
    0% { background-position: 0% 50%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.btn-linux_do:active {
    background: linear-gradient(135deg, #4c51bf 0%, #553c9a 25%, #db2777 50%, #dc2626 75%, #2563eb 100%);
    color: white;
    box-shadow: 0 1px 2px rgba(102, 126, 234, 0.3);
    transform: translateY(0);
}

.btn-linux_do i {
    color: white;
    margin-right: 8px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* LINUX DO按钮添加闪烁光泽效果 */
.btn-linux_do::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s;
}

.btn-linux_do:hover::before {
    left: 100%;
}

/* 暗色主题下的LINUX DO按钮样式 */
[data-theme="dark"] .btn-linux_do {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 25%, #d946ef 50%, #f59e0b 75%, #06b6d4 100%);
    background-size: 400% 400%;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.4), 0 1px 2px rgba(139, 92, 246, 0.4);
    animation: linuxdoGradientDark 12s ease infinite;
}

@keyframes linuxdoGradientDark {
    0% { background-position: 0% 50%; }
    20% { background-position: 100% 0%; }
    40% { background-position: 100% 100%; }
    60% { background-position: 0% 100%; }
    80% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

[data-theme="dark"] .btn-linux_do:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 25%, #c026d3 50%, #ea580c 75%, #0891b2 100%);
    background-size: 400% 400%;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.5), 0 1px 4px rgba(139, 92, 246, 0.5);
    animation: linuxdoGradientDarkHover 10s ease infinite;
}

@keyframes linuxdoGradientDarkHover {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 75%; }
    100% { background-position: 0% 50%; }
}

/* GitHub样式 - 现代化深色渐变设计 */
.btn-github {
    background: linear-gradient(135deg, #24292e 0%, #1a1e22 25%, #0d1117 50%, #161b22 75%, #21262d 100%);
    background-size: 400% 400%;
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(36, 41, 46, 0.3), 0 1px 2px rgba(13, 17, 23, 0.3);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    animation: githubGradient 15s ease infinite;
}

@keyframes githubGradient {
    0% { background-position: 0% 50%; }
    20% { background-position: 100% 0%; }
    40% { background-position: 100% 100%; }
    60% { background-position: 0% 100%; }
    80% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-github:hover {
    background: linear-gradient(135deg, #1a1e22 0%, #0d1117 25%, #010409 50%, #0c1015 75%, #161b22 100%);
    background-size: 400% 400%;
    color: white;
    box-shadow: 0 2px 8px rgba(36, 41, 46, 0.4), 0 1px 4px rgba(13, 17, 23, 0.4);
    transform: translateY(-1px);
    animation: githubGradientHover 12s ease infinite;
}

@keyframes githubGradientHover {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 0% 100%; }
    75% { background-position: 100% 75%; }
    100% { background-position: 0% 50%; }
}

.btn-github:active {
    background: linear-gradient(135deg, #0f1114 0%, #010409 25%, #000000 50%, #0c1015 75%, #1a1e22 100%);
    color: white;
    box-shadow: 0 1px 2px rgba(36, 41, 46, 0.3);
    transform: translateY(0);
}

.btn-github i {
    color: white;
    margin-right: 8px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* GitHub按钮添加银色光泽效果 */
.btn-github::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), rgba(200, 200, 200, 0.1), transparent);
    transition: left 0.7s;
}

.btn-github:hover::before {
    left: 100%;
}

/* 暗色主题下的GitHub按钮样式 */
[data-theme="dark"] .btn-github {
    background: linear-gradient(135deg, #30363d 0%, #21262d 25%, #161b22 50%, #0d1117 75%, #24292e 100%);
    background-size: 400% 400%;
    box-shadow: 0 1px 3px rgba(48, 54, 61, 0.4), 0 1px 2px rgba(33, 38, 45, 0.4);
    animation: githubGradientDark 18s ease infinite;
}

@keyframes githubGradientDark {
    0% { background-position: 0% 50%; }
    16% { background-position: 100% 0%; }
    33% { background-position: 50% 100%; }
    50% { background-position: 0% 75%; }
    66% { background-position: 100% 50%; }
    83% { background-position: 25% 0%; }
    100% { background-position: 0% 50%; }
}

[data-theme="dark"] .btn-github:hover {
    background: linear-gradient(135deg, #21262d 0%, #161b22 25%, #0d1117 50%, #010409 75%, #1a1e22 100%);
    background-size: 400% 400%;
    box-shadow: 0 2px 8px rgba(48, 54, 61, 0.5), 0 1px 4px rgba(33, 38, 45, 0.5);
    animation: githubGradientDarkHover 14s ease infinite;
}

@keyframes githubGradientDarkHover {
    0% { background-position: 0% 50%; }
    30% { background-position: 100% 30%; }
    60% { background-position: 30% 100%; }
    100% { background-position: 0% 50%; }
}

/* Google样式 - 现代化设计，采用浅蓝色背景 */
.btn-google {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 25%, #fbbc05 50%, #ea4335 75%, #4285f4 100%);
    background-size: 400% 400%;
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.3), 0 1px 2px rgba(66, 133, 244, 0.15);
    font-family: 'Google Sans', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.25px;
    position: relative;
    overflow: hidden;
    animation: googleGradient 8s ease infinite;
}

@keyframes googleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-google:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2d7d32 25%, #f9ab00 50%, #d23f31 75%, #3367d6 100%);
    background-size: 400% 400%;
    color: white;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4), 0 1px 4px rgba(66, 133, 244, 0.3);
    transform: translateY(-1px);
    animation: googleGradientHover 6s ease infinite;
}

@keyframes googleGradientHover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-google:active {
    background: linear-gradient(135deg, #2c5aa0 0%, #1b5e20 25%, #e65100 50%, #b71c1c 75%, #2c5aa0 100%);
    color: white;
    box-shadow: 0 1px 2px rgba(66, 133, 244, 0.3);
    transform: translateY(0);
}

.btn-google i {
    color: white;
    margin-right: 8px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Google图标保持白色，与渐变背景形成对比 */
.btn-google i.fab.fa-google {
    color: white !important;
    font-weight: 700;
}

/* 暗色主题下的Google按钮样式 - 保持渐变但调整颜色 */
[data-theme="dark"] .btn-google {
    background: linear-gradient(135deg, #5a8def 0%, #4caf50 25%, #ffc107 50%, #f44336 75%, #5a8def 100%);
    background-size: 400% 400%;
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(90, 141, 239, 0.4), 0 1px 2px rgba(90, 141, 239, 0.2);
    animation: googleGradientDark 8s ease infinite;
}

@keyframes googleGradientDark {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

[data-theme="dark"] .btn-google:hover {
    background: linear-gradient(135deg, #4777d9 0%, #388e3c 25%, #ff9800 50%, #d32f2f 75%, #4777d9 100%);
    background-size: 400% 400%;
    box-shadow: 0 2px 8px rgba(90, 141, 239, 0.5), 0 1px 4px rgba(90, 141, 239, 0.3);
    animation: googleGradientDarkHover 6s ease infinite;
}

@keyframes googleGradientDarkHover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

[data-theme="dark"] .btn-google:active {
    background: linear-gradient(135deg, #3d5afe 0%, #2e7d32 25%, #f57c00 50%, #c62828 75%, #3d5afe 100%);
}

[data-theme="dark"] .btn-google i {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-google i.fab.fa-google {
    color: white !important;
}

/* 通用OAuth按钮样式 */
.btn-oauth.btn-default {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-oauth.btn-default:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* OAuth欢迎提示样式 */
.oauth-welcome {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 移动端OAuth样式优化 */
@media (max-width: 768px) {
    .oauth-section {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .btn-oauth {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .btn-oauth i {
        font-size: 18px;
    }
    
    .divider span {
        font-size: 13px;
        padding: 0 12px;
    }
}

/* 小屏幕设备 */
@media (max-width: 480px) {
    .oauth-providers {
        gap: 10px;
    }
    
    .btn-oauth {
        padding: 12px 16px;
    }
}

/* 加载状态样式 */
.btn-oauth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-oauth.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* OAuth按钮布局优化 */
.oauth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.oauth-providers .btn-oauth {
    width: 100%;
    min-height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* OAuth按钮文字优化 */
.btn-oauth {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.25px;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

/* 提升可访问性 */
.btn-oauth:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.btn-oauth:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* ===== 高对比度模式支持 ===== */
@media (prefers-contrast: high) {
    .auth-container {
        border-width: 2px;
    }

    .form-control {
        border-width: 2px;
    }

    .btn-auth {
        border: 2px solid var(--primary-color);
    }
    
    .btn-oauth {
        border-width: 2px;
        font-weight: 600;
    }
    
    .btn-google {
        border-color: #1a73e8;
        color: #1a73e8;
    }
    
    .btn-github {
        border-color: #f0f6fc;
    }
    
    .btn-linux_do {
        border-color: rgba(255, 255, 255, 0.8);
    }
}
