/* ==================== 认证页面样式 ==================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    background: #0a0e1a;
}

/* ==================== 渐变背景 ==================== */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

/* 主光晕 */
.auth-bg .gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    pointer-events: none;
}

.auth-bg .orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), rgba(99, 102, 241, 0.2), transparent 70%);
    top: -350px;
    left: -200px;
    animation: orb-float 25s ease-in-out infinite;
}

.auth-bg .orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.15), transparent 70%);
    bottom: -200px;
    right: -150px;
    animation: orb-float 20s ease-in-out infinite reverse;
}

.auth-bg .orb-3 {
    display: block;
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.1), transparent 70%);
    top: 40%;
    left: 60%;
    filter: blur(120px);
    opacity: 0.4;
    animation: orb-float 30s ease-in-out infinite;
    animation-delay: -10s;
}

/* 网格线 */
.auth-bg .grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* 顶部光晕条 */
.auth-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.5), rgba(139, 92, 246, 0.5), transparent);
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ==================== 语言选择器 ==================== */
.auth-lang-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.auth-lang-selector .lang-btn {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 8px 16px;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-lang-selector .lang-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(14, 165, 233, 0.3);
}

/* ==================== 认证容器 ==================== */
.auth-container {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    animation: auth-enter 0.6s ease-out;
}

@keyframes auth-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 认证卡片 ==================== */
.auth-box {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(148, 163, 184, 0.05) inset,
        0 0 80px rgba(14, 165, 233, 0.05);
    position: relative;
    overflow: hidden;
}

/* 卡片顶部光晕 */
.auth-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.4), rgba(139, 92, 246, 0.4), transparent);
    border-radius: 50%;
}

.auth-box.wide {
    max-width: 520px;
}

/* ==================== 认证头部 ==================== */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.auth-header .logo i {
    font-size: 28px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.4));
}

.auth-header .logo span {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-header p,
.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ==================== 表单 ==================== */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i:first-child {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 15px;
    z-index: 1;
    transition: color 0.3s;
}

.input-group:focus-within i:first-child {
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.25s ease;
    caret-color: var(--primary-color);
}

.input-group input:hover {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.7);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.1),
        0 0 20px rgba(14, 165, 233, 0.05);
    background: rgba(15, 23, 42, 0.8);
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.5);
    font-size: 13px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
    transition: all 0.25s;
    z-index: 1;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

/* ==================== 密码强度 ==================== */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--error-color);
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-bar.weak::after { width: 33%; background: var(--error-color); }
.strength-bar.fair::after { width: 50%; background: var(--warning-color); }
.strength-bar.good::after { width: 66%; background: #f59e0b; }
.strength-bar.strong::after { width: 83%; background: var(--success-color); }
.strength-bar.very-strong::after { width: 100%; background: #10b981; }

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==================== 表单选项 ==================== */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
}

.checkbox-label.terms-label {
    flex-wrap: wrap;
    line-height: 1.5;
    font-size: 13px;
}

.checkbox-label.terms-label a {
    color: var(--primary-light);
    text-decoration: none;
}

.checkbox-label.terms-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s;
}

.forgot-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==================== 提交按钮 ==================== */
.auth-form .btn-primary {
    font-size: 15px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-form .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-form .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

.auth-form .btn-primary:hover::before {
    opacity: 1;
}

.auth-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.auth-form .btn-primary span,
.auth-form .btn-primary i {
    position: relative;
    z-index: 1;
}

.auth-form .btn-primary i {
    transition: transform 0.3s;
    font-size: 14px;
}

.auth-form .btn-primary:hover i {
    transform: translateX(4px);
}

/* ==================== 分隔线 ==================== */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 22px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.2), transparent);
}

.auth-divider span {
    position: relative;
    background: rgba(15, 23, 42, 0.75);
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 社交登录 ==================== */
.social-login {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.social-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
}

.social-btn i {
    font-size: 20px;
}

.social-btn.wechat:hover {
    border-color: #07C160;
    color: #07C160;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.15);
}

/* ==================== 认证底部 ==================== */
.auth-footer {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    font-size: 13px;
}

.auth-footer p {
    display: inline;
}

.auth-link {
    color: var(--primary-light);
    font-weight: 600;
    margin-left: 4px;
    transition: all 0.25s;
}

.auth-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==================== 装饰元素 ==================== */
.auth-decoration {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 50%;
    animation: auth-ring-pulse 4s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.05), inset 0 0 40px rgba(14, 165, 233, 0.03);
}

.tech-ring.ring-2 {
    width: 400px;
    height: 400px;
    border-color: rgba(99, 102, 241, 0.15);
    animation-delay: 1s;
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.05), inset 0 0 60px rgba(99, 102, 241, 0.03);
}

.tech-ring::before,
.tech-ring::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(14, 165, 233, 0.08);
    border-radius: 50%;
}

.tech-ring::before { inset: 30px; }
.tech-ring::after { inset: 60px; }

.floating-icons {
    position: relative;
    z-index: 1;
}

.floating-icons i {
    position: absolute;
    font-size: 32px;
    color: var(--primary-light);
    opacity: 0.5;
}

.floating-icons i:nth-child(1) {
    top: -100px;
    left: -80px;
    animation: auth-float 6s ease-in-out infinite;
}

.floating-icons i:nth-child(2) {
    top: 80px;
    right: -100px;
    animation: auth-float 8s ease-in-out infinite reverse;
}

.floating-icons i:nth-child(3) {
    bottom: -80px;
    left: 0;
    animation: auth-float 7s ease-in-out infinite 1s;
}

@keyframes auth-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.06); opacity: 1; }
}

@keyframes auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ==================== 错误/成功消息 ==================== */
.auth-error-message,
.auth-success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    animation: auth-slide-down 0.3s ease;
}

.auth-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.auth-success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.auth-error-message i,
.auth-success-message i {
    font-size: 16px;
    flex-shrink: 0;
}

.error-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 2px;
    transition: opacity 0.2s;
}

.error-close:hover { opacity: 1; }

@keyframes auth-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 忘记密码页面 ==================== */
.reset-instruction {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.back-to-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.25s;
}

.back-to-login:hover {
    color: var(--primary-light);
}

.back-to-login i {
    transition: transform 0.3s;
}

.back-to-login:hover i {
    transform: translateX(-4px);
}

/* 成功消息 */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message i {
    font-size: 64px;
    color: var(--success-color);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
}

.success-message h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==================== 登录方式切换标签 ==================== */
.login-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 12px;
    padding: 4px;
    margin: 0 0 22px;
    gap: 4px;
}

.login-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.login-tab.active {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.login-tab i {
    font-size: 14px;
}

/* ==================== 二维码登录样式 ==================== */
.qr-login-section {
    text-align: center;
}

.qr-container {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.qr-code-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 14px;
}

.qr-loading i {
    font-size: 24px;
    color: var(--primary-color);
}

.qr-code-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-display canvas,
.qr-code-display img {
    max-width: 100%;
    max-height: 100%;
}

.qr-placeholder-pattern {
    width: 160px;
    height: 160px;
    background:
        repeating-linear-gradient(
            0deg,
            var(--bg-tertiary) 0px,
            var(--bg-tertiary) 8px,
            white 8px,
            white 9px
        ),
        repeating-linear-gradient(
            90deg,
            var(--bg-tertiary) 0px,
            var(--bg-tertiary) 8px,
            white 8px,
            white 9px
        );
    background-size: 9px 9px;
    background-position: 0 0, 4px 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder-pattern i {
    font-size: 3rem;
    color: var(--primary-color);
}

.qr-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: auth-pulse-dot 1.5s ease-in-out infinite;
}

.qr-status.scanned .status-dot {
    background: var(--warning-color);
    animation: none;
}

.qr-status.confirmed .status-dot {
    background: var(--success-color);
    animation: none;
}

.qr-status.expired .status-dot {
    background: var(--error-color);
    animation: none;
}

@keyframes auth-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.status-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.qr-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.qr-login-section .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qr-login-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ==================== 全局消息 ==================== */
.auth-global-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: auth-slideIn 0.35s ease;
    font-size: 14px;
    color: var(--text-primary);
}

.auth-global-message.success {
    border-left: 3px solid #10b981;
}

.auth-global-message.success i {
    color: #10b981;
}

.auth-global-message.error {
    border-left: 3px solid #ef4444;
}

.auth-global-message.error i {
    color: #ef4444;
}

.auth-global-message.fade-out {
    animation: auth-slideOut 0.35s ease forwards;
}

@keyframes auth-slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes auth-slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .auth-container {
        gap: 40px;
    }

    .auth-decoration {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .auth-box {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .auth-box.wide {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-login {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .auth-global-message {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 13px;
    }

    .auth-header h1 {
        font-size: 22px;
    }
}
