:root {
  --bg: #0d1111;
  --panel: #232323;
  --panel-2: #1b1c1d;
  --text: #f5f5f5;
  --muted: #8d8f92;
  --accent: #ffffff;
  --nav: rgba(34, 34, 34, 0.96);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(96px + var(--safe-bottom));
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(180deg, #0a0e0f 0%, #111313 56%, #0d1010 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 210deg, #f5d838, #f8a800, #31383b, #f5d838);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.avatar,
.avatar-fallback {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1a1d1f;
}

.avatar {
  display: none;
  background: #242424;
}

.avatar.loaded {
  display: block;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #34393c, #151719);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #f7f7f7;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.balance-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.balance-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.menu-button {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 52px;
  height: 52px;
  padding: 14px 13px;
  border: 0;
  border-radius: 17px;
  background: rgba(34, 34, 34, 0.98);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 24px;
  height: 4px;
  border-radius: 20px;
  background: #ffffff;
}


.promo-carousel {
  width: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.promo-carousel[hidden] {
  display: none !important;
}

.promo-carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  cursor: grab;
}

.promo-carousel-viewport:active {
  cursor: grabbing;
}

.promo-carousel-track {
  display: flex;
  width: 100%;
  transform: translate3d(-100%, 0, 0);
  will-change: transform;
}

.promo-carousel-track.is-animated {
  transition: transform 0.34s cubic-bezier(0.22, 0.82, 0.18, 1);
}

.promo-carousel-track.is-dragging {
  transition: none;
}

.promo-banner {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.promo-banner[data-promo-action="none"] {
  cursor: grab;
}

.promo-banner-title {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.promo-banner-update {
  color: #82ee99;
  background: linear-gradient(180deg, rgba(18, 118, 52, 0.86) 0%, rgba(10, 94, 42, 0.82) 100%);
  border: 1px solid rgba(54, 216, 113, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 10px 22px rgba(28, 170, 78, 0.14);
}

.promo-banner-referral {
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #1688ff 0%, #18c6ed 100%);
}

.promo-banner-channel {
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #7a42ff 0%, #c04cff 100%);
}

.promo-banner-referral .promo-banner-title,
.promo-banner-channel .promo-banner-title {
  max-width: calc(100% - 60px);
}

.promo-banner-referral::after,
.promo-banner-channel::after {
  position: absolute;
  right: 14px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-50%);
}

.promo-banner-referral::after {
  content: "₽";
}

.promo-banner-channel::after {
  content: "@";
}


.content-area {
  min-height: calc(100vh - 190px);
  min-height: calc(100dvh - 190px);
  padding-top: 28px;
}

.tab-page {
  display: none;
  min-height: 260px;
}

.tab-page.active {
  display: block;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  width: 100%;
}

.game-card {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 218px;
  padding: 62px 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #262628 0%, #202022 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  overflow: visible;
}

.game-icon-box {
  position: absolute;
  top: -24px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  transform: translateX(-50%);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.game-icon-blue {
  background: linear-gradient(180deg, #20d5ff 0%, #05aee6 100%);
}

.game-icon-purple {
  background: linear-gradient(180deg, #c7a4ff 0%, #9666ff 100%);
}

.game-icon-green {
  background: linear-gradient(180deg, #42f083 0%, #14b85f 100%);
}

.game-card-static {
  cursor: default;
}

.game-icon-box img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
  transform: translateY(4px);
}

.game-title {
  display: block;
  width: 100%;
  margin-top: 24px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.game-description {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #8d8f92;
}

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  min-height: calc(86px + var(--safe-bottom));
  padding: 9px 18px calc(12px + var(--safe-bottom));
  background: var(--nav);
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.tab-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  height: 68px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #8d8d8d;
  cursor: pointer;
}

.tab-button::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  opacity: 0.86;
  filter: grayscale(1);
}

.tab-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-icon {
  width: 35px;
  height: 35px;
}

.tab-label {
  font-size: 15px;
  line-height: 1;
  color: currentColor;
  text-transform: lowercase;
}

.tab-button.active {
  color: #ffffff;
}

.tab-button.active::before {
  background: rgba(255, 255, 255, 0.95);
}

.tab-button.active .tab-label {
  font-weight: 850;
}

.tab-button.active .tab-icon {
  opacity: 1;
  filter: none drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

@media (max-width: 390px) {
  .games-grid {
    gap: 16px 12px;
  }

  .game-card {
    min-height: 204px;
    padding: 58px 12px 16px;
  }

  .game-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
  }

  .game-icon-box img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
  transform: translateY(4px);
}

  .game-title {
    margin-top: 30px;
    font-size: 19px;
  }

  .game-description {
    margin-top: 14px;
    font-size: 13px;
  }
}

@media (min-width: 560px) {
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }

  .bottom-tabs {
    left: 50%;
    right: auto;
    width: 480px;
    transform: translateX(-50%);
  }
}


.game-card-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

.wheel-video {
  transform: scale(1.08);
}

.game-card[data-open-game="wheel"] {
  margin-top: 18px;
}

/* WHEEL_LAYOUT_TUNING
   .wheel-mode-switch margin-top: чем число меньше/отрицательнее, тем выше выбор PvP/solo.
   .wheel-mode-switch transform: translateY(...): положительное значение опускает только выбор.
   .wheel-pvp-content / .wheel-solo-content margin-top: расстояние между выбором и полем.
   .wheel-status-display margin-bottom: расстояние от текста победителя до поля.
*/

.wheel-game-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.wheel-mode-switch {
  position: relative;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -54px auto 0;
  padding: 6px;
  border-radius: 999px;
  background: rgba(33, 33, 33, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transform: translateY(0);
}

.wheel-mode-button {
  min-width: 88px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.wheel-mode-button.is-active {
  background: linear-gradient(180deg, #2fdf7c 0%, #1db862 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(34, 178, 96, 0.26);
}

.wheel-mode-button:active {
  transform: translateY(1px);
}

.wheel-pvp-content,
.wheel-solo-content {
  position: relative;
  width: 100%;
  margin-top: 30px;
  padding-bottom: 24px;
}

.wheel-pvp-content[hidden],
.wheel-solo-content[hidden] {
  display: none !important;
}

.wheel-status-display[hidden] {
  display: none !important;
}

.wheel-status-display {
  position: relative;
  left: auto;
  top: auto;
  z-index: 8;
  width: max-content;
  margin: 0 auto 8px;
  transform: none;
  pointer-events: none;
}

.wheel-status-display.phase-finished {
  max-width: calc(100% - 44px);
  font-size: 16px;
  line-height: 1.16;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wheel-solo-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 640px);
  min-height: 48px;
  margin: 0 0 12px;
  padding: 0 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(72, 126, 255, 0.34), transparent 62%),
    linear-gradient(90deg, rgba(18, 55, 124, 0.94), rgba(22, 38, 86, 0.96));
  border: 1px solid rgba(83, 137, 255, 0.28);
  color: #79efff;
  font-size: clamp(18px, 4.4vw, 26px);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.wheel-solo-status.is-win {
  color: #9cf57a;
}

.wheel-solo-status.is-bot {
  color: #ffffff;
}

.wheel-pvp-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 0 16px;
  border-radius: 24px;
  background: rgba(23, 29, 25, 0.96);
  border: 1px solid rgba(47, 223, 124, 0.34);
  box-shadow:
    inset 0 0 20px rgba(47, 223, 124, 0.13),
    0 0 28px rgba(47, 223, 124, 0.07),
    0 18px 34px rgba(0, 0, 0, 0.30);
  overflow: hidden;
}

.wheel-solo-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 0 16px;
  border-radius: 24px;
  background: rgba(23, 29, 25, 0.96);
  border: 1px solid rgba(47, 223, 124, 0.34);
  box-shadow:
    inset 0 0 20px rgba(47, 223, 124, 0.13),
    0 0 28px rgba(47, 223, 124, 0.07),
    0 18px 34px rgba(0, 0, 0, 0.30);
  overflow: hidden;
}

.wheel-pvp-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(47, 223, 124, 0.14), transparent 58%);
  background-size: 58px 58px, 58px 58px, auto;
  opacity: 0.42;
  pointer-events: none;
}

.wheel-solo-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(47, 223, 124, 0.14), transparent 58%);
  background-size: 58px 58px, 58px 58px, auto;
  opacity: 0.42;
  pointer-events: none;
}

.wheel-pvp-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.wheel-solo-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.wheel-solo-disc {
  position: absolute;
  inset: 7%;
  z-index: 2;
  border-radius: 50%;
  background: conic-gradient(from -90deg, rgb(255, 138, 42) 0deg 180deg, #434851 180deg 360deg);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 3px rgba(10, 12, 15, 0.22);
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-solo-disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.16), transparent 34%);
  pointer-events: none;
}

.wheel-solo-disc-center {
  width: 29%;
  font-size: clamp(34px, 7.2vw, 56px);
}

.wheel-solo-field-players {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-solo-slider {
  --wheel-solo-slider-progress: 50%;
  --wheel-solo-slider-color: rgb(255, 138, 42);
  --wheel-solo-slider-thumb-left: 50%;
  position: relative;
  width: 100%;
  height: 54px;
  margin: 0 0 18px;
}

.wheel-solo-slider-track,
.wheel-solo-slider-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.wheel-solo-slider-track {
  z-index: 1;
  background: rgba(11, 14, 18, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.wheel-solo-slider-fill {
  z-index: 3;
  width: var(--wheel-solo-slider-progress);
  right: auto;
  background: var(--wheel-solo-slider-color);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.wheel-solo-slider-dots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.wheel-solo-slider-dots-selected {
  z-index: 4;
}

.wheel-solo-slider-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.wheel-solo-slider-dots-selected .wheel-solo-slider-dot {
  background: #05070b;
  opacity: 0;
}

.wheel-solo-slider-dots-selected .wheel-solo-slider-dot.is-selected {
  opacity: 1;
}

.wheel-solo-slider-thumb {
  position: absolute;
  z-index: 5;
  left: var(--wheel-solo-slider-thumb-left);
  top: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(9, 12, 16, 0.94);
  box-shadow:
    inset 0 0 0 8px var(--wheel-solo-slider-color),
    0 10px 20px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.wheel-solo-slider-thumb::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(9, 12, 16, 0.98);
}

.wheel-solo-slider-input {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.wheel-solo-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.wheel-solo-slider-input::-moz-range-thumb {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.wheel-solo-slider.is-locked {
  opacity: 0.94;
}

.wheel-solo-slider.is-locked .wheel-solo-slider-input {
  pointer-events: none;
  cursor: default;
}

.wheel-solo-actions {
  margin-top: 0;
}

.wheel-pointer {
  position: absolute;
  top: 24px;
  left: 50%;
  z-index: 7;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid #f1f2f4;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.36));
  transform: translateX(-50%);
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  top: -28px;
  left: -14px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid rgba(12, 14, 15, 0.95);
  transform: translateY(-2px);
}

.wheel-disc {
  position: absolute;
  inset: 7%;
  z-index: 2;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -11.25deg,
    #aeb4c3 0deg 22.5deg,
    #5f667d 22.5deg 45deg
  );
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-disc.is-rotating {
  animation: wheel-spin-waiting 32s linear infinite;
}

.wheel-disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.16), transparent 34%);
  pointer-events: none;
}

.wheel-disc-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 27%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(8, 10, 12, 0.97);
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0;
  transform: translate(-50%, -50%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.wheel-disc-center.is-empty {
  color: transparent;
}

.wheel-pvp-field-players {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-field-avatar {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.34);
  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(255, 255, 255, 0.42);
  transform-origin: 50% 50%;
  box-sizing: border-box;
  isolation: isolate;
  will-change: transform;
}

.wheel-field-avatar.single {
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.36),
    0 0 0 3px rgba(255, 255, 255, 0.48);
}

.wheel-field-avatar img,
.wheel-field-avatar span {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.wheel-field-avatar img {
  display: block;
  object-fit: cover;
}

.wheel-field-avatar span {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(9px, 42%, 22px);
  font-weight: 900;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(0, 0, 0, 0.18));
}

.wheel-field-avatar.tiny {
  background: var(--wheel-player-color, #51e48a);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.44),
    0 3px 8px rgba(0, 0, 0, 0.26);
}

.wheel-field-avatar.tiny span {
  color: transparent;
  font-size: 0;
  background: var(--wheel-player-color, #51e48a);
}


@media (max-width: 390px) {
  .wheel-solo-slider {
    height: 50px;
  }

  .wheel-solo-slider-track,
  .wheel-solo-slider-fill {
    height: 18px;
  }

  .wheel-solo-slider-dot {
    width: 9px;
    height: 9px;
  }

  .wheel-solo-slider-thumb {
    width: 36px;
    height: 36px;
  }
}

@keyframes wheel-spin-waiting {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.wheel-history-strip .arena-history-bottom,
.wheel-players-panel .player-bet-percent {
  color: #51e48a;
}

.wheel-actions {
  margin-top: 0;
}


.rocket-game-screen {
  width: 100%;
}

.last-coefficients {
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  margin: 0 0 18px;
  padding: 0 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.42);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.last-coefficients span {
  flex: 0 0 auto;
}

.last-coefficients span:first-child {
  color: rgba(255, 255, 255, 0.82);
}

.game-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.primary-game-button {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #168cff 0%, #0876ee 100%);
  color: #ffffff;
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  box-shadow: 0 12px 26px rgba(0, 120, 255, 0.22);
  cursor: pointer;
}

.primary-game-button:active {
  transform: translateY(1px);
}

@media (max-width: 390px) {
  .wheel-mode-switch {
    gap: 5px;
    padding: 5px;
    margin-top: -54px;
  }

  .wheel-mode-button {
    min-width: 82px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 16px;
  }

  .wheel-pointer {
    top: 18px;
    border-left-width: 15px;
    border-right-width: 15px;
    border-top-width: 24px;
  }

  .wheel-pointer::after {
    top: -24px;
    left: -12px;
    border-left-width: 12px;
    border-right-width: 12px;
    border-top-width: 18px;
  }

  .wheel-disc {
    inset: 6%;
  }

  .wheel-disc-center {
    width: 29%;
    font-size: 15px;
  }

  .last-coefficients {
    gap: 22px;
    font-size: 13px;
  }

  .primary-game-button {
    min-height: 58px;
    font-size: 20px;
  }
}


.menu-button.close-mode {
  position: relative;
  gap: 0;
}

.menu-button.close-mode span {
  position: absolute;
  width: 28px;
  height: 4px;
  background: #ffffff;
}

.menu-button.close-mode span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-button.close-mode span:nth-child(2) {
  opacity: 0;
}

.menu-button.close-mode span:nth-child(3) {
  transform: rotate(-45deg);
}


.games-grid[hidden],
.rocket-game-screen[hidden],
.wheel-game-screen[hidden],
.is-hidden {
  display: none !important;
}


/* NAV_RESTORE_START */
.tab-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.tab-button.active::before {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.24);
}

.tab-button.active .tab-icon {
  opacity: 1;
  filter: none drop-shadow(0 0 10px rgba(255, 255, 255, 0.12));
  transform: translateY(-2px);
}

.tab-button.active .tab-label {
  color: #ffffff;
  font-weight: 900;
}
/* NAV_RESTORE_END */


/* CRASH_GAME_START */
.rocket-game-screen {
  width: 100%;
}

.game-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 6px 0 18px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(76, 174, 255, 0.38);
  box-shadow:
    inset 0 0 18px rgba(35, 165, 255, 0.16),
    0 0 28px rgba(35, 165, 255, 0.08);
  overflow: hidden;
  transition:
    border-color 0.75s ease,
    box-shadow 0.75s ease,
    background-color 0.75s ease;
}

.game-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(55, 145, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 145, 255, 0.12) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.48;
  pointer-events: none;
}


.game-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 34, 52, 0.58), rgba(74, 0, 10, 0.62));
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
}

.game-board.crashed::after {
  opacity: 1;
}

.game-board.crashed {
  background-color: rgba(74, 0, 10, 0.48);
  border-color: rgba(255, 62, 82, 0.62);
  box-shadow:
    inset 0 0 24px rgba(255, 35, 52, 0.30),
    0 0 30px rgba(255, 35, 52, 0.16);
}

.board-rocket,
.board-rocket-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(48%, 220px);
  height: min(48%, 220px);
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.game-board.countdown .board-rocket,
.game-board.crashed .board-rocket,
.board-rocket-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(48%, 220px);
  height: min(48%, 220px);
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.game-countdown {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

.game-board.running .game-countdown,
.game-board.crashed .game-countdown {
  display: none;
}

.last-coefficients {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
  width: 100%;
  margin: 0 0 18px;
  padding: 0 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.42);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.last-coefficients span {
  flex: 0 0 auto;
}

.last-coefficients span:first-child {
  color: rgba(255, 255, 255, 0.82);
}

.game-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.primary-game-button {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #168cff 0%, #0876ee 100%);
  color: #ffffff;
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  box-shadow: 0 12px 26px rgba(0, 120, 255, 0.22);
  cursor: pointer;
}

.primary-game-button.pending {
  opacity: 0.8;
}

.players-panel {
  margin-top: 26px;
  border-radius: 18px;
  background: rgba(31, 33, 34, 0.94);
  overflow: hidden;
}

.players-list {
  display: block;
  min-height: 92px;
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.no-players {
  padding: 30px 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.player-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.player-row:last-child {
  border-bottom: 0;
}

.player-avatar,
.player-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #34363a;
}

.player-avatar-fallback {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.player-main {
  min-width: 0;
}

.player-name {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-bet {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  font-weight: 650;
}

.player-result {
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.player-result.in-game,
.player-result.pending {
  background: rgba(255, 214, 0, 0.18);
  color: #ffd735;
}

.player-result.won {
  background: rgba(34, 210, 102, 0.16);
  color: #20d266;
}

.player-result.lost {
  background: rgba(255, 51, 78, 0.16);
  color: #ff3550;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  position: relative;
  width: min(100%, 340px);
  padding: 24px 18px 18px;
  border-radius: 22px;
  background: #202123;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.modal-title {
  padding: 8px 34px 18px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.modal-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.modal-input:focus {
  border-color: rgba(22, 140, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(22, 140, 255, 0.14);
}

.modal-save {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #168cff 0%, #0876ee 100%);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.modal-error {
  min-height: 20px;
  margin-top: 10px;
  color: #ff405b;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 390px) {
  .game-countdown {
    font-size: 68px;
  }

  .last-coefficients {
    gap: 20px;
    font-size: 15px;
  }

  .primary-game-button {
    min-height: 58px;
    font-size: 20px;
  }

  .no-players {
    font-size: 20px;
  }
}
/* CRASH_GAME_END */


.board-rocket-fallback {
  display: none;
}

.no-alpha-video .board-rocket {
  display: none;
}

.no-alpha-video .board-rocket-fallback {
  display: block;
}

.game-board.countdown .board-rocket-fallback,
.game-board.crashed .board-rocket-fallback {
  display: none;
}


/* SCROLL_ROCKET_FIX_START */
body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  height: auto !important;
  overflow: visible !important;
}


.content-area {
  padding-bottom: 28px;
}

.tab-page.active {
  display: block;
}

.rocket-game-screen {
  padding-bottom: 24px;
}

.game-board.countdown .board-rocket,
.game-board.countdown .board-rocket-fallback,
.game-board.crashed .board-rocket,
.game-board.crashed .board-rocket-fallback {
  display: none !important;
}

.game-board.running .game-countdown {
  display: none !important;
}

.game-board.running .board-rocket {
  display: block;
}

.no-alpha-video .game-board.running .board-rocket {
  display: none !important;
}

.no-alpha-video .game-board.running .board-rocket-fallback {
  display: block;
}
/* SCROLL_ROCKET_FIX_END */


/* AUTOBET_START */
.autobet-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 14px;
}

.autobet-button span:first-child {
  pointer-events: none;
}

.autobet-check {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 7px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.08);
}

.autobet-button.enabled .autobet-check::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 13px;
  border: solid #ffffff;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -58%) rotate(45deg);
  box-sizing: border-box;
}

.player-bet-kind {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
  font-weight: 750;
}
/* AUTOBET_END */





/* COEF_WAITING_ONLY_RAISE_START */
.rocket-game-screen {
  position: relative;
}

.board-coef-display {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 6;
  width: max-content;
  max-width: calc(100% - 24px);
  color: #ffffff;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: -1px;
  text-shadow:
    0 0 16px rgba(255, 255, 255, 0.14),
    0 0 28px rgba(22, 140, 255, 0.20);
  transform: translate(-50%, -100% );
  white-space: nowrap;
  pointer-events: none;
}

.board-coef-display.waiting {
  color: rgba(255, 255, 255, 0.72);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: none;
  transform: translate(-50%, calc(-100% - 8px));
}

@media (max-width: 390px) {
  .board-coef-display {
    font-size: 42px;
  }

  .board-coef-display.waiting {
    font-size: 26px;
  }
}
/* COEF_WAITING_ONLY_RAISE_END */

/* ARENA_GAME_START */
.arena-status-display.phase-finished {
  max-width: calc(100% - 44px);
  font-size: 16px;
  line-height: 1.16;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 390px) {
  .arena-status-display.phase-finished {
    font-size: 14px;
  }
}


.arena-game-screen {
  position: relative;
  width: 100%;
  padding-bottom: 24px;
}

.arena-board-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 6px 0 16px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(26, 27, 29, 0.96);
  border: 1px solid rgba(198, 128, 255, 0.34);
  box-shadow:
    inset 0 0 20px rgba(177, 92, 255, 0.14),
    0 0 28px rgba(177, 92, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.30);
  overflow: hidden;
}

.arena-board-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 58%);
  background-size: 58px 58px, 58px 58px, auto;
  opacity: 0.38;
  pointer-events: none;
}

.arena-playfield {
  position: absolute;
  inset: 20px;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(233, 28, 168, 0.84), rgba(34, 198, 255, 0.78));
  overflow: hidden;
}

.arena-camera-layer {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  transition: transform 0.12s linear;
  will-change: transform;
}

.arena-canvas,
.arena-avatars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.arena-canvas {
  display: block;
  z-index: 1;
}

.arena-canvas.empty {
  background:
    linear-gradient(135deg, rgba(233, 28, 168, 0.84), rgba(34, 198, 255, 0.78));
}

.arena-avatars {
  z-index: 2;
  pointer-events: none;
}

.arena-player-avatar {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  isolation: isolate;
}

.arena-player-avatar img,
.arena-player-avatar span {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.arena-player-avatar.tiny {
  background: var(--arena-player-color, #bb68ff);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.44),
    0 3px 8px rgba(0, 0, 0, 0.26);
}

.arena-player-avatar.tiny span {
  color: transparent;
  font-size: 0;
  background: var(--arena-player-color, #bb68ff);
}

.arena-player-avatar img {
  display: block;
  object-fit: cover;
}

.arena-player-avatar span {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(14px, 42%, 30px);
  font-weight: 900;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.16));
}

.arena-ball {
  --arena-ball-owner-color: #6c6077;
  --arena-ball-field-color: #d9ddff;
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.36) 24%, transparent 27%),
    radial-gradient(circle, #f8fbff 0%, #eef0ff 31%, var(--arena-ball-owner-color) 62%, var(--arena-ball-owner-color) 100%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    inset 0 0 0 6px rgba(0, 0, 0, 0.12),
    inset 0 0 0 12px rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.arena-ball[hidden] {
  display: none !important;
}

.arena-ball::before,
.arena-ball::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: var(--arena-ball-field-color, #d9ddff);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 1px 4px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.arena-ball-arrow {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: transparent;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.52);
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  opacity: 0;
}

.arena-ball-arrow::before {
  content: "➤";
  display: block;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-40px) rotate(-90deg);
}

.arena-ball.aiming .arena-ball-arrow {
  opacity: 1;
}

.arena-ball-name {
  z-index: 5;
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  max-width: 132px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-result-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(194, 86, 255, 0.62), rgba(77, 0, 112, 0.50));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.arena-board-frame.finished .arena-result-flash {
  opacity: 0.72;
  animation: arenaPurplePulse 1.2s ease-in-out infinite alternate;
}

@keyframes arenaPurplePulse {
  from { opacity: 0.18; }
  to { opacity: 0.52; }
}

.arena-history-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin: 0 0 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.arena-history-strip::-webkit-scrollbar {
  display: none;
}

.arena-history-card {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 34px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 158px;
  padding: 8px 10px;
  border-radius: 15px;
  background: rgba(31, 33, 34, 0.94);
  color: #ffffff;
}

.arena-history-card > img,
.arena-history-fallback {
  grid-row: 1 / 3;
  display: block;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, #bb68ff, #22c6ff);
}

.arena-history-fallback {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.arena-history-top {
  min-width: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-history-bottom {
  color: #5edfff;
  font-size: 13px;
  font-weight: 900;
}

.arena-actions {
  margin-top: 0;
}

.arena-cancel-button {
  background: linear-gradient(180deg, #8c4dff 0%, #642dcb 100%);
  box-shadow: 0 12px 26px rgba(132, 68, 255, 0.22);
}

.primary-game-button:disabled,
.arena-cancel-button:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

.arena-players-panel {
  margin-top: 20px;
}

.player-bet-percent {
  margin-left: 7px;
  color: #5edfff;
  font-weight: 850;
}

.games-grid[hidden],
.rocket-game-screen[hidden],
.arena-game-screen[hidden],
.wheel-game-screen[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 390px) {
  .arena-board-frame {
    padding: 18px;
  }

  .arena-playfield {
    inset: 18px;
  }

  .arena-ball {
    width: 40px;
    height: 40px;
  }

  .arena-history-card {
    min-width: 148px;
  }
}
/* ARENA_GAME_END */


/* TOPS_PAGE_START */
.tops-page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100dvh - 206px);
  margin-top: -16px;
  padding-bottom: 92px;
}


.tops-list-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 470px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(38, 38, 40, 0.82) 0%, rgba(27, 28, 29, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.tops-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 58%);
}

.tops-header[hidden] {
  display: none !important;
}

.tops-selected-title {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 27px;
  font-weight: 950;
  line-height: 1.12;
  text-align: center;
  text-wrap: balance;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tops-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 400px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tops-status {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}

.tops-status[hidden] {
  display: none !important;
}

.top-player-row {
  display: grid;
  grid-template-columns: 30px 44px minmax(0, 1fr) minmax(92px, auto);
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
  background: rgba(31, 33, 34, 0.58);
}

.top-player-row:last-child {
  border-bottom: 0;
}

.top-player-rank {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.top-player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #34363a;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.top-player-avatar-fallback {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(145deg, #383d40, #17191b);
}

.top-player-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-player-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.tops-switcher-wrap {
  position: fixed;
  left: max(18px, calc((100vw - 480px) / 2 + 18px));
  right: max(18px, calc((100vw - 480px) / 2 + 18px));
  bottom: calc(100px + var(--safe-bottom));
  z-index: 19;
  width: auto;
  max-width: 444px;
  margin: 0 auto;
  pointer-events: none;
}

.tops-switcher {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 7px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(33, 33, 33, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.tops-arrow-button,
.tops-current-button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tops-arrow-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2b2b2d 0%, #222224 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.tops-arrow-button:active,
.tops-current-button:active,
.tops-menu-item:active {
  transform: translateY(1px) scale(0.99);
}

.tops-current-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 6px 9px 6px 15px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2f3032 0%, #242527 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}

.tops-current-button[aria-expanded="true"] {
  background: linear-gradient(180deg, #353638 0%, #28292b 100%);
}

.tops-current-name {
  display: -webkit-box;
  min-width: 0;
  max-height: 2.2em;
  overflow: hidden;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tops-menu-title {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.tops-current-chevron {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-1px);
  opacity: 0.88;
}

.tops-switcher-wrap.menu-open .tops-current-chevron {
  transform: translateY(1px);
}

.tops-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 7px;
  width: 100%;
  max-height: min(330px, calc(100dvh - 236px));
  padding: 8px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(33, 33, 33, 0.98);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.44);
  overflow-y: auto;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(18px);
}

.tops-select-menu[hidden] {
  display: none !important;
}

.tops-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.052);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.tops-menu-item.active {
  color: #ffffff;
  background: linear-gradient(180deg, #2fdf7c 0%, #1db862 100%);
  box-shadow: 0 8px 18px rgba(34, 178, 96, 0.22);
}

.tops-menu-empty {
  padding: 16px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 390px) {
  .tops-page {
    gap: 9px;
    min-height: calc(100dvh - 198px);
    margin-top: -18px;
    padding-bottom: 94px;
  }

  .tops-promo-carousel .promo-carousel-viewport,
  .tops-promo-carousel .promo-banner {
    border-radius: 16px;
  }

  .tops-promo-carousel .promo-banner {
    min-height: 48px;
    padding: 9px 12px;
  }

  .tops-promo-carousel .promo-banner-title {
    font-size: 14px;
  }

  .tops-list-panel {
    min-height: 440px;
  }

  .tops-header {
    min-height: 78px;
    padding: 18px 15px 16px;
  }

  .tops-selected-title {
    font-size: 24px;
  }

  .tops-list {
    max-height: calc(100dvh - 370px);
  }

  .top-player-row {
    grid-template-columns: 42px minmax(0, 1fr) minmax(78px, auto);
    gap: 9px;
    padding: 12px 11px;
  }

  .top-player-avatar {
    width: 42px;
    height: 42px;
  }

  .top-player-value {
    min-width: 78px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .tops-switcher-wrap {
    left: 14px;
    right: 14px;
    bottom: calc(98px + var(--safe-bottom));
  }

  .tops-switcher {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 6px;
    min-height: 58px;
    padding: 6px;
    border-radius: 20px;
  }

  .tops-arrow-button {
    height: 46px;
    border-radius: 15px;
    font-size: 31px;
  }

  .tops-current-button {
    grid-template-columns: minmax(0, 1fr) 28px;
    min-height: 46px;
    padding: 5px 8px 5px 12px;
    border-radius: 15px;
    font-size: 15px;
  }

  .tops-current-chevron {
    font-size: 25px;
  }
}
/* TOPS_PAGE_END */




