/* ======== Giao dien JX1 v2: nut / the / tieu de / thanh trang thai cat tu client (Spr\Ui3\道具, 技能, 主界面) ========
   - The (dtabs): thanh hoa van nhu "Vo cong chieu thuc / Ky nang song" cua bang Vo cong JX1.
   - Thanh trang thai duoi san dau: khung "新血条面板" voi thanh Sinh luc / Noi luc kieu JX1. */
:root{--jxtxt:#0d1714;--jxglow:#9fe6d2}
/* (nut bam: giu kieu jx1ui.css) */
/* ---- the trong bang (nhu bang Vo cong JX1) ---- */
.dtabs{gap:0!important;border:1px solid #000;box-shadow:0 0 0 1px #5a5850;background:#000}
.dtabs button{flex:1;border:0!important;border-radius:0!important;padding:5px 6px!important;margin:0;background:url(ui/jx1/flor.png) center/auto 100% repeat-x!important;
  color:#e8f6e6!important;font-weight:700;font-size:12px;text-shadow:0 0 2px #000,0 0 2px #000,0 1px 1px #000!important;border-right:1px solid #1d1d1a!important;filter:brightness(.78)}
.dtabs button:last-child{border-right:0!important}
.dtabs button.on{filter:none;color:#fff8d8!important;text-shadow:0 0 3px #0b3a30,0 0 2px #000,0 0 1px #000!important;box-shadow:inset 0 -2px 0 #e6c67a}
/* ---- tieu de muc (h3) trong bang: thanh hoa van nho ---- */
.tab h3,.mbox h3{background:url(ui/jx1/flor.png) center/auto 100% repeat-x;margin:12px -2px 8px;padding:4px 10px;border:1px solid #000;box-shadow:0 0 0 1px #5a5850;
  color:var(--jxtxt)!important;font-weight:700;text-shadow:0 0 2px var(--jxglow),0 0 2px var(--jxglow);border-bottom:1px solid #000}
.tab h3 small,.mbox h3 small{color:#1a2622;text-shadow:0 0 2px #cfe9df;font-weight:400}
.mbox h3:first-child{margin-top:0}
/* ---- o thong tin (card) nhu o "Ngan luong" cua bang Do vat ---- */
.card,.skl{background:#0b0b0a!important;border:1px solid #000!important;box-shadow:inset 0 0 0 1px #43413b,0 0 0 1px #24231f!important}
/* ---- thanh trang thai tren cung kieu JX1 (新血条面板): Cap | Sinh luc | Noi luc | Kinh nghiem | Luc chien ---- */
#hud{position:absolute;top:0!important;left:0!important;right:0!important;bottom:auto!important;transform:none!important;width:auto!important;z-index:5;
  display:grid!important;grid-template-columns:auto 1fr 1fr 1fr auto!important;gap:0 3px!important;align-items:center;padding:2px 4px!important;
  background:linear-gradient(#123224,#0a1d15)!important;border-bottom:1px solid #000;box-shadow:0 1px 0 #2f5a48,inset 0 1px 0 #2f5a48!important;pointer-events:none}
#hud .jxs{display:flex;align-items:center;gap:3px;font-size:11px;color:#e8dcb0;text-shadow:0 0 2px #000;white-space:nowrap}
#hud .jxs b{min-width:24px;padding:0 4px;height:15px;line-height:15px;text-align:center;background:#1d4a38;border:1px solid #000;box-shadow:inset 0 0 0 1px #3f7a62;color:#fff3c0;font-size:10.5px}
#hud .bar{height:15px!important;border:1px solid #000!important;box-shadow:inset 0 0 0 1px #3f6a58!important;border-radius:0!important;background:linear-gradient(#202020,#3a3a3a 45%,#151515)!important;padding:0!important}
#hud .bar i{inset:2px!important;width:0}
#hud .bar.hp i{background:url(ui/jx1/sbar_hp.png) 0 0/100% 100%!important} #hud .bar.mp i{background:url(ui/jx1/sbar_mp.png) 0 0/100% 100%!important}
#hud .bar.xp i{background:url(ui/jx1/sbar_xp.png) 0 0/100% 100%!important}
#hud .bar span{font-size:9.5px;line-height:15px;color:#fff;text-shadow:0 0 2px #000,0 0 2px #000,0 0 1px #000}
#mainSk{display:none}
#ctrlBtn{top:26px!important}
#skBuffs{top:54px!important}

/* ---- khung hop thoai: hoa van bac tren + duoi nhu bang Do vat ---- */
.mbox::before{background:url(ui/jx1/ornt2.png) center bottom/auto 100% no-repeat!important;top:-22px!important;height:30px!important}
.mbox{box-shadow:0 0 0 1px #000,0 0 0 2px #797369,0 0 0 4px #252320,0 0 0 5px #000,0 0 24px #000!important;background:#252320!important}
.mbox::after{display:none!important}
/* ---- o do: o den vien xam nhu luoi Do vat JX1 ---- */
.it{background:#020202!important;border:1px solid #3c3a35!important;box-shadow:inset 0 0 0 1px #000,0 0 0 1px #000!important}
.invgrid{background:#252320!important;border:1px solid #000!important;box-shadow:0 0 0 1px #797369}
.dktbl{width:100%;border-collapse:collapse;margin:6px 0}.dktbl td,.dktbl th{border:1px solid #3c3a35;padding:3px 6px;text-align:left}.dktbl th{color:#e8dcb0}
/* ---- Chat the gioi (goc duoi trai san dau, nhu khung chat JX1) ---- */
#chatBox{position:absolute;left:6px;bottom:8px;width:min(58%,340px);z-index:6;display:flex;flex-direction:column;align-items:flex-start;pointer-events:none;font-size:11.5px}
#chatHead,#chatIn{display:none}
#chatLines{width:100%;max-height:86px;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,#000 22px);mask-image:linear-gradient(transparent,#000 22px);display:flex;flex-direction:column;justify-content:flex-end;margin-bottom:4px}
#chatLines .cl{color:#f2ecd0;text-shadow:0 0 2px #000,0 0 2px #000,0 1px 1px #000;line-height:1.35;word-break:break-word}
#chatLines .cl i{font-style:normal;color:#9a9480} #chatLines .cl b{color:#ffd76a;font-weight:400} #chatLines .cl small{color:#8fc9b0}
#chatLines .cl.me b{color:#7fe0ff} #chatLines .cl.sys{color:#a9a39a;font-style:italic}
#chatBtn{pointer-events:auto;position:relative;width:34px;height:30px;border:1px solid #000;box-shadow:inset 0 0 0 1px #3f7a62;background:linear-gradient(#1d4a38,#0a1d15);color:#fff;font-size:15px;cursor:pointer}
#chatBtn b{position:absolute;top:-6px;right:-8px;min-width:16px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:16px;font-weight:400}
#chatBtn b:empty{display:none}
#chatBox.quiet #chatLines{display:none}
#chatBox.open{width:min(92%,420px);top:30px;bottom:8px;background:rgba(8,14,11,.92);border:1px solid #000;box-shadow:0 0 0 1px #5a5850,0 0 12px #000;pointer-events:auto;padding:0}
#chatBox.open #chatHead{display:flex;align-items:center;gap:4px;width:100%;padding:3px 6px;background:url(ui/jx1/flor.png) center/auto 100% repeat-x;border-bottom:1px solid #000;color:#0d1714;text-shadow:0 0 2px #9fe6d2}
#chatBox.open #chatHead small{color:#1a2622;flex:1} #chatX{background:none;border:0;font-size:14px;cursor:pointer;color:#0d1714}
#chatBox.open #chatLines{-webkit-mask-image:none;mask-image:none;flex:1;max-height:none;overflow-y:auto;justify-content:flex-start;padding:4px 6px;margin:0}
#chatBox.open #chatIn{display:flex;gap:4px;width:100%;padding:4px;border-top:1px solid #2b2a26}
#chatTxt{flex:1;min-width:0;background:#020202;border:1px solid #3c3a35;color:#f2ecd0;padding:4px 6px;font:inherit}
#chatBox.open #chatBtn{display:none}
@media (orientation:landscape){#chatBox{bottom:52px}}
/* ---- Nut Luyen cong / Nhiem vu goc duoi trai san dau (canh nut chat) ---- */
#modeSw{position:absolute;left:46px;bottom:8px;z-index:5;display:flex;border:1px solid #000;box-shadow:0 0 0 1px #5a5850}
#modeSw button{height:30px;padding:0 9px;border:0;background:linear-gradient(#26332d,#121a16);color:#cfc6a4;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
#modeSw{flex-direction:column}#modeSw b{color:#fff3c0;font-weight:600}
#mswMenu{position:absolute;left:-1px;bottom:31px;display:flex;flex-direction:column;border:1px solid #000;box-shadow:0 0 0 1px #5a5850;background:#121a16}
#mswMenu.hidden{display:none}#mswMenu button{text-align:left;min-width:132px}#mswMenu button+button{border-top:1px solid #000}
#modeSw button.on{background:linear-gradient(#6b5320,#3a2c0e);color:#fff3c0;box-shadow:inset 0 -2px 0 #e6c67a}
@media (orientation:landscape){#modeSw{bottom:52px}}
/* ---- Giang ho online ---- */
#netBtn{position:relative;flex:none;width:32px;height:32px;border-radius:50%;border:1px solid var(--gold2);background:radial-gradient(#1c2f3a,#06101a);font-size:16px;line-height:30px;padding:0}
#netBtn.on::after{content:attr(data-n);position:absolute;top:-4px;right:-5px;min-width:15px;height:15px;padding:0 3px;border-radius:8px;background:#e0402a;color:#fff;font-size:10px;line-height:15px;box-shadow:0 0 0 2px #0f1613}
.nmrow{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid #2b2a26}.nmrow>span{flex:1;min-width:0;font-size:12px}
.nmrow .it{flex:none}.nmg{font-size:22px;width:40px;text-align:center}
.pfgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:8px 0}.pfs{display:flex;flex-direction:column;align-items:center;gap:2px}.pfs small{font-size:10px}
.dktbl a{color:#ffd76a;text-decoration:none}
#chatBox.open #chatLines .cl b[data-pn]{cursor:pointer;text-decoration:underline dotted}
.nmrow .it{width:46px;height:46px;flex:none}
.pfs{width:100%}.pfs .it{width:100%;max-width:62px}
.ngate h3{text-align:center}.ngate .card .row input{flex:1}
body.nochat #modeSw{left:6px}
/* ---- Thanh o vat pham / o vo cong duoi san dau (kieu JX1) ---- */
#pad{left:50%!important;right:auto!important;bottom:4px!important;transform:translateX(-50%);width:auto!important;flex-wrap:nowrap!important;gap:0!important;align-items:center;
  padding:3px 4px;background:linear-gradient(#24231f,#0d0d0c);border:1px solid #000;box-shadow:0 0 0 1px #6b6656,inset 0 1px 0 #45423a,0 2px 8px #000;pointer-events:auto!important}
#pad .hb{display:flex;gap:2px;align-items:center}
#pad .hb+.hb{margin-left:5px;padding-left:5px;border-left:1px solid #000;box-shadow:-1px 0 0 #45423a}
#pad .pbtn{width:34px;height:34px;margin:0!important;border-radius:0!important;border:1px solid #4a473e!important;background:#030303!important;box-shadow:inset 0 0 0 1px #000!important;overflow:hidden}
#pad .pbtn i{inset:2px;background:center/contain no-repeat}
#pad .pbtn.sk i{background-size:cover}
#pad .pbtn b{left:2px;right:auto;bottom:0;font:700 9px/1 var(--font);color:#e8dcb0;text-shadow:0 0 2px #000,0 0 2px #000;z-index:2}
#pad .pbtn em{position:absolute;right:2px;bottom:1px;font:9px/1 var(--font);font-style:normal;color:#fff;text-shadow:0 0 2px #000,0 0 2px #000;z-index:2}
#pad .pbtn .cd{z-index:1}
#pad .pbtn.tp i{background-image:url(img/ep/ldp.png)}
#pad .pbtn.empty{opacity:1;border-style:solid!important} #pad .pbtn.empty i{opacity:0}
#pad .pbtn.cur{border-color:#e6c67a!important;box-shadow:inset 0 0 0 1px #000,0 0 6px #e6c67a!important}
#pad .pbtn.mn{width:42px;height:42px;border-color:#7b6d48!important;box-shadow:inset 0 0 0 1px #000,0 0 0 1px #000,0 0 6px #e6c67a55!important;cursor:pointer}
#pad .pbtn.mn i{background-size:cover}
#pad .sk .sklv{z-index:2}
#pad .pbtn:hover{border-color:#9a8a5a!important}
#chatBox,#modeSw{bottom:52px!important}
@media (max-width:440px){#pad .pbtn{width:30px;height:30px}#pad .pbtn.mn{width:38px;height:38px}}
/* ---- Auto: o tick ---- */
#ctrlBtn,#rotBtn{display:flex;align-items:center;gap:5px}
#ctrlBtn .ck,#rotBtn .ck{display:inline-block;width:12px;height:12px;border:1px solid #9a8a5a;background:#050505;box-shadow:inset 0 0 0 1px #000;position:relative}
#ctrlBtn.on .ck::after,#rotBtn.on .ck::after{content:"";position:absolute;left:3px;top:0;width:4px;height:8px;border:solid #7fe07a;border-width:0 2px 2px 0;transform:rotate(45deg)}
#ctrlBtn:not(.on),#rotBtn:not(.on){color:#a9a39a!important;background:linear-gradient(#26262a,#121214)!important;border-color:#55524a!important}
#pad .pbtn .pk{position:absolute;right:0;top:0;width:13px;height:12px;font:9px/12px sans-serif;text-decoration:none;color:#e8dcb0;background:#000a;z-index:3;text-align:center;cursor:pointer}
/* ---- Bo loc: che do thong minh ---- */
.lootf.smart .lc{display:none!important}
.lmode{margin-bottom:6px}
.it u.up{position:absolute;left:2px;top:1px;color:#7fe07a;font:700 11px/1 sans-serif;text-decoration:none;text-shadow:0 0 2px #000,0 0 2px #000}
.it u.up.pot{color:#ffd24a}
/* ---- vien o do theo do hiem (JX1): xanh / hiem / tim / Hoang Kim / Bach Kim ---- */
.it.r1{border-color:#4a86e8!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 8px #2a5ab0!important}
.it.r2{border-color:#4a86e8!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 8px #2a5ab0!important}
.it.r3{border-color:#c77bff!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 10px #7a3ab0!important}
.it.r4{border-color:#ffcc00!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 10px #b08000,0 0 5px #ffcc0099!important}
.it.r5{border-color:#9fe8ff!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 10px #4a9ab8,0 0 5px #9fe8ff99!important}
.warnc{border-color:#a33!important;background:#2a1010cc}

/* Xoay chiêu: cạnh nút Auto (góc trên phải, ngoài vùng đánh), không che nhân vật / quái */
#topCtl{position:absolute;right:8px;top:26px;z-index:4;display:flex;gap:6px;align-items:center}
#topCtl .chip{position:static!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important}

/* Bang chon chieu o F1-F4 (kieu JX1) */
#skPick{position:absolute;z-index:30;display:grid;grid-template-columns:repeat(6,36px);gap:3px;padding:6px;background:linear-gradient(#1c1d19,#0b0c0a);border:1px solid #6b5a2e;box-shadow:0 0 0 1px #000,0 6px 14px #000c}
#skPick .nm{grid-column:1/-1;font-size:11px;color:#e8dcc0;padding:0 2px 4px;border-bottom:1px solid #2e2b22;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#skPick .nm small{color:#a99f86}
#skPick .spk{width:36px;height:36px;padding:0;border:1px solid #3d3a30;background:#000 center/cover no-repeat;position:relative;cursor:pointer;box-shadow:inset 0 0 0 1px #000}
#skPick .spk:hover{border-color:#c9a85a}
#skPick .spk.on{border-color:#ffd24a;box-shadow:0 0 0 1px #ffd24a,0 0 8px #ffd24a88}
#skPick .spk u{position:absolute;right:1px;bottom:0;font:10px "IBM Plex Mono",monospace;color:#fff;text-decoration:none;text-shadow:0 0 2px #000,0 0 2px #000}
#skPick .spk i{position:absolute;left:1px;top:0;font:9px "IBM Plex Mono",monospace;font-style:normal;color:#ffd24a;text-shadow:0 0 2px #000,0 0 2px #000}

#pad .sk.nowp i{filter:grayscale(1) brightness(.55)}

#ktcBtn{position:static;flex:none;margin:0 6px 0 0;padding:3px 9px;font-size:12px;white-space:nowrap;width:auto;height:auto;border-radius:3px;background:linear-gradient(#3a3020,#201a10);border:1px solid #8a6d35;color:#ffd98a;cursor:pointer}
.gold .knbi{width:16px;height:16px;margin-left:8px;image-rendering:pixelated}
#knbTop{color:#ffd24a}
@media (max-width:520px){#ktcBtn{font-size:11px;padding:2px 5px}}
#chatAtt:empty{display:none}#chatAtt{display:flex;align-items:center;gap:2px;max-width:45%;white-space:nowrap;overflow:hidden;font-size:11px;pointer-events:auto}
#chatAtt button{border:0;background:none;color:#f88;cursor:pointer;padding:0 3px}
#chatLines a.chit{cursor:pointer;text-decoration:underline dotted;pointer-events:auto}
#chatLines .cl.pend{opacity:.6}

#skPick .spk0{color:#ff6a5a;font:bold 18px/34px serif;background:#2a1210}
/* v376: dien thoai man doc hep: nut Ky Tran Cac thanh nut tron (hinh KNB) nhu cac nut ben phai, khong de len ten / ban do */
@media (max-width:520px){
  #ktcBtn{position:relative!important;flex:none;width:34px!important;height:34px!important;min-height:0!important;padding:0!important;margin:0!important;border-radius:50%!important;font-size:0!important;color:transparent!important;
    background:url(img/ep/knb.png) center/20px no-repeat,radial-gradient(#3a2f1c,#120d06)!important;border:1px solid var(--gold2)!important}
  #top .topmid{overflow:hidden}
  #top .topmid .row{flex-wrap:wrap;gap:0 6px}
  #top .topmid .row>*{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
.it u.up.soon{color:#9aa4a8}

/* ---- Thong Thien Thap HUD (Bo dem thoi gian va toc do x1/x2/x3) ---- */
body.in-tower #u20zone,
body.in-tower #u20rc,
body.in-tower #u20dt,
body.in-tower #topCtl #towerSpdBtn {
  display: none !important;
}

#towerHud {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 30px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 480px;
  max-width: calc(100% - 24px);
  height: 54px;
  padding: 4px 12px;
  background: linear-gradient(180deg, rgba(32, 24, 14, 0.94), rgba(12, 9, 5, 0.96));
  border: 1.5px solid #d4af37;
  border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 225, 140, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #f5e4b8;
  font-family: "IBM Plex Mono", Consolas, monospace;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  box-sizing: border-box;
  transition: border-color .3s, box-shadow .3s, background .3s;
}

#towerHud.hidden {
  display: none !important;
}

/* Khoang 1: The Tang */
#towerHud .th-floor-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 95px;
  line-height: 1.15;
}
#towerHud .th-floor-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffd76a;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(255, 215, 106, 0.4);
  white-space: nowrap;
  letter-spacing: 0.5px;
}
#towerHud .th-floor-sub {
  font-size: 10px;
  color: #b0a080;
  font-weight: 600;
}

/* Tang Trum Boss Mode */
#towerHud.boss-floor {
  border-color: #ff5533;
  box-shadow: 0 0 0 1px #000, 0 0 16px rgba(255, 80, 50, 0.6), inset 0 0 8px rgba(255, 80, 50, 0.3);
}
#towerHud.boss-floor .th-floor-title {
  color: #ff6040;
  text-shadow: 0 1px 4px #000, 0 0 10px #ff3b1e;
}

/* Khoang 2: Dong Ho So & Thanh Do */
#towerHud .th-timer-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
#towerHud .th-timer-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
#towerHud .th-timer-icon {
  font-size: 16px;
  display: inline-block;
}
#towerHud .th-timer-digits {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}
#towerHud .th-gauge-bg {
  width: 100%;
  max-width: 160px;
  height: 5px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #4a3818;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
  box-shadow: inset 0 1px 2px #000;
}
#towerHud .th-gauge-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #38c868, #60e080);
  border-radius: 2px;
  transition: width 0.2s linear, background 0.3s;
  box-shadow: 0 0 6px #60e08088;
}

/* Canh bao cap 1: 15s - 30s */
#towerHud.warn .th-gauge-bar {
  background: linear-gradient(90deg, #e69500, #ffb52e);
  box-shadow: 0 0 6px #ffb52e88;
}
#towerHud.warn .th-timer-digits {
  color: #ffcc66;
}

/* Canh bao cap 2 (Nguy cap): < 15s - Chop do ruc don dap */
#towerHud.danger {
  border-color: #ff2020 !important;
  animation: thPulseRed .6s infinite alternate !important;
}
#towerHud.danger .th-gauge-bar {
  background: linear-gradient(90deg, #ff1a1a, #ff4d4d) !important;
  box-shadow: 0 0 8px #ff2020 !important;
}
#towerHud.danger .th-timer-digits {
  color: #ff3333 !important;
  text-shadow: 0 0 8px #ff0000, 0 0 16px #ff2020 !important;
  animation: thGlowDigits .6s infinite alternate;
}
#towerHud.danger .th-timer-icon {
  animation: thShake .4s infinite;
}

@keyframes thPulseRed {
  0% {
    box-shadow: 0 0 0 1px #000, 0 0 12px rgba(255, 30, 30, 0.7), inset 0 0 8px rgba(255, 30, 30, 0.4);
    border-color: #ff3b30;
  }
  100% {
    box-shadow: 0 0 0 1px #000, 0 0 28px rgba(255, 50, 50, 0.95), inset 0 0 16px rgba(255, 50, 50, 0.6);
    border-color: #ff0000;
  }
}

@keyframes thGlowDigits {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1.05); }
}

@keyframes thShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* Khoang 3: Cum Nut Toc Do Da Trang Thai */
#towerHud .th-spd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 40px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid #a88848;
  background: linear-gradient(180deg, #322512, #181208);
  color: #e6c888;
  font-family: inherit;
  box-shadow: 0 2px 6px #000, inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all .15s ease-out;
  position: relative;
  overflow: hidden;
}
#towerHud .th-spd:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}
#towerHud .th-spd:active {
  transform: translateY(1px) scale(0.96);
}
#towerHud .th-spd .th-spd-icon {
  display: none;
}
#towerHud .th-spd .th-spd-txt {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
#towerHud .th-spd .th-spd-sub {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.8;
  line-height: 1;
}

/* Muc 1x */
#towerHud .th-spd.spd-1 {
  border-color: #7a6538;
  background: linear-gradient(180deg, #282012, #141008);
  color: #c8b078;
}

/* Muc 2x (Cyan Lightning) */
#towerHud .th-spd.spd-2 {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #0e354a, #061c28);
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5), inset 0 0 6px rgba(56, 189, 248, 0.3);
}
#towerHud .th-spd.spd-2 .th-spd-txt {
  color: #e0f2fe;
  text-shadow: 0 0 8px #38bdf8;
}

/* Muc 3x (Blazing Gold Glow) */
#towerHud .th-spd.spd-3 {
  border-color: #ffd24a;
  background: linear-gradient(180deg, #784806, #361e02);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 210, 74, 0.7), inset 0 0 8px rgba(255, 210, 74, 0.5);
  animation: thSpd3xPulse 1.2s infinite alternate;
}
#towerHud .th-spd.spd-3 .th-spd-txt {
  color: #fff7cc;
  text-shadow: 0 0 8px #ffd24a, 0 0 14px #ff9500;
}
#towerHud .th-spd.spd-3 .th-spd-sub {
  color: #ffe57f;
}

@keyframes thSpd3xPulse {
  0% { box-shadow: 0 0 10px rgba(255, 210, 74, 0.6); }
  100% { box-shadow: 0 0 22px rgba(255, 210, 74, 0.95), inset 0 0 10px rgba(255, 210, 74, 0.6); }
}

/* Responsive tren Mobile Portrait (body.u2m) */
body.u2m #towerHud {
  top: 68px !important;
  width: calc(100% - 20px) !important;
  max-width: 400px !important;
  height: 52px !important;
  padding: 4px 10px !important;
  z-index: 15 !important;
}
body.u2m #towerHud .th-floor-title {
  font-size: 13.5px !important;
}
body.u2m #towerHud .th-timer-digits {
  font-size: 19px !important;
}
body.u2m #towerHud .th-spd {
  min-width: 68px !important;
  height: 38px !important;
}

/* Responsive tren Desktop Landscape (body.u20 & body.u2s) */
body.u20 #towerHud {
  top: 24px !important;
  width: 480px !important;
  height: 56px !important;
  z-index: 15 !important;
}
/* ==========================================================================
   ICON THÔNG THIÊN TỤ NGHĨA (NẰM TRONG BLOCK #u20rc DƯỚI MINIMAP)
   ========================================================================== */
#tuNghiaBtn.tu-nghia-icon-btn {
  align-self: flex-end;
  position: relative !important;
  z-index: 8;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: radial-gradient(circle, #2d2113 0%, #0d0a06 100%);
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 6px rgba(212, 175, 55, 0.45);
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
  pointer-events: auto !important;
}

#tuNghiaBtn.tu-nghia-icon-btn:hover {
  transform: scale(1.12);
  border-color: #ffe57f;
  box-shadow: 0 0 10px #ffd24a, 0 2px 6px #000;
}

#tuNghiaBtn.tu-nghia-icon-btn:active {
  transform: scale(0.94);
}

#tuNghiaBtn .tn-ico-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

#tuNghiaBtn .tn-ico-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: #ff3b30;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff3b30;
  animation: tnDotPulse 1.4s infinite alternate;
  pointer-events: none;
}

@keyframes tnDotPulse {
  0% { transform: scale(0.85); box-shadow: 0 0 4px #ff3b30; }
  100% { transform: scale(1.2); box-shadow: 0 0 10px #ff3b30, 0 0 14px #ff3b30; }
}

@media (pointer: coarse) {
  body.u2s #tuNghiaBtn {
    width: 36px !important;
    height: 36px !important;
  }
}

body.u2m #u20rc #tuNghiaBtn {
  width: 36px !important;
  height: 36px !important;
  margin-top: 0 !important;
}

/* ==========================================================================
   ICON VÕ QUÁN & CỌC GỖ TEST DPS (BLOCK #u20rc)
   ========================================================================== */
#voQuanBtn.voquan-icon-btn {
  align-self: flex-end;
  position: relative !important;
  z-index: 8;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: radial-gradient(circle, #2a1638 0%, #0d0614 100%);
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 6px rgba(224, 64, 251, 0.45);
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
  pointer-events: auto !important;
}

#voQuanBtn.voquan-icon-btn:hover {
  transform: scale(1.12);
  border-color: #ffd76a;
  box-shadow: 0 0 12px #e040fb, 0 2px 6px #000;
}

#voQuanBtn.voquan-icon-btn:active {
  transform: scale(0.94);
}

@media (pointer: coarse) {
  body.u2s #voQuanBtn {
    width: 36px !important;
    height: 36px !important;
  }
}

body.u2m #u20rc #voQuanBtn {
  width: 36px !important;
  height: 36px !important;
  margin-top: 0 !important;
}

/* ==========================================================================
   ICON NHIỆM VỤ BẢO VẬT TUẦN (NẰM TRONG GROUP TRÁI #u20lc)
   ========================================================================== */
#weeklyBaoVatBtn.weekly-baovat-btn {
  position: relative !important;
  z-index: 8;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  padding: 0;
  background: radial-gradient(circle, #382412 0%, #100a05 100%);
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 6px rgba(212, 175, 55, 0.45);
  cursor: pointer;
  margin: 0 !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
  pointer-events: auto !important;
}

#weeklyBaoVatBtn.weekly-baovat-btn:hover {
  transform: scale(1.08);
  border-color: #ffe57f;
  box-shadow: 0 0 10px #ffd24a, 0 2px 6px #000;
}

#weeklyBaoVatBtn.weekly-baovat-btn:active {
  transform: scale(0.92);
}

#weeklyBaoVatBtn .wbv-ico-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  image-rendering: pixelated;
}

#weeklyBaoVatBtn .wbv-ico-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: #ff3b30;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff3b30;
  animation: tnDotPulse 1.4s infinite alternate;
  pointer-events: none;
}

/* ==========================================================================
   ICON VÕ LÂM LIÊN ĐẤU PVP (NẰM TRONG GROUP TRÁI #u20lc PHÍA DƯỚI BẢO VẬT)
   ========================================================================== */
#pvpLobbyBtn.pvp-icon-btn {
  position: relative !important;
  z-index: 8;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  padding: 0;
  background: radial-gradient(circle, #3d1c10 0%, #100503 100%);
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(212, 175, 55, 0.45);
  cursor: pointer;
  margin: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
  pointer-events: auto !important;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#pvpLobbyBtn.pvp-icon-btn:hover {
  transform: scale(1.12);
  border-color: #ffe57f;
  box-shadow: 0 0 14px #ffd24a, 0 0 6px #ff5722, 0 2px 6px #000;
}

#pvpLobbyBtn.pvp-icon-btn:active {
  transform: scale(0.92);
}

#pvpLobbyBtn .pvp-ico-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

#pvpLobbyBtn::after {
  content: "Liên Đấu";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8.5px;
  font-weight: 700;
  color: #ffd24a;
  background: rgba(42, 17, 10, 0.95);
  border: 1px solid #ffd24a;
  border-radius: 3px;
  padding: 0 3px;
  line-height: 11px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 0 4px rgba(255, 210, 74, 0.5);
}

/* ==========================================================================
   GIAO DIỆN MODAL BẢO VẬT TUẦN
   ========================================================================== */
.bv-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #efe1bd;
  font-family: inherit;
  max-width: 620px;
  margin: 0 auto;
}

.bv-modal-header {
  text-align: center;
  border-bottom: 1px solid rgba(138, 106, 50, 0.4);
  padding-bottom: 8px;
}

.bv-modal-heading {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #ffd24a;
  text-shadow: 0 0 10px rgba(255, 210, 74, 0.6), 0 2px 4px #000;
  letter-spacing: 1px;
}

.bv-modal-sub {
  margin: 4px 0 6px;
  font-size: 12px;
  color: #d8ccb4;
}

.bv-countdown-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #8a6a32;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  color: #f3d88a;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.bv-countdown-badge b {
  color: #fff;
  font-size: 12.5px;
}

.bv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}

.bv-card {
  background: linear-gradient(180deg, #241a12 0%, #120d09 100%);
  border: 1.5px solid #736741;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
}

.bv-card.bv-ready {
  border-color: #ffd24a;
  box-shadow: 0 0 14px rgba(255, 210, 74, 0.4);
}

.bv-card.bv-claimed {
  border-color: #4a4536;
  opacity: 0.9;
}

.bv-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bv-card-icon-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: radial-gradient(circle, #2b1d12 0%, #0d0906 100%);
  border: 1.5px solid #d4af37;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 6px #000;
}

.bv-card-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
}

.bv-card-fx {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  pointer-events: none;
  animation: bvHaloBob 2s infinite ease-in-out alternate;
}

@keyframes bvHaloBob {
  0% { transform: translateY(-1px) scale(0.95); opacity: 0.85; }
  100% { transform: translateY(3px) scale(1.1); opacity: 1; }
}

.bv-card-info {
  flex: 1;
  min-width: 0;
}

.bv-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffe57f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bv-card-desc {
  font-size: 12px;
  font-weight: 700;
  margin: 2px 0;
}

.bv-card-meta {
  font-size: 11px;
  color: #b5a488;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bv-active-tag {
  color: #55f055 !important;
  font-weight: 700;
}

.bv-req-list {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(115, 103, 65, 0.5);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bv-req-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bv-req-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #d8ccb4;
}

.bv-req-label b {
  color: #f3d88a;
}

.bv-bar-bg {
  height: 6px;
  background: #181410;
  border: 1px solid #443828;
  border-radius: 3px;
  overflow: hidden;
}

.bv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #ffe57f);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.bv-card-foot {
  margin-top: 4px;
}

.bv-btn-claim {
  width: 100% !important;
  background: linear-gradient(180deg, #d4af37 0%, #8a6a12 100%) !important;
  color: #000 !important;
  font-weight: 700 !important;
  border: 1px solid #ffe57f !important;
  box-shadow: 0 0 10px rgba(255, 210, 74, 0.6) !important;
  cursor: pointer !important;
}

.bv-btn-done {
  width: 100% !important;
  background: #25221c !important;
  color: #7a7364 !important;
  border: 1px solid #4a4335 !important;
  cursor: not-allowed !important;
}

.bv-btn-locked {
  width: 100% !important;
  background: #1e1914 !important;
  color: #7a705e !important;
  border: 1px solid #3c3426 !important;
  cursor: not-allowed !important;
}

.bv-notice-box {
  background: rgba(22, 17, 12, 0.85);
  border: 1px dashed #8a6a32;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #c4b69c;
}

.bv-notice-title {
  font-weight: 700;
  color: #ffd24a;
  margin-bottom: 3px;
}

.bv-notice-box ul {
  margin: 0;
  padding-left: 16px;
}

.bv-notice-box li {
  margin-bottom: 2px;
}

/* ==========================================================================
   GIAO DIỆN SẢNH TỤ NGHĨA (MODAL)
   ========================================================================== */
/* Đảm bảo nút đóng modal luôn ở lớp trên cùng, không bị che bởi bất kỳ phần tử nào */
#modal .mx, body.u20 #modal .mx, body.u2m #modal .mx {
  z-index: 100 !important;
  cursor: pointer;
}

.tn-lobby-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 820px;
  margin: 0 auto;
}

/* ---- THANH CÔNG CỤ SẢNH TỤ NGHĨA (ACTION BAR) CHUẨN JX1 ---- */
.tn-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(180deg, #2b2721 0%, #1c1915 100%);
  border: 1px solid #5a4e3a;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
}

.tn-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tn-bar-icon {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid #8a7434;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  object-fit: cover;
  flex-shrink: 0;
}

.tn-bar-text {
  display: flex;
  flex-direction: column;
}

.tn-bar-title {
  font-size: 13px;
  font-weight: bold;
  color: #ffd24a;
  text-shadow: 0 1px 1px #000;
  line-height: 1.2;
}

.tn-bar-sub {
  font-size: 11px;
  color: #bcae96;
  line-height: 1.2;
  margin-top: 1px;
}

.tn-bar-sub b {
  color: #e8d49e;
}

/* Nút Tạo Chiến Đội phong cách Võ Lâm 1 cổ điển */
.tn-btn-new-party {
  font-size: 12px !important;
  font-weight: bold !important;
  padding: 4px 12px !important;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 3px !important;
}

@media (max-width: 480px) {
  .tn-action-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tn-bar-info {
    flex: 1 1 100%;
  }
  .tn-btn-new-party {
    width: 100%;
    justify-content: center;
  }
}

.tn-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tn-search-box {
  flex: 1;
}

.tn-search-box input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #70552b;
  border-radius: 6px;
  color: #f3d88a;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
}

.tn-search-box input:focus {
  border-color: #ffd24a;
  outline: none;
  box-shadow: 0 0 8px rgba(255, 210, 74, 0.4);
}

.tn-select-box {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d8c29d;
  font-size: 12.5px;
}

.tn-select-box select {
  padding: 6px 10px;
  background: #1e160e;
  border: 1px solid #70552b;
  border-radius: 6px;
  color: #f3d88a;
  font-size: 12.5px;
}

/* Danh Sách Phòng */
.tn-party-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.tn-party-row {
  background: linear-gradient(135deg, rgba(28, 20, 12, 0.92) 0%, rgba(16, 12, 7, 0.95) 100%);
  border: 1px solid #826330;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.tn-party-row:hover {
  border-color: #ffd24a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 210, 74, 0.25);
}

.tn-party-row.synergy-active {
  border-color: #ffd24a;
  box-shadow: 0 0 12px rgba(255, 210, 74, 0.35);
  background: linear-gradient(135deg, rgba(38, 26, 12, 0.94) 0%, rgba(20, 14, 7, 0.96) 100%);
}

.tn-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tn-row-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tn-row-title {
  font-size: 15px;
  color: #ffe680;
  font-weight: 700;
}

.tn-row-floor {
  font-size: 12px;
  padding: 2px 7px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid #d4af37;
  border-radius: 4px;
  color: #f3d88a;
  font-weight: 600;
}

.tn-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.tn-badge.wait {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid #4caf50;
  color: #81c784;
}

.tn-badge.full {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
  color: #ffd54f;
}

.tn-badge.run {
  background: rgba(244, 67, 54, 0.25);
  border: 1px solid #f44336;
  color: #e57373;
  animation: tnDotPulse 1.2s infinite alternate;
}

.tn-row-btns {
  display: flex;
  gap: 6px;
}

/* 5 Slots trong mỗi phòng */
.tn-slots-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.tn-slot {
  background: rgba(14, 10, 6, 0.7);
  border: 1px solid #5a4220;
  border-radius: 6px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 80px;
  position: relative;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.tn-slot.filled {
  border-color: #8a6a32;
  background: linear-gradient(180deg, rgba(32, 22, 13, 0.85) 0%, rgba(18, 12, 7, 0.9) 100%);
}

.tn-slot.filled:hover {
  border-color: #ffd24a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.tn-slot.empty {
  border: 1.5px dashed rgba(212, 175, 55, 0.4);
  cursor: pointer;
  background: rgba(20, 15, 9, 0.5);
  justify-content: center;
}

.tn-slot.empty:hover {
  border-style: solid;
  border-color: #ffd24a;
  background: rgba(255, 210, 74, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 210, 74, 0.35);
}

.tn-slot-fac-series {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 98%;
}

.tn-slot-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  margin: 3px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tn-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1.5px solid #d4af37;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
  object-fit: contain;
  background: #111;
}

.tn-lead-crown {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 13px;
  z-index: 2;
  filter: drop-shadow(0 0 4px rgba(255, 210, 74, 0.8));
}

.tn-slot-skname {
  font-size: 10px;
  color: #ffd24a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
  margin-bottom: 2px;
}

.tn-slot-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.tn-slot-sub {
  font-size: 9.5px;
  color: #a89476;
}

.tn-slot-num {
  font-size: 10px;
  color: #8c7657;
  margin-bottom: 4px;
}

.tn-slot-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tn-slot-dash {
  color: #6a573e;
  font-size: 10.5px;
}

.tn-slot-empty-state .tn-slot-action {
  font-size: 9px;
  color: #8c7657;
  margin-top: 2px;
}

.tn-row-synergy {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 4px;
}

.tn-row-synergy.ok {
  background: rgba(255, 210, 74, 0.15);
  border: 1px solid #ffd24a;
  color: #ffe680;
  text-align: center;
}

.tn-row-synergy.tip {
  color: #c4b093;
}

.tn-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d8c29d;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #5a4220;
}

.tn-empty {
  text-align: center;
  padding: 30px 10px;
  color: #8c7657;
  font-size: 13.5px;
}

/* ==========================================================================
   GIAO DIỆN PHÒNG CHỜ (ROOM DETAIL / LOBBY)
   ========================================================================== */
.tn-room-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.tn-room-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  padding-bottom: 8px;
}

.tn-room-topbar h3 {
  margin: 0;
  color: #ffd24a;
  font-size: 18px;
}

.tn-synergy-banner {
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
}

.tn-synergy-banner.gold {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(255, 210, 74, 0.35) 50%, rgba(212, 175, 55, 0.2) 100%);
  border: 1px solid #ffd24a;
  color: #fff2a3;
  box-shadow: 0 0 14px rgba(255, 210, 74, 0.4);
}

.tn-synergy-banner.tip {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #70552b;
  color: #d8c29d;
}

.tn-detail-podiums {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.tn-podium {
  background: linear-gradient(180deg, rgba(32, 22, 13, 0.9) 0%, rgba(15, 10, 6, 0.95) 100%);
  border: 1.5px solid #785a2b;
  border-radius: 8px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 120px;
  gap: 4px;
}

.tn-podium.filled {
  border-color: #d4af37;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.tn-podium.empty {
  border: 1px dashed rgba(160, 130, 90, 0.35);
  background: rgba(14, 10, 6, 0.35);
  justify-content: center;
  gap: 8px;
}

.tn-pod-slot-label {
  font-size: 11px;
  color: #8c7657;
}

.tn-pod-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 4px;
}

.tn-pod-empty-dash {
  color: #6a573e;
  font-size: 14px;
}

.tn-pod-empty-txt {
  font-size: 11px;
  color: #6a573e;
}

.tn-pod-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #111;
  text-align: center;
  white-space: nowrap;
}

.tn-pod-tag.dim {
  background: #3e3020;
  color: #c9b79c;
}

.tn-pod-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  margin: 4px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tn-pod-skimg {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: 2px solid #d4af37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  object-fit: contain;
  background: #111;
}

.tn-pod-name {
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.tn-pod-name.dim {
  color: #8c7657;
}

.tn-pod-sk {
  font-size: 11px;
  color: #ffd24a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.tn-pod-lvl {
  font-size: 10.5px;
  color: #a89476;
}

.tn-pod-status {
  margin-top: auto;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.tn-pod-status.ready {
  background: rgba(76, 175, 80, 0.25);
  border: 1px solid #4caf50;
  color: #81c784;
}

.tn-pod-status.wait {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
  color: #ffd54f;
}

.tn-room-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.tn-room-actions button.big {
  flex: 1;
  font-size: 15px !important;
  font-weight: 800 !important;
  padding: 10px 18px !important;
}

.tn-room-actions button.glow {
  animation: tnBtnPulseGlow 1.5s infinite alternate;
}

@keyframes tnBtnPulseGlow {
  0% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.6); }
  100% { box-shadow: 0 0 24px rgba(76, 175, 80, 0.95), inset 0 0 10px rgba(255, 255, 255, 0.4); }
}

/* Modal Tạo Phòng */
.tn-create-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.tn-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tn-form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #ffd24a;
}

.tn-form-group input,
.tn-form-group select {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #70552b;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}

.tn-form-group input:focus,
.tn-form-group select:focus {
  border-color: #ffd24a;
  outline: none;
}

/* Responsive cho Mobile */
@media (max-width: 640px) {
  .tn-slots-container,
  .tn-detail-podiums {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .tn-slot {
    min-height: 70px;
    padding: 4px 2px;
  }
  .tn-slot-avatar {
    font-size: 16px;
  }
  .tn-slot-name {
    font-size: 10.5px;
  }
  .tn-slot-txt {
    font-size: 9.5px;
  }
  .tn-row-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ==============================================================================
 * BĂNG RÔN THÔNG BÁO CHỮ CHẠY TOÀN SERVER (MARQUEE BROADCAST BANNER)
 * ============================================================================== */
#sysMarquee {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 780px);
  height: 28px;
  line-height: 26px;
  z-index: 9998;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(24, 10, 5, 0.94) 0%, rgba(68, 18, 12, 0.96) 25%, rgba(98, 22, 14, 0.98) 50%, rgba(68, 18, 12, 0.96) 75%, rgba(24, 10, 5, 0.94) 100%);
  border: 1.5px solid #d4af37;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), 0 0 10px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 230, 120, 0.3);
  font-family: "IBM Plex Mono", Consolas, monospace, sans-serif;
  font-size: 12px;
  color: #fff4d0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#sysMarquee.hidden {
  display: none !important;
}

.smq-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 100%;
  background: linear-gradient(90deg, #7c1a10, #a02214);
  color: #ffd76a;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-right: 1px solid #d4af37;
  border-radius: 12px 0 0 12px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.5);
  z-index: 2;
  cursor: pointer;
  flex-shrink: 0;
}

.smq-badge:hover {
  filter: brightness(1.2);
}

.smq-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.smq-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: smq-scroll 24s linear infinite;
  color: #fce8a6;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.smq-content:hover,
.smq-track:hover .smq-content {
  animation-play-state: paused;
}

.smq-content b {
  color: #ffd24a;
  font-weight: bold;
}

.smq-cta {
  display: inline-block;
  margin: 0 6px;
  padding: 1px 8px;
  background: linear-gradient(180deg, #ffd76a, #c89524);
  color: #2b1100;
  font-weight: bold;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #ffe890;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.smq-cta:hover {
  transform: scale(1.06);
  filter: brightness(1.15);
}

.smq-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 100%;
  background: transparent;
  border: none;
  color: #c8a45a;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;
  flex-shrink: 0;
  border-radius: 0 12px 12px 0;
  transition: background 0.15s, color 0.15s;
}

.smq-close:hover {
  background: rgba(180, 40, 30, 0.45);
  color: #ff5050;
}

@keyframes smq-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

#sysMarqueeOpen {
  position: fixed;
  top: 30px;
  left: 12px;
  z-index: 9997;
  background: rgba(40, 14, 8, 0.9);
  border: 1px solid #d4af37;
  color: #ffd76a;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  font-family: inherit;
  transition: all 0.2s ease;
}
#sysMarqueeOpen:hover {
  background: #6a1810;
  color: #fff;
  transform: scale(1.05);
}
#sysMarqueeOpen.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  #sysMarquee {
    top: 24px;
    height: 25px;
    line-height: 23px;
    font-size: 11px;
    width: 98vw;
  }
  .smq-badge {
    padding: 0 6px;
    font-size: 10px;
  }
  .smq-cta {
    padding: 0 6px;
    font-size: 10px;
  }
}

/* ---- Dã Tẩu: Modal Chọn Phần Thưởng & Cấu Hình Auto ---- */
.dt-reward-win {
  padding: 4px;
  animation: dtWinFadeIn 0.25s ease-out;
}
@keyframes dtWinFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.dt-rw-card {
  position: relative;
  background: #141419;
  border: 1px solid #3c3830;
  border-radius: 6px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 3px 10px rgba(0,0,0,0.5);
}
.dt-rw-card:hover {
  transform: translateY(-3px);
  border-color: #ffd24a !important;
  box-shadow: 0 6px 18px rgba(255, 210, 74, 0.25), inset 0 0 8px rgba(255, 210, 74, 0.1) !important;
}
.dt-rw-card.jackpot {
  background: linear-gradient(145deg, #2d1800 0%, #150f07 100%) !important;
  border-color: #ff9800 !important;
  animation: dtJackpotPulse 2.2s infinite ease-in-out;
}
@keyframes dtJackpotPulse {
  0% { box-shadow: 0 0 10px rgba(255, 152, 0, 0.3), inset 0 0 8px rgba(255, 210, 74, 0.15); border-color: #ff9800; }
  50% { box-shadow: 0 0 22px rgba(255, 152, 0, 0.65), inset 0 0 14px rgba(255, 210, 74, 0.35); border-color: #ffd24a; }
  100% { box-shadow: 0 0 10px rgba(255, 152, 0, 0.3), inset 0 0 8px rgba(255, 210, 74, 0.15); border-color: #ff9800; }
}
.dt-rw-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  background: linear-gradient(135deg, #d32f2f, #ff6f00);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7);
  text-transform: uppercase;
}
