/* ============================================
   客豆AI - 登录/注册页样式（深色星空科技风）
   与首页风格统一
   ============================================ */

/* ---------- 全局背景 ---------- */
.auth-page {
    min-height: 100vh;
    background: #050810;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;   /* 修复：垂直排列，避免 nav/flash/wrapper/footer 横排 */
    align-items: center;
}

/* 星空粒子背景 */
.auth-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent),
        radial-gradient(1px 1px at 200px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 250px 20px, #fff, transparent),
        radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 350px 50px, #fff, transparent),
        radial-gradient(2px 2px at 400px 10px, rgba(255,255,255,0.8), transparent);
    background-size: 450px 120px;
    animation: authTwinkle 4s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes authTwinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 背景渐变光晕 */
.auth-page::after {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ---------- 布局容器 ---------- */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    margin: auto 0;  /* 上下 auto，让 auth-wrapper 在垂直方向居中 */
}

/* ---------- Logo 区域 ---------- */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    font-size: 48px;
    display: inline-block;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.7)); }
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
    letter-spacing: 2px;
}

.auth-logo .logo-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* ---------- 卡片容器 ---------- */
.auth-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 60px -20px rgba(99, 102, 241, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 80px -15px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

/* ---------- 标题区域 ---------- */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ---------- 表单样式 ---------- */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 13px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input::placeholder {
    color: #475569;
}

.auth-form input:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12),
                0 0 20px -5px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 1);
}

.auth-form input:hover:not(:focus) {
    border-color: rgba(148, 163, 184, 0.3);
}

/* ---------- 记住我 + 忘记密码行 ---------- */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px !important;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0 !important;
    font-size: 13px;
    color: #94a3b8;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.forgot-link {
    font-size: 13px;
    color: #818cf8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forgot-link:hover {
    color: #a5b4fc;
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

/* ---------- 登录按钮 ---------- */
.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn-auth-submit:hover {
    background-position: 100% 0;
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.5),
                0 0 40px -10px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

/* 按钮光效扫过动画 */
.btn-auth-submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-auth-submit:hover::before {
    left: 100%;
}

/* ---------- 底部链接 ---------- */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.auth-footer p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.auth-footer a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-footer a:hover {
    color: #a5b4fc;
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

/* ---------- 分割线 ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.15), transparent);
}

.auth-divider span {
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
}

/* ---------- 消息提示覆盖 ---------- */
.flash-messages {
    position: relative;
    z-index: 10;
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 0 20px;
}

.flash-messages .alert {
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.flash-messages .alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.flash-messages .alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.flash-messages .alert-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

/* ---------- 导航栏（登录页简化版）---------- */
.auth-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 8, 16, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.auth-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-navbar .nav-brand .brand-icon {
    font-size: 26px;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.auth-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.auth-navbar .nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.auth-navbar .nav-links a:hover {
    color: #e2e8f0;
}

.auth-navbar .nav-btn-register {
    padding: 8px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    color: #a5b4fc;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-navbar .nav-btn-register:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
    box-shadow: 0 0 20px -5px rgba(99, 102, 241, 0.3);
}

/* ---------- 页脚 ---------- */
.auth-page-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    text-align: center;
    padding: 16px;
    color: #334155;
    font-size: 12px;
    z-index: 1;
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .auth-wrapper {
        padding: 16px;
    }
    
    .auth-navbar {
        padding: 12px 16px;
    }
    
    .auth-logo h1 {
        font-size: 24px;
    }
    
    .auth-header h2 {
        font-size: 20px;
    }
}
