/* ============================================
   伏尔加 · 认证页面样式（登录/注册/忘记密码/重置密码/OAuth关联）
   ============================================ */

/* ---------- 背景 ---------- */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.bg-orb.orb-1 {
    width: 480px;
    height: 480px;
    top: -120px;
    left: -120px;
    background: var(--accent, #6c72cb);
}

.bg-orb.orb-2 {
    width: 360px;
    height: 360px;
    bottom: -80px;
    right: -80px;
    background: var(--success, #10b981);
}

.bg-orb.orb-3 {
    width: 260px;
    height: 260px;
    top: 50%;
    left: 60%;
    background: var(--warning, #f59e0b);
}

/* ---------- 容器与卡片 ---------- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    background: var(--card-bg, #151827);
    border: 1px solid var(--border, #2a2f45);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,0.35));
    padding: 32px 28px;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.4), transparent);
    opacity: 0.8;
}

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

.auth-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 8px;
}

.auth-header h1 {
    font-family: var(--font-mono, monospace);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent, #6c72cb);
    margin: 0 0 4px;
}

.auth-header p {
    font-size: 0.82rem;
    color: var(--text-secondary, #9aa1b5);
    margin: 0;
}

/* ---------- 状态栏 ---------- */
.auth-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.68rem;
    color: var(--text-muted, #6b7290);
    padding: 8px 0;
    margin-bottom: 16px;
    border-top: 1px solid var(--border, #2a2f45);
    border-bottom: 1px solid var(--border, #2a2f45);
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success, #22c55e);
    box-shadow: 0 0 6px var(--success, #22c55e);
    animation: auth-pulse 2s ease-in-out infinite;
}

@keyframes auth-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ---------- 提示条 ---------- */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    padding: 10px 14px;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 14px;
}

.auth-alert-error {
    background: color-mix(in srgb, var(--danger, #ef4444) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 30%, transparent);
    color: var(--danger, #ef4444);
}

.auth-alert-success {
    background: color-mix(in srgb, var(--success, #22c55e) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--success, #22c55e) 30%, transparent);
    color: var(--success, #22c55e);
}

/* ---------- 表单 ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #9aa1b5);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 0.95rem;
    color: var(--text-muted, #6b7290);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 40px;
    background: var(--input-bg, #0f1220);
    border: 1px solid var(--border, #2a2f45);
    border-radius: var(--radius-sm, 8px);
    color: var(--text, #e8eaf2);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    border-color: var(--accent, #6c72cb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #6c72cb) 20%, transparent);
}

.input-wrapper input::placeholder {
    color: var(--text-muted, #6b7290);
}

.password-toggle {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px;
    color: var(--text-muted, #6b7290);
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--text, #e8eaf2);
    background: var(--accent-soft, rgba(108,114,203,0.12));
}

/* ---------- 验证码 ---------- */
.auth-login-captcha {
    display: none;
}

.auth-login-captcha.visible {
    display: block;
}

.auth-captcha {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-captcha input {
    flex: 1;
}

.auth-captcha-img {
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border, #2a2f45);
    cursor: pointer;
    height: 50px;
}

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

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary, #9aa1b5);
    cursor: pointer;
}

.checkbox-wrapper input {
    accent-color: var(--accent, #6c72cb);
}

.forgot-link {
    color: var(--accent, #6c72cb);
    text-decoration: none;
}

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

/* ---------- 提交按钮 ---------- */
.btn-submit {
    position: relative;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent, #6c72cb), var(--accent-to, #4f46e5));
    border: none;
    border-radius: var(--radius-sm, 8px);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-submit:hover {
    opacity: 0.92;
}

.btn-submit:active {
    transform: translateY(1px);
}

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

.btn-submit .btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

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

/* ---------- 分隔线与 OAuth ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted, #6b7290);
    font-size: 0.72rem;
    margin: 18px 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border, #2a2f45);
}

.auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--input-bg, #0f1220);
    border: 1px solid var(--border, #2a2f45);
    border-radius: var(--radius-sm, 8px);
    color: var(--text, #e8eaf2);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.btn-oauth:hover {
    border-color: var(--accent, #6c72cb);
    background: var(--accent-soft, rgba(108,114,203,0.12));
}

/* ---------- 页脚 ---------- */
.auth-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7290);
    margin-top: 18px;
}

.auth-footer a {
    color: var(--accent, #6c72cb);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ---------- OAuth 关联页 ---------- */
.oauth-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--input-bg, #0f1220);
    border: 1px solid var(--border, #2a2f45);
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 10px;
}

.oauth-item .oauth-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text, #e8eaf2);
}

.btn-unlink {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 40%, transparent);
    background: transparent;
    color: var(--danger, #ef4444);
    font-size: 0.76rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-unlink:hover {
    background: color-mix(in srgb, var(--danger, #ef4444) 12%, transparent);
}

.btn-link {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--accent, #6c72cb);
    background: var(--accent, #6c72cb);
    color: #fff;
    font-size: 0.76rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-link:hover {
    opacity: 0.88;
}

/* ---------- 密码强度（注册页） ---------- */
.auth-pw-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.auth-pw-bar span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border, #2a2f45);
    transition: background 0.3s;
}

.auth-pw-bar span.strong {
    background: var(--success, #22c55e);
}

.auth-pw-bar span.mid {
    background: var(--warning, #f59e0b);
}

.auth-pw-strength {
    font-size: 0.7rem;
    color: var(--text-muted, #6b7290);
    margin-top: 4px;
}

/* ---------- 返回链接 ---------- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted, #6b7290);
    font-size: 0.78rem;
    text-decoration: none;
    margin-bottom: 16px;
}

.back-link:hover {
    color: var(--accent, #6c72cb);
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px 18px;
    }

    .auth-container {
        padding: 16px 10px;
    }
}
