* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f0f4fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    max-width: 860px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-row {
    display: flex;
    flex-wrap: wrap;
}

/* ===== 左侧：微信区域 ===== */
.auth-wechat-col {
    flex: 1;
    background: #f5f8fe;
    padding: 2.8rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 180px;
}
.auth-wechat-col .wechat-main-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0b1a33;
    margin-bottom: 0.2rem;
}
.auth-wechat-col .wechat-main-sub {
    font-size: 0.8rem;
    color: #6c7a8a;
    margin-bottom: 1.6rem;
}

.wechat-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.4rem;
}
.wechat-user .avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #e9edf4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6c7a8a;
    margin-bottom: 0.4rem;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236c7a8a"><path d="M12 12c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm0 2c-3.33 0-10 1.67-10 5v2h20v-2c0-3.33-6.67-5-10-5z"/></svg>');
    background-size: 55%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e9edf4;
    overflow: hidden;
}
.wechat-user .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wechat-user .nickname {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
}
.wechat-user .nickname-sub {
    font-size: 0.75rem;
    color: #6c7a8a;
}

.wechat-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    max-width: 200px;
}
.wechat-btn-group .wechat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 60px;
    border: 1px solid #07c160;
    background: #ffffff;
    font-weight: 500;
    color: #1e293b;
    transition: 0.2s;
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
}
.wechat-btn-group .wechat-btn i {
    font-size: 1.4rem;
    color: #07c160;
}
.wechat-btn-group .wechat-btn:hover {
    background: #f0faf4;
    border-color: #06ad56;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.15);
}
.wechat-btn-group .wechat-btn:active {
    transform: scale(0.97);
}
.wechat-btn-group .wechat-hint {
    font-size: 0.7rem;
    color: #8a98a8;
    text-align: center;
    margin-top: 0.1rem;
}

/* ===== 右侧：表单区域 ===== */
.auth-form-col {
    flex: 1.6;
    padding: 2.4rem 2.8rem 2.2rem;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

/* 登录/注册小标签切换 */
.form-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #e9edf4;
    padding-bottom: 0.5rem;
}
.form-tabs .tab-btn {
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: #6c7a8a;
    padding: 0.2rem 0;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}
.form-tabs .tab-btn::after {
    content: '';
    position: absolute;
    bottom: -0.55rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    border-radius: 4px;
    transition: 0.2s;
}
.form-tabs .tab-btn.active {
    color: #006ACD;
}
.form-tabs .tab-btn.active::after {
    background: #006ACD;
}
.form-tabs .tab-btn:hover:not(.active) {
    color: #1e293b;
}

.auth-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0b1a33;
    margin-bottom: 0.1rem;
}
.auth-sub {
    color: #6c7a8a;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

/* 登录方式切换小标签 */
.login-method-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.login-method-tabs .method-tab {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6c7a8a;
    padding: 0.2rem 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}
.login-method-tabs .method-tab.active {
    color: #006ACD;
    border-bottom-color: #006ACD;
}
.login-method-tabs .method-tab:hover:not(.active) {
    color: #1e293b;
}

.auth-form .form-floating {
    margin-bottom: 1rem;
}
.auth-form .form-floating .form-control {
    border-radius: 0.8rem;
    border: 1px solid #e9edf4;
    padding: 0.7rem 1.2rem;
    height: auto;
    font-size: 0.92rem;
    background: #fafcff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form .form-floating .form-control:focus {
    border-color: #006ACD;
    box-shadow: 0 0 0 3px rgba(0, 106, 205, 0.08);
}
.auth-form .form-floating label {
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
    color: #8a98a8;
}

/* 验证码行 */
.captcha-row {
    display: flex;
    gap: 0.8rem;
    align-items: stretch;
    margin-bottom: 1rem;
}
.captcha-row .form-floating {
    flex: 1;
    margin-bottom: 0;
}
.captcha-row .btn-captcha {
    flex-shrink: 0;
    background: #e9edf4;
    border: none;
    border-radius: 0.8rem;
    padding: 0 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    transition: 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 100%;
    line-height: 1.4;
}
.captcha-row .btn-captcha:hover {
    background: #dde2eb;
}
.captcha-row .form-floating .form-control {
    margin-bottom: 0;
}

.auth-form .form-check {
    margin-bottom: 1rem;
    margin-top: 0.2rem;
}
.auth-form .form-check-input:checked {
    background-color: #006ACD;
    border-color: #006ACD;
}
.auth-form .form-check-label {
    font-size: 0.85rem;
    color: #4b5a6a;
}
.auth-form .form-check-label a {
    color: #006ACD;
    text-decoration: none;
}
.auth-form .form-check-label a:hover {
    text-decoration: underline;
}

.auth-form .btn-primary {
    background: #006ACD;
    border: none;
    padding: 0.7rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.2s;
    width: 100%;
    color: #fff;
}
.auth-form .btn-primary:hover {
    background: #0052a3;
    box-shadow: 0 6px 20px rgba(0, 106, 205, 0.25);
}
.auth-form .btn-primary:active {
    transform: scale(0.98);
}

.auth-form .extra-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #6c7a8a;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}
.auth-form .extra-links a {
    color: #006ACD;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.auth-form .extra-links a:hover {
    text-decoration: underline;
}
.auth-form .extra-links .forgot-link {
    color: #6c7a8a;
    font-weight: 400;
}
.auth-form .extra-links .forgot-link:hover {
    color: #006ACD;
}
.auth-form .extra-links .divider {
    color: #dde2eb;
}

/* ===== 面板容器：grid叠放，高度自适应不跳动 ===== */
.panel-container {
    display: grid;
    flex: 1;
}
.panel-container .panel {
    grid-area: 1 / 1 / 2 / 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}
.panel-container .panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 表单组切换 */
.form-group {
    display: none;
}
.form-group.active {
    display: block;
}

/* 卡片容器添加相对定位，作为返回链接的参照 */
.auth-card {
    position: relative;
    max-width: 860px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ===== 返回首页链接（卡片左上角） ===== */
.back-home {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(6px);
    padding: 6px 16px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}
.back-home a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}
.back-home a i {
    font-size: 1rem;
    line-height: 1;
}
.back-home a:hover {
    color: #006ACD;
}
.back-home:hover {
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* ============================================================ */
/* ===== 滑块验证弹窗 ===== */
/* ============================================================ */
.slider-captcha-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.slider-captcha-overlay.show {
    opacity: 1;
}

.slider-captcha-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}
.slider-captcha-overlay.show .slider-captcha-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 头部 */
.slider-captcha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 12px 24px;
    border-bottom: 1px solid #f0f2f5;
}
.slider-captcha-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0b1a33;
    display: flex;
    align-items: center;
    gap: 8px;
}
.slider-captcha-title i {
    color: #006ACD;
    font-size: 1.2rem;
}
.slider-captcha-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #8a98a8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.2s;
}
.slider-captcha-close:hover {
    background: #f0f2f5;
    color: #1e293b;
}

/* 主体 */
.slider-captcha-body {
    padding: 20px 24px 28px 24px;
}
.slider-captcha-desc {
    font-size: 0.9rem;
    color: #4b5a6a;
    margin-bottom: 18px;
    text-align: center;
}

/* 滑块轨道容器 */
.slider-track-wrap {
    padding: 0 2px;
}
.slider-track {
    position: relative;
    height: 44px;
    background: #eef2f7;
    border-radius: 60px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    border: 1px solid #e4e9ef;
    transition: border-color 0.2s;
}
.slider-track:active {
    border-color: #006ACD;
}

/* 进度条 */
.slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dbeafe, #006ACD);
    border-radius: 60px;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* 滑块按钮 */
.slider-thumb {
    position: absolute;
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: box-shadow 0.2s;
    z-index: 2;
    border: 2px solid #006ACD;
}
.slider-thumb:hover {
    box-shadow: 0 4px 20px rgba(0, 106, 205, 0.25);
}
.slider-thumb:active {
    cursor: grabbing;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.slider-thumb i {
    font-size: 1.2rem;
    color: #006ACD;
    transition: transform 0.2s;
}
.slider-thumb:active i {
    transform: scale(0.9);
}

/* 滑块上的提示文字 */
.slider-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #6c7a8a;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s;
    letter-spacing: 0.3px;
}

/* 状态提示 */
.slider-status {
    text-align: center;
    margin-top: 14px;
    font-size: 0.85rem;
    min-height: 24px;
    transition: 0.2s;
}
.slider-status.info {
    color: #006ACD;
}
.slider-status.success {
    color: #22c55e;
}
.slider-status.error {
    color: #ef4444;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-8px);
    }
    40% {
        transform: translateX(8px);
    }
    60% {
        transform: translateX(-4px);
    }
    80% {
        transform: translateX(4px);
    }
}

/* ===== 响应式适配 ===== */
@media (max-width: 575.98px) {
    .back-home {
        top: 12px;
        left: 14px;
        padding: 4px 12px;
    }
    .back-home a {
        font-size: 0.78rem;
        gap: 4px;
    }
    .back-home a i {
        font-size: 0.9rem;
    }

    .slider-captcha-modal {
        max-width: 96vw;
        border-radius: 16px;
    }
    .slider-captcha-body {
        padding: 16px 16px 22px 16px;
    }
    .slider-captcha-header {
        padding: 14px 16px 10px 16px;
    }
    .slider-captcha-title {
        font-size: 0.95rem;
    }
    .slider-track {
        height: 40px;
    }
    .slider-thumb {
        width: 40px;
        height: 40px;
    }
    .slider-thumb i {
        font-size: 1rem;
    }
    .slider-text {
        font-size: 0.78rem;
    }
}

/* 响应式 */
@media (max-width: 767.98px) {
    .auth-row {
        flex-direction: column;
    }
    .auth-wechat-col {
        padding: 1.8rem 1.2rem;
        border-bottom: 1px solid #e9edf4;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }
    .auth-wechat-col .wechat-main-title {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        margin-bottom: 0;
    }
    .auth-wechat-col .wechat-main-sub {
        display: none;
    }
    .wechat-user {
        flex-direction: row;
        gap: 0.8rem;
        margin-bottom: 0;
    }
    .wechat-user .avatar {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        margin-bottom: 0;
    }
    .wechat-user .nickname-sub {
        display: none;
    }
    .wechat-btn-group {
        flex-direction: row;
        max-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .wechat-btn-group .wechat-btn {
        width: auto;
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }
    .wechat-btn-group .wechat-hint {
        display: none;
    }
    .auth-form-col {
        padding: 1.5rem 1.2rem;
    }
    .panel-container {
        min-height: 360px;
    }
}
@media (max-width: 575.98px) {
    .auth-form-col {
        padding: 1rem 0.8rem;
    }
    .auth-title {
        font-size: 1.15rem;
    }
    .auth-sub {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    .auth-form .form-floating .form-control {
        font-size: 0.88rem;
        padding: 0.5rem 1rem;
    }
    .auth-form .form-floating label {
        font-size: 0.82rem;
        padding: 0.5rem 1rem;
    }
    .captcha-row {
        flex-wrap: wrap;
    }
    .captcha-row .btn-captcha {
        width: 100%;
        padding: 0.5rem;
        min-height: 44px;
    }
    .form-tabs .tab-btn {
        font-size: 0.95rem;
    }
    .login-method-tabs .method-tab {
        font-size: 0.82rem;
    }
    .auth-form .btn-primary {
        font-size: 0.95rem;
        padding: 0.6rem;
    }
    .auth-form .extra-links {
        font-size: 0.8rem;
    }
    .panel-container {
        min-height: 340px;
    }
}
@media (min-width: 768px) {
    .panel-container {
        min-height: 380px;
    }
}