/* ===================================================================
   鑫支付 · 登录/注册页美化（仅作用于 main/index.html）
   深蓝 + 鎏金玻璃拟态风格，品牌色 #1a223e / #c9a227，加载于公共主题 main.min.css 之后
   =================================================================== */

:root {
    --brand: #1a223e;
    --brand-light: #2b3a63;
    --brand-lighter: #c9a227;
    --brand-soft: rgba(201, 162, 39, .14);
    --gold: #d4af37;
    --gold-light: #e8c766;
    --text: rgba(255, 255, 255, .92);
    --text-dim: rgba(255, 255, 255, .62);
    --line: rgba(255, 255, 255, .16);
    --panel: rgba(10, 16, 34, .68);
}

/* 限制超宽屏下主题根字号（默认 16pt 约 21px，整体偏大） */
@media screen and (min-width: 1681px) {
    html {
        font-size: 13pt;
    }
}

/* ---------- 全局：中文字体栈 ---------- */
body, input, select, textarea {
    font-family: "Montserrat", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

::selection {
    background: rgba(201, 162, 39, .45);
    color: #fff;
}

/* ---------- 背景：深蓝鎏金渐变蒙层 ---------- */
#bg:before {
    background-image:
        radial-gradient(ellipse 60% 45% at 18% 12%, rgba(201, 162, 39, .22), transparent 70%),
        radial-gradient(ellipse 55% 45% at 85% 88%, rgba(43, 58, 99, .55), transparent 70%),
        linear-gradient(160deg, rgba(6, 10, 24, .72) 0%, rgba(12, 20, 44, .66) 55%, rgba(5, 9, 20, .78) 100%),
        url("../../assets/images/overlay.png");
    background-size: auto, auto, auto, 256px 256px;
}

/* ---------- 头部连接竖线 ---------- */
#header > * {
    margin-top: 2.75rem;
}

#header > *:before {
    top: calc(-2.75rem - 1px);
    height: calc(2.75rem + 1px);
    background: rgba(255, 255, 255, .28);
}

/* ---------- Logo ---------- */
#header .logo {
    width: 4.75rem;
    height: 4.75rem;
    line-height: normal;
    border: 1px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .96);
    overflow: hidden;
    box-shadow:
        0 16px 34px -12px rgba(201, 162, 39, .45),
        inset 0 0 0 5px rgba(201, 162, 39, .07);
    transition: transform .3s ease, box-shadow .3s ease;
}

#header .logo:hover {
    transform: translateY(-3px);
    box-shadow:
        0 22px 42px -12px rgba(201, 162, 39, .55),
        inset 0 0 0 5px rgba(201, 162, 39, .12);
}

#header .logo img {
    width: 100%;
    height: 100%;
    padding: .75rem;
    object-fit: contain;
    border-radius: 100%;
}

/* ---------- 标题区 ---------- */
#header .content {
    border-color: rgba(255, 255, 255, .22);
}

#header .content .inner {
    padding: 2.1rem 2rem;
}

#header h1 {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: .16rem;
    text-transform: none;
    margin-bottom: .7rem;
    background: linear-gradient(180deg, #ffffff 18%, #f0d98a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 6px 26px rgba(201, 162, 39, .28);
}

#header .content p {
    text-transform: none;
    letter-spacing: .06rem;
    font-size: .78rem;
    line-height: 1.85;
    color: var(--text-dim);
    margin: 0;
}

/* ---------- 导航：分段玻璃按钮 ---------- */
#header nav ul {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .3rem;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 34px -16px rgba(2, 8, 23, .7);
}

#header nav ul li {
    border-left: 0;
}

#header nav ul li a {
    min-width: 6.25rem;
    height: 2.25rem;
    line-height: 2.25rem;
    padding: 0 1.1rem;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: .1rem;
    font-size: .8rem;
    font-weight: 400;
    color: var(--text-dim);
    transition: color .2s ease, background-color .2s ease;
}

#header nav ul li a:hover {
    background: rgba(255, 255, 255, .10);
    color: #fff;
}

#header nav ul li a:active {
    background: rgba(255, 255, 255, .16);
}

/* 当前打开的面板对应导航高亮 */
body:has(#login.active) #header nav a[href="#login"],
body:has(#register.active) #header nav a[href="#register"],
body:has(#login:target) #header nav a[href="#login"],
body:has(#register:target) #header nav a[href="#register"] {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 8px 20px -8px rgba(201, 162, 39, .85);
}

/* ---------- 面板（登录 / 注册） ---------- */
#main article {
    width: 31rem;
    padding: 3.1rem 2.6rem 2.6rem;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow:
        0 30px 70px -24px rgba(2, 8, 23, .85),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* 面板标题：蓝色短下划线 */
#main article h2.major {
    border-bottom: 0;
    padding-bottom: .85rem;
    margin-bottom: 1.9rem;
    text-transform: none;
    letter-spacing: .12rem;
    font-size: 1.35rem;
    font-weight: 700;
    position: relative;
}

#main article h2.major:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.4rem;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand-lighter), var(--gold-light));
    box-shadow: 0 2px 10px rgba(201, 162, 39, .65);
}

/* 注册页浏览器提示：信息条 */
#register h3 {
    font-size: .76rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: .02rem;
    color: #f0d98a;
    background: var(--brand-soft);
    border: 1px solid rgba(201, 162, 39, .30);
    border-radius: 10px;
    padding: .7rem 1rem;
    margin: -0.5rem 0 1.5rem;
}

/* ---------- 表单 ---------- */
form {
    margin-bottom: 0;
}

form .field {
    margin-bottom: 1.35rem;
}

form label {
    text-transform: none;
    letter-spacing: .06rem;
    font-size: .8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .82);
    margin-bottom: .55rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    height: 2.85rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
    padding: 0 1.05rem;
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: rgba(255, 255, 255, .32);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    background: rgba(255, 255, 255, .09);
    border-color: var(--brand-lighter);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .26);
}

.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 3.15rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, .55);
    background: transparent;
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s ease, background-color .2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    box-shadow: none;
}

.password-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    pointer-events: none;
}

.password-toggle .eye-hide { display: none; }
.password-toggle.is-visible .eye-show { display: none; }
.password-toggle.is-visible .eye-hide { display: block; }

input::-webkit-input-placeholder { color: rgba(255, 255, 255, .35) !important; }
input::-moz-placeholder { color: rgba(255, 255, 255, .35) !important; }

/* 自动填充深色适配 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 16, 34, .92) inset;
    transition: background-color 9999s ease-out;
}

/* ---------- 验证码行 ---------- */
.cap-row {
    display: flex;
    align-items: stretch;
    gap: .7rem;
}

.cap-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.sms-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.85rem;
    padding: 0 .9rem;
    border-radius: 10px;
    border-bottom: 0;
    white-space: nowrap;
    font-size: .78rem;
    letter-spacing: .04rem;
    color: #e8c766;
    background: rgba(201, 162, 39, .14);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .5);
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.sms-btn:hover {
    background: rgba(201, 162, 39, .26);
    color: #f5e3b0;
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .8);
}

.sms-btn:active {
    background: rgba(201, 162, 39, .38);
}

.time-reget {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ---------- 按钮 ---------- */
ul.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.9rem !important;
}

ul.actions li {
    padding: 0;
}

ul.actions li + li {
    margin-left: .85rem;
}

input[type="submit"],
input[type="reset"] {
    height: 2.85rem;
    line-height: 2.85rem;
    border-radius: 10px;
    padding: 0 1.7rem;
    font-size: .82rem;
    letter-spacing: .14rem;
    text-transform: none;
    transition: transform .2s ease, box-shadow .2s ease,
        background-color .2s ease, filter .2s ease;
}

input[type="submit"].special {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 12px 26px -10px rgba(201, 162, 39, .8);
}

input[type="submit"].special:hover {
    background: linear-gradient(135deg, #e8c766 0%, #c9a227 100%);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -10px rgba(201, 162, 39, .9);
}

input[type="submit"].special:active {
    transform: translateY(0);
}

input[type="reset"] {
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
}

input[type="reset"]:hover {
    background: rgba(255, 255, 255, .14);
}

/* 忘记密码：靠右弱化（仅登录页） */
#login ul.actions li:last-child {
    margin-left: auto;
}

#login ul.actions li:last-child a {
    display: inline-flex;
    align-items: center;
    min-height: 2.85rem;
    padding: 0 .15rem;
    font-size: .78rem;
    letter-spacing: .03rem;
    color: var(--text-dim);
    border-bottom: 0;
    transition: color .2s ease;
}

#login ul.actions li:last-child a:hover {
    color: #f0d98a;
}

/* 登录与注册快捷切换 */
.auth-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.35rem 0 0;
    padding: .8rem 1rem;
    color: rgba(255, 255, 255, .5);
    font-size: .76rem;
    letter-spacing: .02rem;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 10px;
}

.auth-switch a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #e8c766;
    font-weight: 600;
    letter-spacing: .03rem;
    border-bottom: 0;
    transition: color .2s ease;
}

.auth-switch a::after {
    content: '›';
    margin-left: .4rem;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1;
    transition: transform .2s ease;
}

.auth-switch a:hover {
    color: #fff;
}

.auth-switch a:hover::after {
    transform: translateX(3px);
}

/* 提示消息 */
#result #msg {
    margin: 1rem 0 0;
    font-size: .82rem;
    line-height: 1.6;
    letter-spacing: .03rem;
    color: #fca5a5;
    text-align: center;
}

/* ---------- 页脚 ---------- */
#footer {
    margin-top: 2.5rem;
}

#footer .copyright {
    text-transform: none;
    letter-spacing: .04rem;
    font-size: .66rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, .45);
    max-width: 44rem;
    margin: 0 auto;
}

#footer .copyright:first-child {
    color: rgba(255, 255, 255, .65);
    font-size: .72rem;
    margin-bottom: .5rem;
    letter-spacing: .12rem;
}

/* ===================================================================
   响应式
   =================================================================== */
@media screen and (max-width: 736px) {
    #header h1 {
        font-size: 1.65rem;
    }

    #header .content .inner {
        padding: 1.75rem 1.25rem;
    }

    #main article {
        padding: 2.6rem 1.6rem 2rem;
        border-radius: 16px;
    }

    #main article h2.major {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    #header .logo {
        width: 4.25rem;
        height: 4.25rem;
    }

    #header nav ul {
        min-width: 12rem;
        border-radius: 14px;
        padding: .3rem;
    }

    #header nav ul li a {
        height: 2.5rem;
        line-height: 2.5rem;
        border-radius: 10px;
        letter-spacing: .1rem;
    }

    /* 小屏按钮纵向铺满排列，用列布局 + gap 控制间距 */
    ul.actions {
        flex-direction: column;
        align-items: stretch;
        gap: .85rem;
    }

    ul.actions li,
    ul.actions li + li {
        width: 100%;
        margin: 0;
    }

    ul.actions li input {
        width: 100%;
    }

    /* 忘记密码：小屏居中显示 */
    #login ul.actions li:last-child {
        width: 100%;
        margin: .15rem 0 0;
        text-align: center;
    }

    #login ul.actions li:last-child a {
        display: inline-flex;
        width: auto;
        min-height: auto;
        padding: .2rem 0;
    }

    .auth-switch {
        gap: .5rem;
        margin-top: 1.2rem;
        padding: .75rem .85rem;
    }

    .cap-row {
        gap: .5rem;
    }

    .sms-btn {
        padding: 0 .8rem;
        letter-spacing: 0;
    }
}

/* ===================================================================
   安全验证弹窗（滑块验证码）
   弹窗由 layer 生成（skin: layui-layer-molv / lp-captcha-layer），
   内容为 tianai-captcha 滑块验证码
   =================================================================== */

/* ---------- 弹窗外壳 ---------- */
.layui-layer.layui-layer-molv,
.layui-layer.lp-captcha-layer {
    padding: 0;
    box-sizing: border-box;
    max-width: calc(100vw - 20px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 28px 60px -22px rgba(2, 8, 23, .85),
        0 0 0 1px rgba(201, 162, 39, .14);
}

.layui-layer.layui-layer-molv .layui-layer-title,
.layui-layer.lp-captcha-layer .layui-layer-title {
    height: 52px;
    line-height: 52px;
    padding: 0 52px 0 18px;
    border-bottom: 0;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .12rem;
    color: #fff;
    background: linear-gradient(135deg, #2b3a63 0%, #1a223e 100%);
}

.layui-layer.layui-layer-molv .layui-layer-setwin,
.layui-layer.lp-captcha-layer .layui-layer-setwin {
    top: 18px;
    right: 14px;
}

.layui-layer.layui-layer-molv .layui-layer-setwin a,
.layui-layer.lp-captcha-layer .layui-layer-setwin a {
    opacity: .75;
    -webkit-filter: brightness(0) invert(1);
    filter: brightness(0) invert(1);
    transition: opacity .2s ease;
}

.layui-layer.layui-layer-molv .layui-layer-setwin a:hover,
.layui-layer.lp-captcha-layer .layui-layer-setwin a:hover {
    opacity: 1;
}

.layui-layer.layui-layer-molv .layui-layer-content,
.layui-layer.lp-captcha-layer .layui-layer-content {
    padding: 12px 0 14px;
    overflow: visible;
    background: #fff;
}

/* ---------- 验证码主体 ---------- */
#captchaLayer #tianai-captcha-parent {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
}

#captchaLayer #tianai-captcha #tianai-captcha-slider-bg-canvas,
#captchaLayer #tianai-captcha #tianai-captcha-slider-bg-div {
    border-radius: 10px;
}

#captchaLayer #tianai-captcha .content .tianai-captcha-tips {
    font-size: .76rem;
    letter-spacing: .08rem;
}

/* 拖动条 */
#captchaLayer #tianai-captcha.tianai-captcha-slider .slider-move {
    -webkit-filter: none;
    filter: none;
}

#captchaLayer #tianai-captcha.tianai-captcha-slider .slider-move-track {
    border-color: #e2e8f0;
    border-radius: 10px;
    background: linear-gradient(90deg, #f7f5ef 0%, #efe7d0 100%);
    color: #94a3b8;
    font-size: .74rem;
    letter-spacing: .1rem;
}

#captchaLayer #tianai-captcha.tianai-captcha-slider .slider-move .slider-move-btn {
    border-radius: 10px;
    box-shadow:
        0 8px 18px -10px rgba(201, 162, 39, .8),
        inset 0 0 0 1px rgba(226, 232, 240, .9);
}

/* 底部刷新 / 关闭 */
#captchaLayer #tianai-captcha-parent .slider-bottom .close-btn,
#captchaLayer #tianai-captcha-parent .slider-bottom .refresh-btn {
    opacity: .5;
    transition: opacity .2s ease;
}

#captchaLayer #tianai-captcha-parent .slider-bottom .close-btn:hover,
#captchaLayer #tianai-captcha-parent .slider-bottom .refresh-btn:hover {
    opacity: 1;
}

/* ---------- 小屏自适应 ---------- */
@media screen and (max-width: 736px) {
    .layui-layer.layui-layer-molv,
    .layui-layer.lp-captcha-layer {
        border-radius: 14px;
    }

    .layui-layer.layui-layer-molv .layui-layer-title,
    .layui-layer.lp-captcha-layer .layui-layer-title {
        height: 46px;
        line-height: 46px;
        font-size: .78rem;
    }
}

/* 整体等比缩小验证码，避免横向溢出（高度用负外边距回收） */
@media screen and (max-width: 380px) {
    #captchaLayer #sliderCaptcha {
        -webkit-transform: scale(.94);
        transform: scale(.94);
        -webkit-transform-origin: top center;
        transform-origin: top center;
        margin-bottom: -20px;
    }
}

@media screen and (max-width: 340px) {
    #captchaLayer #sliderCaptcha {
        -webkit-transform: scale(.86);
        transform: scale(.86);
        margin-bottom: -45px;
    }

    .layui-layer.layui-layer-molv .layui-layer-title,
    .layui-layer.lp-captcha-layer .layui-layer-title {
        height: 42px;
        line-height: 42px;
        padding-left: 14px;
    }
}
