/* Nút "Thông Báo Update" trên header + bảng thông báo game mới update (kiểu danh sách thông báo, khung HUD vát góc) */

/* ---------- Nút trên header (cùng ngôn ngữ HUD với Kho đồ / Tìm kiếm) ---------- */
.nu-wrap{display:flex;align-items:center;}
html body header .nu-btn{
  --c1:10px;--c2:4px;--bd1:#8cc8ff;--bd2:#2f6bff;--f1:#0f2142;--f2:#0a1630;--tk:#bfe3ff;
  position:relative;isolation:isolate;display:flex;align-items:center;gap:7px;cursor:pointer;font:inherit;
  border:1px solid transparent;border-radius:0;background:none;box-shadow:none;outline:0;
  color:var(--text,#e9eef7);padding:8px 17px;font-size:13.5px;white-space:nowrap;
  transition:filter .18s ease,transform .18s ease;
}
html body header .nu-btn::before,html body header .nu-btn::after{content:"";position:absolute;z-index:-1;pointer-events:none;}
html body header .nu-btn::before{
  inset:-1px;background:linear-gradient(135deg,var(--bd1),var(--bd2));
  clip-path:polygon(var(--c1) 0,calc(100% - var(--c2)) 0,100% var(--c2),100% calc(100% - var(--c1)),calc(100% - var(--c1)) 100%,var(--c2) 100%,0 calc(100% - var(--c2)),0 var(--c1));
}
html body header .nu-btn::after{
  inset:.5px;
  background:
    linear-gradient(var(--tk),var(--tk)) 14px 0/16px 2px no-repeat,
    linear-gradient(var(--tk),var(--tk)) right 14px bottom 0/16px 2px no-repeat,
    linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,0) 55%),
    linear-gradient(135deg,var(--f1),var(--f2));
  clip-path:polygon(calc(var(--c1) - .9px) 0,calc(100% - var(--c2) + .9px) 0,100% calc(var(--c2) - .9px),100% calc(100% - var(--c1) + .9px),calc(100% - var(--c1) + .9px) 100%,calc(var(--c2) - .9px) 100%,0 calc(100% - var(--c2) + .9px),0 calc(var(--c1) - .9px));
}
html body header .nu-btn:hover,html body header .nu-btn[aria-expanded="true"]{--bd1:#ffe08a;--bd2:#ff9a3d;--tk:#ffe9b0;filter:brightness(1.12);}
html body header .nu-btn svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
html body header .nu-btn.has-new svg{color:#ffd166;animation:nuRing 2.4s ease-in-out infinite;transform-origin:50% 8%;}
@keyframes nuRing{0%,70%,100%{transform:rotate(0)}74%{transform:rotate(14deg)}80%{transform:rotate(-12deg)}86%{transform:rotate(8deg)}92%{transform:rotate(-4deg)}}
.nu-badge{position:absolute;top:-9px;right:-9px;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;
  background:#e5384f;color:#fff;font:800 11.5px/20px "JetBrains Mono",system-ui,sans-serif;text-align:center;pointer-events:none;
  clip-path:polygon(5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%,0 5px);}
.nu-badge[hidden]{display:none!important;}
html[data-theme="light"] body header .nu-btn{--bd1:#74a8ff;--bd2:#2f6bff;--f1:#ffffff;--f2:#eaf1ff;--tk:#2f6bff;}
@media(max-width:640px){
  html body header .nu-btn{--c1:8px;--c2:3px;padding:0;width:36px;height:36px;justify-content:center;}
  html body header .nu-btn .nu-label{display:none;}
}

/* ---------- Bảng thông báo ---------- */
.nu-panel{
  --c:18px;
  --nu-bg1:#0f1d36;--nu-bg2:#0a1424;--nu-text:#e9eef7;--nu-muted:#8ba0bd;--nu-blue:#6db4ff;
  --nu-hover:rgba(140,200,255,.09);--nu-pill:#16315c;--nu-pill-t:#8cc8ff;--nu-line:rgba(140,200,255,.14);
  position:fixed;z-index:10000;width:390px;max-width:calc(100vw - 16px);display:none;color:var(--nu-text);
  filter:drop-shadow(0 0 2px rgba(80,150,255,.55)) drop-shadow(0 16px 36px rgba(0,0,0,.6));
}
.nu-panel.open{display:block;animation:nuDrop .16s ease;}
@keyframes nuDrop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.nu-bd{position:absolute;inset:0;pointer-events:none;background:linear-gradient(135deg,#8cc8ff 0%,#2f6bff 55%,#a855f7 100%);
  clip-path:polygon(var(--c) 0,calc(100% - 6px) 0,100% 6px,100% calc(100% - var(--c)),calc(100% - var(--c)) 100%,6px 100%,0 calc(100% - 6px),0 var(--c));}
.nu-in{position:relative;margin:1.5px;background:linear-gradient(160deg,var(--nu-bg1),var(--nu-bg2));
  clip-path:polygon(calc(var(--c) - 1px) 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - var(--c) + 1px),calc(100% - var(--c) + 1px) 100%,5px 100%,0 calc(100% - 5px),0 calc(var(--c) - 1px));
  display:flex;flex-direction:column;padding:16px 8px 12px;}
.nu-in::before{content:"";position:absolute;left:26px;top:0;width:40px;height:2px;background:#bfe3ff;opacity:.8;}

.nu-head{display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 10px;}
.nu-head h2{margin:0;font-size:23px;font-weight:800;letter-spacing:.2px;}
.nu-x{width:34px;height:34px;border:0;border-radius:50%;background:rgba(140,200,255,.1);color:var(--nu-text);font-size:20px;line-height:1;cursor:pointer;}
.nu-x:hover{background:rgba(140,200,255,.2);}
.nu-tabs{display:flex;gap:6px;padding:12px 8px 4px;}
.nu-tab{position:relative;flex:1;border:0;cursor:pointer;font:inherit;font-size:14.5px;font-weight:700;padding:8px 10px;border-radius:999px;background:transparent;color:var(--nu-text);white-space:nowrap;}
.nu-tab:hover{background:var(--nu-hover);}
.nu-tab.on{background:var(--nu-pill);color:var(--nu-pill-t);}

/* danh sách: ~10 game hiện sẵn, kéo thanh bên phải để xem tới 20 game (JS tự chỉnh max-height) */
.nu-list{position:relative;overflow-y:auto;overscroll-behavior:contain;padding:0 4px 4px 0;margin-right:2px;
  scrollbar-width:thin;scrollbar-color:#3a78d8 transparent;}
.nu-list::-webkit-scrollbar{width:8px;}
.nu-list::-webkit-scrollbar-track{background:rgba(140,200,255,.07);border-radius:8px;}
.nu-list::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#8cc8ff,#2f6bff);border-radius:8px;}
.nu-readall{border:0;background:none;cursor:pointer;font:inherit;font-size:13.5px;color:var(--nu-blue);padding:2px 4px;}
.nu-readall:hover{text-decoration:underline;}

.nu-item{display:flex;align-items:center;gap:12px;padding:8px 10px 8px 8px;margin:0 0 0 4px;border-radius:10px;
  text-decoration:none;color:inherit;cursor:pointer;min-height:68px;box-sizing:border-box;}
.nu-item:hover,.nu-item:focus-visible{background:var(--nu-hover);outline:0;}
.nu-av{position:relative;flex:0 0 56px;width:56px;height:56px;}
.nu-av img,.nu-av .nu-ph{width:56px;height:56px;box-sizing:border-box;border-radius:8px;border:1.5px solid #2f6bff;object-fit:cover;display:block;background:#0b1830;box-shadow:0 0 0 1px rgba(140,200,255,.18),0 2px 8px rgba(0,0,0,.35);}
.nu-ph{display:flex;align-items:center;justify-content:center;font-size:22px;}
.nu-txt{flex:1;min-width:0;font-size:14.5px;line-height:1.35;}
.nu-txt b{font-weight:800;}
.nu-meta{display:block;margin-top:3px;font-size:12.5px;color:var(--nu-blue);font-weight:600;}
.nu-item.read .nu-txt{color:var(--nu-muted);}
.nu-item.read .nu-meta{color:var(--nu-muted);font-weight:500;}
.nu-dot{flex:0 0 12px;width:12px;height:12px;border-radius:50%;background:#2f8bff;}
.nu-item.read .nu-dot{visibility:hidden;}
.nu-empty{padding:34px 18px;text-align:center;color:var(--nu-muted);font-size:14px;line-height:1.6;}
.nu-foot{display:block;margin:8px 6px 2px;padding:12px;text-align:center;font-weight:800;font-size:14px;border-radius:10px;
  background:rgba(140,200,255,.1);color:var(--nu-text);text-decoration:none;}
.nu-foot:hover{background:rgba(140,200,255,.18);}

html[data-theme="light"] .nu-panel{--nu-bg1:#ffffff;--nu-bg2:#f2f6ff;--nu-text:#14213d;--nu-muted:#5f7394;--nu-blue:#2f6bff;
  --nu-hover:rgba(47,107,255,.08);--nu-pill:#dce8ff;--nu-pill-t:#1f55d6;}
html[data-theme="light"] .nu-x,html[data-theme="light"] .nu-foot{background:rgba(47,107,255,.09);}

@media(max-width:640px){
  .nu-panel{width:calc(100vw - 16px);}
  .nu-head h2{font-size:21px;}
}

.nu-tab.dot::after{content:"";position:absolute;top:6px;right:8px;width:8px;height:8px;border-radius:50%;background:#e5384f;}
.nu-sub{display:flex;justify-content:flex-end;min-height:24px;padding:2px 12px 2px;}
.nu-sub:empty{min-height:8px;}
