/* ========================================
   注册弹窗样式 — 复刻 SDK tplay base.css
======================================== */


/* 全局 reset */
#tplayPop, #tplayPop * { box-sizing: border-box; }

/* ========== 弹窗外层容器 ========== */
.tplay-pop {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    z-index: 99999;
}

html.reg-open { overflow: hidden !important; }
html.reg-open body { overflow: hidden !important; }

/* ========== 遮罩层 ========== */
#regMask {
    display: none;
    position: fixed;
    top:0;left:0;bottom:0;right:0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    pointer-events: auto;
}
#regMask.show { display: block; }

/* ========== 弹窗容器（仅注册弹窗）========== */
#regpop {
    display: none;
    position: fixed;
    background: #FFFFFF;
    border-radius: 5px;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    z-index: 10000;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;            /* 裁切水平溢出，防止验证码按钮截断 */
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
}
#regpop.show {
    display: block !important;
}

/* ========== 登录面板（首屏内嵌元素，非弹窗）========== */
#indexhome #loginpop,
#loginpop {
    position: absolute !important;
    right: 20px !important;
    top: 42% !important;
    transform: translateY(-50%) !important;
    -webkit-transform: translateY(-50%) !important;
    /* display 不加 !important，JS hide/show 才能生效 */
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

/* 登录面板卡片 — overflow:hidden + border-box 保证文字不溢出不截断 */
#loginpop, #loginpop * { box-sizing: border-box; }

#loginpop .pop-jl.pop-reg {
    width: 380px;
    height: auto;
    min-height: auto;
    background: #FFFFFF;
    border-radius: 5px;
    overflow: hidden;
}

/* 注册弹窗卡片 — 裁切溢出 */
#regpop .pop-jl.pop-reg {
    width: 460px;
    height: auto;
    min-height: auto;
    background: #FFFFFF;
    border-radius: 5px;
    overflow: hidden;
}

/*
 * 注册弹窗关闭按钮 × — 绝对定位到标题栏右上角
 */
#regpop .pop-head .close2 {
    position: absolute !important;
    right: 10px !important;
    top: 8px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 24px !important;
    text-align: center;
    cursor: pointer !important;
    z-index: 9999 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #999 !important;
    font-size: 20px !important;
    text-decoration: none !important;
    outline: none !important;
}
#regpop .pop-head .close2:hover { color: #333 !important; }
.close2::before, .close2::after { display: none !important; }

/* ========== 标题栏 .pop-head — 白色底，flex布局 ========== */
.pop-jl .pop-head {
    width: 100%;
    height: 46px;
    line-height: 46px;
    background: #FFFFFF;
    color: #333333;
    font-size: 15px;
    padding: 0 20px;              /* 左右对称留足空间 */
    display: flex;                 /* flex 左右分布 */
    align-items: center;
    overflow: visible;             /* 允许内部元素正常显示（关闭按钮已在pop-jl层裁切） */
}
.pop-head p { margin: 0; font-weight: normal; }

/* "注册新用户" — 标题栏右侧蓝色链接 */
#loginpop .pop-head .head-link {
    margin-left: auto;
    color: #018FFF !important;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
#loginpop .pop-head .head-link:hover { text-decoration: underline; }

/* 弹窗卡片需要 relative，供内部绝对定位的关闭按钮参考 */
#regpop .pop-jl.pop-reg {
    position: relative;
}
#loginpop .pop-jl.pop-reg {
    position: relative;
    overflow: hidden;
}

/* 登录面板隐藏关闭按钮 */
#loginpop .close2 { display: none !important; }

/* 注册弹窗关闭按钮：绝对定位到 pop-head 右上角 */
#regpop .pop-head .close2 {
    position: absolute !important;
    right: 10px !important;
    top: 8px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 24px !important;
    text-align: center;
    cursor: pointer !important;
    z-index: 9999 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #999 !important;
    font-size: 20px !important;
    text-decoration: none !important;
    outline: none !important;
}
#regpop .pop-head .close2:hover,
#regpop .pop-jl.pop-reg .close2:hover { color: #333 !important; }

/* 隐藏纯 CSS 画的 X 伪元素 — 用 × 文字字符代替 */
.close2::before, .close2::after { display: none !important; }

/* ========== 表单区域 .reg-body ========== */
.reg-body {
    padding: 18px 25px 22px;
    overflow: hidden;
}

/* 登录弹窗表单区域 */
#loginpop .reg-body {
    padding: 15px 30px 18px;
}

/* ========== 注册表单布局 ========== */
.form-box {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.form-row .input-label {
    width: 64px;
    flex-shrink: 0;
    font-size: 13px;
    color: #333;
    line-height: 40px;
    text-align: right;
    padding-right: 8px;
}
.form-row .finput,
.form-row .reg-input {
    flex: 1;
    min-width: 0;
}
.form-row .error_text {
    width: 100%;
}

/* ========== Tab 切换栏 ========== */
.reg-category {
    list-style: none; padding: 0; margin: 0 0 20px;
    display: flex; border-bottom: 1px solid #F7F7F7;
}
.reg-category li {
    flex: 1; text-align: center; font-size: 14px; color: #333;
    height: 46px; line-height: 46px; cursor: pointer;
    border-bottom: 2px solid transparent;     /* 预留下划线空间 */
}
.reg-category li.cur {
    color: #018FFF;
    font-weight: bold;
    font-size: 15px;
    border-bottom-color: #018FFF !important;   /* 蓝色下划线 = 选中特效 */
}

/* ========== 面板切换 ========== */
.regblock { display: none; }
.regblock[style*="block"] { display: block !important; }

/* ========== 输入框 .finput/.reg-input ========== */
.finput, .reg-input {
    position: relative;
    width: 100%;
    height: 40px;
    background: #F7F7F7;
    border-radius: 5px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.finput span, .reg-input span {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 38px !important; flex-shrink: 0 !important; min-width: 38px !important;
    max-width: 38px;
    height: 100%; min-height: 38px;
    background-size: 20px 20px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
.finput .account { background-image: url(/template/default/Index/cjm/images/tplay/signin-ico-user2.png) !important; }
.finput .mobile { background-image: url(/template/default/Index/cjm/images/tplay/signup-ico-phone.png) !important; }
.finput .mima { background-image: url(/template/default/Index/cjm/images/tplay/signup-ico-mima.png) !important; }
.finput .smscode { background-image: url(/template/default/Index/cjm/images/tplay/signup-ico-yanzheng.png) !important; }

.finput input, .reg-input input {
    flex: 1; min-width: 0;
    background: transparent;
    font-size: 14px; border: none; outline: none;
    padding: 0 12px; height: 40px; line-height: 40px;
    color: #333;
}
.finput input::placeholder, .reg-input input::placeholder { color: #bbb; }
.finput.input-error { border: 1px solid #ff4444 !important; background: #fff5f5; }

/* 错误提示 */
.error_text {
    display: none; font-size: 11px; color: #ff4444;
    line-height: 1.4; padding: 1px 0 8px;
}
.error_text.show { display: block; }

/* ========== 发送验证码 ========== */
.lcode-btn {
    width: auto !important; min-width: 100px;
    height: 36px; line-height: 36px; padding: 0 12px;
    background: #018FFF; border-radius: 5px;
    color: #fff; font-size: 12px; text-align: center;
    cursor: pointer; border: none;
    white-space: nowrap; flex-shrink: 0; margin-left: 6px;
}
.lcode-btn:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(1,143,255,0.35); }
.lcode-btn:disabled, .lcode-btn.btn-counting { background: #ccc; cursor: not-allowed; color: #999; }

/* ========== 协议勾选 ========== */
.remember {
    display: flex; align-items: center;
    font-size: 12px; color: #333; margin: 10px 0 15px;
}
.remember > div {
    display: flex; align-items: center; flex-shrink: 0;
}
.remember p { margin: 0; line-height: 1.4; }
.remember a { color: #018FFF; text-decoration: none; margin: 0 2px; }
.remember a:hover { text-decoration: underline; }

#regpop .color-input-orange { visibility: hidden !important; position: absolute; }
#regpop .color-input-orange + label {
    display: inline-block !important;
    width: 18px; height: 18px; min-width: 18px;
    cursor: pointer; vertical-align: middle; flex-shrink: 0;
    background: url(/template/default/Index/cjm/images/tplay/signin-ico-weixuan.png) no-repeat center/contain;
}
#regpop .color-input-orange:checked + label::before {
    content: ""; display: inline-block;
    background: url(/template/default/Index/cjm/images/tplay/signin-ico-gouxuan.png) no-repeat center/contain;
    width: 18px; height: 18px;
}

/* ========== 提交按钮 ========== */
.login-btn {
    display: block; width: 100%; height: 44px; line-height: 44px;
    background: #018FFF; border-radius: 5px;
    color: #FFFFFF; font-size: 16px; text-align: center;
    cursor: pointer; border: none; letter-spacing: 2px;
    transition: all 0.3s; margin: 8px 0 12px;
}
.login-btn:hover { box-shadow: 0 4px 24px rgba(0,90,255,0.45); }
.login-btn.disabled { background: #ccc !important; box-shadow:none !important; cursor:not-allowed !important; color:#999 !important; }

/* ========== 底部链接 ========== */
.center { text-align: center; }
.center a.blue { color: #018FFF; text-decoration: none; }
.center a.blue:hover { text-decoration: underline; }

/* ========== 登录弹窗专用 ========== */

/* 记住密码 + 忘记密码 */
.login-options {
    display: flex; align-items: center; justify-content: space-between;
    margin: 2px 0 6px; font-size: 12px;
}
.login-options .remember-pwd {
    display: flex; align-items: center; cursor: pointer; color: #333; font-size: 13px;
}
.login-options .remember-pwd input[type="checkbox"] { display: none; }
.login-options .remember-pwd i {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid #018FFF; border-radius: 3px;
    margin-right: 5px; position: relative; flex-shrink: 0;
}
.login-options .remember-pwd input:checked + i { background: #018FFF; }
.login-options .remember-pwd input:checked + i::after {
    content: ''; position: absolute;
    left: 4px; top: 2px; width: 4px; height: 7px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}
.login-options .forgot-pwd { color: #018FFF; text-decoration: none; font-size: 13px; }
.login-options .forgot-pwd:hover { text-decoration: underline; }

/* 游客快速登录 */
.guest-login {
    text-align: center; margin-top: 15px; padding-top: 15px;
    border-top: 1px solid #eee;
}
.guest-login a {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 5px; color: #666; text-decoration: none; font-size: 13px;
}
.guest-login a:hover { color: #018FFF; }
.guest-login .youke-icon {
    display: inline-block; width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9A44, #FF6B00);
    flex-shrink: 0;
}
.guest-login .youke-icon.loading { opacity: 0.4; }

/* ========== Toast 提示 ========== */
.reg-toast {
    position: fixed; top: 40%; left: 50%;
    min-width: 180px; max-width: 320px;
    padding: 12px 20px; border-radius: 6px;
    font-size: 14px; color: #fff; text-align: center;
    z-index: 99999; pointer-events: none;
    transform: translate(-50%, -10px);
    opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.reg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.reg-toast-success { background: rgba(82,196,52,0.92); }
.reg-toast-error { background: rgba(255,68,68,0.92); }
.reg-toast-info { background: rgba(51,51,51,0.9); }

/* ========== 响应式 ========== */

/* ---- 中等屏幕 (平板/小笔记本) 480~600px ---- */
@media screen and (max-width: 600px) and (min-width: 481px) {
    #regpop .pop-jl.pop-reg,
    #loginpop .pop-jl.pop-reg {
        width: 90% !important;
        max-width: 400px;
    }
    #loginpop {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
    }
    .reg-body { padding: 15px 20px 18px; }
}

/* ---- 小屏手机 (含 iPhone SE 375px) ≤480px ---- */
@media screen and (max-width: 480px) {
    /* 弹窗宽度自适应，留出左右边距 */
    #regpop .pop-jl.pop-reg,
    #loginpop .pop-jl.pop-reg {
        width: calc(100vw - 32px) !important;
        max-width: 380px;
        min-width: 300px;
    }

    /* 登录面板居中 */
    #loginpop {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        top: 45% !important;
    }

    /* 标题栏紧凑 */
    .pop-head {
        height: 42px !important;
        line-height: 42px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
    }
    .pop-head p { font-size: 14px; }
    #loginpop .pop-head .head-link {
        font-size: 12px !important;
        padding-right: 6px !important;
    }
    #regpop .pop-jl.pop-reg .close2 {
        width: 22px !important;
        height: 22px !important;
        font-size: 18px !important;
    }

    /* 表单区域减小内边距 */
    .reg-body {
        padding: 12px 16px 16px !important;
    }
    #loginpop .reg-body {
        padding: 10px 16px 14px !important;
    }

    /* 输入框稍小 */
    .finput, .reg-input {
        height: 36px !important;
        margin-bottom: 10px !important;
    }
    .finput input, .reg-input input {
        height: 36px !important;
        line-height: 36px !important;
        font-size: 13px !important;
        padding: 0 10px !important;
    }
    .finput span, .reg-input span {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px;
        background-size: 18px 18px !important;
    }

    /* 验证码按钮：小屏下允许换行但不截断 */
    .lcode-btn {
        min-width: 72px !important;
        width: auto !important;
        height: 34px !important;
        line-height: 34px !important;
        font-size: 11px !important;
        padding: 0 8px !important;
        margin-left: 6px !important;
        flex-shrink: 0 !important;
    }

    /* 注册表单标签+输入框布局：小屏下纵向排列 */
    .form-row {
        display: block !important;
        margin-bottom: 10px !important;
    }
    .form-row .input-label {
        text-align: left !important;
        width: auto !important;
        padding-right: 0 !important;
        margin-bottom: 3px;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }
    .form-row .finput,
    .form-row .reg-input {
        width: 100% !important;
        min-width: 0 !important;
    }
    .form-row .error_text {
        margin-top: 2px;
    }

    /* Tab 栏紧凑 */
    .reg-category li {
        height: 40px !important;
        line-height: 40px !important;
        font-size: 13px !important;
    }
    .reg-category { margin-bottom: 14px !important; }

    /* 提交按钮 */
    .login-btn {
        height: 40px !important;
        line-height: 40px !important;
        font-size: 14px !important;
        letter-spacing: 1px;
        margin: 6px 0 10px !important;
    }

    /* 记住密码 + 忘记密码：小屏下可接受换行 */
    .login-options {
        flex-wrap: wrap !important;
        gap: 4px;
    }
    .login-options .forgot-pwd {
        white-space: nowrap;
    }

    /* 游客登录 */
    .guest-login {
        margin-top: 10px !important;
        padding-top: 10px !important;
        font-size: 12px !important;
    }

    /* 协议勾选 */
    .remember { font-size: 11px !important; margin: 8px 0 10px !important; }

    /* 错误提示 */
    .error_text { font-size: 10px !important; padding: 1px 0 5px !important; }
}
