/* ═══════════════════════════════════════════════════════════════════════════
 *  PK · نبرد زنده
 * ═══════════════════════════════════════════════════════════════════════════ */
#liveRoom49{ --pkT:146px; --pkH:min(66vw, 318px) }
@media (max-height:700px){ #liveRoom49{ --pkT:128px; --pkH:min(56vw, 260px) } }

/* تصویر میزبان همین اتاق: نیمهٔ «شروع» */
#liveRoom49.pk109on #lrVid{
  inset:auto !important; top:var(--pkT) !important; inset-inline-start:0 !important;
  width:50% !important; height:var(--pkH) !important; z-index:2 !important; border-radius:0;
}
#liveRoom49.pk109on #gs108{ display:none !important }
#liveRoom49.pk109on #lrChat{ max-height:min(24vh, 200px) !important }

#pk109{ position:absolute; left:0; right:0; top:0; bottom:0; z-index:6; pointer-events:none }
#pk109 > *{ pointer-events:auto }
.pk-top{
  position:absolute; top:calc(var(--pkT) - 2px); left:50%; transform:translate(-50%,-50%); z-index:8;
  display:flex; align-items:center; gap:6px; direction:ltr;
}
.pk-logo{
  direction:ltr; display:inline-flex; align-items:center; gap:0; padding:3px 10px; border-radius:10px;
  background:linear-gradient(135deg,#ff2d6f,#7c3aed 60%,#2f7bff); box-shadow:0 4px 14px rgba(124,58,237,.55);
  font:italic 900 15px/1 system-ui,-apple-system,sans-serif; color:#fff; letter-spacing:1px;
}
.pk-logo i{ font-style:italic }
.pk-logo svg{ width:13px; height:13px; color:#fde047; margin:0 1px; filter:drop-shadow(0 0 4px #fde047) }
.pk-logo.big{ font-size:22px; padding:8px 14px; border-radius:14px }
.pk-logo.big svg{ width:18px; height:18px }
.pk-time{
  border:0; cursor:pointer; min-width:62px; padding:4px 12px; border-radius:99px;
  background:rgba(0,0,0,.6); backdrop-filter:blur(8px); color:#fff; font:900 13px/1.3 system-ui,-apple-system,sans-serif;
  border:1px solid rgba(255,255,255,.2); font-variant-numeric:tabular-nums;
}
.pk-time.hot{ background:#e11d48; animation:pkpulse 1s ease-in-out infinite }
@keyframes pkpulse{ 50%{ transform:scale(1.08) } }

.pk-panes{
  position:absolute; top:var(--pkT); left:0; right:0; height:var(--pkH);
  display:flex; pointer-events:none;
}
.pk-me, .pk-opp{ position:relative; flex:1; height:100% }
.pk-me{ pointer-events:none }
.pk-opp{ pointer-events:auto; background:#0b0b10; overflow:hidden; cursor:pointer }
.pk-ov{ position:absolute; inset:0 }
.pk-ov video{ width:100%; height:100%; object-fit:cover; display:block }
.pk-wait{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#fff;
  background:radial-gradient(circle at 50% 40%, #2b2140, #0b0b10) }
.pk-wait .a, .pk-oi .a, .pk-t .a, .pk-wait2 .a, .pk-oh .a, .pk-inv .a{
  position:relative; display:grid; place-items:center; border-radius:50%; overflow:hidden;
  background:linear-gradient(135deg,#FFC940,#FF9E2C); color:#fff; font-weight:900;
}
.pk-wait .a{ width:64px; height:64px; font-size:22px; animation:pkpulse 1.4s ease-in-out infinite }
.pk-wait small{ font-size:11px; font-weight:800; opacity:.75 }
.a img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
.pk-oi{
  position:absolute; top:8px; inset-inline-end:8px; z-index:3; display:flex; align-items:center; gap:5px;
  max-width:88%; padding:3px 9px 3px 3px; border:0; border-radius:99px; cursor:pointer;
  background:rgba(0,0,0,.5); backdrop-filter:blur(6px); color:#fff; font-family:inherit;
}
.pk-oi .a{ width:24px; height:24px; font-size:11px; flex:0 0 24px }
.pk-oi .n{ font-size:11px; font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.pk-panes::after{
  content:""; position:absolute; top:0; bottom:0; left:50%; width:2px; margin-left:-1px; z-index:3;
  background:linear-gradient(transparent, rgba(255,255,255,.8), transparent);
}

/* ۱۰ ثانیهٔ آخر */
.pk-count{
  position:absolute; left:50%; top:50%; z-index:6; transform:translate(-50%,-50%);
  font:900 84px/1 system-ui,-apple-system,sans-serif; color:#fff; pointer-events:none;
  text-shadow:0 0 30px rgba(255,45,111,.9), 0 4px 0 #7c3aed;
}
.pk-count.on{ animation:pkcount .9s ease both }
@keyframes pkcount{ 0%{ transform:translate(-50%,-50%) scale(2.2); opacity:0 } 25%{ transform:translate(-50%,-50%) scale(1); opacity:1 } 100%{ opacity:0 } }

/* نتیجه */
.pk-res{ position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); z-index:4; display:none; flex-direction:column; align-items:center; pointer-events:none }
.pk-res.on{ display:flex; animation:pkres .6s cubic-bezier(.2,1.5,.4,1) both }
@keyframes pkres{ from{ transform:translateY(-50%) scale(.2); opacity:0 } }
.pk-res b{ font:italic 900 40px/1 system-ui,-apple-system,sans-serif; letter-spacing:2px }
.pk-res.win b{ background:linear-gradient(180deg,#fff6c2,#fbbf24 55%,#d97706); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 4px 10px rgba(0,0,0,.6)) }
.pk-res.win i{ width:44px; height:44px; color:#fbbf24; filter:drop-shadow(0 0 12px rgba(251,191,36,.9)); animation:pkcrown 1.6s ease-in-out infinite }
.pk-res.win i svg{ width:100%; height:100% }
@keyframes pkcrown{ 50%{ transform:translateY(-6px) rotate(-6deg) } }
.pk-res.lose b{ color:#cbd5e1; text-shadow:0 4px 10px rgba(0,0,0,.7) }
.pk-res.draw b{ color:#fff; text-shadow:0 0 18px rgba(124,58,237,.9) }
#pk109.ended .pk-me::before, #pk109.ended .pk-opp::before{ content:""; position:absolute; inset:0; z-index:3; background:rgba(0,0,0,.25); pointer-events:none }

/* نوار امتیاز */
.pk-bar{
  position:absolute; top:calc(var(--pkT) + var(--pkH)); left:0; right:0; height:24px; z-index:7;
  display:flex; overflow:visible;
}
.pk-bar i{
  position:relative; height:100%; display:flex; align-items:center; font-style:normal; transition:width .6s cubic-bezier(.2,.9,.3,1);
  font:900 12.5px/1 system-ui,-apple-system,sans-serif; color:#fff; font-variant-numeric:tabular-nums;
}
.pk-bar .m{ background:linear-gradient(90deg,#ff2d6f,#ff7a3d); justify-content:flex-start; padding-inline-start:10px }
.pk-bar .o{ background:linear-gradient(90deg,#22d3ee,#2f7bff); justify-content:flex-end; padding-inline-end:10px }
[dir="rtl"] .pk-bar .m{ background:linear-gradient(270deg,#ff2d6f,#ff7a3d) }
[dir="rtl"] .pk-bar .o{ background:linear-gradient(270deg,#22d3ee,#2f7bff) }
.pk-bar i.up b{ animation:pkup .5s ease }
@keyframes pkup{ 40%{ transform:scale(1.4) } }
.pk-plus{
  position:absolute; top:-18px; inset-inline-start:12px; font:900 12px/1 system-ui,sans-serif; color:#fde047;
  text-shadow:0 1px 4px rgba(0,0,0,.8); animation:pkplus 1.2s ease-out both; pointer-events:none;
}
.pk-bar .o .pk-plus{ inset-inline-start:auto; inset-inline-end:12px }
@keyframes pkplus{ from{ transform:translateY(8px); opacity:0 } 25%{ opacity:1 } to{ transform:translateY(-16px); opacity:0 } }
.pk-spark{
  position:absolute; top:50%; width:26px; height:26px; margin-top:-13px; margin-inline-start:-13px; z-index:2;
  color:#fff; filter:drop-shadow(0 0 6px #fde047) drop-shadow(0 0 12px #f97316); transition:inset-inline-start .6s cubic-bezier(.2,.9,.3,1);
  animation:pkspark .7s ease-in-out infinite alternate; pointer-events:none;
}
.pk-spark svg{ width:100%; height:100%; color:#fde047 }
@keyframes pkspark{ to{ transform:scale(1.25) rotate(8deg) } }

/* حامیان برتر هر طرف */
.pk-tops{
  position:absolute; top:calc(var(--pkT) + var(--pkH) + 30px); left:8px; right:8px; z-index:7;
  display:flex; align-items:center; gap:6px;
}
.pk-tops .m, .pk-tops .o{ flex:1; display:flex; gap:5px; align-items:center; min-height:30px }
.pk-tops .o{ justify-content:flex-end }
.pk-tops .t{
  position:relative; width:28px; height:28px; border-radius:50%; overflow:visible;
  display:grid; place-items:center; background:linear-gradient(135deg,#FFC940,#FF9E2C); color:#fff; font-size:11px; font-weight:900;
  border:2px solid rgba(255,255,255,.7);
}
.pk-tops .t img{ border-radius:50% }
.pk-tops .t.r1{ border-color:#fbbf24 }
.pk-tops .t.r2{ border-color:#e2e8f0 }
.pk-tops .t.r3{ border-color:#f59e0b }
.pk-tops .t em{
  position:absolute; bottom:-6px; left:50%; transform:translateX(-50%); z-index:2;
  font:900 8.5px/1 system-ui,sans-serif; font-style:normal; color:#1c1917; background:#fde68a; border-radius:99px; padding:1px 4px;
}
.pk-tops .t.mvp{ width:34px; height:34px; border-color:#fbbf24; box-shadow:0 0 14px rgba(251,191,36,.8) }
.pk-tops .t.mvp em{ background:linear-gradient(135deg,#fbbf24,#f97316); color:#fff }
.pk-tops .none{ font-size:10px; font-weight:800; color:rgba(255,255,255,.55); text-shadow:0 1px 3px rgba(0,0,0,.7) }
.pk-pun{ flex:0 0 auto; font-size:11px; font-weight:900; color:#fde68a; text-shadow:0 1px 4px rgba(0,0,0,.8); white-space:nowrap }
.pk-pun b{ font-variant-numeric:tabular-nums }

/* شروع نبرد */
.pk-splash{
  position:absolute; left:0; right:0; top:calc(var(--pkT) + var(--pkH) / 2 - 60px); z-index:9; pointer-events:none;
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap; direction:ltr;
  font:italic 900 88px/1 system-ui,-apple-system,sans-serif; color:#fff;
}
.pk-splash .l{ color:#ff2d6f; text-shadow:0 0 30px rgba(255,45,111,.9); animation:pkl .5s cubic-bezier(.2,1.4,.4,1) both }
.pk-splash .r{ color:#38bdf8; text-shadow:0 0 30px rgba(56,189,248,.9); animation:pkr .5s cubic-bezier(.2,1.4,.4,1) both }
.pk-splash .b{ width:64px; height:64px; color:#fde047; filter:drop-shadow(0 0 18px #fde047); animation:pkb .5s .35s cubic-bezier(.2,1.6,.4,1) both }
.pk-splash .b svg{ width:100%; height:100% }
.pk-splash small{ flex-basis:100%; text-align:center; font:900 16px/2 inherit; font-style:normal; color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.8); animation:sh109fade .4s .5s both }
.pk-splash{ animation:pkout .4s 1.7s ease both }
@keyframes pkl{ from{ transform:translateX(-120vw) } }
@keyframes pkr{ from{ transform:translateX(120vw) } }
@keyframes pkb{ from{ transform:scale(0) rotate(-40deg) } }
@keyframes pkout{ to{ opacity:0; transform:scale(1.3) } }

/* دکمهٔ PK نوار پایین میزبان */
.vs98-rb.pk109b{ background:linear-gradient(135deg,#ff2d6f,#7c3aed 60%,#2f7bff) !important; box-shadow:0 4px 14px rgba(124,58,237,.5) }
.vs98-rb.pk109b span{ font:italic 900 13px/1 system-ui,-apple-system,sans-serif; color:#fff; letter-spacing:.5px }
.vs98-rb.pk109b.live{ animation:pkpulse 1.2s ease-in-out infinite }
.vs98-rb.pk109b.wait::after{
  content:""; position:absolute; inset:-3px; border-radius:50%; border:2px solid transparent; border-top-color:#fde047;
  animation:cl108spin .9s linear infinite;
}

/* ═══════════════ شیت PK ═══════════════ */
.pk-sh{
  position:fixed; inset:0; z-index:10025; background:rgba(0,0,0,.5);
  display:flex; align-items:flex-end; justify-content:center; animation:sh109fade .18s ease;
}
.pk-p{
  width:100%; max-width:480px; max-height:82vh; overflow-y:auto;
  background:linear-gradient(180deg,#1f1234,#120a20); color:#fff;
  border-radius:26px 26px 0 0; padding:8px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -12px 40px rgba(0,0,0,.45); animation:sh109up .24s cubic-bezier(.2,.9,.3,1);
}
.pk-grab{ display:block; width:40px; height:5px; border-radius:99px; background:rgba(255,255,255,.2); margin:2px auto 12px }
.pk-hd{ display:flex; align-items:center; gap:12px; margin-bottom:14px }
.pk-hd b{ display:block; font-size:17px; font-weight:900 }
.pk-hd small{ display:block; font-size:11px; font-weight:700; opacity:.6; line-height:1.7 }
.pk-lbl{ font-size:12px; font-weight:900; opacity:.6; margin:14px 2px 8px }
.pk-durs{ display:flex; gap:8px }
.pk-durs button{
  flex:1; padding:11px 0; border-radius:14px; border:1.5px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06);
  color:#fff; font-family:inherit; font-weight:900; font-size:13px; cursor:pointer;
}
.pk-durs button.on{ border-color:#ff2d6f; background:rgba(255,45,111,.18); color:#ffd1dc }
.pk-cta{
  width:100%; margin-top:14px; padding:15px; border:0; border-radius:18px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
  background:linear-gradient(135deg,#ff2d6f,#7c3aed 60%,#2f7bff); color:#fff; font-family:inherit; font-size:15px; font-weight:900;
  box-shadow:0 10px 26px rgba(124,58,237,.45);
}
.pk-list{ display:flex; flex-direction:column; gap:6px; min-height:60px }
.pk-t{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:16px; background:rgba(255,255,255,.05) }
.pk-t .a{ width:44px; height:44px; flex:0 0 44px }
.pk-t .n{ flex:1; min-width:0; display:flex; flex-direction:column }
.pk-t .n b{ font-size:13.5px; font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.pk-t .n small{ font-size:10.5px; opacity:.6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.pk-t button{
  flex:0 0 auto; border:0; border-radius:99px; padding:8px 14px; cursor:pointer; font-family:inherit; font-weight:900; font-size:12px;
  background:linear-gradient(135deg,#ff2d6f,#ff7a3d); color:#fff;
}
.pk-t button:disabled{ opacity:.5 }
.pk-none{ text-align:center; font-size:12px; font-weight:700; opacity:.6; padding:16px 8px; line-height:1.8 }
.pk-spin{ width:28px; height:28px; border-radius:50%; border:3px solid rgba(255,255,255,.2); border-top-color:#ff2d6f; animation:cl108spin .8s linear infinite; margin:18px auto; display:block }
.pk-ghost{ margin-top:12px; border:1.5px solid rgba(255,255,255,.2); background:none; color:#fff; border-radius:99px; padding:9px 22px; font-family:inherit; font-weight:900; cursor:pointer }
.pk-wait2, .pk-search{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 0 6px; text-align:center }
.pk-wait2 .a{ width:76px; height:76px; font-size:26px; box-shadow:0 0 0 4px rgba(255,45,111,.35); animation:pkpulse 1.4s ease-in-out infinite }
.pk-wait2 b, .pk-search b{ font-size:15px; font-weight:900 }
.pk-wait2 small, .pk-search small{ font-size:12px; opacity:.6; font-variant-numeric:tabular-nums }
.pk-search .rad{ position:relative; width:90px; height:90px; display:grid; place-items:center; color:#fff }
.pk-search .rad i{ position:absolute; inset:0; border-radius:50%; border:2px solid rgba(255,45,111,.6); animation:pkrad 1.8s ease-out infinite }
.pk-search .rad i:nth-child(2){ animation-delay:.6s } .pk-search .rad i:nth-child(3){ animation-delay:1.2s }
.pk-search .rad svg{ width:36px; height:36px; animation:pkdice 1.2s ease-in-out infinite }
@keyframes pkrad{ from{ transform:scale(.3); opacity:1 } to{ transform:scale(1.3); opacity:0 } }
@keyframes pkdice{ 50%{ transform:rotate(180deg) scale(1.1) } }
.pk-row{
  width:100%; display:flex; align-items:center; gap:12px; padding:14px 10px; border:0; background:none; color:#fff;
  font-family:inherit; font-size:14px; font-weight:800; border-radius:14px; cursor:pointer; text-align:start;
}
.pk-row:active{ background:rgba(255,255,255,.08) }
.pk-row.danger{ color:#fb7185 }
.pk-row .e{ font-size:18px; width:22px; text-align:center }
.pk-oh{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 0 10px }
.pk-oh .a{ width:60px; height:60px; font-size:22px; border:3px solid #38bdf8 }
.pk-oh b{ font-size:15px; font-weight:900 }
.pk-oh small{ font-size:11px; opacity:.6; font-weight:800 }

/* کارت دعوت */
#pkInv109{
  position:fixed; inset:0; z-index:10035; display:grid; place-items:center; padding:24px;
  background:rgba(8,4,16,.6); backdrop-filter:blur(3px); animation:sh109fade .2s ease;
}
.pk-inv{
  width:100%; max-width:330px; border-radius:28px; padding:22px 18px 18px; text-align:center; color:#fff;
  background:linear-gradient(160deg,#2a1545,#140a24); border:1px solid rgba(255,255,255,.1);
  box-shadow:0 20px 60px rgba(124,58,237,.45); animation:pkres .45s cubic-bezier(.2,1.4,.4,1) both;
  display:flex; flex-direction:column; align-items:center; gap:10px;
}
.pk-inv .a{ width:88px; height:88px; font-size:30px; overflow:visible }
.pk-inv .a img{ border-radius:50% }
.pk-inv .a{ box-shadow:0 0 0 4px rgba(255,45,111,.85), 0 0 26px rgba(255,45,111,.55); animation:pkpulse 1.2s ease-in-out infinite }
.pk-inv b{ font-size:15.5px; font-weight:900; line-height:1.6 }
.pk-inv small{ font-size:12px; opacity:.75; font-weight:800 }
.pk-inv small em{ font-style:normal; color:#fda4af }
.pk-inv .bt{ display:flex; gap:10px; width:100%; margin-top:6px }
.pk-inv .bt button{ flex:1; padding:13px 0; border:0; border-radius:16px; font-family:inherit; font-weight:900; font-size:14px; cursor:pointer }
.pk-inv .no{ background:rgba(255,255,255,.1); color:#fff }
.pk-inv .yes{ background:linear-gradient(135deg,#ff2d6f,#7c3aed); color:#fff; box-shadow:0 8px 22px rgba(255,45,111,.45) }

@media (prefers-reduced-motion:reduce){
  .pk-splash, .pk-splash *, .pk-spark, .pk-time.hot, .vs98-rb.pk109b.live{ animation:none !important }
}

.pk-q{ font-size:16px; font-weight:900; text-align:center; margin:4px 0 4px }
.pk-qs{ font-size:12.5px; opacity:.65; text-align:center; margin:0 0 14px; font-weight:700 }
.pk-qb{ display:flex; gap:10px }
.pk-qb button{ flex:1; padding:13px 0; border:0; border-radius:16px; font-family:inherit; font-weight:900; cursor:pointer; background:rgba(255,255,255,.1); color:#fff }
.pk-qb button.d{ background:#e11d48 }

/* پیام‌های کوتاه لایو باید بالای شیت‌ها دیده شوند (قبلاً z-index:99 بود و زیر شیت PK پنهان می‌ماند) */
#lrToast{ z-index:10090 !important }
.pk-err{ margin:0 0 10px; padding:9px 12px; border-radius:12px; background:rgba(244,63,94,.16); border:1px solid rgba(244,63,94,.4); color:#fecdd3; font-size:12px; font-weight:800; line-height:1.7 }
.pk-hint{ max-width:280px; line-height:1.7 }

/* v112 · وضعیت شبکه و تشخیص، داخل شیت PK */
.pk-net{ display:block; margin:4px 0 2px; font-size:11px; font-weight:800; color:#fbbf24; text-align:center }
.pk-diag{ margin:6px 2px 0; font-size:11px; font-weight:800; color:#a78bfa; text-align:center; line-height:1.7 }
.pk-diag.bad{ color:#fda4af }
.pk-hint{ line-height:1.8 }
