/* ============================================================
   国安盾 · 全局登录 / 注册弹窗（第189轮）
   唯一的登录界面来源：任何页面只要 <link> 本文件 + <script> auth.js，
   调用 GADAuth.open() 即得同一套界面。
   版式照搬 xuanwudun 项目的 auth_modal.css（暗色玻璃卡 + 青蓝渐变），
   在此基础上补：底部合规文案、忘记密码入口、算术验证码题面。
   所有规则经 #authMask 作用域隔离，不污染页面既有 .btn/.field 等类。
   ============================================================ */

#authMask{
    position:fixed;inset:0;background:rgba(2,6,16,.56);
    backdrop-filter:blur(9px) saturate(1.18);-webkit-backdrop-filter:blur(9px) saturate(1.18);
    display:none;align-items:center;justify-content:center;z-index:9999;
    padding:16px;
    animation:gdaMaskIn .22s ease both;
}
@keyframes gdaMaskIn{from{opacity:0}to{opacity:1}}
#authMask.show{display:flex}

#authMask .modal.auth{
    width:428px;max-width:100%;padding:0;overflow:hidden;position:relative;
    font-family:"Segoe UI","Microsoft YaHei","PingFang SC",system-ui,sans-serif;
    line-height:1.5;
    background:
        radial-gradient(520px 240px at 18% -20%,rgba(0,150,255,.2),transparent 72%),
        radial-gradient(420px 220px at 100% 6%,rgba(168,85,247,.15),transparent 72%),
        linear-gradient(160deg,rgba(16,34,66,.94),rgba(6,14,32,.97));
    border:1px solid rgba(0,229,255,.3);border-radius:14px;
    box-shadow:0 30px 90px rgba(0,0,0,.66),0 0 70px rgba(0,229,255,.13),inset 0 1px 0 rgba(255,255,255,.07);
    max-height:calc(100vh - 32px);display:flex;flex-direction:column;
}
/* 顶部流动光带 */
#authMask .modal.auth::before{
    content:'';position:absolute;left:0;right:0;top:0;height:2px;border:0;border-radius:0;z-index:1;
    background:linear-gradient(90deg,transparent,rgba(0,229,255,.9),rgba(168,85,247,.7),transparent);
    background-size:220% 100%;animation:gdaSheen 3.8s linear infinite;
}
@keyframes gdaSheen{0%{background-position:-130% 0}100%{background-position:230% 0}}
/* 斜向玻璃高光 */
#authMask .modal.auth::after{
    content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
    background:linear-gradient(115deg,transparent 32%,rgba(255,255,255,.055) 46%,transparent 60%);
    background-size:260% 100%;animation:gdaGlass 7.5s ease-in-out infinite;
}
@keyframes gdaGlass{0%,100%{background-position:125% 0}50%{background-position:-65% 0}}

/* ---- 头部品牌区 ---- */
#authMask .auth-cover{
    position:relative;padding:24px 26px 18px;border-bottom:1px solid rgba(0,174,255,.14);
    background:
        radial-gradient(420px 160px at 22% -30%,rgba(0,132,255,.22),transparent 70%),
        radial-gradient(320px 140px at 96% 10%,rgba(168,85,247,.16),transparent 70%),
        rgba(4,11,24,.6);
}
#authMask .auth-head{display:flex;flex-direction:column;align-items:center;gap:11px;text-align:center}
/* 第190轮：LOGO 放大（72→96）。与文字块之间留出足够呼吸感 */
#authMask .auth-logo{
    width:96px;height:96px;flex:0 0 96px;position:relative;
    display:flex;align-items:center;justify-content:center;
    border:none;background:transparent;box-shadow:none;
    animation:gdaFloat 4.4s ease-in-out infinite;
}
@keyframes gdaFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
#authMask .auth-logo img{width:84px;height:84px;display:block;filter:none}
/* 标题与域名两行居中且等宽：等宽靠 auth.js 的 alignHead() 反算字距，
   这里只保证两行都是「内容宽度」的 inline-block，才能被准确测量 */
#authMask .auth-head-txt{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
#authMask .auth-head h3{
    margin:0;display:inline-block;
    font-size:26px;letter-spacing:1.4px;font-weight:700;
    background:linear-gradient(92deg,#eaf9ff,#9fe6ff 55%,#c9b6ff);
    -webkit-background-clip:text;background-clip:text;color:transparent;
}
#authMask .auth-head .sub{display:inline-block;font-size:11.5px;color:#6b86ab;line-height:1.5}

/* ---- 登录 / 注册页签 ---- */
#authMask .auth-tabs{position:relative;display:flex;gap:6px;margin:16px 26px 2px;padding:3px;
    background:rgba(0,0,0,.3);border:1px solid rgba(0,174,255,.14);border-radius:10px;
    animation:gdaRise .4s cubic-bezier(.16,.84,.24,1) both .05s}
#authMask .at{
    flex:1;position:relative;z-index:1;padding:8px 0;font-size:12.5px;font-family:inherit;cursor:pointer;
    color:#9fb6d8;background:transparent;border:0;border-radius:8px;transition:color .18s;
}
#authMask .at:hover{color:#00e5ff}
#authMask .at.on{color:#eafcff}
#authMask .auth-tabs-ink{
    position:absolute;top:3px;left:3px;height:calc(100% - 6px);width:0;
    border-radius:8px;pointer-events:none;
    background:linear-gradient(135deg,rgba(0,229,255,.3),rgba(47,123,255,.3));
    border:1px solid rgba(0,229,255,.5);box-shadow:0 0 14px rgba(0,229,255,.18);
    transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1);
}

/* ---- 表单区 ---- */
#authMask .modal-body{padding:16px 26px 4px;max-height:62vh;overflow-y:auto}
#authMask .field{margin-bottom:13px}
#authMask .field>label{display:flex;align-items:center;justify-content:space-between;
    margin-bottom:6px;font-size:11.5px;line-height:1.4;color:#6b86ab;letter-spacing:.6px}
#authMask .field>label a{color:#5fb6ff;font-size:11px;letter-spacing:0;cursor:pointer;text-decoration:none}
#authMask .field>label a:hover{color:#00e5ff;text-decoration:underline}
#authMask .field input{width:100%;height:42px;padding:0 12px 0 36px;font-size:13.5px;font-family:inherit;
    color:#eaf5ff;background:rgba(3,10,22,.72);border:1px solid rgba(0,174,255,.18);border-radius:10px;
    outline:none;transition:.18s;box-sizing:border-box}
#authMask .field .hint{font-size:11px;color:#6b86ab;margin-top:5px;line-height:1.5}
#authMask .auth-input{position:relative;display:flex;align-items:center}
#authMask .auth-input>.ic{
    position:absolute;left:12px;width:15px;height:15px;color:rgba(125,151,189,.9);
    pointer-events:none;transition:color .18s;
}
#authMask .auth-input input::placeholder{color:rgba(125,151,189,.6)}
#authMask .auth-input input:hover{border-color:rgba(0,229,255,.35)}
#authMask .auth-input input:focus{
    border-color:rgba(0,229,255,.7);background:rgba(3,12,26,.9);
    box-shadow:0 0 0 3px rgba(0,229,255,.12),0 0 18px rgba(0,229,255,.1);
}
#authMask .auth-input:focus-within>.ic{color:#00e5ff}
#authMask .auth-input input[type=password]{padding-right:40px}
#authMask .auth-eye{
    position:absolute;right:6px;width:28px;height:28px;padding:0;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    color:#6b86ab;background:transparent;border:0;border-radius:7px;transition:.15s;
}
#authMask .auth-eye .ic{width:15px;height:15px}
#authMask .auth-eye:hover{color:#00e5ff;background:rgba(0,229,255,.1)}
#authMask .auth-eye.on{color:#00e5ff}

/* ---- 提示 ---- */
#authMask .auth-tip{margin-top:4px;padding:9px 11px;border-radius:9px;font-size:11.5px;line-height:1.65;
    color:#a9c6e8;background:rgba(0,110,190,.12);border:1px solid rgba(0,174,255,.24)}
#authMask .auth-tip b{color:#00e5ff;font-weight:600}
#authMask .auth-tip[hidden]{display:none}
#authMask .auth-out{margin-top:10px;padding:9px 11px;border-radius:9px;font-size:12px;
    color:#ffa8b6;background:rgba(255,77,109,.1);border:1px solid rgba(255,77,109,.32)}
#authMask .auth-out:empty{display:none;padding:0;border:0}

/* ---- 验证码：左侧输入 + 右侧题面（点一下换一题） ---- */
#authMask .auth-cap{display:flex;gap:9px;align-items:stretch}
#authMask .auth-cap .auth-input{flex:1 1 auto;min-width:0}
#authMask .cap-q{
    flex:0 0 116px;width:116px;height:42px;border-radius:10px;cursor:pointer;
    border:1px solid rgba(0,174,255,.32);background:rgba(3,10,22,.8);
    display:flex;align-items:center;justify-content:center;
    font-size:14px;letter-spacing:2px;color:#bfe4ff;user-select:none;
    transition:border-color .18s,box-shadow .18s,transform .14s;
}
#authMask .cap-q:hover{border-color:rgba(0,229,255,.72);box-shadow:0 0 16px rgba(0,229,255,.22)}
#authMask .cap-q:active{transform:scale(.97)}
#authMask .cap-hint b{color:#00e5ff;font-weight:600;cursor:pointer}
#authMask .cap-hint b:hover{text-decoration:underline}

/* ---- 密保问题题面（重置密码用） ---- */
#authMask .sec-q{
    padding:10px 12px;border-radius:10px;font-size:13px;color:#d7e8ff;line-height:1.6;
    background:rgba(3,10,22,.72);border:1px dashed rgba(0,174,255,.28);
}

/* ---- 底部按钮 ---- */
#authMask .modal-foot{display:flex;gap:10px;justify-content:center;margin-top:16px;padding:6px 26px 0}
#authMask .modal-foot .btn{justify-content:center;min-width:104px}
#authMask .btn{
    padding:8px 18px;border-radius:8px;cursor:pointer;font-size:13px;font-family:inherit;letter-spacing:1px;
    background:linear-gradient(135deg,rgba(0,229,255,.16),rgba(47,123,255,.18));
    border:1px solid rgba(0,229,255,.45);color:#bff2ff;
    transition:.18s;display:inline-flex;align-items:center;gap:6px;
}
#authMask .btn:hover{background:linear-gradient(135deg,rgba(0,229,255,.35),rgba(47,123,255,.35));box-shadow:0 0 16px rgba(0,229,255,.3)}
#authMask .btn.ghost{background:rgba(255,255,255,.04);border-color:rgba(0,174,255,.18);color:#9fb6d8}
#authMask .btn.ghost:hover{color:#00e5ff;border-color:rgba(0,229,255,.5)}
#authMask .btn:disabled{opacity:.55;cursor:default}
#authMask .btn.auth-ok{
    background:linear-gradient(92deg,#00d0ff,#2f7bff);color:#041021;font-weight:700;
    border:0;box-shadow:0 6px 20px rgba(0,180,255,.28);position:relative;overflow:hidden;
}
#authMask .btn.auth-ok:hover{filter:brightness(1.08);box-shadow:0 8px 26px rgba(0,200,255,.4)}
#authMask .btn.auth-ok::after{
    content:'';position:absolute;top:0;bottom:0;width:34%;
    background:linear-gradient(100deg,transparent,rgba(255,255,255,.5),transparent);
    transform:translateX(-160%) skewX(-18deg);
}
#authMask .btn.auth-ok:hover::after{animation:gdaBtnSheen .7s ease}
@keyframes gdaBtnSheen{from{transform:translateX(-160%) skewX(-18deg)}to{transform:translateX(420%) skewX(-18deg)}}

/* ---- 底部合规文案（保留原样：协议 + HTTPS） ---- */
#authMask .auth-legal{
    padding:12px 26px 18px;text-align:center;font-size:11.5px;line-height:1.8;color:#94a9c4;
}
#authMask .auth-legal a{color:#b9cde6;text-decoration:underline;cursor:pointer}
#authMask .auth-legal a:hover{color:#7fe2ff}
#authMask .auth-legal .auth-sec{margin-top:3px;color:#8399b5}
#authMask .auth-legal .auth-sec b{color:#12c99a;font-weight:600}

@keyframes gdaRise{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}

@media (max-width:520px){
    #authMask{padding:14px}
    #authMask .modal.auth{width:100%}
    #authMask .modal-body{max-height:56vh}
    #authMask .auth-cover{padding:20px 18px 14px}
    #authMask .auth-tabs{margin:14px 18px 2px}
    #authMask .modal-body{padding:14px 18px 4px}
    #authMask .modal-foot{padding:4px 18px 0}
    #authMask .auth-legal{padding:10px 18px 16px}
    #authMask .modal-foot .btn{min-width:0;flex:1}
    /* 窄屏下用户名占位符较长，缩字号避免被右边框裁掉 */
    #authMask .field input{font-size:12.5px;padding-left:34px;padding-right:10px}
    #authMask .auth-input>.ic{left:11px}
}
@media (prefers-reduced-motion:reduce){
    #authMask,#authMask .modal.auth::before,#authMask .modal.auth::after,
    #authMask .auth-logo,#authMask .auth-tabs{animation:none!important}
    #authMask .btn.auth-ok:hover::after{animation:none!important}
}

/* 轻量提示（登录成功后由 auth.js 使用） */
.gd-toast{
    position:fixed;top:86px;left:50%;transform:translateX(-50%);z-index:10000;
    padding:10px 22px;border-radius:10px;font-size:13px;letter-spacing:.5px;color:#bff2ff;
    background:rgba(10,26,48,.92);border:1px solid rgba(0,229,255,.45);
    box-shadow:0 12px 34px rgba(0,0,0,.4),0 0 18px rgba(0,229,255,.15);
    animation:gdaMaskIn .25s ease both;max-width:86vw;text-align:center;
}

/* ============ 顶部账户下拉（鼠标悬停用户名弹出：个人中心 / 退出） ============ */
/* .acc 容器：作为下拉菜单的定位基准，并在按钮与菜单之间留出透明桥接区避免悬停断开 */
.acc{position:relative;display:inline-flex;align-items:center;}
.acc:after{content:"";position:absolute;left:0;right:0;top:100%;height:12px;}
.acc-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:132px;padding:6px;margin:0;
    background:#0b1a33;border:1px solid rgba(255,255,255,.14);border-radius:10px;
    box-shadow:0 18px 42px rgba(0,0,0,.5);display:none;z-index:50;}
/* 登录用户（.acc.user）悬停/聚焦时显示；管理员（.is-admin）保持原逻辑；.show 供点击切换 */
.acc.user:hover .acc-menu,.acc.user:focus-within .acc-menu,
.acc.is-admin:hover .acc-menu,.acc-menu.show{display:block;}
.acc-menu:before{content:"";position:absolute;right:15px;top:-6px;width:10px;height:10px;
    background:#0b1a33;border-left:1px solid rgba(255,255,255,.14);
    border-top:1px solid rgba(255,255,255,.14);transform:rotate(45deg);}
.acc-menu a{display:flex;align-items:center;gap:7px;padding:8px 10px;border-radius:7px;
    font-size:13px;color:#c9d7ea;white-space:nowrap;text-decoration:none;}
.acc-menu a:hover{background:rgba(59,130,246,.2);color:#fff;}
.acc-menu a svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;
    stroke-linecap:round;stroke-linejoin:round;}
/* 非管理员隐藏管理后台等敏感项 */
.acc:not(.is-admin) .acc-menu .admin-only{display:none;}
