/* อารีน่า (client-debug/js/arena.js, src/map/arena.js): the window - dark crimson and steel - and the banner over the game
   for a fight's phases. The same in every theme (#win-arena over the RO theme's). Entries only with the arena
   (<html class="ar-sys">). Linked by client/index.html and client-debug/index.html after style.css. */

html:not(.ar-sys) .ar-entry, html:not(.ar-sys) .mh-grid [data-w="!arena"] { display: none !important; }
.sb-ic.sb-arena { border-color: #7a1424; color: #fff; background: linear-gradient(#ff9aa6, #d8334a 52%, #8e1a2c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4); --gi-fill: rgba(255, 220, 220, 0.5); }

#win-arena .win-body { padding: 0; overflow: auto; background: linear-gradient(180deg, #2a1218, #170a0e 70%, #10070a); color: #ffeef0; }
.ar { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; font-size: 13px; line-height: 1.4; }
.ar-wait { padding: 20px; text-align: center; }
.ar-hero { display: flex; align-items: center; gap: 14px; margin: 0 -12px; padding: 14px; background: radial-gradient(ellipse 60% 140% at 0% 50%, color-mix(in srgb, var(--tc) 35%, transparent), transparent 70%), linear-gradient(135deg, #6e1525, #34101a); }
.ar-badge { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 86px; height: 86px; border-radius: 50%; border: 3px solid var(--tc);
	background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.45)); box-shadow: 0 0 20px color-mix(in srgb, var(--tc) 60%, transparent); }
.ar-badge small { font-size: 11px; font-weight: 800; color: var(--tc); letter-spacing: 0.06em; text-transform: uppercase; }
.ar-badge b { font-size: 24px; font-weight: 900; color: #fff; line-height: 1.1; }
.ar-stat { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #ffdfe3; }
.ar-stat b { color: #fff; }
.ar-rule { font-size: 11.5px; color: #f3bcc4; }
#win-arena .ar-join { height: 42px; font-size: 16px; font-weight: 900; border: 0; border-radius: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); background: linear-gradient(180deg, #ff5a6e, #c21f38); box-shadow: 0 0 14px rgba(255, 80, 100, 0.45); }
.ar-qn { text-align: center; font-size: 12px; color: #f0b9c1; margin-top: -4px; }
.ar-q { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 120, 140, 0.35); }
.ar-q > div:not(.ar-spin) { flex: 1; display: flex; flex-direction: column; }
.ar-q span { font-size: 12px; color: #f0c4ca; }
.ar-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #ff6b7f; animation: ar-spin 0.9s linear infinite; }
#win-arena .ar-h { margin: 4px 0 0; font-size: 13.5px; font-weight: 800; color: #ffd1d8; text-shadow: none; }
.ar-tb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ar-tb th { text-align: left; font-weight: 600; color: #e7a9b2; padding: 3px 4px; border-bottom: 1px solid rgba(255, 140, 160, 0.25); }
.ar-tb td { padding: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.ar-tb tr.me td { background: rgba(255, 210, 90, 0.12); }
.ar-nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-tier { display: inline-block; padding: 0 7px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #1a0d10; background: var(--tc); }
.ar-rec { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ar-rec li { display: flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); font-size: 12.5px; }
.ar-rec li span { margin-left: auto; font-weight: 700; }
.ar-rec .ar-win b, .ar-rec .ar-win span { color: #6dff9e; }
.ar-rec .ar-lose b, .ar-rec .ar-lose span { color: #ff8a9a; }
.ar-tip { margin: 2px 0 0; font-size: 11.5px; color: #e3b3ba; }
@keyframes ar-spin { to { transform: rotate(360deg); } }

/* ---- the banner over the game ---- */
#ar-banner { position: absolute; z-index: 9; left: 50%; top: 14%; transform: translateX(-50%); min-width: 260px; max-width: calc(100% - 24px); box-sizing: border-box; padding: 12px 22px 14px; border-radius: 16px; text-align: center; pointer-events: none;
	font: 14px/1.35 system-ui, "Noto Sans Thai", sans-serif; color: #fff; background: linear-gradient(180deg, rgba(60, 10, 20, 0.88), rgba(25, 5, 10, 0.88)); border: 1px solid rgba(255, 120, 140, 0.55); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
#ar-banner .ar-big { font-size: 28px; font-weight: 900; letter-spacing: 0.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
#ar-banner .ar-go { color: #ffd84a; animation: ar-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
#ar-banner .ar-win { color: #6dff9e; }
#ar-banner .ar-lose { color: #ff8a9a; }
#ar-banner .ar-draw { color: #d8e1ff; }
#ar-banner .ar-num { font-size: 64px; font-weight: 900; line-height: 1; color: #ffd84a; text-shadow: 0 0 24px rgba(255, 200, 60, 0.8); animation: ar-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
#ar-banner .ar-clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
#ar-banner .ar-vs { display: block; margin-top: 2px; color: #ffd1d8; }
#ar-banner .ar-res { margin-top: 4px; font-size: 15px; }
#ar-banner .ar-sm { margin-top: 3px; font-size: 12px; color: #f0c4ca; }
#ar-banner.ar-fight { top: 8px; padding: 6px 16px 8px; min-width: 200px; }
@keyframes ar-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #ar-banner .ar-go, #ar-banner .ar-num, .ar-spin { animation: none !important; } }
html.mhud #ar-banner { top: calc(env(safe-area-inset-top, 0px) + 120px); transform: translateX(-50%) scale(max(var(--uik, 1), 0.7)); transform-origin: 50% 0; }
html.mhud .win.win-arena { --wk: max(var(--uik, 1), 0.85); transform: scale(max(var(--uik, 1), 0.85)); max-height: calc((100% - 88px - var(--mh-wb)) / max(var(--uik, 1), 0.85)) !important; }
