/* ── Aviator Game Styles ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #08080c;
  --surface:   rgba(13,13,19,.82);
  --surface2:  rgba(255,255,255,.06);
  --border:    rgba(255,255,255,.12);
  --accent:    #46d47b;
  --accent2:   #ff5a5f;
  --yellow:    #f4d77c;
  --text:      #f2f2f2;
  --text-dim:  rgba(255,255,255,.58);
  --radius:    8px;
}

body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(70,32,14,.72), transparent 42%),
    linear-gradient(180deg, #0b0b10 0%, #120b0a 55%, #07070a 100%);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(9,9,14,.84);
  border-bottom: 1px solid rgba(244,215,124,.18);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  text-decoration: none;
  border: 1px solid rgba(244,215,124,.28);
  background: linear-gradient(180deg, rgba(244,215,124,.12), rgba(201,168,76,.04));
  border-radius: 8px;
  padding: 0;
  color: var(--yellow);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.18);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.top-bar .logo:hover {
  border-color: rgba(244,215,124,.5);
  background: linear-gradient(180deg, rgba(244,215,124,.18), rgba(201,168,76,.07));
}

.top-bar .logo:active { transform: translateY(1px); }

.top-bar .logo svg { width: 22px; height: 22px; }

.top-bar .player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .85rem;
}

.top-bar .balance {
  background: var(--surface2);
  border: 1px solid rgba(244,215,124,.25);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 800;
  color: var(--yellow);
}

.top-bar .username { color: var(--text-dim); }

.aviator-top-menu-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(244,215,124,.3);
  background: rgba(244,215,124,.08);
  color: var(--yellow);
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
}

.aviator-top-menu-btn:hover {
  border-color: rgba(244,215,124,.55);
  background: rgba(244,215,124,.14);
}

/* ── History Strip ── */
.history-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(8,8,12,.66);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.history-strip .strip-label {
  font-size: .68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  margin-right: 4px;
}

#historyPills {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#historyPills::-webkit-scrollbar { display: none; }

.history-strip.expanded {
  align-items: flex-start;
}

.history-strip.expanded #historyPills {
  flex-wrap: wrap;
  overflow: visible;
  max-height: none;
}

.history-expand-btn {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  width: 42px;
  height: 34px;
  min-width: 42px;
  border: 1px solid rgba(244,215,124,.24);
  border-radius: 8px;
  background: rgba(244,215,124,.08);
  color: var(--yellow);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.crash-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border-radius: 0;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.crash-pill.low   { color: #38bdf8; }
.crash-pill.mid   { color: #d946ef; }
.crash-pill.high  { color: var(--accent2); }

/* ── Main Layout ── */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  padding: 14px 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Canvas Panel ── */
.canvas-panel {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

#aviatorCanvas {
  display: block;
  width: 100%;
  height: 280px;
}

.phase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.multiplier-display {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: -2px;
  transition: color .2s;
  text-shadow: 0 0 30px currentColor;
  line-height: 1;
}
.multiplier-display.green { color: var(--accent); }
.multiplier-display.red   { color: var(--accent2); }
.multiplier-display.yellow { color: var(--yellow); }
.multiplier-display.blue { color: #38bdf8; }
.multiplier-display.magenta { color: #d946ef; }
.multiplier-display.dim   { color: var(--text-dim); }

.phase-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.countdown-display {
  min-width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,15,.86);
  border: 1px solid rgba(244,215,124,.35);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--yellow);
  box-shadow: 0 8px 22px rgba(0,0,0,.38);
}

.crash-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 82, 82, 0);
  pointer-events: none;
  transition: background .3s;
}
.crash-flash.active { background: rgba(255, 82, 82, 0.25); }

/* ── Side Panel ── */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Bet Card ── */
.bet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.bet-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.bet-card-title-row h3,
.bet-card h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 0;
}

.aviator-award-host {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.aviator-award-host:empty {
  display: none;
}

.bet-card-title-row span {
  font-size: .7rem;
  color: var(--yellow);
  font-weight: 800;
}

.bet-slots-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bet-slot {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0,0,0,.14);
  min-width: 0;
}

.bet-slot-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 34%);
  gap: 8px;
  align-items: stretch;
}

.bet-slot-left {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "step"
    "chips"
    "auto"
    "hint";
  gap: 6px;
  align-items: center;
}

.bet-slot-head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.bet-slot-head span {
  color: var(--text);
  font-size: .82rem;
  font-weight: 900;
}

.bet-slot-head small {
  color: var(--yellow);
  font-size: .7rem;
  font-weight: 800;
  min-height: 1em;
}

.bet-amount-hint {
  grid-area: hint;
  font-size: .75rem;
  color: #ef4444;
  margin: 0;
  line-height: 1.1;
  display: none;
}

.bet-amount-hint:not(:empty) {
  display: block;
}

.bet-stepper {
  grid-area: step;
  min-width: 0;
  height: 36px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(244,215,124,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}

.bet-step-btn {
  height: 28px;
  border: 1px solid rgba(244,215,124,.24);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: var(--yellow);
  font: inherit;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.bet-stepper input {
  min-width: 0;
  height: 28px;
  border: 0;
  border-radius: 5px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
  padding: 0 4px;
  outline: none;
  cursor: default;
  caret-color: transparent;
  user-select: none;
}

.chips {
  grid-area: chips;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 0;
  align-content: center;
  min-width: 0;
}

.chip {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 3px 7px;
  border-radius: 14px;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .1s, border-color .1s;
}
.chip:hover,
.chip.active { background: rgba(244,215,124,.14); border-color: rgba(244,215,124,.5); color: var(--yellow); }
.chip:disabled,
.bet-step-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.auto-row {
  grid-area: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  max-width: 220px;
}
.auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--text-dim);
  white-space: nowrap;
  font-weight: 800;
  cursor: pointer;
}

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

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

.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;
}

.auto-toggle input:checked + span {
  background: rgba(244,215,124,.28);
  border-color: var(--yellow);
}

.auto-toggle input:checked + span::after {
  transform: translateX(13px);
  background: var(--yellow);
}

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

.auto-toggle:has(input:disabled) {
  opacity: .55;
  cursor: not-allowed;
}

.auto-row > input {
  flex: 1;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 6px;
  color: var(--text);
  font-size: .8rem;
  min-width: 0;
}
.auto-row > input:focus { outline: none; border-color: var(--yellow); }
.auto-row > input:disabled { opacity: .55; cursor: not-allowed; }

.btn-bet {
  width: 100%;
  min-height: 76px;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  margin-top: 0;
}
.btn-bet:active { transform: scale(.97); }
.btn-bet:disabled { opacity: .4; cursor: not-allowed; }

.btn-place   { background: #1f7a3d;  color: #fff; }
.btn-cancel  { background: #8e2f34; color: #fff; }
.btn-locked  { background: rgba(255,255,255,.12); color: var(--text-dim); border: 1px solid var(--border); }
.btn-cashout { background: #8b6d16; color: #fff; }
.btn-invalid { background: #7f1d1d; color: #fca5a5; cursor: not-allowed; }
.btn-place:hover:not(:disabled)   { opacity: .88; }
.btn-cancel:hover:not(:disabled)  { opacity: .88; }
.btn-cashout:hover:not(:disabled) { opacity: .88; }

.av-award-btn {
  width: auto; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,180,0,.45); background: rgba(255,180,0,.1);
  color: #ffca28; font-size: .78rem; font-weight: 900;
  cursor: pointer; transition: all .2s; margin-bottom: 0;
  white-space: nowrap;
}
.av-award-btn:hover { background: rgba(255,180,0,.22); border-color: #ffca28; }

.bet-status {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  display: none;
}
.bet-status.cashed { background: rgba(0,230,118,.15); color: var(--accent); display: block; }
.bet-status.active { background: rgba(255,215,64,.15); color: var(--yellow); display: block; }
.bet-status.error  { background: rgba(244,215,124,.12); color: var(--yellow); display: block; }

/* ── Live Bets Card ── */
.livebets-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.livebets-card h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.livebets-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.livebet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
  gap: 6px;
}
.livebet-row:last-child { border-bottom: none; }
.livebet-row .lbuser { color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livebet-row .lbamt  { font-weight: 600; color: var(--accent); flex-shrink: 0; }
.livebet-row .lbauto { font-size: .7rem; color: var(--yellow); flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  body {
    min-height: 100dvh;
    padding-bottom: 0;
  }

  .top-bar {
    padding: 10px 12px;
  }

  .top-bar .username {
    display: none;
  }

  .history-strip {
    padding: 7px 12px;
  }

  .main {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  #aviatorCanvas { height: 230px; }
  .multiplier-display { font-size: 2.8rem; }

  .side-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .livebets-card {
    max-height: 180px;
  }
}

@media (max-width: 560px) {
  .bet-slot-main {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .btn-bet {
    min-height: 88px;
  }
}

/* ── History Section ── */
.history-section {
  max-width: 1100px;
  margin: 12px auto 24px;
  padding: 0 16px;
  width: 100%;
}

.aviator-bottom-stats {
  width: min(1100px, 100%);
  margin: 0 auto 18px;
  padding: 0 16px;
}

.bottom-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bottom-stats-head h2 {
  font-size: .95rem;
  line-height: 1.15;
}

.bottom-stats-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bottom-stats-panel {
  min-height: 128px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.aviator-bottom-stats .top-list {
  max-height: 190px;
}

.aviator-bottom-stats #bottomHistChart {
  display: block;
  width: 100%;
  height: 160px;
}

.stats-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 16px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
}

.stats-modal-box {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
}

.history-section .stats-modal-close {
  position: static;
  flex: 0 0 auto;
}

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

.hist-kicker {
  color: var(--yellow);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 2px;
}

.hist-heading-row h2 {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.2;
}

.hist-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  min-height: 240px;
}

.stats-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.stats-subtab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.stats-subtab.active {
  background: rgba(255,255,255,.1);
  color: var(--text);
  border-color: rgba(255,255,255,.25);
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
}
.top-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.top-list-row:last-child { border-bottom: none; }
.top-list-rank {
  font-size: .8rem;
  min-width: 26px;
  text-align: center;
}
.top-list-time {
  margin-left: auto;
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
}

.top-results-card {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.top-results-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: .04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.top-results-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.top-result-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
}
.top-result-rank {
  font-size: .8rem;
  min-width: 20px;
}

/* ── Chart ── */
.chart-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
  font-size: .78rem;
}

.chart-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-stat .cs-label { color: var(--text-dim); font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; }
.chart-stat .cs-value { font-weight: 700; font-size: .95rem; }
.chart-stat .cs-value.green { color: var(--accent); }
.chart-stat .cs-value.red   { color: var(--accent2); }
.chart-stat .cs-value.yellow{ color: var(--yellow); }

.chart-wrap {
  position: relative;
  overflow: hidden;
}

#histChart {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
}

.chart-tooltip {
  position: fixed;
  background: #1e2530;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: .78rem;
  color: var(--text);
  pointer-events: none;
  display: none;
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.hist-loading {
  color: var(--text-dim);
  font-size: .85rem;
  text-align: center;
  padding: 24px 0;
}

.hist-inline-loading {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  font-size: .78rem;
  padding: 4px 0;
}

.mybets-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.mybets-filters {
  display: flex;
  gap: 6px;
}

.mybets-filter-btn,
.mybets-page-btn,
.mybets-month-input {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--text-dim);
  border-radius: 5px;
  font-size: .78rem;
}

.mybets-filter-btn {
  flex: 1;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}

.mybets-filter-btn.active,
.mybets-filter-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(0,230,118,.10);
}

.mybets-month-input {
  width: 100%;
  padding: 7px 9px;
  color: var(--text);
}

.mybets-month-input:focus {
  outline: none;
  border-color: var(--accent);
}

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

.hist-table thead th {
  color: var(--text-dim);
  text-align: left;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.hist-table tbody tr { border-bottom: 1px solid rgba(48,54,61,.5); }
.hist-table tbody tr:last-child { border-bottom: none; }
.hist-table tbody tr:hover { background: rgba(255,255,255,.02); }

.hist-table td {
  padding: 7px 10px;
  color: var(--text);
}

.mybets-table th,
.mybets-table td {
  white-space: nowrap;
}

.hist-table td.mult-low  { color: #38bdf8; font-weight: 700; }
.hist-table td.mult-mid  { color: #d946ef; font-weight: 700; }
.hist-table td.mult-high { color: #ff5252; font-weight: 700; }

.hist-table td.status-won    { color: #00e676; }
.hist-table td.status-lost   { color: #ff5252; }
.hist-table td.status-pending { color: #ffd740; }
.hist-table td.yellow { color: #ffd740; font-weight: 700; }
.hist-table td.blue { color: #38bdf8; font-weight: 700; }
.hist-table td.magenta { color: #d946ef; font-weight: 700; }
.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; }

.mybets-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(48,54,61,.5);
}

.mybets-page-btn {
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 700;
}

.mybets-page-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.mybets-page-label {
  color: var(--text-dim);
  font-size: .78rem;
  white-space: nowrap;
}

.aviator-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(4px);
}

.aviator-menu-box {
  width: min(360px, 100%);
  position: relative;
  background: rgba(13,13,19,.96);
  border: 1px solid rgba(244,215,124,.20);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.58);
}

.aviator-menu-box h2 {
  color: var(--yellow);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 14px;
}

.aviator-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  cursor: pointer;
}

.aviator-modal-close:hover {
  color: var(--accent2);
  border-color: rgba(255,90,95,.45);
}

.aviator-menu-list {
  display: grid;
  gap: 8px;
}

.aviator-menu-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
  text-align: left;
}

.aviator-menu-item:hover {
  border-color: rgba(244,215,124,.38);
  background: rgba(244,215,124,.08);
}

.aviator-menu-item.muted {
  opacity: .6;
}

.aviator-menu-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .history-section,
  .aviator-bottom-stats { padding: 10px; }
  .bottom-stats-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .bottom-stats-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .stats-modal-box { padding: 14px; }
  .mybets-controls { grid-template-columns: 1fr; }
  .mybets-table {
    font-size: .74rem;
  }
  .mybets-table thead th,
  .mybets-table td {
    padding-left: 5px;
    padding-right: 5px;
  }
}
