.balloon-page {
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(146, 64, 14, .34), transparent 42%),
    linear-gradient(180deg, #08080c 0%, #120b0a 62%, #050506 100%);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.balloon-page * {
  box-sizing: border-box;
}

.balloon-page button,
.balloon-page a,
.balloon-page .btn-bet,
.balloon-page .dock-mini-btn,
.balloon-page .chip {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
}

.balloon-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 8px 14px;
}

.balloon-cabinet {
  position: relative;
  width: min(1120px, 100%);
  height: calc(100dvh - 16px);
  min-height: 500px;
  max-height: 760px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 38px 36px minmax(250px, 1fr) auto;
  border: 1px solid rgba(244,215,124,.18);
  border-radius: 8px;
  background: rgba(13,13,19,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06);
}

.balloon-cabinet > .balloon-hud,
.balloon-cabinet > .history-strip,
.balloon-cabinet > .canvas-panel,
.balloon-cabinet > .balloon-control-dock {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.balloon-hud.top-bar {
  position: relative;
  z-index: 20;
  min-height: 38px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: #050507;
  border-bottom: 1px solid rgba(244,215,124,.18);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.balloon-game-select,
.balloon-how,
.balloon-mode,
.balloon-menu-button {
  height: 28px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 900;
  font-size: .72rem;
  line-height: 28px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: #fff;
}

.balloon-game-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #f4d77c;
  font-size: 1.02rem;
  box-shadow: none;
}

.balloon-game-select svg {
  display: block;
}

.balloon-how,
.balloon-mode {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(244,215,124,.22);
  color: #f4d77c;
  box-shadow: none;
}

.balloon-how {
  justify-self: end;
  display: none;
}

.balloon-mode {
  display: none;
}

.balloon-hud .player-info {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  font-size: .78rem;
}

.balloon-hud .username {
  color: rgba(255,255,255,.7);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balloon-hud .balance {
  flex: 0 1 auto;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(244,215,124,.25);
  border-radius: 8px;
  background: rgba(0,0,0,.48);
  color: #f4d77c;
  font-weight: 900;
}

.balloon-menu-button {
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #f2f2f2;
  box-shadow: none;
}

.balloon-page .history-strip {
  position: relative;
  z-index: 18;
  min-height: 28px;
  margin: 4px 8px;
  padding: 4px 8px;
  background: rgba(5,5,8,.78);
  border: 1px solid rgba(244,215,124,.16);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.balloon-page .history-strip .strip-label {
  color: rgba(255,255,255,.58);
  font-weight: 900;
}

.balloon-page #historyPills {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.balloon-page #historyPills::-webkit-scrollbar {
  display: none;
}

.balloon-page .crash-pill {
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(244,215,124,.34);
  background: rgba(0,0,0,.54);
  color: #f4d77c;
  font-size: .72rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.balloon-page .crash-pill.low,
.balloon-page .crash-pill.mid,
.balloon-page .crash-pill.high {
  background: rgba(0,0,0,.54);
  color: #f4d77c;
  border-color: rgba(244,215,124,.34);
}

.balloon-page .canvas-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  background: #e9bd72;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

#balloonCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.balloon-page .phase-overlay {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  pointer-events: none;
  text-align: center;
  inset: 0;
  justify-content: center;
  transform: translateY(-4px);
}

.balloon-page .multiplier-display {
  font-size: clamp(2.3rem, 5.1vw, 4rem);
  letter-spacing: 0;
  text-shadow: 0 4px 12px rgba(0,0,0,.28);
  color: #fff;
}

.balloon-page .multiplier-display.green,
.balloon-page .multiplier-display.dim,
.balloon-page .multiplier-display.red {
  color: #fff;
}

.balloon-page .crash-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: rgba(255,255,255,.16);
}

.balloon-page .phase-label {
  display: none;
  padding: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffbd61, #e58a32);
  color: #3d1d08;
  text-transform: none;
  font-size: .88rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 6px 0 rgba(104,62,25,.24), 0 10px 22px rgba(0,0,0,.2);
}

.balloon-control-dock {
  position: relative;
  z-index: 24;
  min-height: 86px;
  padding: 7px 10px 8px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, .9fr);
  grid-template-rows: auto auto;
  gap: 10px;
  align-items: end;
  background: rgba(13,13,19,.94);
  border-top: 1px solid rgba(244,215,124,.18);
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.balloon-idle-hint {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: min(520px, 100%);
  min-height: 24px;
  padding: 4px 12px;
  border: 1px solid rgba(244,215,124,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f4d77c;
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.16);
}

.balloon-idle-hint.holding {
  border-color: rgba(244,215,124,.32);
  background: rgba(244,215,124,.08);
  color: #f4d77c;
}

.balloon-idle-hint.needs-action {
  border-color: rgba(244,215,124,.55);
  background: rgba(244,215,124,.13);
}

.balloon-hand-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f4d77c;
  color: #0b0b10;
  font-size: .82rem;
  line-height: 1;
  box-shadow: 0 0 0 0 rgba(244,215,124,.34);
  animation: balloonHandPulse 1s ease-in-out infinite;
}

@keyframes balloonHandPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(244,215,124,.34); }
  50% { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(244,215,124,0); }
}

.balloon-control-dock .bet-card {
  min-width: 0;
  max-width: 100%;
  background: rgba(13,13,19,.82);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 7px 10px;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

.balloon-control-dock .bet-card {
  display: grid;
  gap: 6px;
}

.balloon-control-dock .bet-input-row {
  display: grid;
  grid-template-columns: 44px minmax(86px, 1fr) 32px 32px;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.balloon-control-dock .bet-input-row label {
  color: rgba(255,255,255,.86);
  text-transform: none;
  font-weight: 900;
  font-size: .72rem;
  text-align: center;
}

.balloon-control-dock input#betAmount {
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.38);
  color: #fff;
  font-weight: 900;
  text-align: center;
  font-size: .92rem;
}

.dock-mini-btn {
  width: 32px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #f2f2f2;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.balloon-control-dock #betAmountHint {
  min-height: 14px;
  color: #ffe5e5;
  font-size: .68rem;
  text-align: center;
}

.balloon-page .chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.balloon-page .chips::-webkit-scrollbar {
  display: none;
}

.balloon-page .auto-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.balloon-page .auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.balloon-page .auto-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.balloon-page .auto-toggle span {
  position: relative;
  width: 30px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(244,215,124,.45);
  background: rgba(255,255,255,.06);
  transition: background .15s, border-color .15s;
}

.balloon-page .auto-toggle span::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 3px;
  top: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  transition: transform .15s, background .15s;
}

.balloon-page .auto-toggle input:checked + span {
  background: rgba(244,215,124,.28);
  border-color: #f4d77c;
}

.balloon-page .auto-toggle input:checked + span::after {
  transform: translateX(13px);
  background: #f4d77c;
}

.balloon-page .auto-toggle em {
  font-style: normal;
}

.balloon-page .auto-row > input {
  flex: 1;
  min-width: 72px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
}

.balloon-page .auto-row > input:focus {
  outline: none;
  border-color: rgba(244,215,124,.78);
}

.balloon-page .auto-row > input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.balloon-page .chip {
  flex: 0 0 auto;
  min-width: 52px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f2f2f2;
  font-size: .74rem;
  font-weight: 900;
}

.balloon-page .btn-bet {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  border: 0;
  color: #fff;
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  cursor: pointer;
}

.balloon-page .btn-bet:active:not(:disabled) {
  transform: translateY(1px) scale(.99);
}

.balloon-page .btn-bet:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.balloon-page .btn-place {
  display: inline-flex;
  background: linear-gradient(135deg, #c9a84c, #f4d77c);
  color: #0b0b10;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 26px rgba(0,0,0,.28);
}

.balloon-action-cluster {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.balloon-action-cluster.cashout-visible {
  grid-template-columns: 1fr;
}

.balloon-action-cluster .btn-bet {
  width: 100%;
}

.balloon-page .btn-heat {
  margin: 0;
  min-width: 0;
  background: #1f7a3d;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  -webkit-user-drag: none;
  cursor: pointer;
}

.balloon-page .btn-heat::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: radial-gradient(circle at 60% 65%, #d9ffd0 0 18%, transparent 19%), #f6fff1;
}

.balloon-page .btn-heat.heating {
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 24px rgba(121,200,69,.55), 0 4px 0 rgba(0,0,0,.28);
}

.balloon-page .btn-heat.needs-action {
  background: #256f3f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 2px rgba(244,215,124,.2), 0 10px 26px rgba(0,0,0,.28);
}

.balloon-btn-press-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #f4d77c;
  color: #0b0b10;
  font-size: .8rem;
  line-height: 1;
  animation: balloonButtonPressPulse 1s ease-in-out infinite;
}

@keyframes balloonButtonPressPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.08); }
}

.balloon-page .btn-cashout {
  background: #8b6d16;
  color: #fff;
}

.balloon-hidden-status {
  display: none;
}

.balloon-page .history-section {
  width: min(1120px, calc(100% - 28px));
  margin: 10px auto 28px;
}

.balloon-page .hist-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.balloon-page .hist-kicker {
  color: rgba(255,255,255,.5);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.balloon-page .hist-panel {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(13,13,19,.8);
  overflow: hidden;
}

.balloon-page .hist-loading {
  padding: 14px;
  color: rgba(255,255,255,.58);
  font-size: .84rem;
}

.balloon-page .hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

.balloon-page .hist-table th,
.balloon-page .hist-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
}

.balloon-page .hist-table th {
  color: rgba(255,255,255,.52);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.balloon-page .hist-table td {
  color: rgba(255,255,255,.86);
}

.balloon-page .mybets-controls,
.balloon-page .mybets-filters,
.balloon-page .mybets-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.balloon-page .mybets-controls {
  justify-content: space-between;
  margin: 10px 0;
}

.balloon-page .mybets-filter-btn,
.balloon-page .mybets-page-btn,
.balloon-page .mybets-month-input {
  min-height: 30px;
  border: 1px solid rgba(244,215,124,.28);
  border-radius: 7px;
  background: rgba(255,255,255,.06);
  color: #f4d77c;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  padding: 5px 10px;
}

.balloon-page .mybets-filter-btn.active {
  background: rgba(244,215,124,.18);
  border-color: rgba(244,215,124,.52);
}

.balloon-page .mybets-page-label {
  color: rgba(255,255,255,.56);
  font-size: .78rem;
}

.balloon-my-bets-panel {
  position: fixed;
  z-index: 260;
  inset: 56px max(14px, calc((100vw - 980px) / 2)) 18px;
  width: auto !important;
  margin: 0 !important;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(244,215,124,.24);
  border-radius: 10px;
  background: rgba(9,9,14,.96);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}

.balloon-panel-close {
  border: 1px solid rgba(244,215,124,.34);
  border-radius: 7px;
  background: rgba(244,215,124,.12);
  color: #f4d77c;
  padding: 7px 12px;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.balloon-page .aviator-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.45);
  z-index: 300;
}

.balloon-page .aviator-modal-overlay.show {
  display: block;
}

.balloon-page .aviator-modal-overlay {
  z-index: 300;
}

.balloon-page .aviator-menu-box {
  position: absolute;
  top: 48px;
  right: max(16px, calc((100vw - 1120px) / 2 + 16px));
  left: auto;
  transform: none;
  width: min(280px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(244,215,124,.24);
  border-radius: 10px;
  background: rgba(9,9,14,.98);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}

.balloon-page .aviator-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
}

.balloon-page .aviator-menu-list {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.balloon-page .aviator-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.9);
  padding: 10px;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.balloon-page .aviator-menu-icon {
  width: 24px;
  text-align: center;
  color: #f4d77c;
}

.balloon-page .award-badge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  width: 100%;
  border: 1px solid rgba(244,215,124,.36);
  border-radius: 8px;
  background: rgba(244,215,124,.12);
  color: #f4d77c;
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}

.balloon-page .award-badge-btn.active {
  background: linear-gradient(135deg, #c9a84c, #f4d77c);
  border-color: rgba(244,215,124,.7);
  color: #0b0b10;
}

@media (max-width: 860px) {
  .balloon-shell {
    align-items: start;
    padding: 8px;
  }

  .balloon-cabinet {
    height: calc(100dvh - 16px);
    min-height: 500px;
    max-height: none;
    grid-template-rows: 38px 34px minmax(230px, 1fr) auto;
  }

  .balloon-hud.top-bar {
    min-height: 38px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .balloon-mode {
    display: none;
  }

  .balloon-how {
    min-width: 110px;
    justify-self: end;
  }

  .balloon-hud .username {
    display: none;
  }

  .balloon-control-dock {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    padding: 7px;
  }

  .balloon-hud .player-info {
    gap: 6px;
  }

  .balloon-control-dock .bet-card {
    border-radius: 8px;
  }

  .balloon-action-cluster {
    grid-template-columns: 1fr;
  }

  .balloon-action-cluster.cashout-visible {
    grid-template-columns: 1fr;
  }

  .balloon-page .phase-overlay { inset: 0; }
}

@media (max-width: 560px) {
  .balloon-hud.top-bar {
    min-height: 36px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .balloon-how {
    display: none;
  }

  .balloon-game-select {
    font-size: 1rem;
    width: 32px;
    min-width: 32px;
  }

  .balloon-hud .balance {
    font-size: .72rem;
    padding-inline: 8px;
    max-width: 92px;
  }

  .balloon-cabinet {
    grid-template-rows: 36px 32px minmax(210px, 1fr) auto;
  }

  .balloon-control-dock .bet-input-row {
    grid-template-columns: 38px minmax(72px, 1fr) 30px 30px;
  }

  .balloon-page .chip {
    min-width: 44px;
  }

  .balloon-page .btn-bet {
    min-height: 40px;
  }
}

.free-bet-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  color: #121212;
  background: #ffd740;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: .02em;
}
