/* queue-27: „TWÓJ MECZ JEST GOTOWY!” – styl Arena Champions (fiolet/złoto), czytelny kontrast, tanie animacje. */
/* queue-27: nakładka = widoczny ekran (JS ustawia --vv* z visualViewport tylko przy powiększeniu); karta wyśrodkowana marginesem auto
   – przy niskim ekranie przewija się od góry zamiast uciekać poza krawędź; bez poziomego przewijania. */
#acReady{position:fixed;left:var(--vvx,0);top:var(--vvy,0);width:var(--vvw,100%);height:var(--vvh,100%);box-sizing:border-box;z-index:9800;display:grid;padding:16px;overflow:hidden auto;overscroll-behavior:contain;background:rgba(6,4,22,.78);animation:acRIn .22s ease-out both}
#acReady.out{animation:acROut .14s ease-in both}
@keyframes acRIn{from{opacity:0}to{opacity:1}}
@keyframes acROut{from{opacity:1}to{opacity:0}}
@keyframes acRPop{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
@keyframes acRPulse{0%,100%{box-shadow:0 0 0 0 #f5c54200,0 8px 22px #f5c54255,inset 0 1px #fff8}50%{box-shadow:0 0 0 8px #f5c54222,0 10px 28px #f5c54277,inset 0 1px #fff8}}

#acReady .acRb{
  box-sizing:border-box;width:100%;max-width:460px;min-width:0;margin:auto;padding:26px 22px 20px;border-radius:20px;text-align:center;
  background:radial-gradient(120% 90% at 50% 0%,#32267a 0%,#1a1448 42%,#0e0a2e 100%);
  border:2px solid #f5c542;
  box-shadow:0 0 0 1px #00000090,0 24px 70px #000c,0 0 48px #f5c54240;
  color:#fff;animation:acRPop .24s cubic-bezier(.2,.8,.2,1) both;
}
html.acFxLite #acReady{background:rgba(6,4,22,.88)}
html.acFxLite #acReady .acRb{box-shadow:0 0 0 1px #f5c54288,0 14px 36px #000c;animation:none}

#acReady h2{
  margin:0 0 6px;font:900 clamp(24px,5.6vw,32px)/1.12 Baloo,system-ui;letter-spacing:.03em;
  color:#ffe08a;text-shadow:0 0 22px #f5c54288,0 2px 0 #3a230066;
  background:linear-gradient(180deg,#fff6c8 0%,#ffe08a 45%,#f0b84a 100%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  #acReady h2{color:#ffe08a;-webkit-text-fill-color:initial;background:none;text-shadow:0 0 22px #f5c54299}
}
#acReady .acRsub{margin:0 0 12px;font:800 14px/1.3 system-ui;color:#c8d0ff;letter-spacing:.02em}
#acReady .acRline{height:2px;margin:0 8% 18px;background:linear-gradient(90deg,transparent,#f5c542aa,#7dffb0aa,transparent);border-radius:2px}

/* Symetryczne rzędy: 2→1×2, 6→2×3, 8→2×4, 10→2×5. Stały rozmiar slotu = bez layout shift przy akceptacji. */
#acReady .acSlots{
  --slot:38px;--gap:9px;
  display:grid;gap:var(--gap);justify-content:center;justify-items:center;
  margin:0 auto 12px;width:max-content;max-width:100%;
  grid-template-columns:repeat(var(--cols,5),var(--slot));
}
#acReady .acSlots[data-n="2"]{--cols:2}
#acReady .acSlots[data-n="4"]{--cols:2}
#acReady .acSlots[data-n="6"]{--cols:3}
#acReady .acSlots[data-n="8"]{--cols:4}
#acReady .acSlots[data-n="10"]{--cols:5}
#acReady .acSlot{
  width:var(--slot);height:var(--slot);box-sizing:border-box;border-radius:12px;display:grid;place-items:center;flex:none;
  background:#0a0724;border:2px solid #3a4580;color:#6a74a0;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s;
}
#acReady .acSlot svg{width:20px;height:20px;fill:currentColor}
#acReady .acSlot.on{
  background:linear-gradient(180deg,#1a5a3a,#0e3524);border-color:#7dffb0;color:#e8fff4;
  box-shadow:0 0 0 1px #7dffb066,0 0 16px #3dff9a77,inset 0 1px #ffffff33;
}
html.acFxLite #acReady .acSlot.on{box-shadow:0 0 0 1px #7dffb088}
/* jak w CS2: kto odrzucił / nie odpowiedział – czerwony slot u wszystkich */
#acReady .acSlot.bad{
  background:linear-gradient(180deg,#6a1824,#3a0b14);border-color:#ff5a6e;color:#ffe3e7;
  box-shadow:0 0 0 1px #ff5a6e66,0 0 16px #ff3d5a88,inset 0 1px #ffffff22;animation:acRBad .5s ease-out both;
}
@keyframes acRBad{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
html.acFxLite #acReady .acSlot.bad{box-shadow:0 0 0 1px #ff5a6e99;animation:none}
#acReady .acRb.fail,#acReady.fail .acRb{border-color:#ff5a6e;box-shadow:0 0 0 1px #00000090,0 24px 70px #000c,0 0 48px #ff3d5a40}
#acReady.fail .acRtimer i{background:#ff5a6e;box-shadow:none}
#acReady .acRbad{color:#ffb3bd;font-weight:900}

#acReady .acRcnt{margin:0 0 14px;font:800 16px/1.2 system-ui;color:#eef2ff}
#acReady .acRcnt b{color:#7dffb0;font-size:1.15em;text-shadow:0 0 12px #3dff9a66}

#acReady .acRtimer{margin:0 auto 10px;width:min(240px,72%);height:10px;border-radius:99px;background:#0a0724;border:1px solid #ffffff22;overflow:hidden;box-shadow:inset 0 1px 3px #0008}
#acReady .acRtimer i{display:block;height:100%;width:100%;transform-origin:left center;background:linear-gradient(90deg,#7dffb0,#ffe08a,#f5c542);border-radius:99px;box-shadow:0 0 10px #f5c54266}
#acReady .acRsec{margin:0 0 16px;font:900 22px/1 Baloo,system-ui;color:#ffe08a;font-variant-numeric:tabular-nums;text-shadow:0 0 14px #f5c54266}

#acReady .acRbtns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
#acReady .acRbtns .btn{min-width:148px;min-height:48px;font-size:17px;font-weight:900;padding:13px 20px;border-radius:14px}
#acReady .acRbtns .btn.ghost{background:#120e36;border:1.5px solid #5a64b0;color:#dfe6ff;box-shadow:none}
#acReady .acRbtns .btn.gold[data-ok]:not(:disabled){
  border:0;font-size:18px;letter-spacing:.02em;
  background:linear-gradient(180deg,#ffe08a,#f0b020);color:#2a1700;
  box-shadow:0 8px 22px #f5c54266,inset 0 1px #fff8;
  animation:acRPulse 1.6s ease-in-out infinite;
}
#acReady .acRbtns .btn.gold[data-ok]:not(:disabled):hover{filter:brightness(1.06)}
#acReady .acRbtns .btn:disabled{opacity:.55;cursor:default;animation:none!important;filter:none}
html.acFxLite #acReady .acRbtns .btn.gold[data-ok]:not(:disabled){animation:none;box-shadow:0 6px 16px #f5c54255,inset 0 1px #fff8}

#acReady .acRnote{margin:14px 6px 0;font:600 12.5px/1.4 system-ui;color:#a8b4e8}

@media (max-width:420px){
  #acReady{padding:12px}
  #acReady .acRbtns{gap:10px}
  #acReady .acRb{padding:22px 16px 16px;border-radius:18px}
  #acReady .acSlots{--slot:32px;--gap:7px}
  #acReady .acSlot{border-radius:10px}
  #acReady .acSlot svg{width:18px;height:18px}
  #acReady .acRbtns .btn{flex:1 1 0;min-width:0;padding:13px 10px;font-size:16px;white-space:nowrap}
  #acReady .acRbtns .btn.gold[data-ok]:not(:disabled){font-size:17px}
  #acReady h2{font-size:clamp(22px,6.5vw,28px)}
}
@media (prefers-reduced-motion:reduce){
  #acReady,#acReady.out,#acReady .acRb,#acReady .acRbtns .btn.gold[data-ok]{animation:none}
  #acReady .acSlot{transition:none}
  #acReady .acSlot.bad{animation:none}
}
