/* ===== 站点公告样式 ===== */

#noticeHost{position:relative;z-index:20}

/* ---------- 顶部公告条 ---------- */
.notice-bar{
  position:relative;display:flex;align-items:flex-start;gap:10px;
  padding:9px 18px;font-size:13.5px;line-height:1.55;
  border-bottom:1px solid #262b36;color:#e6e9ef;
  background:linear-gradient(90deg,rgba(79,140,255,.16),rgba(79,140,255,.04));
  animation:noticeIn .28s ease;
}
@keyframes noticeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

.notice-bar.info{background:linear-gradient(90deg,rgba(79,140,255,.18),rgba(79,140,255,.04));border-bottom-color:rgba(79,140,255,.35)}
.notice-bar.success{background:linear-gradient(90deg,rgba(46,204,113,.16),rgba(46,204,113,.03));border-bottom-color:rgba(46,204,113,.32)}
.notice-bar.warning{background:linear-gradient(90deg,rgba(245,166,35,.16),rgba(245,166,35,.03));border-bottom-color:rgba(245,166,35,.34)}
.notice-bar.danger{background:linear-gradient(90deg,rgba(255,91,91,.16),rgba(255,91,91,.03));border-bottom-color:rgba(255,91,91,.34)}

.notice-icon{flex:none;font-size:14px;line-height:1.5;margin-top:1px}

.notice-main{flex:1;min-width:0}

.notice-head{
  display:flex;align-items:center;gap:8px;
  cursor:pointer;user-select:none;min-height:21px;
}
.notice-title-wrap{flex:1;min-width:0;overflow:hidden;position:relative;height:21px}
.notice-title{
  display:inline-block;white-space:nowrap;font-weight:600;color:#fff;
  will-change:transform;
}
.notice-title.scrolling{
  animation:mq var(--dur,14s) linear infinite alternate;
  padding-right:24px;
}
@keyframes mq{
  from{transform:translateX(0)}
  to{transform:translateX(var(--shift,0))}
}
.notice-bar:hover .notice-title.scrolling{animation-play-state:paused}

.notice-chevron{
  flex:none;color:#8b94a7;font-size:11px;line-height:1;
  transition:transform .22s ease;
}
.notice-bar.expanded .notice-chevron{transform:rotate(180deg);color:#c8d0dd}

.notice-body{
  max-height:0;overflow:hidden;opacity:0;
  transition:max-height .3s ease,opacity .22s ease,margin .2s ease;
  color:#a8b1c2;font-size:12.8px;white-space:pre-wrap;word-break:break-word;
}
.notice-bar.expanded .notice-body{max-height:300px;opacity:1;margin-top:7px;overflow-y:auto}

.notice-actions{flex:none;display:flex;align-items:center;gap:6px;padding-top:1px}
.notice-more{
  position:relative;
  color:#8fb6ff;text-decoration:none;font-size:12.5px;line-height:1.6;
  padding:1px 9px;border:1px solid rgba(79,140,255,.35);border-radius:20px;
  cursor:pointer;white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
/* 热区上下各扩 8px，手指更好点 */
.notice-more::after{
  content:'';position:absolute;inset:-8px -4px;
}
.notice-more:hover{background:rgba(79,140,255,.14)}
.notice-more:active{background:rgba(79,140,255,.22)}
.notice-close{
  position:relative;
  width:26px;height:26px;border:0;border-radius:50%;cursor:pointer;
  background:transparent;color:#8b94a7;font-size:17px;line-height:1;
  display:flex;align-items:center;justify-content:center;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
/* 热区扩大到 44×44，视觉尺寸不变，手机上不容易点错 */
.notice-close::before{
  content:'';position:absolute;inset:-9px;border-radius:50%;
}
.notice-close:hover{background:rgba(255,255,255,.1);color:#fff}
.notice-close:active{background:rgba(255,255,255,.16)}

/* 锁定态（后台禁止关闭）：右侧只留「全部」按钮 */
.notice-bar.locked .notice-actions{padding-top:0}

/* ---------- 弹窗公告 ---------- */
.popup-mask{
  position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.76);
  display:flex;align-items:center;justify-content:center;padding:20px;
  animation:nmaskIn .2s ease;
}
@keyframes nmaskIn{from{opacity:0}to{opacity:1}}

.popup-box{
  width:100%;max-width:560px;background:#181b22;
  border:1px solid #2c3242;border-radius:16px;overflow:hidden;
  box-shadow:0 28px 70px rgba(0,0,0,.6);
  animation:popIn .26s cubic-bezier(.2,.9,.3,1.2);
  display:flex;flex-direction:column;
  max-height:86vh;max-height:86dvh;
}
@keyframes popIn{from{opacity:0;transform:scale(.94) translateY(8px)}to{opacity:1;transform:none}}

.popup-box.info{border-top:3px solid #4f8cff}
.popup-box.success{border-top:3px solid #2ecc71}
.popup-box.warning{border-top:3px solid #f5a623}
.popup-box.danger{border-top:3px solid #ff5b5b}

.popup-head{
  display:flex;align-items:flex-start;gap:10px;
  padding:20px 22px 14px;
}
.popup-icon{flex:none;font-size:18px;line-height:1.3}
.popup-titletx{flex:1;min-width:0}
.popup-titletx h3{
  margin:0;font-size:16.5px;font-weight:600;color:#fff;line-height:1.5;
  word-break:break-word;
}
.popup-titletx .popup-sub{
  margin-top:4px;color:#5b6478;font-size:11.5px;
}
.popup-x{
  flex:none;width:30px;height:30px;border:0;border-radius:50%;cursor:pointer;
  background:transparent;color:#8b94a7;font-size:20px;line-height:1;
}
.popup-x:hover{background:rgba(255,255,255,.1);color:#fff}

.popup-body{
  flex:1 1 auto;min-height:0;overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  margin:0 22px;padding:16px 0;
  color:#c2cad8;font-size:13.5px;line-height:1.75;
  white-space:pre-wrap;word-break:break-word;
  border-top:1px solid #262b36;
}

.popup-foot{
  padding:18px 22px 20px;display:flex;align-items:center;gap:10px;
}
.popup-ok{
  padding:9px 22px;background:#4f8cff;border:0;border-radius:9px;
  color:#fff;font-size:13.5px;font-weight:600;cursor:pointer;
}
.popup-ok:hover{background:#3d7bf0}
.popup-hint{color:#5b6478;font-size:11.5px;margin-left:auto}

/* ---------- ② 强制首层弹窗：盖住整站，无关闭入口，倒计时自动消失 ---------- */
.force-layer{
  position:fixed;inset:0;z-index:2147483000;
  display:flex;align-items:center;justify-content:center;padding:22px;
  background:
    radial-gradient(900px 520px at 50% -8%,rgba(91,140,255,.20),transparent 62%),
    rgba(4,6,10,.9);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
  backdrop-filter:blur(10px) saturate(120%);
  animation:forceIn .28s ease;
}
@keyframes forceIn{from{opacity:0}to{opacity:1}}

.force-box{
  position:relative;width:100%;max-width:620px;
  max-height:84vh;max-height:84dvh;overflow:auto;
  padding:30px 30px 22px;border-radius:20px;
  background:linear-gradient(180deg,#171c28,#11151e);
  border:1px solid rgba(122,162,255,.26);
  box-shadow:0 40px 100px -40px rgba(0,0,0,.95),0 0 0 1px rgba(255,255,255,.03);
  animation:forceBox .34s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes forceBox{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
.force-box::before{
  content:'';position:absolute;left:0;right:0;top:0;height:3px;border-radius:20px 20px 0 0;
  background:linear-gradient(90deg,#5b8cff,#a06bff);
}
.force-box.info::before{background:linear-gradient(90deg,#5b8cff,#7aa2ff)}
.force-box.success::before{background:linear-gradient(90deg,#2ecc71,#7ae2a6)}
.force-box.warning::before{background:linear-gradient(90deg,#f5a623,#ffd27a)}
.force-box.danger::before{background:linear-gradient(90deg,#ff3b5c,#ff8a5c)}

.force-head{display:flex;align-items:center;gap:9px;margin-bottom:13px}
.force-icon{font-size:19px;line-height:1}
.force-cat{
  font-size:11px;letter-spacing:1.5px;
  color:#9fb6ff;padding:2px 9px;border-radius:999px;
  background:rgba(91,140,255,.14);border:1px solid rgba(91,140,255,.24);
}
.force-box.success .force-cat{color:#77d79c;background:rgba(46,204,113,.14);border-color:rgba(46,204,113,.26)}
.force-box.warning .force-cat{color:#f0b757;background:rgba(245,166,35,.14);border-color:rgba(245,166,35,.26)}
.force-box.danger .force-cat{color:#ff9db0;background:rgba(255,59,92,.14);border-color:rgba(255,59,92,.26)}

.force-title{
  margin:0;font-size:21px;line-height:1.45;font-weight:700;color:#fff;
  letter-spacing:.2px;word-break:break-word;
}

.force-body{
  margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.07);
  color:#b6c0d2;font-size:14px;line-height:1.85;
  white-space:pre-wrap;word-break:break-word;
  max-height:46vh;max-height:46dvh;overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.force-foot{margin-top:20px}
.force-progress{height:3px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden}
.force-progress i{
  display:block;height:100%;width:100%;transform-origin:left center;border-radius:3px;
  background:linear-gradient(90deg,#5b8cff,#a06bff);
  box-shadow:0 0 14px rgba(122,162,255,.6);
}
.force-box.success .force-progress i{background:linear-gradient(90deg,#2ecc71,#7ae2a6);box-shadow:0 0 14px rgba(46,204,113,.5)}
.force-box.warning .force-progress i{background:linear-gradient(90deg,#f5a623,#ffd27a);box-shadow:0 0 14px rgba(245,166,35,.5)}
.force-box.danger .force-progress i{background:linear-gradient(90deg,#ff3b5c,#ff9f43);box-shadow:0 0 14px rgba(255,59,92,.5)}
.force-countdown{
  margin-top:10px;text-align:center;font-size:12px;color:#6b768a;
  letter-spacing:.3px;font-variant-numeric:tabular-nums;
}
.force-countdown.ready{color:#8fe3b0}

.force-step{
  margin-left:auto;font-size:11px;color:#6b768a;
  letter-spacing:1px;font-variant-numeric:tabular-nums;
}

.force-ok{
  display:block;width:100%;margin-top:14px;padding:13px;
  border:0;border-radius:12px;cursor:pointer;
  font-family:inherit;font-size:14.5px;font-weight:600;color:#fff;
  background:linear-gradient(135deg,#5b8cff,#8a6bff);
  box-shadow:0 16px 34px -18px rgba(91,140,255,.95);
  transition:opacity .25s ease,transform .16s ease,filter .16s ease,background .25s;
}
.force-ok:not(:disabled):hover{filter:brightness(1.12);transform:translateY(-1px)}
.force-box.danger .force-ok{background:linear-gradient(135deg,#ff3b5c,#ff8a5c);box-shadow:0 16px 34px -18px rgba(255,59,92,.95)}
.force-box.warning .force-ok{background:linear-gradient(135deg,#f5a623,#ffb84d);box-shadow:0 16px 34px -18px rgba(245,166,35,.95);color:#2a1c00}
.force-box.success .force-ok{background:linear-gradient(135deg,#2ecc71,#65d99a);box-shadow:0 16px 34px -18px rgba(46,204,113,.95);color:#062a16}
.force-ok.wait{
  background:#242b3a !important;color:#7b8699 !important;
  opacity:.55;cursor:not-allowed;box-shadow:none !important;
}

@media(max-width:480px){
  .force-layer{padding:14px}
  .force-box{padding:22px 18px 18px;border-radius:16px;max-height:88vh;max-height:88dvh}
  .force-title{font-size:17.5px}
  .force-body{font-size:13.5px;line-height:1.8;max-height:42vh;max-height:42dvh}
  .force-countdown{font-size:11.5px}
  .force-ok{padding:12px;font-size:14px;margin-top:12px}
  .force-step{font-size:10.5px;letter-spacing:.5px}
}

/* ---------- 全部公告弹窗 ---------- */
.nmask{
  position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.74);
  display:flex;align-items:center;justify-content:center;padding:20px;
  animation:nmaskIn .18s ease;
}
.nbox{
  width:100%;max-width:660px;max-height:78vh;overflow:auto;
  background:#181b22;border:1px solid #262b36;border-radius:14px;
  padding:22px 24px 18px;box-shadow:0 24px 60px rgba(0,0,0,.5);
}
.nbox h3{margin:0 0 16px;font-size:16px;font-weight:600;color:#e6e9ef;display:flex;align-items:center;gap:10px}
.nbox h3 .nclose-all{margin-left:auto;background:transparent;border:0;color:#8b94a7;font-size:22px;cursor:pointer;line-height:1}
.nbox h3 .nclose-all:hover{color:#fff}
.nitem{padding:13px 0;border-top:1px solid #262b36}
.nitem:first-of-type{border-top:0;padding-top:0}
.nitem h4{margin:0 0 6px;font-size:14px;font-weight:600;color:#fff;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nitem p{margin:0;color:#a8b1c2;font-size:13px;white-space:pre-wrap;word-break:break-word}
.nitem .ntime{color:#5b6478;font-size:11.5px;font-weight:400}
.nbadge{font-size:10.5px;padding:1px 7px;border-radius:20px;font-weight:400}
.nbadge.info{background:rgba(79,140,255,.18);color:#8fb6ff}
.nbadge.success{background:rgba(46,204,113,.16);color:#77d79c}
.nbadge.warning{background:rgba(245,166,35,.16);color:#f0b757}
.nbadge.danger{background:rgba(255,91,91,.16);color:#ff9a9a}
.nbadge.pin{background:rgba(245,166,35,.2);color:#ffcb6b}
.nbadge.pop{background:rgba(155,89,255,.2);color:#c4a5ff}
.nbadge.lock{background:rgba(255,91,91,.2);color:#ff9a9a}

/* ---------- 平板及以下 ---------- */
@media(max-width:768px){
  .notice-bar{padding:10px 14px;font-size:13px;gap:9px}
  .notice-title-wrap{height:21px}
  .notice-close{width:32px;height:32px;font-size:19px;margin:-3px -4px -3px 0}
  .notice-close::before{inset:-6px}
  .popup-head{padding:18px 18px 13px}
  .popup-body{margin:0 18px}
  .popup-foot{padding:16px 18px 18px}
  .nbox{padding:20px 18px 16px}
  .nbox{max-height:84vh}
}

/* ---------- 手机 ---------- */
@media(max-width:480px){
  .notice-bar{padding:9px 12px;font-size:12.5px;gap:8px}
  .notice-icon{font-size:13px}
  .notice-title-wrap{height:20px}
  .notice-chevron{font-size:10px}
  .notice-more{padding:0 8px;font-size:11.5px;line-height:1.75}
  .notice-close{width:34px;height:34px;font-size:20px;margin:-5px -5px -5px 0}
  .notice-close::before{inset:-5px}
  .notice-bar.expanded .notice-body{max-height:220px}
  .notice-body{font-size:12.2px}

  .popup-mask{padding:12px}
  .popup-box{max-height:90vh;max-height:90dvh;border-radius:14px}
  .popup-head{padding:16px 16px 12px;gap:8px}
  .popup-icon{font-size:16px}
  .popup-titletx h3{font-size:15.5px;line-height:1.45}
  .popup-titletx .popup-sub{font-size:11px}
  .popup-x{width:34px;height:34px;font-size:22px;margin:-4px -6px 0 0}
  .popup-body{margin:0 16px;padding:14px 0;font-size:13px}
  .popup-foot{padding:14px 16px 16px;flex-wrap:wrap}
  .popup-ok{width:100%;padding:12px;font-size:14px}
  .popup-hint{width:100%;text-align:center;margin:10px 0 0}

  .nbox{padding:18px 16px 14px;max-height:86vh}
  .nbox h3{font-size:15px;margin-bottom:13px}
  .nitem h4{font-size:13.5px}
  .nitem p{font-size:12.5px}
}
