/*
 * 🌸 萌神出品：认证页面专用样式 v5.0
 * 完全匹配 xundu 主题设计语言
 * 使用 Bootstrap 4 原生 .form-control + .input-group
 * 仅覆盖视觉，不改变布局逻辑
 */

/* ===== 背景 ===== */
.xd-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(-45deg, #fbc2eb, #a6c1ee, #e0f7fa, #ccb1ff);
    background-size: 400% 400%;
    animation: xdGradient 15s ease infinite;
    overflow-x: hidden;
    font-family: 'Inter', 'PingFang SC', system-ui, -apple-system, sans-serif;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.xd-auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
}

/* ===== 柔色光球 ===== */
.xd-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    animation: xdMove 25s infinite alternate;
}

.xd-blob-1 {
    width: 500px;
    height: 500px;
    background: #bfdbfe;
    top: -100px;
    left: -100px;
}

.xd-blob-2 {
    width: 450px;
    height: 450px;
    background: #ddd6fe;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.xd-blob-3 {
    width: 350px;
    height: 350px;
    background: #fbcfe8;
    top: 30%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes xdMove {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1) rotate(45deg);
    }
}

/* ===== 卡片 ===== */
.xd-auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    padding: 44px 40px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05), 0 10px 20px -5px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: xdCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.xd-auth-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 8px 20px -6px rgba(0, 0, 0, 0.04);
}

@keyframes xdCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== 标题 ===== */
.xd-auth-title {
    text-align: center;
    margin-bottom: 32px;
}

.xd-auth-title h4 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.xd-auth-title h4::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.xd-auth-title p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.8;
    opacity: 0.8;
}

/* ===== Tab 切换 ===== */
.xd-auth-tabs {
    display: flex;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
    padding: 0;
    list-style: none;
}

.xd-auth-tabs .nav-item {
    flex: 1;
}

.xd-auth-tabs .nav-link {
    display: block;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.xd-auth-tabs .nav-link:hover {
    color: #3b82f6;
}

.xd-auth-tabs .nav-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* ===== 表单控件覆盖（Bootstrap .form-control）===== */
.xd-auth-card .form-control {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 16px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: none;
}

.xd-auth-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.xd-auth-card .form-control::placeholder {
    color: #94a3b8;
}

/* input-group 适配 */
.xd-auth-card .input-group-prepend {
    width: 110px;
}

.xd-auth-card .input-group-prepend .form-control {
    border-radius: 12px 0 0 12px;
    border-right: none;
    font-size: 13px;
    background: #f8fafc;
}

.xd-auth-card .input-group>.form-control:not(:first-child) {
    border-radius: 0 12px 12px 0;
}

/* input-group-append 按钮 */
.xd-auth-card .input-group-append {
    height: 46px;
}

.xd-auth-card .input-group-append .btn {
    border-radius: 0 12px 12px 0;
    height: 46px;
    line-height: 30px;
    font-size: 13px;
    font-weight: 600;
    padding: 0 16px;
    white-space: nowrap;
}

.xd-auth-card .input-group-append .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: #fff;
}

.xd-auth-card .input-group-append .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* ===== 主按钮 ===== */
.xd-btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
    letter-spacing: 0.5px;
}

.xd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
}

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

/* ===== 链接 ===== */
.xd-link {
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.xd-link:hover {
    color: #2563eb;
}

/* ===== 底部 ===== */
.xd-auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #64748b;
}

.xd-auth-footer a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.xd-auth-footer a:hover {
    color: #2563eb;
}

/* ===== Label ===== */
.xd-auth-card label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    opacity: 0.9;
}

/* ===== Select ===== */
.xd-auth-card select.form-control {
    appearance: auto;
    -webkit-appearance: auto;
}

/* ===== 二次验证 Modal ===== */
.modal-content {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: rgba(59, 130, 246, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px 24px;
}

.modal-title {
    font-weight: 600;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 24px;
}

/* ===== 错误/成功提示（兼容 baiduyh error/ includes）===== */
.alert {
    border-radius: 14px;
    font-size: 14px;
    border: none;
    padding: 14px 20px;
}

/* ===== pointer 辅助类 ===== */
.pointer {
    cursor: pointer;
}

/* ===== 隐藏密码/验证码模式切换 ===== */
.allow_login_code_captcha {
    display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 540px) {
    .xd-auth-card {
        padding: 32px 24px;
        border-radius: 22px;
        margin: 8px;
    }

    .xd-auth-title h4 {
        font-size: 22px;
    }
}