body.arena-page {
  background:
    radial-gradient(ellipse 60% 68% at 50% 43%, rgba(55, 169, 255, .76) 0%, rgba(55, 169, 255, .46) 38%, rgba(55, 169, 255, .14) 76%, transparent 100%),
    radial-gradient(ellipse at 50% 48%, #35004f 0%, #1d002f 47%, #10001a 100%);
}
.app--arena-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(max(9px, env(safe-area-inset-top)) + var(--telegram-fullscreen-top-gap, 0px)) 14px max(86px, calc(82px + env(safe-area-inset-bottom)));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 60% 68% at 50% 43%, rgba(55, 169, 255, .76) 0%, rgba(55, 169, 255, .46) 38%, rgba(55, 169, 255, .14) 76%, transparent 100%),
    radial-gradient(ellipse at 50% 48%, #35004f 0%, #1d002f 47%, #10001a 100%);
  color: #f4f5f7;
}
.arena-topbar { height: 38px; }
.arena-topbar .online { color: #858b95; }
.arena-account { max-width: none; margin: 3px 0 0; }
.arena-account .account-row { height: 35px; }
.arena-account .account-label { color: #747b86; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.arena-account .balance-button { height: 30px; border-color: #292d34; border-radius: 10px; background: #181a1f; }
.arena-game { display: flex; width: 100%; max-width: 406px; flex-direction: column; gap: 10px; margin: 8px auto 0; }
.arena-heading, .arena-pot-row, .arena-bet-header, .arena-section-title { display: flex; align-items: center; justify-content: space-between; }
.arena-kicker, .arena-label { color: #818894; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.arena-heading h1 { margin: 1px 0 0; color: #fff; font-size: 23px; font-weight: 800; line-height: 1.1; }
.arena-round-tag { color: #757c87; font-size: 9px; font-weight: 800; letter-spacing: .7px; }
.arena-round-tag strong { margin-left: 4px; color: #d8dce2; }
.arena-pot-row { min-height: 41px; padding: 0 11px; border: 1px solid #292d35; border-radius: 11px; background: #191c22; }
.arena-pot { display: flex; flex-direction: column; gap: 2px; }
.arena-pot > span { color: #808792; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.arena-pot strong { display: flex; align-items: center; gap: 4px; color: #f1f3f6; font-size: 13px; font-weight: 800; }
.arena-countdown { color: #61e995; font-size: 10px; font-weight: 800; }
.arena-board-frame { position: relative; width: 100%; overflow: hidden; border: 1px solid rgba(150, 190, 255, .52); border-radius: 15px; background: rgba(20, 25, 40, .82); box-shadow: 0 0 0 1px rgba(197, 151, 255, .16), 0 0 22px rgba(76, 157, 255, .22), inset 0 1px 0 rgba(230, 242, 255, .16), inset 0 0 24px rgba(92, 143, 255, .08), 0 7px 24px rgba(0,0,0,.3); }
#arena-board { display: block; width: 100%; aspect-ratio: 1 / 1; }
.arena-board-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12,14,18,.62); color: white; font-size: 19px; font-weight: 800; text-align: center; }
.arena-board-message[hidden] { display: none; }
.arena-players { display: flex; flex-direction: column; gap: 7px; }
.arena-player-list { display: flex; flex-direction: column; gap: 7px; }
.arena-player {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--player-color, #96beff) 42%, rgba(205,224,255,.28));
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--player-color, #96beff) 15%, rgba(24,27,42,.92)), rgba(20,23,36,.78));
  box-shadow:
    0 0 16px color-mix(in srgb, var(--player-color, #96beff) 20%, transparent),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 0 20px rgba(125,166,255,.08);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
}
.arena-player--winner { border-color: rgba(87,220,162,.72); box-shadow: 0 0 20px rgba(87,220,162,.24), inset 0 1px 0 rgba(255,255,255,.2); }
.arena-player-identity { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 9px 11px; }
.arena-player-avatar {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: var(--player-color, #515866);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.arena-player-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arena-player-details { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.arena-player-details strong { overflow: hidden; color: #f0f1f3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.arena-player-chance { color: var(--player-color, #6fe4d7); font-size: 9px; font-weight: 700; }
.arena-player-chance::before { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--player-color, #6fe4d7); content: ""; }
.arena-player-winner-label { width: fit-content; color: #61e995; font-size: 8px; font-weight: 900; letter-spacing: .6px; }
.arena-player-amount { color: #f0f1f3; font-size: 11px; white-space: nowrap; }
.arena-player-stake { display: flex; min-height: 37px; align-items: center; gap: 4px; padding: 5px 11px; border-top: 1px solid color-mix(in srgb, var(--player-color, #96beff) 22%, rgba(255,255,255,.08)); background: linear-gradient(90deg, color-mix(in srgb, var(--player-color, #96beff) 9%, rgba(8,12,24,.3)), rgba(8,12,24,.24)); color: #c3c9d8; font-size: 9px; font-weight: 700; }
.arena-player-stake img { width: 26px; height: 26px; object-fit: contain; }
.arena-commit { display: block; max-width: 100%; align-self: center; overflow: hidden; padding: 2px 4px; border: 0; background: transparent; color: #717883; font: 700 9px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.arena-commit:not(:disabled) { color: #a5abb5; cursor: pointer; }
.arena-commit:disabled { opacity: 1; }
.arena-board-message { display: grid; }
.arena-winner-popup { display: flex; width: min(100%, 250px); flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px 13px; border: 1px solid rgba(197, 228, 255, .34); border-radius: 22px; background: linear-gradient(145deg, rgba(40, 51, 76, .96), rgba(19, 24, 39, .97)); box-shadow: 0 16px 46px rgba(0,0,0,.48), 0 0 30px rgba(90, 174, 255, .25), inset 0 1px 0 rgba(255,255,255,.18); animation: arena-winner-popup-in 420ms cubic-bezier(.2,.85,.25,1.2) both; }
.arena-winner-popup-badge { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,226,143,.36); border-radius: 50%; background: radial-gradient(circle, rgba(255,214,97,.24), rgba(255,214,97,.06)); font-size: 22px; }
.arena-winner-popup-title { color: #ffdf8a; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; }
.arena-winner-popup-avatar { position: relative; display: grid; width: 52px; height: 52px; place-items: center; overflow: hidden; border: 2px solid rgba(255,230,155,.85); border-radius: 50%; background: var(--player-color, #4c8cff); box-shadow: 0 0 20px rgba(255,219,120,.3); color: #fff; font-size: 17px; font-weight: 900; }
.arena-winner-popup-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arena-winner-popup-name { max-width: 100%; overflow: hidden; color: #fff; font-size: 16px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.arena-winner-popup-payout { color: #70f0aa; font-size: 15px; font-weight: 900; }
@keyframes arena-winner-popup-in { from { opacity: 0; transform: translateY(16px) scale(.82); } to { opacity: 1; transform: translateY(0) scale(1); } }
.app--low-power .arena-player,
.app--low-power .arena-winner-popup {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app--document-hidden .arena-winner-popup {
  animation-play-state: paused;
}
.arena-bet-panel { padding: 11px; border: 1px solid #292d35; border-radius: 13px; background: #191c22; }
.arena-bet-header { gap: 8px; }
.arena-bet-header > div { display: flex; flex-direction: column; gap: 3px; }
.arena-bet-header > div > strong { color: #e0e3e8; font-size: 10px; }
.arena-fee { color: #858c97; font-size: 8px; white-space: nowrap; }
.arena-input-wrap { display: flex; height: 39px; align-items: center; gap: 8px; margin-top: 9px; padding: 0 10px; border: 1px solid #30353e; border-radius: 9px; background: #111319; }
.arena-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: #f4f5f7; font-size: 14px; font-weight: 800; }
.arena-input-wrap > span { color: #7c8490; font-size: 9px; font-weight: 800; }
.arena-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.arena-presets button { min-height: 29px; border: 1px solid #2c3038; border-radius: 8px; background: #22252c; color: #d2d6dc; font-size: 10px; font-weight: 800; cursor: pointer; }
.arena-presets button:active { background: #353a44; }
.arena-bet-button { display: flex; width: 100%; min-height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin-top: 8px; border: 0; border-radius: 10px; background: linear-gradient(105deg, #3275ef, #4c8cff); color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.arena-bet-button:disabled { background: #292d34; color: #808792; cursor: default; }
.arena-bet-button small { color: rgba(255,255,255,.75); font-size: 8px; }
.arena-bet-button:disabled small { color: #777e88; }
.arena-rules { margin: 8px 0 0; color: #747b85; font-size: 8px; line-height: 1.45; text-align: center; }
.arena-section-title { color: #777e88; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.arena-section-title > span:last-child { font-size: 9px; font-weight: 600; letter-spacing: 0; }
.arena-empty { padding: 8px; color: #717884; font-size: 9px; text-align: center; }
.app--arena-page .toast { z-index: 30; }
@media (max-width: 360px) {
  .app--arena-page { padding-right: 11px; padding-left: 11px; }
}
@media (max-height: 720px) {
  .arena-game { gap: 8px; }
  #arena-board { aspect-ratio: 1 / .78; }
  .arena-bet-panel { padding: 9px; }
}
